2013年10月22日星期二

How to make use of spring struts2 action?

Just plug into spring package configuration file in struts2 action element in the class attribute value is set to spring in the name of the bean can manage ,
but I use an action to handle multiple requests class attribute
 <action name="*/*" class="com.youkan.logistics.action.{1}Action" method="{2}" >
  
   <result name="msg">/MyJsp.jsp</result>
  
   </action>

he did not do with a bean name ! how do think it is how conflicting
------ Solution ---------------------------- ----------------
accompanied by annotations enough. Write so much trouble.
------ For reference only -------------------------------------- -
eh , the problem could not understand . Can only guess .

;

/ MyJsp.jsp



Here are dynamic, such as your name is test1/test2 Here cclass
That is : com.youkan.logistics.action.test1Action
method is : test2
to spring configuration to find com.youkan.logistics.action.test1Action, wants
------ For reference only ----------------- ----------------------

! ! ! !

originally written in spring management class name can be filed

such LoginAction here is spring managed bean name
But I'll use an action to handle multiple requests it
;
This class can not be used after the name of the bean . then how to do ?

This clearly did not ah described under

------ For reference only ---------------------------------- -----


Yes, this is indeed a way you

没有评论:

发表评论