You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bryan Richardson <li...@hotmail.com> on 2003/04/03 03:37:02 UTC
WEB-INF/web.xml problem
Here's the deal...I have a .class file that is in the
webapps/pnm/WEB-INF/classes folder that I am trying to run. In web.xml I
have the following:
<!-- servlet definition -->
<servlet>
<servlet-name>
Submit
</servlet-name>
<description>
A simple servlet
</description>
<servlet-class>
ranade.SubmitServlet
</servlet-class>
</servlet>
<!-- servlet mapppings -->
<servlet-mapping>
<servlet-name>
Submit
</servlet-name>
<url-pattern>
/Submit
</url-pattern>
</servlet-mapping>
I can go to http://<URL>:8080/pnm/Submit and the .class file will run.
However, if I try to go through my Apache web server and run the .class
file, I get the Error 404 message. I'm assuming I have Apache-Tomcat
configured correctly because I can run the java examples in the Tomcat
"examples" folder through Apache. I'm thinking it has something to do with
Apache not referencing the web.xml file because when I set up a security
realm in web.xml, it will ask me for a password when I go directly to Tomcat
via port 8080, but if I go through Apache the page will come up without
asking for a password. Can anyone help me with this?
Thanks.
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: WEB-INF/web.xml problem
Posted by Bill Barker <wb...@wilshire.com>.
I'm assuming that you haven't enabled the ApacheConfig Listener (or, you
haven't restarted Apache after Tomcat was started).
Assuming that you are using mod_jk1.x, you need to include the directive:
JkMount /mycontext/Submit ajp13
somewhere in your httpd.conf file. Despite it's many draw-backs, I'd
recommend using the ApacheConfig Listener to generate this for you.
"Bryan Richardson" <li...@hotmail.com> wrote in message
news:F84x29xDbH8J0sca0Zk00007664@hotmail.com...
> Here's the deal...I have a .class file that is in the
> webapps/pnm/WEB-INF/classes folder that I am trying to run. In web.xml I
> have the following:
>
> <!-- servlet definition -->
> <servlet>
> <servlet-name>
> Submit
> </servlet-name>
> <description>
> A simple servlet
> </description>
> <servlet-class>
> ranade.SubmitServlet
> </servlet-class>
> </servlet>
> <!-- servlet mapppings -->
> <servlet-mapping>
> <servlet-name>
> Submit
> </servlet-name>
> <url-pattern>
> /Submit
> </url-pattern>
> </servlet-mapping>
>
> I can go to http://<URL>:8080/pnm/Submit and the .class file will run.
> However, if I try to go through my Apache web server and run the .class
> file, I get the Error 404 message. I'm assuming I have Apache-Tomcat
> configured correctly because I can run the java examples in the Tomcat
> "examples" folder through Apache. I'm thinking it has something to do
with
> Apache not referencing the web.xml file because when I set up a security
> realm in web.xml, it will ask me for a password when I go directly to
Tomcat
> via port 8080, but if I go through Apache the page will come up without
> asking for a password. Can anyone help me with this?
>
> Thanks.
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: WEB-INF/web.xml problem
Posted by Mariusz Wiktorczyk <ko...@fanthom.math.put.poznan.pl>.
In your url http://<URL>:8080/pnm/Submit should be some hint for apache
telling that this is a Tomcat app i.e. http://<URL>/servlet/pnm/Submit.
See exactly how is build URL to Tomcat examples.
Bryan Richardson wrote:
> Here's the deal...I have a .class file that is in the
> webapps/pnm/WEB-INF/classes folder that I am trying to run. In
> web.xml I have the following:
>
> <!-- servlet definition -->
> <servlet>
> <servlet-name>
> Submit
> </servlet-name>
> <description>
> A simple servlet
> </description>
> <servlet-class>
> ranade.SubmitServlet
> </servlet-class>
> </servlet>
> <!-- servlet mapppings -->
> <servlet-mapping>
> <servlet-name>
> Submit
> </servlet-name>
> <url-pattern>
> /Submit
> </url-pattern>
> </servlet-mapping>
>
> I can go to http://<URL>:8080/pnm/Submit and the .class file will
> run. However, if I try to go through my Apache web server and run the
> .class file, I get the Error 404 message. I'm assuming I have
> Apache-Tomcat configured correctly because I can run the java examples
> in the Tomcat "examples" folder through Apache. I'm thinking it has
> something to do with Apache not referencing the web.xml file because
> when I set up a security realm in web.xml, it will ask me for a
> password when I go directly to Tomcat via port 8080, but if I go
> through Apache the page will come up without asking for a password.
> Can anyone help me with this?
>
> Thanks.
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org