You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daxin Zuo <dz...@techexcel.com> on 2004/09/11 01:07:54 UTC

How to make Apache direct Servlet to Tomcat

My Apache 2.0.49  Tomcat 5.0.19, windows 2000. (Soon I will move them to
UNIX)
I have a difficult in running servlet from Apache.
For example I have a servlet TestServlet.class (package: myServlet) in
C:\Program Files\Apache
Group\Apache2\tomcat\webapps\ROOT\WEB-INF\classes\myServlet\
I register this servlet in  \tomcat\webapps\ROOT\WEB-INF\web.xml:

  <servlet>
        <servlet-name>TestServlet</servlet-name>
        <servlet-class>TestServlet</servlet-class>
  </servlet>
  <servlet-mapping>
	<servlet-name>TestServlet</servlet-name>
   	<url-pattern>/TestServlet</url-pattern>
  </servlet-mapping>

Tomcat port is 8008
When I run http://localhost:8008/TestServlet, it runs correctly.
Apache port is 82
I cannot start it with http://localhost:82/TestServlet. -- The page cannot
be found

My Aache and Tomcat is connected correctly. All JSP files can run on both.
For example, I have a jsp file
C:\Program Files\Apache
Group\Apache2\tomcat\webapps\ROOT\testJSP\testDBPool.jsp.
I can run http://localhost:82/testJSP/testDBPool.jsp
or http://localhost:8008/testJSP/testDBPool.jsp

in workers2.properties, I have:

[uri:/myServlet/*]
group=lb

[uri:/WEB-INF/*]
group=lb

[uri:/WEB-INF/classes/*]
group=lb


Please forward your instruction.

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


AbandonedObjectPool means Abandoned Object Pool?

Posted by Daxin Zuo <dz...@techexcel.com>.
In my database connection pool, I used
org.apache.commons.dbcp.BasicDataSourceFactory for MS SQL and Oracle.
I see  the message on the Tomcat monitor window:

AbandonedObjectPool is used
(org.apache.commons.dbcp.AbandonedObjectPool@1552b76)

Does it means the Object pool is Abandoned, or Deprecated? If it is true,
what is the updated object pool?

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


How to make Apache direct Servlet to Tomcat

Posted by Daxin Zuo <dz...@techexcel.com>.
On my Apache 2.0.43 + Tomcat5.0.28 on UNIX sparc, I can run the same JSP
files from both Apache and Tomcat, and run servlets on Tomcat, but I cannot
run Servlet from Apache.
I register the servlet in tomcat/webapps/www/WEB-INF/web.xml:
    <servlet>
         <servlet-name>ServletTest</servlet-name>
        <servlet-class>ServletTest</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>ServletTest</servlet-name>
        <url-pattern>/ServletTest</url-pattern>
    </servlet-mapping>

/www is the DocBase.
The error message on the screen is: /ServletTest was not found on this
server.
>From the Apache error log, I see Apache looked for the file in Apache htdocs
folder, instead pass the request to Tomcat.

When I start Tomcat I get some errors. The are probably not related to the
problem above. the errors are:
1) in catalina.out
....
INFO: Installing web application at context path /balancer from URL
file:/usr/local/apache2/jakarta-tomcat-5.0.28/webapps/balancer
Oct 1, 2004 10:14:50 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Oct 1, 2004 10:14:50 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
.....

2) in localhost_log.2004-10-01.txt
2004-10-01 10:14:50 StandardContext[/balancer]Exception starting filter
BalancerFilter
java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
        at
org.apache.webapp.balancer.RulesParser.createDigester(RulesParser.java:65)
...

Please help me with the servlet problem.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Please help: Apache direct Servlet to Tomcat

Posted by Kelly Denehy <kd...@gmail.com>.
On Mon, 13 Sep 2004 14:57:31 -0400, Kelly Denehy <kd...@gmail.com> wrote:
> On Mon, 13 Sep 2004 11:21:55 -0700, Daxin Zuo <dz...@techexcel.com> wrote:
> > [snip]
> > For example I have a servlet TestServlet.class (package: myServlet) in
> > [snip]
> >   <servlet>
> >         <servlet-name>TestServlet</servlet-name>
> >         <servlet-class>TestServlet</servlet-class>
> >   </servlet>
> 
> I might be wrong, but I believe the servlet-class needs to be fully
> qualified, so it would be
> <servlet-class>myServlet.TestServlet</servlet-class>.
> 

Hmmm, except you said it runs correctly when accessing directly
through Tomcat on port 8008.  I've always avoided accessing the ROOT
webapp through Apache to avoid these kind of issues, because of the
additional ambiguity that it introduces.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Please help: Apache direct Servlet to Tomcat

Posted by Kelly Denehy <kd...@gmail.com>.
On Mon, 13 Sep 2004 11:21:55 -0700, Daxin Zuo <dz...@techexcel.com> wrote:
> [snip]
> For example I have a servlet TestServlet.class (package: myServlet) in
> [snip]
>   <servlet>
>         <servlet-name>TestServlet</servlet-name>
>         <servlet-class>TestServlet</servlet-class>
>   </servlet>

I might be wrong, but I believe the servlet-class needs to be fully
qualified, so it would be
<servlet-class>myServlet.TestServlet</servlet-class>.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Please help: Apache direct Servlet to Tomcat

Posted by Daxin Zuo <dz...@techexcel.com>.
My Apache 2.0.49  Tomcat 5.0.19, windows 2000.
I have a difficult in running servlet from Apache.
For example I have a servlet TestServlet.class (package: myServlet) in
C:\Program Files\Apache
Group\Apache2\tomcat\webapps\ROOT\WEB-INF\classes\myServlet\
I register this servlet in  \tomcat\webapps\ROOT\WEB-INF\web.xml:

  <servlet>
        <servlet-name>TestServlet</servlet-name>
        <servlet-class>TestServlet</servlet-class>
  </servlet>
  <servlet-mapping>
	<servlet-name>TestServlet</servlet-name>
   	<url-pattern>/TestServlet</url-pattern>
  </servlet-mapping>

Tomcat port is 8008
When I run http://localhost:8008/TestServlet, it runs correctly.
Apache port is 82
I cannot start it with http://localhost:82/TestServlet. -- The page cannot
be found

My Aache and Tomcat is connected correctly. All JSP files can run on both.
For example, I have a jsp file
C:\Program Files\Apache
Group\Apache2\tomcat\webapps\ROOT\testJSP\testDBPool.jsp.
I can run http://localhost:82/testJSP/testDBPool.jsp
or http://localhost:8008/testJSP/testDBPool.jsp

in workers2.properties, I have:

[uri:/myServlet/*]
group=lb

[uri:/WEB-INF/*]
group=lb

[uri:/WEB-INF/classes/*]
group=lb


Please forward your instruction.

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org