Thank for your reply.
Yes, I did it.
in the tomcat\webapps\ROOT\web.xml or tomcat\webapps\ROOT\WEB-INF (not
both):
  <servlet>
        <servlet-name>test1/test1</servlet-name>
        <servlet-class>test1/test1</servlet-class>
  </servlet>
  <servlet-mapping>
        <servlet-name>test1/test1</servlet-name>
        <url-pattern>/test1/test1</url-pattern>
  </servlet-mapping>

in Apache/conf/workers2.properties
[uri:/ROOT/*]
group=lb

The servlet classes test1.class is compiled to
tomcat\webapps\ROOT\WEB-INF\classes, in package test1.
only URL http://localhost:8008/servlet/test1.test1 works.(Tomcat port 8008)
I would run it with URL http://localhost:82/test1/test1 (Apach port 82)
Thanks.

-----Original Message-----
From: Dale, Matt [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 27, 2004 8:55 AM
To: Tomcat Users List
Subject: RE: How to make Apache direct Servlet to Tomcat


Hi,

1) You need to set up a URI mapping in your workers2.properties in your
apache conf directory for the servlets to work, its enough to just put
yourapp/*, from the sounds of it you must have yourapp/*.jsp or something
like that.

2) You need to set up URL mappings in the applications web.xml file and then
you can have the URL as anything you want to each servlet.

Ta
Matt


-----Original Message-----
From: Daxin Zuo [mailto:[EMAIL PROTECTED]
Sent: 27 May 2004 16:14
To: Tomcat Users List
Subject: How to make Apache direct Servlet to Tomcat


My Apache 2.0.49 can direct JSP to Tomcat 5.0.19, but it cannot direct
Servlet to Tomcat. I can run it  on Tomcat:
http://localhost:8008/servlet/myapp/testServlet
But I cannot run it on Apache (port number is 82) like:
http://localhost:82/servlet/myapp/testServlet. The error log says:
File does not exist: C:/Program Files/Apache Group/Apache2/htdocs/servlet.
I guess I may need to put <servlet> in some configuration file in
Apache/conf. Please tell me

1) How to make Apache direct servlet to Tomcat?
2) Suppose my application base folder is myApp, is there a way to run the
servlet on Apache and with the url like:
http://localhost:82/myapp/testServlet (without /Servlet)?
Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to