Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use struts2 rest-style and default style at same time

Status
Not open for further replies.

ryman1981

Programmer
Jan 20, 2010
1
CN
I want to use struts2 default-style and rest-style at the same time,for example the login action does struts default method execute(). but when I add the struts2-rest-plugin in lib, my default-style does not work. And when I use the configuration properties:
<constant name="struts.mapper.class" value="composite"/>
<constant name="struts.mapper.composite" value="struts,rest"/>
<constant name="struts.convention.action.suffix" value="Controller" />
<constant name="struts.convention.action.mapAllMatches" value="true" />
<constant name="struts.convention.default.parent.package" value="rest-default" />
<constant name="struts.convention.package.locators" value="example" />
then the rest-style does not work. But when I change the property <constant name="struts.mapper.composite" value="rest,struts"/> the default-style does not work.
How to solve it? Thanks a lot!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top