I am using the follwoing code to rewrite my URL. everytime I click on the Profile link it works but adds EXTRA Profile/view to the end of address.
http://www.example.com/myProject/Profile/view.action
first time I click on view it changes it to
http://www.example.com/myProject/Profile/Profile/view.action
after that if I click the view again it will be (everytime I click it addes a /Profile to the address)
http://localhost:8080/myProject/Profile/Profile/Profile/view.action
link
<a href="<s:url action="Profile/view"/>" >Profile</a>
struts.xml
<package name="default" extends="struts-default">
<result-types>
<result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult"/>
</result-types>
<action name="index">
<result type="tiles">content</result>
</action>
</package>
<package name="Profile" extends="default" namespace="/Profile">
<action name = "*" method="{1}" class="com.myproject.Profile">
<result name="View" type="tiles">Profile</result>
<result name="Edit" type="tiles">Edit</result>
</action>
</package>
the problem is that everytime I click on view it does not remove the address and add the profile/view to the end of it. It just change the address from www.example.com/myproject/profile/view to www.example.com/myproject/profile/profile/view