In a weblogic server. I installed inside two indipendent WAR application
war1 with "app1" context root (set in application.xml)
war2 with "app2" context root.
I have to sat that i can not modify any weblogic configuration, i have a single server in that domain with a fixed root (mydomain/myear)
The application server answer correctly here:
My trouble is when struts and his tiles create the html path in the views, becuse it thinks that the root is "app1" and not "myear/app1".
Infact the homepage correctly started but inside the html:form tag had this action path: "/app1/MyAction" and obviously it will send to http://mydomain/app1/MyAction out of my application.
How can i setup struts to add "myear/" before the context root when it makes the html paths?
Thank you.
Raj Kamal
Ranch Hand
Joined: Mar 02, 2005
Posts: 400
posted
0
Hi,
You can use a request.getContextPath() along with the URL. But my understanding is that if you use html:xxx tags Struts takes care of adding the context path by default? Check out this post
Thanks for your answer.
It can be, but i must change every page... I hope there is some configuration... or no?
This is a big application that before was deployed in a domaim root (http://mydomain/app1) so everything worked correctly... but now it moves to a sub-folder of the domain, that it is still in a virtualserver root (server side the context root is corret), but i need to map the path action in html with the context-root (already done by struts) "app1" but prepending "myear", exists some configuration attribute?
Thanks
Bear Bibeault
Author and opinionated walrus
Marshal
Maybe it did not well explain...
I use this tag: <html:form action="/MyAction"> and /MyAction refer to an action in the struts config.
In generated html this became: <form action="/app1/MyAction" > so struts automatically (correctly) prepend to action the context-root of my app.
There is no way to use a relativePath or to manually set the context-path (/myear/app1 instead of /app1)?