aspose file tools*
The moose likes Struts and the fly likes Struts2 action adds folder path to url Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 action adds folder path to url" Watch "Struts2 action adds folder path to url" New topic
Author

Struts2 action adds folder path to url

Ramesh kangamuthu
Ranch Hand

Joined: Mar 13, 2007
Posts: 79
In my Struts2 action i invoked loginAction_check.action and it generates the

url - /myapp/jsp/common/loginAction_check.action .


but i need only /myapp/loginAction_check.action. I think that it prepends the result jsp file path /jsp/common to the url.

How can I remove /jsp/common after /myapp in the url?







David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Without knowing how you're generating the URL it's impossible to help.
Ramesh kangamuthu
Ranch Hand

Joined: Mar 13, 2007
Posts: 79
I know how to execute Struts2 action and I followed it this project. But I want to know whether Struts2 specifies an action in the url exactly after the context root , ie App name, or not.

Only for the first time it adds jsp/common after the action. For subsequent requests the url comes as /AppName/actionName

 
Consider Paul's rocket mass heater.
 
subject: Struts2 action adds folder path to url