You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Pedro Salazar <pe...@ptinovacao.pt> on 2001/06/12 19:12:58 UTC

starting in a default servlet

Greetings,

I configured tomcat to when I start my application to run a default 
servlet [url-pattern is /]:

in web.xml:
"
<servlet-mapping>
   <servlet-name>
     servlet1
   </servlet-name>
   <url-pattern>
     /
   </url-pattern>
</servlet-mapping>
"

When I go to http://myserver:8080/myapp/ my servlet starts as expected.
Now I would like to do the samething but with apache (without the 8080 
port).
But, apache assumes that the root application is only for him to handle, 
and only /myapp/servlet/* or /myapp/*.jsp is for TOMCAT to handle 
[JkMount]. What is happening is that apache shows the root of myapp!!

JkMount:
"
JkMount /myapp/servlet/* ajp13
JkMount /myapp/*.jsp ajp13
"

What should I do for when I request http:/myserver/myapp/ apache 
redirect the request to tomcat?

thx
--
<psalazar/>


RE: starting in a default servlet

Posted by istvan bereti <is...@kolumbus.fi>.
Probably instead 
JkMount /myapp/*.jsp ajp13
do this
JkMount /myapp/* ajp13
And then all the requests from myapp will be forwarded.



-----Original Message-----
From: Pedro Salazar [mailto:pedro-b-salazar@ptinovacao.pt]
Sent: Tuesday, June 12, 2001 10:13 AM
To: tomcat-user@jakarta.apache.org
Subject: starting in a default servlet


Greetings,

I configured tomcat to when I start my application to run a default 
servlet [url-pattern is /]:

in web.xml:
"
<servlet-mapping>
   <servlet-name>
     servlet1
   </servlet-name>
   <url-pattern>
     /
   </url-pattern>
</servlet-mapping>
"

When I go to http://myserver:8080/myapp/ my servlet starts as expected.
Now I would like to do the samething but with apache (without the 8080 
port).
But, apache assumes that the root application is only for him to handle, 
and only /myapp/servlet/* or /myapp/*.jsp is for TOMCAT to handle 
[JkMount]. What is happening is that apache shows the root of myapp!!

JkMount:
"
JkMount /myapp/servlet/* ajp13
JkMount /myapp/*.jsp ajp13
"

What should I do for when I request http:/myserver/myapp/ apache 
redirect the request to tomcat?

thx
--
<psalazar/>




Re: AW: starting in a default servlet

Posted by Milt Epstein <me...@uiuc.edu>.
On Tue, 12 Jun 2001, Daniel Strobl wrote:

> try
> JkMount /myapp/* ajp13
>
> but in this case everything from /myapp and on will be directed to
> tomcat-->consider "is Apache needed??"

I think you're right.  Unfortunately, in Tomcat 3.X, I believe there
is no way to specify a default servlet for a context; I had heard that
they were considering adding such a capability to Tomcat 4.X (perhaps
by allowing specifying a servlet as a "welcome-file").  Don't know if
that's been followed through on yet.


> -----Ursprüngliche Nachricht-----
> Von: Pedro Salazar [mailto:pedro-b-salazar@ptinovacao.pt]
> Gesendet: Dienstag, 12. Juni 2001 19:13
> An: tomcat-user@jakarta.apache.org
> Betreff: starting in a default servlet
>
>
> Greetings,
>
> I configured tomcat to when I start my application to run a default
> servlet [url-pattern is /]:
>
> in web.xml:
> "
> <servlet-mapping>
>    <servlet-name>
>      servlet1
>    </servlet-name>
>    <url-pattern>
>      /
>    </url-pattern>
> </servlet-mapping>
> "
>
> When I go to http://myserver:8080/myapp/ my servlet starts as expected.
> Now I would like to do the samething but with apache (without the 8080
> port).
> But, apache assumes that the root application is only for him to handle,
> and only /myapp/servlet/* or /myapp/*.jsp is for TOMCAT to handle
> [JkMount]. What is happening is that apache shows the root of myapp!!
>
> JkMount:
> "
> JkMount /myapp/servlet/* ajp13
> JkMount /myapp/*.jsp ajp13
> "
>
> What should I do for when I request http:/myserver/myapp/ apache
> redirect the request to tomcat?
>
> thx
> --
> <psalazar/>
>

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


AW: starting in a default servlet

Posted by Daniel Strobl <Da...@t-online.de>.
try
JkMount /myapp/* ajp13

but in this case everything from /myapp and on will be directed to
tomcat-->consider "is Apache needed??"

regards
Daniel

-----Ursprüngliche Nachricht-----
Von: Pedro Salazar [mailto:pedro-b-salazar@ptinovacao.pt]
Gesendet: Dienstag, 12. Juni 2001 19:13
An: tomcat-user@jakarta.apache.org
Betreff: starting in a default servlet


Greetings,

I configured tomcat to when I start my application to run a default
servlet [url-pattern is /]:

in web.xml:
"
<servlet-mapping>
   <servlet-name>
     servlet1
   </servlet-name>
   <url-pattern>
     /
   </url-pattern>
</servlet-mapping>
"

When I go to http://myserver:8080/myapp/ my servlet starts as expected.
Now I would like to do the samething but with apache (without the 8080
port).
But, apache assumes that the root application is only for him to handle,
and only /myapp/servlet/* or /myapp/*.jsp is for TOMCAT to handle
[JkMount]. What is happening is that apache shows the root of myapp!!

JkMount:
"
JkMount /myapp/servlet/* ajp13
JkMount /myapp/*.jsp ajp13
"

What should I do for when I request http:/myserver/myapp/ apache
redirect the request to tomcat?

thx
--
<psalazar/>