[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Struts form

Posted on 2003-11-24
4
Medium Priority
?
258 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 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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

In this article I will be showing you how to subnet the easiest way possible for IPv4 (Internet Protocol version 4). This article does not cover IPv6. Keep in mind that subnetting requires lots of practice and time.
Social messanging services like WhatsApp and Facebook can help businesses in ways that many owners don't even imagine, giving new opportunities to connect with customers. Discover some of the most innovative things they can do for your company.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

834 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