Solved

Struts form

Posted on 2003-11-24
4
248 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
Comment Utility
I think you need to configure you webcontext root to /yahoo/temp
0
 
LVL 2

Expert Comment

by:f_98
Comment Utility
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
Comment Utility
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
Comment Utility
>> 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now