Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Servlet question(Tomcat, web.xml, servlet-class, servlet-name)

Reply
Thread Tools

Servlet question(Tomcat, web.xml, servlet-class, servlet-name)

 
 
circuit_breaker
Guest
Posts: n/a
 
      04-03-2004
Hi everyone,

I just upgraded from a 4.1.10 Tomcat implementation on NT4 to a Tomcat
5.0.19 on Linux. Works fine but...

On the NT4 box, my web.xml look like this:
---
<servlet>
<servlet-name>Testing</servlet-name>
<servlet-class>TestingServlet</servlet-class>
</servlet>
---

and I can call the servlet this way:
http//ntgate:8090/myApp/servlet/Testing

On the Linux box, I have something like this:
---
<servlet>
<servlet-name>TestingServlet</servlet-name>
<servlet-class>TestingServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TestingServlet</servlet-name>
<url-pattern>/servlet/TestingServlet</url-pattern>
</servlet-mapping>

When I call the servlet, I have to type "TestingServlet" in the URL in
order to have it working. If I change "TestingServlet" for "Testing"
in my web.xml file, the servlet doesn't show up.

What's the trick?

Thanks you.
 
Reply With Quote
 
 
 
 
Stefano
Guest
Posts: n/a
 
      04-03-2004

"circuit_breaker" <(E-Mail Removed)> ha scritto nel messaggio
news:(E-Mail Removed) om...
> Hi everyone,
>
> I just upgraded from a 4.1.10 Tomcat implementation on NT4 to a Tomcat
> 5.0.19 on Linux. Works fine but...
>
> On the NT4 box, my web.xml look like this:
> ---
> <servlet>
> <servlet-name>Testing</servlet-name>
> <servlet-class>TestingServlet</servlet-class>
> </servlet>
> ---
>
> and I can call the servlet this way:
> http//ntgate:8090/myApp/servlet/Testing
>
> On the Linux box, I have something like this:
> ---
> <servlet>
> <servlet-name>TestingServlet</servlet-name>
> <servlet-class>TestingServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>TestingServlet</servlet-name>
> <url-pattern>/servlet/TestingServlet</url-pattern>
> </servlet-mapping>
>
> When I call the servlet, I have to type "TestingServlet" in the URL in
> order to have it working. If I change "TestingServlet" for "Testing"
> in my web.xml file, the servlet doesn't show up.
>
> What's the trick?
>
> Thanks you.


Did you restart tomcat to apply modifications?


 
Reply With Quote
 
 
 
 
Jack Jia
Guest
Posts: n/a
 
      04-04-2004
You should change url-pattern. Whatever you type in your browser is a url,
right?

Jack

"circuit_breaker" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi everyone,
>
> I just upgraded from a 4.1.10 Tomcat implementation on NT4 to a Tomcat
> 5.0.19 on Linux. Works fine but...
>
> On the NT4 box, my web.xml look like this:
> ---
> <servlet>
> <servlet-name>Testing</servlet-name>
> <servlet-class>TestingServlet</servlet-class>
> </servlet>
> ---
>
> and I can call the servlet this way:
> http//ntgate:8090/myApp/servlet/Testing
>
> On the Linux box, I have something like this:
> ---
> <servlet>
> <servlet-name>TestingServlet</servlet-name>
> <servlet-class>TestingServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>TestingServlet</servlet-name>
> <url-pattern>/servlet/TestingServlet</url-pattern>
> </servlet-mapping>
>
> When I call the servlet, I have to type "TestingServlet" in the URL in
> order to have it working. If I change "TestingServlet" for "Testing"
> in my web.xml file, the servlet doesn't show up.
>
> What's the trick?
>
> Thanks you.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM
Keeping session with Servlet to Servlet communications DiscoStu Java 0 07-08-2004 06:50 PM
Offending class: javax/servlet/Servlet.class chamikara Java 1 06-19-2004 05:42 AM
Tomcat: POST from one servlet or internal class to another servlet Sean Clarke Java 1 01-07-2004 02:22 PM
how to get my servlet configuration before the servlet is initialised Andy Fish Java 4 12-17-2003 09:47 PM



Advertisments