Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Struts form

Posted on 2003-11-24
4
Medium Priority
?
255 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Read on to get a few ideas on how to promote your next corporate event.
Files go missing when using DFS (Distributed File System) Replication and how to recover them and fix it.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 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