Results 1 to 2 of 2
  1. #1
    67726e is offline Member
    Join Date
    Mar 2010
    Location
    Hilton Head, SC
    Posts
    34
    Rep Power
    0

    Default Servlet Deployment

    The documentation for actually adding the most basic of servlets is a bit sketchy so I tried 'reverse-engineering' the example servlets. I got it so I have a folder with a basic Hello, World servlet. I wrote and compiled a servlet to test but I guess my deployment is off.

    Java Code:
    <servlet>
            <servlet-name>HelloWorldExample</servlet-name>
            <servlet-class>HelloWorldExample</servlet-class>
    </servlet>
    <servlet>
    	<servlet-name>HelloServlet</servlet-name>
    	<servlet-class>HelloServlet</servlet-class>
    </servlet>
    
    <servlet-mapping>
            <servlet-name>HelloWorldExample</servlet-name>
            <url-pattern>/servlets/servlet/HelloWorldExample</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
            <servlet-name>HelloServlet</servlet-name>
            <url-pattern>/servlets/servlet/HelloServlet</url-pattern>
    </servlet-mapping>
    Whenever I comment out the <servlet> and <servlet-mapping> sections for the 'HelloServlet' section, the 'HelloWorldExample' servlet works just fine. When I try running the Tomcat server without the comments, both servlets throw a 503.

    It would seem that there is something I'm doing wrong with my XML since this fixes/breaks it. Does anyone know what exactly I have wrong?

  2. #2
    67726e is offline Member
    Join Date
    Mar 2010
    Location
    Hilton Head, SC
    Posts
    34
    Rep Power
    0

    Default

    Never mind this. The issue was the JRE Tomcat was using. (Note: I would delete the post, but I don't know how)

Similar Threads

  1. Deployment
    By rob in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 04-08-2009, 11:03 PM
  2. hot deployment
    By Manas Das in forum Advanced Java
    Replies: 0
    Last Post: 01-21-2009, 06:24 PM
  3. Replies: 1
    Last Post: 12-02-2008, 01:23 AM
  4. deployment
    By Nicholas Jordan in forum NetBeans
    Replies: 4
    Last Post: 07-09-2008, 06:10 PM
  5. Replies: 1
    Last Post: 08-07-2007, 04:47 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •