Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / August 2006

Tip: Looking for answers? Try searching our database.

unable to run servlet in Apache Tomcat/5.5.17

Thread view: 
crazzybugger - 17 Aug 2006 18:39 GMT
hi i have a situation where i am not able to run any servlets on
tomcat................. first there is no "classes" folder within the
/webapps/ROOT/ folder............
so i created one......and added the class files...........however when
i try http://localhost:8080/servlet/servletName  i am getting an error
sayin resource not found............i find it very annoying and i tried
moving the class files in and out of the folders but no magic
happens.............
help me :(
Arne Vajhøj - 18 Aug 2006 01:46 GMT
> hi i have a situation where i am not able to run any servlets on
> tomcat................. first there is no "classes" folder within the
[quoted text clipped - 4 lines]
> moving the class files in and out of the folders but no magic
> happens.............

Have you configured the servlet in web.xml ?

Arne
crazzybugger - 18 Aug 2006 13:52 GMT
> > hi i have a situation where i am not able to run any servlets on
> > tomcat................. first there is no "classes" folder within the
[quoted text clipped - 8 lines]
>
> Arne

no i have not configured my server............if you mean to say i have
put that "servlet-mapping" tag into the web.xml , i dont think so i can
do it  for each and every servlet that i am going to test and run
Arne Vajhøj - 18 Aug 2006 23:23 GMT
>> Have you configured the servlet in web.xml ?
> no i have not configured my server............if you mean to say i have
> put that "servlet-mapping" tag into the web.xml , i dont think so i can
> do it  for each and every servlet that i am going to test and run

You need to either put each servlet in web.xml or use
the invoker servlet.

And I will not recommend the last solution.

Arne
jagonzal@gmail.com - 18 Aug 2006 13:55 GMT
> hi i have a situation where i am not able to run any servlets on
> tomcat................. first there is no "classes" folder within the
[quoted text clipped - 5 lines]
> happens.............
> help me :(

Your class should be within "ROOT/WEB-INF/classes"

And you have to add your servlet (with <servlet> and <servlet-mapping>
tags) in your web.xml
Mark Space - 20 Aug 2006 05:50 GMT
>> hi i have a situation where i am not able to run any servlets on
>> tomcat................. first there is no "classes" folder within the
[quoted text clipped - 10 lines]
> And you have to add your servlet (with <servlet> and <servlet-mapping>
> tags) in your web.xml

Also, one does not normally use the ROOT application.  One deploys
separate apps parallel to ROOT, directly under /webapps/ folder.  Most
practical guides I've seen say to delete the ROOT folder so it can't be
used as an exploit.

Unless I misunderstand completely what you are trying to do...
crazzybugger - 20 Aug 2006 08:40 GMT
> >> hi i have a situation where i am not able to run any servlets on
> >> tomcat................. first there is no "classes" folder within the
[quoted text clipped - 17 lines]
>
> Unless I misunderstand completely what you are trying to do...

i am quite new to web applications and this is my first try with
servlets....... basically i need the servlets for uploading data as
well as registering new users........along with some authentication
routines
William Brogden - 20 Aug 2006 17:04 GMT
>>> hi i have a situation where i am not able to run any servlets on
>>> tomcat................. first there is no "classes" folder within the
>>> /webapps/ROOT/ folder............
>>>  so i created one......and added the class files...........however when
>>> i try http://localhost:8080/servlet/servletName  i am getting an error

That URL is using the "invoker servlet" syntax - the cause of much beginner
grief. Invoker used to be turned on in early Tomcat distributions and thus
this syntax appears in early books. See this Javaranch FAQ discussion:

http://faq.javaranch.com/view?InvokerServlet

>>> sayin resource not found............i find it very annoying and i tried
>>> moving the class files in and out of the folders but no magic
[quoted text clipped - 10 lines]
>
> Unless I misunderstand completely what you are trying to do...

ROOT is simply Tomcat's convention for the "/" location - there is utterly
no reason to delete it, just substitute your own web application.

Bill


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.