I am trying out struts action mappings and wildcards so that I can provide
my dynamic content static URLs that are

not based on query strings.

 

When my action class forwards to success or failure all the URLs in the
receiving .jsp page are prefix with the initial URL.

 

For example if I submit the following URL to my action class

 

http://www.example.com/getCompanyDetails/companyName/postalCode/CEO all the
urls in the receiving .jsp file look like

 

/getCompanyDetails/companyName/postalCode/CEO/contactUs.jsp - a contact us
link in my footer 

 

Here is my action definition:

 

<action path="/getCompanyDetails/*/*/*/*"
type="com.example.struts.GetCompanyDetailsAction" parameter="{4}"
name="getCompanyDetailsForm" scope="request" input="/displayCompanies.jsp"
validate="false">

      <forward name="failure" path="/displayCompanies.jsp" />

      <forward name="success" path="/displayCompanyDetails.jsp"  />

</action>

 

Any advice you have on how to solve this would be appreciated.

 

Thanks again.

 

Cheers,

Jeff

 

 

 

Reply via email to