Solved

Struts form

Posted on 2003-11-24
4
251 Views
Last Modified: 2010-04-01
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
0
Comment
Question by:rahulkothari
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:kennethxu
ID: 9813507
I think you need to configure you webcontext root to /yahoo/temp
0
 
LVL 2

Expert Comment

by:f_98
ID: 9815423
try changing the servlet mapping of the ActionServlet
change the <url-pattern> to /yahoo/temp/do/* in WEB-INF/web.xml
0
 
LVL 2

Accepted Solution

by:
f_98 earned 125 total points
ID: 9815439
oops, my mistake.

>> in my case its action="/temp/do/sayHello" where temp is the name of my web app.

i dont think you can change it without changing the name of your webapp.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 9815516
>> 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 :-)
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A professional opinion on which Apple product to buy, and a tidbit about the WWDC.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question