Forum Moderators: phranque

Message Too Old, No Replies

Problem in virtual host of Struts 2 Application

Struts 2 deployment problem

         

asitjaiswal

10:40 am on Jun 11, 2010 (gmt 0)

10+ Year Member



Hi!
I am trying to host a Struts 2 Application.
I am using a virtual host to host it.
Application Information :
Application is deployed at: h ttp://localhost:8080/StatusInternal/

Note: space between http is provided intentionally
Virtual Host:

<VirtualHost *:80>
RewriteEngine on
ServerName statusint
DirectoryIndex index.jsp
DocumentRoot "C:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\StatusInternal"
RewriteRule ^/(.+)$ h ttp://localhost:8080/StatusInternal/$1 [P]
ProxyPassReverse / h ttp://localhost:8080/StatusInternal/
ProxyPassReverseCookieDomain h ttp://localhost:8080/StatusInternal/ statusint
ProxyPassReverseCookiePath /statusint /
ProxyErrorOverride On
ErrorDocument 503 /sorry.html
</VirtualHost>

Problem : I am using proxy module, when I type URL: h ttp://statusint
in browser every thing is fine it shows a login page , when I typed in login name and password and pressed submit button the URL becomes
h ttp://statusint/StatusInternal/populateuserhome.cm2 it gets login.
expected URL should be : h ttp://statusint/populateuserhome.cm2

Please guide me .

Thanks
Asit Jaiswal

jdMorgan

4:20 pm on Jun 11, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You don't need the RewriteRule directive, as its function is redundant with the ProxyPassReverse directive's.
It also may be the cause of your proxied path getting exposed.

Otherwise, look for additional redirects on the back-end that may be exposing the proxied path.

Jim

asitjaiswal

6:26 am on Jun 12, 2010 (gmt 0)

10+ Year Member



Hi Jim
Thanks for your reply...
Great advice.
Its working now.

Thanks
Asit Jaiswal