tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xybrek <xyb...@gmail.com>
Subject Re: How to forward all kind of request from ROOT to another subdirectory?
Date Thu, 08 Dec 2011 16:58:38 GMT
On Thursday, 08 December, 2011 09:37 PM, André Warnier wrote:
> Xybrek wrote:
>> On 12/8/2011 9:19 PM, Xybrek wrote:
>>> On 12/8/2011 8:52 PM, Thom Hehl wrote:
>>>> Simplest would be to set up an index.html in the root path that
>>>> redirects to whatever you wish. You can find 500 hits on google about
>>>> how to do an HTML redirect.
>>>>
>>>> -----Original Message-----
>>>> From: Xybrek [mailto:xybrek@gmail.com]
>>>> Sent: Thursday, December 08, 2011 3:07 AM
>>>> To: users@tomcat.apache.org
>>>> Subject: How to forward all kind of request from ROOT to another
>>>> subdirectory?
>>>>
>>>> Hello,
>>>>
>>>> I need to forward all kind of request from the ROOT, i.e
>>>> http://localhost:8080/ to http://localhost:8080/myRoot
>>>>
>>>> Is it possible, do I need to create a redirect servlet? However, I
>>>> think
>>>>
>>>> tomcat can be configured to behave that way?
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>> Hi, I am using UrlRedirectFilter.
>>
>> Also, I am able to redirect with UrlRedirectFilter from
>> http://localhost:8080 to http://localhost:8080/myRoot
>>
>> However my problem now is that I want to keep the URL in the browser
>> relative to the original ROOT, i.e. right now when I request for
>> http://localhost:8080/index.html it will show
>> http://localhost:8080/myRoot/index.html
>>
>> but I want to keep it like http://localhost:8080/index.html and for
>> all other request.
>>
>> Maybe I need to do something with the rules in the urlrewrite.xml
>>
>> Any ideas?
>>
> Why do you not just rename "myRoot" to "ROOT", making this the default
> application ?
> http://wiki.apache.org/tomcat/HowTo#How_do_I_make_my_web_application_be_the_Tomcat_default_application.3F
>


Hi Andre,

Thanks. I know about placing the web app (like myRoot) under the ROOT 
and it will work. However, there is another issue I that comes when I do 
this, an issue with my GWT (http://code.google.com/webtoolkit/) web app, 
where the the client-side code cannot access the services (servlets).

My gwt application works just fine in the myRoot folder of the tomcat 
webapps folder. So my idea, is just forward every access to the ROOT to 
myRoot.

But then again, if there's a better solution I am may want to try it.




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


Mime
View raw message