You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Lothar Krenzien <lk...@web.de> on 2006/02/10 15:05:50 UTC

webapp under different URLs with different JSP but same java classes

Hi,

I'm not sure whether it is possible or not:

I have a webapp which I want to access under different URL's with different JSP's but the same java classes. I know that I can define the context URL in the context.xml But how to define which jsp's to use ?

Example :

<Context path="/a" docBase="/myapp">

</Context>

<Context path="/b" docBase="/myapp" >

</Context>

In myapp I may have a folder jsp_a and jsp_b.  Path 'a' should use JSPs from jsp_a and path 'b' should JSPs from jsp_b. Of course I can set up two different webapps. But the java classes and so the the content of the WEB-INF/classes directory will be identically for both webapps. I'm using Tomcat 5.5 under Windows 2003.

Thanks,
Lothar
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


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


Re: webapp under different URLs with different JSP but same java classes

Posted by David Delbecq <de...@oma.be>.
Duplicate your classes, one copy in each webapp

Lothar Krenzien a écrit :

>Hi,
>
>I'm not sure whether it is possible or not:
>
>I have a webapp which I want to access under different URL's with different JSP's but the same java classes. I know that I can define the context URL in the context.xml But how to define which jsp's to use ?
>
>Example :
>
><Context path="/a" docBase="/myapp">
>
></Context>
>
><Context path="/b" docBase="/myapp" >
>
></Context>
>
>In myapp I may have a folder jsp_a and jsp_b.  Path 'a' should use JSPs from jsp_a and path 'b' should JSPs from jsp_b. Of course I can set up two different webapps. But the java classes and so the the content of the WEB-INF/classes directory will be identically for both webapps. I'm using Tomcat 5.5 under Windows 2003.
>
>Thanks,
>Lothar
>______________________________________________________________
>Verschicken Sie romantische, coole und witzige Bilder per SMS!
>Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>


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


Re: webapp under different URLs with different JSP but same java classes

Posted by Wade Chandler <hw...@yahoo.com>.
--- Lothar Krenzien <lk...@web.de> wrote:

> Hi,
> 
> I'm not sure whether it is possible or not:
> 
> I have a webapp which I want to access under
> different URL's with different JSP's but the same
> java classes. I know that I can define the context
> URL in the context.xml But how to define which jsp's
> to use ?
> 
> Example :
> 
> <Context path="/a" docBase="/myapp">
> 
> </Context>
> 
> <Context path="/b" docBase="/myapp" >
> 
> </Context>
> 
> In myapp I may have a folder jsp_a and jsp_b.  Path
> 'a' should use JSPs from jsp_a and path 'b' should
> JSPs from jsp_b. Of course I can set up two
> different webapps. But the java classes and so the
> the content of the WEB-INF/classes directory will be
> identically for both webapps. I'm using Tomcat 5.5
> under Windows 2003.
> 
> Thanks,
> Lothar
>
______________________________________________________________
> Verschicken Sie romantische, coole und witzige
> Bilder per SMS!
> Jetzt bei WEB.DE FreeMail:
> http://f.web.de/?mc=021193
> 
Why exactly can't you use /webapp/a /webapp/b and must
use /a and /b?  That would be much simpler.  Same
classes and different JSPs.

Wade

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