basic jsp problem ( form and servlets)


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: basic jsp problem ( form and servlets)

  1. #1
    tyris Guest

    basic jsp problem ( form and servlets)


    well in fact i have found a begun of solution but not the entire one.

    it seems that the way to call a servlet is :
    "/servlet/name_of_the_class"
    (in a <FORM ACTION="..." METHOD="POST"> or by entering the path in the navigator)
    (as it is written in IBM red books Servlet and JSP programming)

    if i put something else the navigator answer "page not found" and if i use
    the path "/servlet/name_of_the_class" (in my case "/servlet/ShowParameters"
    ) , the server answer something like :

    " ERROR 500
    An error has occured while processing
    request:http://websphere/servlet/ShowParameters
    Message:Server caught unhandled exception from servlet[invoker]
    Target Servlet: invoker
    StackTrace:

    Root Error-1: ShowParameters
    java.lang.ClassNotFoundException: ShowParameters at .....

    Wrapped Error-2: Servlet [ShowParameters]: Could not find required servlet
    class -
    ShowParameters.class
    javax.servlet.ServletException: Servlet [ShowParameters]: Could not find

    required servlet class - ShowParameters.class at ...."

    and if i call an other servlet - that is on the same directory than the
    one i tested above - in the browser with the same way
    ("/websphere/servlet/servlet_that_works")it works !!

    Both servlet (the one that works and the one that not) are in the same directory,
    are both .class and are both called with the same method. but only one of
    them function.

    this thing is getting me mad.
    if you have any idea please tell me, i gonna search by my own too as always
    even if I'm really lost


    Best regards ,
    Elise


  2. #2
    Rajkamal Gopinath Guest

    Re: basic jsp problem ( form and servlets)


    Hi,

    Just check this.. (If in case answers your question)

    If you are creating a new servlet class in a context path which is installed
    using .web archive file.. then probably you need to recreate the .web archive
    file with your new servlet..

    As long as your servlet is placed in the correct place.. refering it with
    servlet/ServletName should be correct..

    Regards

    Rajkamal





    "tyris" <kea@mailcity.com> wrote:
    >
    >well in fact i have found a begun of solution but not the entire one.
    >
    >it seems that the way to call a servlet is :
    >"/servlet/name_of_the_class"
    >(in a <FORM ACTION="..." METHOD="POST"> or by entering the path in the navigator)
    >(as it is written in IBM red books Servlet and JSP programming)
    >
    >if i put something else the navigator answer "page not found" and if i use
    >the path "/servlet/name_of_the_class" (in my case "/servlet/ShowParameters"
    >) , the server answer something like :
    >
    >" ERROR 500
    >An error has occured while processing
    >request:http://websphere/servlet/ShowParameters
    >Message:Server caught unhandled exception from servlet[invoker]
    >Target Servlet: invoker
    >StackTrace:
    >
    >Root Error-1: ShowParameters
    >java.lang.ClassNotFoundException: ShowParameters at .....
    >
    >Wrapped Error-2: Servlet [ShowParameters]: Could not find required servlet
    >class -
    >ShowParameters.class
    >javax.servlet.ServletException: Servlet [ShowParameters]: Could not find
    >
    >required servlet class - ShowParameters.class at ...."
    >
    >and if i call an other servlet - that is on the same directory than the


    >one i tested above - in the browser with the same way
    >("/websphere/servlet/servlet_that_works")it works !!
    >
    >Both servlet (the one that works and the one that not) are in the same directory,
    >are both .class and are both called with the same method. but only one of
    >them function.
    >
    >this thing is getting me mad.
    >if you have any idea please tell me, i gonna search by my own too as always
    >even if I'm really lost
    >
    >
    >Best regards ,
    >Elise
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center