Link to home
Start Free TrialLog in
Avatar of rahulkothari
rahulkothari

asked on

Struts form

I am using the struts html:form tag.
Now when the page is generated , struts automatic creates the action for me , in my case its action="/temp/do/sayHello"
where temp is the name of my web app.
Now i have a requirement to add a string("yahoo") before "/temp" so now all my actions would be : /yahoo/temp/do/sayHello or  /yahoo/temp/do/sayHi etc etc. How do i implement this......i would like to make change in only once place.

Thanx
Avatar of kennethxu
kennethxu

I think you need to configure you webcontext root to /yahoo/temp
try changing the servlet mapping of the ActionServlet
change the <url-pattern> to /yahoo/temp/do/* in WEB-INF/web.xml
ASKER CERTIFIED SOLUTION
Avatar of f_98
f_98

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> i dont think you can change it without changing the name of your webapp.
there is nothing to do with the name, it's the context root path that matters :-)