You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by skydiverx <ma...@tapestryforums.com> on 2005/12/27 01:39:39 UTC

Strange URL rewriting behaviour

Hi,

   When I run my application in with just Tomcat everything works like a charm, but when I move my webapp to another site where Tomcat is proxied behind Apache, the links don't work anymore. I get a 404 on each and every one.

   What happens is that a ";jsessionid=xxx" is inserted between the base app URL and the parameters.

Like so ...

http://localhost/GameBrowser/app?component=gamesTable.tablePages.linkPage&page=Home&service=direct&session=T&sp=AHome%2CgamesTable.tableView&sp=2

turns into ...

http://mysite/GameBrowser/app;jsessionid=00CE26938AD223A726FBEA6C21B010F2?component=gamesTable.tablePages.linkPage&page=Home&service=direct&session=T&sp=AHome%2CgamesTable.tableView&sp=2

The browser is the same in both cases so I assume this has something to do with how Apache and Tomcat play together. 

I am at my wits end here. What to do?

Any and all suggestions welcome.

Tom.


-------------------- m2f --------------------

Sent from www.TapestryForums.com

Read this topic online here: <<topic_link>>

http://www.tapestryforums.com/viewtopic.php?p=12417#12417

-------------------- m2f --------------------



RE: Strange URL rewriting behaviour

Posted by skydiverx <ma...@tapestryforums.com>.
I get the error from Apache. 

If I look in error.log it says "File does not exist: /var/www/html/game-browser, referer: http://mysite.com/browse/app".

Now, http://mysite.com/browse/app is the URL of the application and that page loads fine. When I try any of the links (who all have ";jsessionid etc") the above error happens.

It seems lika apahce thinks the URL points to a file instead of sending it to Tomcat.

In my http.conf I use ProxyPass and ProxyPassReverse like so:

ProxyPass        /browse http://localhost:8080/game-browser
ProxyPassReverse /browse http://localhost:8080/game-browser


-------------------- m2f --------------------

Sent from www.TapestryForums.com

Read this topic online here: <<topic_link>>

http://www.tapestryforums.com/viewtopic.php?p=12566#12566

-------------------- m2f --------------------



Re: Strange URL rewriting behaviour

Posted by Paul Cantrell <ca...@pobox.com>.
Are you getting the 404 from Apache or Tomcat?

(If the former, perhaps your JkMount directive isn't matching the  
rewritten URL...?)

P

On Dec 26, 2005, at 5:39 PM, skydiverx wrote:

> Hi,
>
>    When I run my application in with just Tomcat everything works  
> like a charm, but when I move my webapp to another site where  
> Tomcat is proxied behind Apache, the links don't work anymore. I  
> get a 404 on each and every one.
>
>    What happens is that a ";jsessionid=xxx" is inserted between the  
> base app URL and the parameters.
>
> Like so ...
>
> http://localhost/GameBrowser/app? 
> component=gamesTable.tablePages.linkPage&page=Home&service=direct&sess 
> ion=T&sp=AHome%2CgamesTable.tableView&sp=2
>
> turns into ...
>
> http://mysite/GameBrowser/ 
> app;jsessionid=00CE26938AD223A726FBEA6C21B010F2? 
> component=gamesTable.tablePages.linkPage&page=Home&service=direct&sess 
> ion=T&sp=AHome%2CgamesTable.tableView&sp=2
>
> The browser is the same in both cases so I assume this has  
> something to do with how Apache and Tomcat play together.
>
> I am at my wits end here. What to do?
>
> Any and all suggestions welcome.
>
> Tom.
>
>
> -------------------- m2f --------------------
>
> Sent from www.TapestryForums.com
>
> Read this topic online here: <<topic_link>>
>
> http://www.tapestryforums.com/viewtopic.php?p=12417#12417
>
> -------------------- m2f --------------------
>
>

_________________________________________________________________
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


RE: Strange URL rewriting behaviour

Posted by skydiverx <ma...@tapestryforums.com>.
Just wanted to let you all know we resolved this issue.

After weeks trying to make mod_proxy work, we finally gave up and changed to mod_jk. Installed and configured everything in a couple of minutes time and everything now works.

Lesson learned, stay away from mod_proxy, use mod_jk instead, unless you feel you really want to spend time on the URL rewrite stuff.

- Tom


-------------------- m2f --------------------

Sent from www.TapestryForums.com

Read this topic online here: <<topic_link>>

http://www.tapestryforums.com/viewtopic.php?p=12772#12772

-------------------- m2f --------------------