You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by hs...@china.com on 2000/08/01 13:42:13 UTC
Re: Apache and Front Servlets
See below:
> Hi,
>
> I'm migrating a web application from a tomcat set-up to a apache-tomcat
> set-up (for the first time!).
> The new apache set-up works fine for the standard "examples" web
> application.
> I have, however, a problem with my own web application that I figure is
> because I use a front servlet. So assume my web application is called
> "myapp", and the front servlet is bound to "fs". In web.xml we have:
>
> <servlet>
> <servlet-name>front</servlet-name>
> <servlet-class>com.blablabla.FrontServlet</servlet-class>
> </servlet>
> <servlet-mapping>
> <servlet-name>front</servlet-name>
> <url-pattern>/fs/*</url-pattern>
> </servlet-mapping>
>
> One of many tasks for the front servlet is to forward control to a jsp
> page of the request url placed in a certain folder ("certainFolder"):
> "myhost/myapp/fs/page.jsp" -> front servlet ->
> "myhost/myapp/certainFolder/page.jsp"
> This works perfectly for a stand-alone tomcat-setup. But in the
> apache-tomcat setup I get an error message:
>
> "Not Found. The requested URL /myapp/fs/page.jsp was not found on this
> server."
>
> Now, if I make a dummy folder called "fs" in "myapp" with a dummy file
> called "page.jsp" then I get no error and the proper page is shown via
> the front servlet (that is, not the dummy one). This leads me to believe
> that my tomcat.config included by apache is wrong. If anybody can spot
> what I'm missing in the mapping below, you will make me a happy man
> again:
>
> Alias /myapp /opt/tomcat/webapps/myapp
> <Directory "/opt/tomcat/webapps/myapp">
> Options Indexes FollowSymLinks
> </Directory>
add one line will be ok:
ApJServMount /myapp /root
> ApJServMount /myapp/servlet /myapp
> <Location /myapp/WEB-INF/ >
> AllowOverride None
> deny from all
> </Location>
>
> Thanks in advance,
> Peder
>
> Btw: I use Tomcat 3.1 final.
----------------------------------------------
��ӭ�μ�CNNIC�н�����,��������
��ͶƱ֧���л���!
http://www.china.com/zh_cn/cnnic/
��ͶƱ֧�ֹ�����!
http://cww.com/cnnic.html