Welcome to WebmasterWorld Guest from 23.20.65.255

Forum Moderators: Ocean10000 & incrediBILL & phranque

Tomcat from Root

     
6:03 pm on Mar 20, 2017 (gmt 0)

Full Member

5+ Year Member Top Contributors Of The Month

joined:Feb 19, 2012
posts: 322
votes: 2


We have an annoying historical situation:

We have static files as follows:
/
/folder1
/folder2...

And the Tomcat WebApp under:
/webApp

We forward every request under /webApp from Apache to the tomcat container with mod_jk

On the homepage "example.com/index.html" we use an ugly FRAME to include a full html (originally a jsp) from the webApp because we need some webApp (Tomcat) functionaly on the homepage. So the Frame's source points "/webApp/main.jsp"

Is there a nicer way to do it? We are concerned about SEO.

I am not sure Rewrites will work because they will drop the Tomcat functionality because it looks at the page as an html, for example the Jsession may be ignored.
11:52 pm on Mar 29, 2017 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10809
votes: 53


try using mod_headers:
http://httpd.apache.org/docs/current/mod/mod_headers.html [httpd.apache.org]

you can change any cookie paths as required using the "Header edit Set-Cookie" syntax.
(this is most likely the cause of your lost tomcat functionality with an internal rewrite.)
5:26 am on Mar 30, 2017 (gmt 0)

Full Member

5+ Year Member Top Contributors Of The Month

joined:Feb 19, 2012
posts: 322
votes: 2


@Phranque Thanks. We thought about it too because the tomcat cookie path is set to /webApp. We need to set them all to root /.

Some questions nonetheless:

- Isn't there a way to do it in Tomcat instead of Apache?

- Can you think of other issues related to a Rewrite (to Apache) in the background?