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 / March 2008

Tip: Looking for answers? Try searching our database.

Problem in executing servlets on tomcat 5.5

Thread view: 
ruds - 26 Mar 2008 07:33 GMT
Hi,
I'm developing a web application using tomcat 5.5.
I can execute Jsp pages in my application, but when I try to execute
servlets I simply cant execute them
the error shown is: Requested resource is not available.
Also my application's index page does on appear after i put entry of
servlet in the web.xml file.
But if I remove the entry in web.xml, my application runs perfect.
the servlet gets executed in the webapps/ROOT directiry, but not in my
dir.
I have checked all the paths and classpaths again, still no
difference.
Can someone tell me where I could be going wrong?
ruds - 26 Mar 2008 11:28 GMT
when I start the application from tomcat manager it does not start...
and gives context error
If I remove the servlet entry from web.xml my application runs
properly..
my web.xml is;
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<servlet>
<servlet-name>HelloServlet</servlet-name>
<servlet-class>HelloServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>HelloServlet</servlet-name>
<url-pattern>Hello</url-pattern>
</servlet-mapping> -->
</web-app>

Why is this happening?

> Hi,
> I'm developing a web application using tomcat 5.5.
[quoted text clipped - 9 lines]
> difference.
> Can someone tell me where I could be going wrong?
ruds - 26 Mar 2008 12:02 GMT
Sorry stupid mistake of mine.... :)
RedGrittyBrick - 26 Mar 2008 12:06 GMT
> Sorry stupid mistake of mine.... :)

Please share the solution in case I make the same silly mistake.
Thanks.

Signature

RGB

Lew - 26 Mar 2008 13:40 GMT
> when I start the application from tomcat manager it does not start...
> and gives context error
[quoted text clipped - 12 lines]
>  <servlet-class>HelloServlet</servlet-class>
>  </servlet>

Never deploy Java code that is in the default (anonymous) package.

Signature

Lew



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.