You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "SanJ.SANJAY" <gi...@gmail.com> on 2009/05/05 18:16:56 UTC

Struts 1 Plugin | forwards?

Has anyone used struts 1 plugin for using struts 1 actions in struts 2? How
would we handle the return types? As in struts 1 actions, it is an
actionfoward type and struts 2 return type is string ("SUCCESS", "INPUT"
etc..)

After I installed the plugin and changes the struts.xml file:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
  
  <constant name="struts.devMode" value="true"/>
  
  <package name="OpportunityAction" extends="struts1-default"
namespace="/OpportunityAction">
   			
	<action name="OpportunityAction"
class="org.apache.struts2.s1.Struts1Action">
		com.cec.cdb.struts.actionclass.opportunity.ReportI 			
		
		<interceptor-ref name="scopedModelDriven">
			com.cec.cdb.struts.actionform.opportunity.OppForm
			OppForm
			request
		</interceptor-ref>
		
		<interceptor-ref name="struts1Stack"></interceptor-ref>		
		
		<result name="success">/jsp/newOpp.jsp</result>  
    </action>
    
  </package>

</struts>


It goes inside the struts 1 action action but fails for return type I guess
as the console error says:

12:08:03,730 WARN  [OgnlValueStack] Could not find property
[.freemarker.RequestParameters]
12:08:03,730 WARN  [OgnlValueStack] Could not find property [hideNav]
12:08:03,730 WARN  [OgnlValueStack] Could not find property [hideNav]
12:08:04,293 WARN  [OgnlValueStack] Could not find property
[struts.valueStack]
12:08:04,324 WARN  [OgnlValueStack] Could not find property
[.freemarker.Request]
12:08:04,324 WARN  [OgnlValueStack] Could not find property
[.freemarker.RequestParameters]
12:08:04,324 WARN  [OgnlValueStack] Could not find property [hideNav]
12:08:04,324 WARN  [OgnlValueStack] Could not find property [hideNav]
12:08:07,058 WARN  [OgnlValueStack] Could not find property
[struts.valueStack]
12:08:07,199 INFO  [STDOUT]
***********************************************************************************
inside execute()
12:08:07,199 WARN  [OgnlValueStack] Could not find property
[org.apache.struts.action.ACTION_MESSAGE]




-- 
View this message in context: http://www.nabble.com/Struts-1-Plugin-%7C-forwards--tp23390825p23390825.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts 1 Plugin | forwards?

Posted by "SanJ.SANJAY" <gi...@gmail.com>.
No, there is a plugin "Struts 1 Plugin" which lets you use the struts 1
actions in struts 2 application.


mgainty wrote:
> 
> 
> sounds like you're mixing your Struts1 code with struts2 jars
> 
> probably easiest just to convert your codebase up to Struts2
> http://struts.apache.org/2.0.12/docs/migration-guide.html
> 
> Martin 
> ______________________________________________ 
> Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note
> de déni et de confidentialité
> This message is confidential. If you should not be the intended receiver,
> then we ask politely to report. Each unauthorized forwarding or
> manufacturing of a copy is inadmissible. This message serves only for the
> exchange of information and has no legal binding effect. Due to the easy
> manipulation of emails we cannot take responsibility over the the
> contents.
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> copie de ceci est interdite. Ce message sert à l'information seulement et
> n'aura pas n'importe quel effet légalement obligatoire. Étant donné que
> les email peuvent facilement être sujets à la manipulation, nous ne
> pouvons accepter aucune responsabilité pour le contenu fourni.
> 
> 
> 
> 
>> Date: Tue, 5 May 2009 09:16:56 -0700
>> From: girish.sh@gmail.com
>> To: user@struts.apache.org
>> Subject: Struts 1 Plugin | forwards?
>> 
>> 
>> Has anyone used struts 1 plugin for using struts 1 actions in struts 2?
>> How
>> would we handle the return types? As in struts 1 actions, it is an
>> actionfoward type and struts 2 return type is string ("SUCCESS", "INPUT"
>> etc..)
>> 
>> After I installed the plugin and changes the struts.xml file:
>> 
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <!DOCTYPE struts PUBLIC
>>         "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>>         "http://struts.apache.org/dtds/struts-2.0.dtd">
>> 
>> <struts>
>>   
>>   <constant name="struts.devMode" value="true"/>
>>   
>>   <package name="OpportunityAction" extends="struts1-default"
>> namespace="/OpportunityAction">
>>    			
>> 	<action name="OpportunityAction"
>> class="org.apache.struts2.s1.Struts1Action">
>> 		com.cec.cdb.struts.actionclass.opportunity.ReportI 			
>> 		
>> 		<interceptor-ref name="scopedModelDriven">
>> 			com.cec.cdb.struts.actionform.opportunity.OppForm
>> 			OppForm
>> 			request
>> 		</interceptor-ref>
>> 		
>> 		<interceptor-ref name="struts1Stack"></interceptor-ref>		
>> 		
>> 		<result name="success">/jsp/newOpp.jsp</result>  
>>     </action>
>>     
>>   </package>
>> 
>> </struts>
>> 
>> 
>> It goes inside the struts 1 action action but fails for return type I
>> guess
>> as the console error says:
>> 
>> 12:08:03,730 WARN  [OgnlValueStack] Could not find property
>> [.freemarker.RequestParameters]
>> 12:08:03,730 WARN  [OgnlValueStack] Could not find property [hideNav]
>> 12:08:03,730 WARN  [OgnlValueStack] Could not find property [hideNav]
>> 12:08:04,293 WARN  [OgnlValueStack] Could not find property
>> [struts.valueStack]
>> 12:08:04,324 WARN  [OgnlValueStack] Could not find property
>> [.freemarker.Request]
>> 12:08:04,324 WARN  [OgnlValueStack] Could not find property
>> [.freemarker.RequestParameters]
>> 12:08:04,324 WARN  [OgnlValueStack] Could not find property [hideNav]
>> 12:08:04,324 WARN  [OgnlValueStack] Could not find property [hideNav]
>> 12:08:07,058 WARN  [OgnlValueStack] Could not find property
>> [struts.valueStack]
>> 12:08:07,199 INFO  [STDOUT]
>> ***********************************************************************************
>> inside execute()
>> 12:08:07,199 WARN  [OgnlValueStack] Could not find property
>> [org.apache.struts.action.ACTION_MESSAGE]
>> 
>> 
>> 
>> 
>> -- 
>> View this message in context:
>> http://www.nabble.com/Struts-1-Plugin-%7C-forwards--tp23390825p23390825.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
> 
> _________________________________________________________________
> Hotmail® has ever-growing storage! Don’t worry about storage limits.
> http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009
> 

