?
Solved

New app on Tomcat 5.0.19

Posted on 2004-03-23
16
Medium Priority
?
343 Views
Last Modified: 2013-11-24
I am converting a project containg JSP and servlets from Tomcat 3.3 to 5.0.19
I have moved my web application under the webapps directory and the initial web page is found and comes up ok but when the first servlet comes up I get an error from Tomcat
HTTP Status 404 /insidezos20/servlet/checkuser
Description: The rquested resource (/insidezos20/servlet/checkuser) is not available


Any configuration in the web.xml or server.xml

Any help please ???

0
Comment
Question by:pouli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 4
  • +2
16 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 10661087
Make sure you've moved ALL your files
0
 

Author Comment

by:pouli
ID: 10661456
yes,

I have moved them. What else could be ?
0
 
LVL 35

Expert Comment

by:girionis
ID: 10661535
I guess you have also moved the web.xml file. Can you make sure that the checkuser servlet (I guess it;s a servlet) is defined in your web.xml file? Also in Tomcat 5.0.19 you do not need the servlet.xml file.
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Author Comment

by:pouli
ID: 10661632
   <servlet-mapping>
        <servlet-name>checkuser</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>


It is in the web.xml file
0
 
LVL 35

Expert Comment

by:girionis
ID: 10661827
Do you also have

<servlet>
    <servlet-name>...</servlet-name>
    <servlet-class>...</servlet-class>
</servlet>

tags?
0
 

Author Comment

by:pouli
ID: 10661953
It seems that no.

Why it was working with the old version though?
0
 
LVL 35

Expert Comment

by:girionis
ID: 10662097
Not sure, different settings probably. It's a very long time since I last used Tomcat 3.3, I do not remember details but I *think* you didn't have to specify the <servlet-name> and <servlet-class> in your web.xml. It could find the servlets as long as they were in the WEB-INF/classes folder.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10662122
Isn't it that it can find the web apps if they're in the webapps dir and through the app archive  find the servlets?
0
 

Author Comment

by:pouli
ID: 10662154
CEHJ sorry could you explain better what you mean??
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10662191
That's really a semi-rhetorical(?) question to girionis. Generally there seems to be less config to worry about
0
 
LVL 35

Expert Comment

by:girionis
ID: 10662244
> Isn't it that it can find the web apps if they're in the webapps dir and through the app archive  find the servlets?

It's weird what's going on. AFAIR Tomcat 3.3 needed to servlet.xml file in order to find the web application but could implicitly find a servlet under the web app. On the other hand Tomcat 5.0 (I think this feature was availble after the 4.0 version) does not need a servlet.xml file (can find all the web-apps automatically as long as they are under the web-apps folder) to load the web-app but it does need to explicitly define a servlet in the web.xml file.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 10662370
Well i think it's a general move in the direction of individual config as opposed to global, which i think is probably a good thing, although it feels a bit rich when you hear them recommending that library jars should really go in each web app. i.e. if you have x.jar used by 4 web apps, you'll have 4 copies of x.jar
0
 
LVL 28

Accepted Solution

by:
rrz earned 200 total points
ID: 10664121
Did you change the header  in your context's web.xml   ?  

In Tomcat 3, I think the Invoker servlet was active.
But in Tomcat 5  the Invoker servlet is commented out.  
To uncomment it, go to  jakarta-tomcat-5.0.19\conf\web.xml  
Uncomment both  <servlet>  and  <servlet-mapping>  for the invoker.
rrz
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 10664497
>> /insidezos20/servlet/checkuser

>> But in Tomcat 5  the Invoker servlet is commented out.  

Correct, the invoker Servlet is no longer there. It was already known a long time back that it will be removed. It must have a mapping in web.xml. The invoker Servlet feature was generally used for testing purposes (while development - as a short-hand way for immediate-testing), but now, its no longer there.
0
 

Author Comment

by:pouli
ID: 10669552
rrz@871311

Thank your answer was correct.

Thank everyone though for your interest.

Talk u later
0
 
LVL 28

Expert Comment

by:rrz
ID: 10671400
pouli, thanks for the points, but I must agree with mayankeagle  

>The invoker Servlet feature was generally used for testing purposes    

and because it was a security risk, was  phased out.    rrz
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question