Solved

unable to get servlet working

Posted on 2003-11-27
11
469 Views
Last Modified: 2013-11-24
I am trying to deploy an application in Tomcat 5.0

I have put the JSP pages in
   /webapps/ROOT/test/index.jsp
and the servlets in the package
   /webapps/ROOT/WEB-INF/classes/sample/Logintest.class
and the WEB.XML in
   /webapps/ROOT/WEB-INF/web.xml

but I get .
Am i missing something , i have the same thing running Tomcat 4.0.6 and have nor problem . I am using a linux m/c

The requested resource (/servlet/sample.Logintest) is not available.

Thank q
0
Comment
Question by:applekanna
  • 4
  • 4
  • 2
  • +1
11 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 9830599
try it with a servlet mapping in web.xml:

  <servlet>
    <servlet-name>logintest</servlet-name>
    <servlet-class>sample.Logintest</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>logintest</servlet-name>
    <url-pattern>*.login</url-pattern>
  </servlet-mapping>

restart Tomcat, and go to:

http://localhost:8080/test.login
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9830600
Have you tried the URL without the /servlet/ ?
0
 
LVL 3

Author Comment

by:applekanna
ID: 9830605
yes we have it running on a tomcat 4.0.6 already , but unable to get it to deploy on a new machine and we installed tomcat 5.

0
 
LVL 15

Expert Comment

by:jimmack
ID: 9830607
Morning Tim.  You're very active lately ;-)
0
 
LVL 15

Accepted Solution

by:
jimmack earned 200 total points
ID: 9830620
From the Tomcat 5 Release Notes:

------------------------
Enabling invoker servlet:
------------------------

Starting with Tomcat 4.1.12, the invoker servlet is no longer available by
default in all webapps. Enabling it for all webapps is possible by editing
$CATALINA_HOME/conf/web.xml to uncomment the "/servlet/*" servlet-mapping
definition.

Using the invoker servlet in a production environment is not recommended and
is unsupported.

This might explain it ;-)
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 35

Assisted Solution

by:TimYates
TimYates earned 50 total points
ID: 9830656
> This might explain it ;-)

And my solution should fix it ;-)

Hee hee!

>  Morning Tim.  You're very active lately ;-)

Messing round with Axis, CSS, SOAP, RPC and stuff...  It's cool, but I come here to think about other things, and try to have a revelation about what I'm doing wrong ;-)

Hee hee

Tim
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9830661
PS:  Morning!!!! :-)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9830820
>>Messing round with Axis, CSS, SOAP, RPC and stuff.

Well there's a coincidence - so am i - but not with much enthusiasm ;-) Maybe we should offline about it? ;-)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9830927
:-) You can find my contact details with a bit of investigation into my profile ;-)  hee hee
0
 
LVL 3

Author Comment

by:applekanna
ID: 9834234
Thx a lot guys, it worked like a charm.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9836656
;-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Python Assistance 7 73
get weblogic logged in user in java 2 59
JavaScript/Java - Changing an image background color 4 56
map related example 6 38
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now