-- 
View this message in context: http://www.nabble.com/Struts-1-Plugin-%7C-forwards--tp23390825p23391888.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Struts 1 Plugin | forwards?

Posted by Martin Gainty <mg...@hotmail.com>.
sounds like you're mixing your Struts1 code with struts2 jars

probably easiest just to convert your codebase up to Struts2
http://struts.apache.org/2.0.12/docs/migration-guide.html

Martin 
______________________________________________ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
This message is confidential. If you should not be the intended receiver, then we ask politely to report. Each unauthorized forwarding or manufacturing of a copy is inadmissible. This message serves only for the exchange of information and has no legal binding effect. Due to the easy manipulation of emails we cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Tue, 5 May 2009 09:16:56 -0700
> From: girish.sh@gmail.com
> To: user@struts.apache.org
> Subject: Struts 1 Plugin | forwards?
> 
> 
> Has anyone used struts 1 plugin for using struts 1 actions in struts 2? How
> would we handle the return types? As in struts 1 actions, it is an
> actionfoward type and struts 2 return type is string ("SUCCESS", "INPUT"
> etc..)
> 
> After I installed the plugin and changes the struts.xml file:
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE struts PUBLIC
>         "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>         "http://struts.apache.org/dtds/struts-2.0.dtd">
> 
> <struts>
>   
>   <constant name="struts.devMode" value="true"/>
>   
>   <package name="OpportunityAction" extends="struts1-default"
> namespace="/OpportunityAction">
>    			
> 	<action name="OpportunityAction"
> class="org.apache.struts2.s1.Struts1Action">
> 		com.cec.cdb.struts.actionclass.opportunity.ReportI 			
> 		
> 		<interceptor-ref name="scopedModelDriven">
> 			com.cec.cdb.struts.actionform.opportunity.OppForm
> 			OppForm
> 			request
> 		</interceptor-ref>
> 		
> 		<interceptor-ref name="struts1Stack"></interceptor-ref>		
> 		
> 		<result name="success">/jsp/newOpp.jsp</result>  
>     </action>
>     
>   </package>
> 
> </struts>
> 
> 
> It goes inside the struts 1 action action but fails for return type I guess
> as the console error says:
> 
> 12:08:03,730 WARN  [OgnlValueStack] Could not find property
> [.freemarker.RequestParameters]
> 12:08:03,730 WARN  [OgnlValueStack] Could not find property [hideNav]
> 12:08:03,730 WARN  [OgnlValueStack] Could not find property [hideNav]
> 12:08:04,293 WARN  [OgnlValueStack] Could not find property
> [struts.valueStack]
> 12:08:04,324 WARN  [OgnlValueStack] Could not find property
> [.freemarker.Request]
> 12:08:04,324 WARN  [OgnlValueStack] Could not find property
> [.freemarker.RequestParameters]
> 12:08:04,324 WARN  [OgnlValueStack] Could not find property [hideNav]
> 12:08:04,324 WARN  [OgnlValueStack] Could not find property [hideNav]
> 12:08:07,058 WARN  [OgnlValueStack] Could not find property
> [struts.valueStack]
> 12:08:07,199 INFO  [STDOUT]
> ***********************************************************************************
> inside execute()
> 12:08:07,199 WARN  [OgnlValueStack] Could not find property
> [org.apache.struts.action.ACTION_MESSAGE]
> 
> 
> 
> 
> -- 
> View this message in context: http://www.nabble.com/Struts-1-Plugin-%7C-forwards--tp23390825p23390825.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage1_052009