another Book on the shelf

Discussion in 'Java' started by Print Guy, Aug 19, 2006.

  1. Print Guy

    Print Guy Guest

    I got this book

    Java for the Web with Servlets, JSP, and EJB: A Developer's Guide to
    J2EE Solutions

    working through the very first chapter... created the directory
    structure, created the .java and .xml files then started up Tomcat...
    no luck... 404 error.

    They say in the book that if you don't have a deployer .xml file you
    have to type in something like this

    http://localhost:7070/myApp/servlet/TestingServlet

    Which I did...

    HTTP Status 404 - /myApp/servlet/TestingServlet

    --------------------------------------------------------------------------------

    type Status report

    message /myApp/servlet/TestingServlet

    description The requested resource (/myApp/servlet/TestingServlet) is
    not available.


    Question.. is there anyone who has seen this book and has encountered
    the same error...I've checked the errata for the book and the java
    class is compiled...
     
    Print Guy, Aug 19, 2006
    #1
    1. Advertising

  2. Print Guy

    Guest

    i sugesst you check you WEB-INF/web.xml
    see whether there has a servlet mapping like following


    <servlet>
    <servlet-name>yourServlet</servlet-name>
    <servlet-class>com.test.YourServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>yourServlet</servlet-name>
    <url-pattern>/yourServlet</url-pattern>
    </servlet-mapping>


    Print Guy wrote:
    > I got this book
    >
    > Java for the Web with Servlets, JSP, and EJB: A Developer's Guide to
    > J2EE Solutions
    >
    > working through the very first chapter... created the directory
    > structure, created the .java and .xml files then started up Tomcat...
    > no luck... 404 error.
    >
    > They say in the book that if you don't have a deployer .xml file you
    > have to type in something like this
    >
    > http://localhost:7070/myApp/servlet/TestingServlet
    >
    > Which I did...
    >
    > HTTP Status 404 - /myApp/servlet/TestingServlet
    >
    > --------------------------------------------------------------------------------
    >
    > type Status report
    >
    > message /myApp/servlet/TestingServlet
    >
    > description The requested resource (/myApp/servlet/TestingServlet) is
    > not available.
    >
    >
    > Question.. is there anyone who has seen this book and has encountered
    > the same error...I've checked the errata for the book and the java
    > class is compiled...
     
    , Aug 20, 2006
    #2
    1. Advertising

  3. Print Guy

    Mindundi Guest

    That book is from the times (2002) when the invoker servlet was active in
    Tomcat, which let you call the servlet with urls like in your message.
    Now you have to specify a mapping for your servlet, like you were told, or
    activate the invoker (not recommended in production, security issues) in the
    /conf/web.xml file of your Tomcat installation (search for the string
    "invoker" and uncomment).
    Also, I recommend you a more recent book, anyone that covers at least the
    Servlet/JSP 2.4/2.0 Specification, including the JSTL.
    You better not do JSP with scriptlets by now.

    "Print Guy" <> escribiĆ³ en el mensaje
    news:...
    >I got this book
    >
    > Java for the Web with Servlets, JSP, and EJB: A Developer's Guide to
    > J2EE Solutions
    >
    > working through the very first chapter... created the directory
    > structure, created the .java and .xml files then started up Tomcat...
    > no luck... 404 error.
    >
    > They say in the book that if you don't have a deployer .xml file you
    > have to type in something like this
    >
    > http://localhost:7070/myApp/servlet/TestingServlet
    >
    > Which I did...
    >
    > HTTP Status 404 - /myApp/servlet/TestingServlet
    >
    > --------------------------------------------------------------------------------
    >
    > type Status report
    >
    > message /myApp/servlet/TestingServlet
    >
    > description The requested resource (/myApp/servlet/TestingServlet) is
    > not available.
    >
    >
    > Question.. is there anyone who has seen this book and has encountered
    > the same error...I've checked the errata for the book and the java
    > class is compiled...
    >
     
    Mindundi, Aug 20, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. xz
    Replies:
    1
    Views:
    374
    Mark Newmister
    Apr 7, 2006
  2. Aaron Brady

    shelf membership

    Aaron Brady, Mar 31, 2007, in forum: Python
    Replies:
    3
    Views:
    253
    Peter Otten
    Apr 1, 2007
  3. dE|_
    Replies:
    0
    Views:
    388
  4. Sera Jackson

    I love "shelf" BUT

    Sera Jackson, Jul 28, 2008, in forum: Python
    Replies:
    3
    Views:
    283
    alex23
    Jul 28, 2008
  5. kj

    shelf-like list?

    kj, Aug 10, 2010, in forum: Python
    Replies:
    9
    Views:
    293
    Emile van Sebille
    Aug 15, 2010
Loading...

Share This Page