Does Tomcat cache servlets

K

kikotores

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
 
S

Stalin

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top