Does Tomcat cache servlets

Discussion in 'Java' started by kikotores@yahoo.com, Sep 10, 2005.

  1. Guest

    I'm trying to develop and run servlets. I installed Tomcat 4.1.31
    However, I can't get my serlvets to run.

    I did uncomment
    <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>

    I get the example servlets running

    However if I change the name of HelloWorldExample.class and then get a
    message that it doesn't run, then rename it back to the original I
    still get the error message. Same happens with my servlets.
    The second problem is that I can't get my servlets running in
    webapps\ROOT\WEB-INF\classes. I just sometimes get them work if I put
    them in the examples directory.

    Do I have to make a new servlet-mapping for each servlet I make

    Thank you
    , Sep 10, 2005
    #1
    1. Advertising

  2. Stalin Guest

    <> wrote in message
    news:...
    > I'm trying to develop and run servlets. I installed Tomcat 4.1.31
    > However, I can't get my serlvets to run.
    >
    > I did uncomment
    > <servlet-mapping>
    > <servlet-name>invoker</servlet-name>
    > <url-pattern>/servlet/*</url-pattern>
    > </servlet-mapping>
    >
    > I get the example servlets running
    >
    > However if I change the name of HelloWorldExample.class and then get a
    > message that it doesn't run, then rename it back to the original I
    > still get the error message. Same happens with my servlets.
    > The second problem is that I can't get my servlets running in
    > webapps\ROOT\WEB-INF\classes. I just sometimes get them work if I put
    > them in the examples directory.
    >
    > Do I have to make a new servlet-mapping for each servlet I make
    >
    > Thank you
    >


    From top of my head and as far as I remember there were two places in
    web.xml where you have to make changes.

    Googled:

    ..Edit \...Tomcat\conf\web.xml
    ..Find "<!-- The "invoker" servlet. -->"
    ..Remove the comments from the block of xml (servlet definition) that
    follows.
    .. Find "<!-- The mapping for the invoker servlet -->"
    ..Remove the comments from the block of xml (servlet mapping for the 'invoker')
    that follows.
    Stalin, Sep 11, 2005
    #2
    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. Jim
    Replies:
    4
    Views:
    6,975
  2. Jim
    Replies:
    2
    Views:
    861
  3. M
    Replies:
    5
    Views:
    421
    Christophe Vanfleteren
    Sep 20, 2003
  4. Arun Goel

    Servlets & Tomcat problems.

    Arun Goel, Oct 1, 2003, in forum: Java
    Replies:
    2
    Views:
    514
    William Brogden
    Oct 1, 2003
  5. Phil Jarvis
    Replies:
    2
    Views:
    790
    Sudsy
    Jul 7, 2004
Loading...

Share This Page