I have a problem with a site on struts2.
First I developed the site on http://localhost:8080/site
Then QA team deployed it to http://testmachine/site
- all worked ok.
Then QA created http://sub.anotherdomain.com
that pointed to http://testmachine/site
- and that is where problems began.
I notice that all links was like http://sub.anotherdomain.com/site/some.action
- it means that the real path link was pointing to was http://testmachine/site/site/some.action
which was wrong.
The struts tag included the webapp context path (/site) which was the place the site actually deployed.
I found the way to work only on http://sub.anotherdomain.com/
or on http://testmachine/
(root context) with same way. I changed the includeContext="false"
on all s:url
tags. But that is not working with s:form
that is still includes context information in action="sendMail.action"
1. How to have my site working both on http://testmachine/site
2. How to have <s:form action="sendMail.action" method="get" theme="simple">
pointed to http://sub.anotherdomain.com/sendMail.action
but not on http://sub.anotherdomain.com/site/sendMail.action