You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sandy143 <sj...@gmail.com> on 2008/04/24 18:28:33 UTC

Struts1 and Struts2 in the same app

I  have to integrate struts 2 actions in my existing struts 1.2 web
application.

 

My login page is using struts 1.2 action. Upon login, I come to home page.
there is a link on home page. when I click on that link, I need to go to
another jsp page. The later action has to be in struts 2. 

 

I have added filter, filter mapping for struts 2 in web.xml.

I have included struts.xml in the root of the project (under java source
folder). This included struts-config.xml (using struts 1.2.8) and
struts-config-two.xml (using struts 2). 

 

--> struts-config.xml is in web-inf

--> struts-config-two.xml is in the root of the project (under java source
folder)

 

my  struts-config-two.xml is :

-----------------------------------------------------------------

 

<?xml version="1.0" encoding="UTF-8" ?>



 



 

            

 

                        

                                    

                                     /TestLink.jsp 

                        

            

 



 

--------------------------------------------------------------------------

 

In my TestLink.jsp, I am specifying :

 

 

 Test Link Home  Test Link

 

-------------------------------------------------------------------------------------

I am able to login to the app. but When I click on the link I get an error
message : ERROR action.RequestProcessor  - Invalid path was requested
/xxx/TestAction.

 

Can you please help me to resolve this issue.

 

I would have to use struts2 action in the flow of struts1 action. Please let
me know the step by step procedure.

 

I have read the migration tutorial. but it didn't help me to resolve this
issue.

 

 

 

-- 
View this message in context: http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16851031.html
Sent from the Struts - User mailing list archive at Nabble.com.

Re: Struts1 and Struts2 in the same app

Posted by Sandy143 <sj...@gmail.com>.
Even if I don't include ... it is the same.

It doesnot invoke struts2 action class.


newton.dave wrote:
> 
> You're including the S1 configuration file in the S2 config file?
> 
> Dave
> 
> --- Sandy143 <sj...@gmail.com> wrote:
> 
>> 
>> In struts.xml, I have
>> 
>> -----------------------------------------
>> <include file="/WEB-INF/struts-config.xml" />
>> <include file="/struts-config-two.xml" /> 
>> -----------------------------------------
>> yes! struts.xml is placed in WEB-INF/classes/  
>> 
>> Do you have any solution for it?
>> 
>> 
>> 
>> KonTiki wrote:
>> > 
>> > Hi Sandy,
>> > 
>> > How exactly did you do the struts.xml inclusion?
>> > (I had a similar problem, where I found the struts.xml for struts 2
>> wasn't
>> > picking the correct xml)
>> > And by java source folder - do you mean WEB-INF/classes/  ?
>> > 
>> > 
>> > Sandy143 wrote:
>> >> 
>> >> I  have to integrate struts 2 actions in my existing struts 1.2 web
>> >> application.
>> >> 
>> >> My login page is using struts 1.2 action. Upon login, I come to home
>> >> page. there is a link on home page. when I click on that link, I need
>> to
>> >> go to another jsp page. The later action has to be in struts 2. 
>> >> 
>> >> I have added filter, filter mapping for struts 2 in web.xml.
>> >> 
>> >> I have included struts.xml in the root of the project (under java
>> source
>> >> folder). This included struts-config.xml (using struts 1.2.8) and
>> >> struts-config-two.xml (using struts 2). 
>> >> 
>> >>  --> struts-config.xml is in web-inf
>> >> 
>> >> --> struts-config-two.xml is in the root of the project (under java
>> >> source folder)
>> >> 
>> >>  my  struts-config-two.xml is :
>> >> 
>> >> -----------------------------------------------------------------
>> >> <?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>
>> >>             <package name="xxx" namespace="/xxx"
>> extends="xxx-default">
>> >> 
>> >>                         <action name="testAction2" 
>> >>                                    
>> >> class="x.y.z.presentation.test.TestAction2">
>> >>                              <result name="home"> /TestLink.jsp
>> </result>
>> >>                         </action>
>> >> 
>> >>             </package>
>> >> </struts>
>> >> 
>> >> 
>> >>
>> --------------------------------------------------------------------------
>> >> 
>> >> In my TestLink.jsp, I am specifying :
>> >> 
>> >> <s:url id="viewURL" namespace="/xxx" action="testAction2" /> 
>> >> 
>> >> <s:a href=%{viewURL}> Test Link Home </s:a> Test Link
>> >> 
>> >> 
>> >>
>>
> -------------------------------------------------------------------------------------
>> >> 
>> >> I am able to login to the app. but When I click on the link I get an
>> >> error message : ERROR action.RequestProcessor  - Invalid path was
>> >> requested /xxx/TestAction.
>> >> 
>> >> Can you please help me to resolve this issue.
>> >> 
>> >>  I would have to use struts2 action in the flow of struts1 action.
>> Please
>> >> let me know the step by step procedure. Can anyone provide a sample
>> app
>> >> or config info on how it can be done?
>> >> 
>> >> I have read the migration tutorial. but it didn't help me to resolve
>> this
>> >> issue.
>> >> 
>> >>  
>> >> 
>> >>  
>> >> 
>> >>  
>> >> 
>> >> 
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16942822.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
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16945436.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: Struts1 and Struts2 in the same app

Posted by Sandy143 <sj...@gmail.com>.
Hi,

How would I define a dispatch action in struts1 ... in struts.xml while
migrating?



newton.dave wrote:
> 
> --- Sandy143 <sj...@gmail.com> wrote:
>> With this we will not have ... struts1 config file right ????
>> 
>> struts-config.xml would be completely modified to struts.xml. Am I on the
>> right path?
> 
> Are you trying to use the plugin, or are you trying to run in parallel?
> 
> The S1 plugin wraps S1 actions inside S2 actions. There wouldn't be an S1
> configuration file.
> 
> If you're not using the plugin, then you configure S1 and S2 completely
> separately from each other.
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16985158.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: Struts1 and Struts2 in the same app

Posted by Laurie Harper <la...@holoweb.net>.
Yes. If you don't want to migrate any of your existing Struts 1 JSPs, 
you can just add Struts 2 to the application, leaving everything else as 
it is. Later, you can add the Struts 1 plugin to help with migrating 
existing (Struts 1) views to Struts 2.

L.

Sandy143 wrote:
> "If you're not using the plugin, then you configure S1 and S2 completely
> separately from each other."
> 
> Can I do this if I want to use both S1 and S2 in the same web app (single
> web.xml)?
> 
> 
> 
> 
> newton.dave wrote:
>> --- Sandy143 <sj...@gmail.com> wrote:
>>> With this we will not have ... struts1 config file right ????
>>>
>>> struts-config.xml would be completely modified to struts.xml. Am I on the
>>> right path?
>> Are you trying to use the plugin, or are you trying to run in parallel?
>>
>> The S1 plugin wraps S1 actions inside S2 actions. There wouldn't be an S1
>> configuration file.
>>
>> If you're not using the plugin, then you configure S1 and S2 completely
>> separately from each other.
>>
>> Dave
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
> 


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


Re: Struts1 and Struts2 in the same app

Posted by Sandy143 <sj...@gmail.com>.
"If you're not using the plugin, then you configure S1 and S2 completely
separately from each other."

Can I do this if I want to use both S1 and S2 in the same web app (single
web.xml)?




newton.dave wrote:
> 
> --- Sandy143 <sj...@gmail.com> wrote:
>> With this we will not have ... struts1 config file right ????
>> 
>> struts-config.xml would be completely modified to struts.xml. Am I on the
>> right path?
> 
> Are you trying to use the plugin, or are you trying to run in parallel?
> 
> The S1 plugin wraps S1 actions inside S2 actions. There wouldn't be an S1
> configuration file.
> 
> If you're not using the plugin, then you configure S1 and S2 completely
> separately from each other.
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16962482.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: Struts1 and Struts2 in the same app

Posted by Dave Newton <ne...@yahoo.com>.
--- Sandy143 <sj...@gmail.com> wrote:
> With this we will not have ... struts1 config file right ????
> 
> struts-config.xml would be completely modified to struts.xml. Am I on the
> right path?

Are you trying to use the plugin, or are you trying to run in parallel?

The S1 plugin wraps S1 actions inside S2 actions. There wouldn't be an S1
configuration file.

If you're not using the plugin, then you configure S1 and S2 completely
separately from each other.

Dave


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


Re: Struts1 and Struts2 in the same app

Posted by Sandy143 <sj...@gmail.com>.
With this we will not have ... struts1 config file right ????

struts-config.xml would be completely modified to struts.xml. Am I on the
right path?

Thanks,



newton.dave wrote:
> 
> --- Sandy143 <sj...@gmail.com> wrote:
>> It is a single application.
>> 
>> when trying to access struts2 action ... it is unable to find the path.
>> (Error: Invalid Specified Path ...)
>> 
>> I have interceptors in struts.xml. I have plugin jar in web-inf/lib.
>> 
>> I am not sure of what needs to be done in addition to this...
> 
> Did you follow the instructions at the S1 Plugin page?
> 
> http://struts.apache.org/2.x/docs/struts-1-plugin.html
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16961727.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: Struts1 and Struts2 in the same app

Posted by Dave Newton <ne...@yahoo.com>.
--- Sandy143 <sj...@gmail.com> wrote:
> It is a single application.
> 
> when trying to access struts2 action ... it is unable to find the path.
> (Error: Invalid Specified Path ...)
> 
> I have interceptors in struts.xml. I have plugin jar in web-inf/lib.
> 
> I am not sure of what needs to be done in addition to this...

Did you follow the instructions at the S1 Plugin page?

http://struts.apache.org/2.x/docs/struts-1-plugin.html

Dave


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


Re: Struts1 and Struts2 in the same app

Posted by Sandy143 <sj...@gmail.com>.
It is a single application.

when trying to access struts2 action ... it is unable to find the path.
(Error: Invalid Specified Path ...)

I have interceptors in struts.xml. I have plugin jar in web-inf/lib.

I am not sure of what needs to be done in addition to this...

Your help would be greatly appreciated.




newton.dave wrote:
> 
> --- Sandy143 <sj...@gmail.com> wrote:
>> Am I wrong? Please let me know ...how to use both the config files.
> 
> An included file within struts.xml is expected to be an S2 config, AFAIK.
> 
> Were there any error messages in the logs?
> 
> If you're using the S1 plugin then the docs at [1] give a decent overview.
> There is a known issue with using the S1 plugin with S1.3.8, but you
> indicated you were using S1.2; I think you're having some more basic
> configuration issues.
> 
> If you're not using the S1 plugin I'd assume the two frameworks are
> running
> in parallel: each would require its own configuration, any request mapping
> issues are resolved, etc.
> 
> Dave
> 
> [1] http://struts.apache.org/2.x/docs/struts-1-plugin.html
> 
>> newton.dave wrote:
>> > You're including the S1 configuration file in the S2 config file?
>> > 
>> > --- Sandy143 <sj...@gmail.com> wrote:
>> >> In struts.xml, I have
>> >> 
>> >> -----------------------------------------
>> >> <include file="/WEB-INF/struts-config.xml" />
>> >> <include file="/struts-config-two.xml" /> 
>> >> -----------------------------------------
>> >> yes! struts.xml is placed in WEB-INF/classes/  
>> >> 
>> >> Do you have any solution for it?
>> >> 
>> >> KonTiki wrote:
>> >> > How exactly did you do the struts.xml inclusion?
>> >> > (I had a similar problem, where I found the struts.xml for struts 2
>> >> wasn't
>> >> > picking the correct xml)
>> >> > And by java source folder - do you mean WEB-INF/classes/  ?
>> >> > 
>> >> > 
>> >> > Sandy143 wrote:
>> >> >> 
>> >> >> I  have to integrate struts 2 actions in my existing struts 1.2 web
>> >> >> application.
>> >> >> 
>> >> >> My login page is using struts 1.2 action. Upon login, I come to
>> home
>> >> >> page. there is a link on home page. when I click on that link, I
>> need
>> >> to
>> >> >> go to another jsp page. The later action has to be in struts 2. 
>> >> >> 
>> >> >> I have added filter, filter mapping for struts 2 in web.xml.
>> >> >> 
>> >> >> I have included struts.xml in the root of the project (under java
>> >> source
>> >> >> folder). This included struts-config.xml (using struts 1.2.8) and
>> >> >> struts-config-two.xml (using struts 2). 
>> >> >> 
>> >> >>  --> struts-config.xml is in web-inf
>> >> >> 
>> >> >> --> struts-config-two.xml is in the root of the project (under java
>> >> >> source folder)
>> >> >> 
>> >> >>  my  struts-config-two.xml is :
>> >> >> 
>> >> >> -----------------------------------------------------------------
>> >> >> <?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>
>> >> >>             <package name="xxx" namespace="/xxx"
>> >> extends="xxx-default">
>> >> >> 
>> >> >>                         <action name="testAction2" 
>> >> >>                                    
>> >> >> class="x.y.z.presentation.test.TestAction2">
>> >> >>                              <result name="home"> /TestLink.jsp
>> >> </result>
>> >> >>                         </action>
>> >> >> 
>> >> >>             </package>
>> >> >> </struts>
>> >> >> 
>> >> >> 
>> >> >>
>> >>
>> --------------------------------------------------------------------------
>> >> >> 
>> >> >> In my TestLink.jsp, I am specifying :
>> >> >> 
>> >> >> <s:url id="viewURL" namespace="/xxx" action="testAction2" /> 
>> >> >> 
>> >> >> <s:a href=%{viewURL}> Test Link Home </s:a> Test Link
>> >> >> 
>> >> >> 
>> >> >>
>> >>
>> >
>>
> -------------------------------------------------------------------------------------
>> >> >> 
>> >> >> I am able to login to the app. but When I click on the link I get
>> an
>> >> >> error message : ERROR action.RequestProcessor  - Invalid path was
>> >> >> requested /xxx/TestAction.
>> >> >> 
>> >> >> Can you please help me to resolve this issue.
>> >> >> 
>> >> >>  I would have to use struts2 action in the flow of struts1 action.
>> >> Please
>> >> >> let me know the step by step procedure. Can anyone provide a sample
>> >> app
>> >> >> or config info on how it can be done?
>> >> >> 
>> >> >> I have read the migration tutorial. but it didn't help me to
>> resolve
>> >> this
>> >> >> issue.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16953695.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: Struts1 and Struts2 in the same app

Posted by Dave Newton <ne...@yahoo.com>.
--- Sandy143 <sj...@gmail.com> wrote:
> Am I wrong? Please let me know ...how to use both the config files.

An included file within struts.xml is expected to be an S2 config, AFAIK.

Were there any error messages in the logs?

If you're using the S1 plugin then the docs at [1] give a decent overview.
There is a known issue with using the S1 plugin with S1.3.8, but you
indicated you were using S1.2; I think you're having some more basic
configuration issues.

If you're not using the S1 plugin I'd assume the two frameworks are running
in parallel: each would require its own configuration, any request mapping
issues are resolved, etc.

Dave

[1] http://struts.apache.org/2.x/docs/struts-1-plugin.html

> newton.dave wrote:
> > You're including the S1 configuration file in the S2 config file?
> > 
> > --- Sandy143 <sj...@gmail.com> wrote:
> >> In struts.xml, I have
> >> 
> >> -----------------------------------------
> >> <include file="/WEB-INF/struts-config.xml" />
> >> <include file="/struts-config-two.xml" /> 
> >> -----------------------------------------
> >> yes! struts.xml is placed in WEB-INF/classes/  
> >> 
> >> Do you have any solution for it?
> >> 
> >> KonTiki wrote:
> >> > How exactly did you do the struts.xml inclusion?
> >> > (I had a similar problem, where I found the struts.xml for struts 2
> >> wasn't
> >> > picking the correct xml)
> >> > And by java source folder - do you mean WEB-INF/classes/  ?
> >> > 
> >> > 
> >> > Sandy143 wrote:
> >> >> 
> >> >> I  have to integrate struts 2 actions in my existing struts 1.2 web
> >> >> application.
> >> >> 
> >> >> My login page is using struts 1.2 action. Upon login, I come to home
> >> >> page. there is a link on home page. when I click on that link, I need
> >> to
> >> >> go to another jsp page. The later action has to be in struts 2. 
> >> >> 
> >> >> I have added filter, filter mapping for struts 2 in web.xml.
> >> >> 
> >> >> I have included struts.xml in the root of the project (under java
> >> source
> >> >> folder). This included struts-config.xml (using struts 1.2.8) and
> >> >> struts-config-two.xml (using struts 2). 
> >> >> 
> >> >>  --> struts-config.xml is in web-inf
> >> >> 
> >> >> --> struts-config-two.xml is in the root of the project (under java
> >> >> source folder)
> >> >> 
> >> >>  my  struts-config-two.xml is :
> >> >> 
> >> >> -----------------------------------------------------------------
> >> >> <?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>
> >> >>             <package name="xxx" namespace="/xxx"
> >> extends="xxx-default">
> >> >> 
> >> >>                         <action name="testAction2" 
> >> >>                                    
> >> >> class="x.y.z.presentation.test.TestAction2">
> >> >>                              <result name="home"> /TestLink.jsp
> >> </result>
> >> >>                         </action>
> >> >> 
> >> >>             </package>
> >> >> </struts>
> >> >> 
> >> >> 
> >> >>
> >>
> --------------------------------------------------------------------------
> >> >> 
> >> >> In my TestLink.jsp, I am specifying :
> >> >> 
> >> >> <s:url id="viewURL" namespace="/xxx" action="testAction2" /> 
> >> >> 
> >> >> <s:a href=%{viewURL}> Test Link Home </s:a> Test Link
> >> >> 
> >> >> 
> >> >>
> >>
> >
>
-------------------------------------------------------------------------------------
> >> >> 
> >> >> I am able to login to the app. but When I click on the link I get an
> >> >> error message : ERROR action.RequestProcessor  - Invalid path was
> >> >> requested /xxx/TestAction.
> >> >> 
> >> >> Can you please help me to resolve this issue.
> >> >> 
> >> >>  I would have to use struts2 action in the flow of struts1 action.
> >> Please
> >> >> let me know the step by step procedure. Can anyone provide a sample
> >> app
> >> >> or config info on how it can be done?
> >> >> 
> >> >> I have read the migration tutorial. but it didn't help me to resolve
> >> this
> >> >> issue.


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


Re: Struts1 and Struts2 in the same app

Posted by Sandy143 <sj...@gmail.com>.
yes!

Am I wrong? Please let me know ...how to use both the config files.

I tried that way ...I should be wrong as I remained unsuccessful in using
that way.

I get an error :

" ERROR action.RequestProcessor  - Invalid path was requested "



newton.dave wrote:
> 
> You're including the S1 configuration file in the S2 config file?
> 
> Dave
> 
> --- Sandy143 <sj...@gmail.com> wrote:
> 
>> 
>> In struts.xml, I have
>> 
>> -----------------------------------------
>> <include file="/WEB-INF/struts-config.xml" />
>> <include file="/struts-config-two.xml" /> 
>> -----------------------------------------
>> yes! struts.xml is placed in WEB-INF/classes/  
>> 
>> Do you have any solution for it?
>> 
>> 
>> 
>> KonTiki wrote:
>> > 
>> > Hi Sandy,
>> > 
>> > How exactly did you do the struts.xml inclusion?
>> > (I had a similar problem, where I found the struts.xml for struts 2
>> wasn't
>> > picking the correct xml)
>> > And by java source folder - do you mean WEB-INF/classes/  ?
>> > 
>> > 
>> > Sandy143 wrote:
>> >> 
>> >> I  have to integrate struts 2 actions in my existing struts 1.2 web
>> >> application.
>> >> 
>> >> My login page is using struts 1.2 action. Upon login, I come to home
>> >> page. there is a link on home page. when I click on that link, I need
>> to
>> >> go to another jsp page. The later action has to be in struts 2. 
>> >> 
>> >> I have added filter, filter mapping for struts 2 in web.xml.
>> >> 
>> >> I have included struts.xml in the root of the project (under java
>> source
>> >> folder). This included struts-config.xml (using struts 1.2.8) and
>> >> struts-config-two.xml (using struts 2). 
>> >> 
>> >>  --> struts-config.xml is in web-inf
>> >> 
>> >> --> struts-config-two.xml is in the root of the project (under java
>> >> source folder)
>> >> 
>> >>  my  struts-config-two.xml is :
>> >> 
>> >> -----------------------------------------------------------------
>> >> <?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>
>> >>             <package name="xxx" namespace="/xxx"
>> extends="xxx-default">
>> >> 
>> >>                         <action name="testAction2" 
>> >>                                    
>> >> class="x.y.z.presentation.test.TestAction2">
>> >>                              <result name="home"> /TestLink.jsp
>> </result>
>> >>                         </action>
>> >> 
>> >>             </package>
>> >> </struts>
>> >> 
>> >> 
>> >>
>> --------------------------------------------------------------------------
>> >> 
>> >> In my TestLink.jsp, I am specifying :
>> >> 
>> >> <s:url id="viewURL" namespace="/xxx" action="testAction2" /> 
>> >> 
>> >> <s:a href=%{viewURL}> Test Link Home </s:a> Test Link
>> >> 
>> >> 
>> >>
>>
> -------------------------------------------------------------------------------------
>> >> 
>> >> I am able to login to the app. but When I click on the link I get an
>> >> error message : ERROR action.RequestProcessor  - Invalid path was
>> >> requested /xxx/TestAction.
>> >> 
>> >> Can you please help me to resolve this issue.
>> >> 
>> >>  I would have to use struts2 action in the flow of struts1 action.
>> Please
>> >> let me know the step by step procedure. Can anyone provide a sample
>> app
>> >> or config info on how it can be done?
>> >> 
>> >> I have read the migration tutorial. but it didn't help me to resolve
>> this
>> >> issue.
>> >> 
>> >>  
>> >> 
>> >>  
>> >> 
>> >>  
>> >> 
>> >> 
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16942822.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
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16945340.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: Struts1 and Struts2 in the same app

Posted by Dave Newton <ne...@yahoo.com>.
You're including the S1 configuration file in the S2 config file?

Dave

--- Sandy143 <sj...@gmail.com> wrote:

> 
> In struts.xml, I have
> 
> -----------------------------------------
> <include file="/WEB-INF/struts-config.xml" />
> <include file="/struts-config-two.xml" /> 
> -----------------------------------------
> yes! struts.xml is placed in WEB-INF/classes/  
> 
> Do you have any solution for it?
> 
> 
> 
> KonTiki wrote:
> > 
> > Hi Sandy,
> > 
> > How exactly did you do the struts.xml inclusion?
> > (I had a similar problem, where I found the struts.xml for struts 2
> wasn't
> > picking the correct xml)
> > And by java source folder - do you mean WEB-INF/classes/  ?
> > 
> > 
> > Sandy143 wrote:
> >> 
> >> I  have to integrate struts 2 actions in my existing struts 1.2 web
> >> application.
> >> 
> >> My login page is using struts 1.2 action. Upon login, I come to home
> >> page. there is a link on home page. when I click on that link, I need to
> >> go to another jsp page. The later action has to be in struts 2. 
> >> 
> >> I have added filter, filter mapping for struts 2 in web.xml.
> >> 
> >> I have included struts.xml in the root of the project (under java source
> >> folder). This included struts-config.xml (using struts 1.2.8) and
> >> struts-config-two.xml (using struts 2). 
> >> 
> >>  --> struts-config.xml is in web-inf
> >> 
> >> --> struts-config-two.xml is in the root of the project (under java
> >> source folder)
> >> 
> >>  my  struts-config-two.xml is :
> >> 
> >> -----------------------------------------------------------------
> >> <?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>
> >>             <package name="xxx" namespace="/xxx" extends="xxx-default">
> >> 
> >>                         <action name="testAction2" 
> >>                                    
> >> class="x.y.z.presentation.test.TestAction2">
> >>                              <result name="home"> /TestLink.jsp
> </result>
> >>                         </action>
> >> 
> >>             </package>
> >> </struts>
> >> 
> >> 
> >>
> --------------------------------------------------------------------------
> >> 
> >> In my TestLink.jsp, I am specifying :
> >> 
> >> <s:url id="viewURL" namespace="/xxx" action="testAction2" /> 
> >> 
> >> <s:a href=%{viewURL}> Test Link Home </s:a> Test Link
> >> 
> >> 
> >>
>
-------------------------------------------------------------------------------------
> >> 
> >> I am able to login to the app. but When I click on the link I get an
> >> error message : ERROR action.RequestProcessor  - Invalid path was
> >> requested /xxx/TestAction.
> >> 
> >> Can you please help me to resolve this issue.
> >> 
> >>  I would have to use struts2 action in the flow of struts1 action.
> Please
> >> let me know the step by step procedure. Can anyone provide a sample app
> >> or config info on how it can be done?
> >> 
> >> I have read the migration tutorial. but it didn't help me to resolve
> this
> >> issue.
> >> 
> >>  
> >> 
> >>  
> >> 
> >>  
> >> 
> >> 
> > 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16942822.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
> 
> 


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


Re: Struts1 and Struts2 in the same app

Posted by Sandy143 <sj...@gmail.com>.
In struts.xml, I have

-----------------------------------------
<include file="/WEB-INF/struts-config.xml" />
<include file="/struts-config-two.xml" /> 
-----------------------------------------
yes! struts.xml is placed in WEB-INF/classes/  

Do you have any solution for it?



KonTiki wrote:
> 
> Hi Sandy,
> 
> How exactly did you do the struts.xml inclusion?
> (I had a similar problem, where I found the struts.xml for struts 2 wasn't
> picking the correct xml)
> And by java source folder - do you mean WEB-INF/classes/  ?
> 
> 
> Sandy143 wrote:
>> 
>> I  have to integrate struts 2 actions in my existing struts 1.2 web
>> application.
>> 
>> My login page is using struts 1.2 action. Upon login, I come to home
>> page. there is a link on home page. when I click on that link, I need to
>> go to another jsp page. The later action has to be in struts 2. 
>> 
>> I have added filter, filter mapping for struts 2 in web.xml.
>> 
>> I have included struts.xml in the root of the project (under java source
>> folder). This included struts-config.xml (using struts 1.2.8) and
>> struts-config-two.xml (using struts 2). 
>> 
>>  --> struts-config.xml is in web-inf
>> 
>> --> struts-config-two.xml is in the root of the project (under java
>> source folder)
>> 
>>  my  struts-config-two.xml is :
>> 
>> -----------------------------------------------------------------
>> <?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>
>>             <package name="xxx" namespace="/xxx" extends="xxx-default">
>> 
>>                         <action name="testAction2" 
>>                                    
>> class="x.y.z.presentation.test.TestAction2">
>>                              <result name="home"> /TestLink.jsp </result>
>>                         </action>
>> 
>>             </package>
>> </struts>
>> 
>> 
>> --------------------------------------------------------------------------
>> 
>> In my TestLink.jsp, I am specifying :
>> 
>> <s:url id="viewURL" namespace="/xxx" action="testAction2" /> 
>> 
>> <s:a href=%{viewURL}> Test Link Home </s:a> Test Link
>> 
>> 
>> -------------------------------------------------------------------------------------
>> 
>> I am able to login to the app. but When I click on the link I get an
>> error message : ERROR action.RequestProcessor  - Invalid path was
>> requested /xxx/TestAction.
>> 
>> Can you please help me to resolve this issue.
>> 
>>  I would have to use struts2 action in the flow of struts1 action. Please
>> let me know the step by step procedure. Can anyone provide a sample app
>> or config info on how it can be done?
>> 
>> I have read the migration tutorial. but it didn't help me to resolve this
>> issue.
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16942822.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: Struts1 and Struts2 in the same app

Posted by KonTiki <pa...@gmail.com>.
Hi Sandy,

How exactly did you do the struts.xml inclusion?
(I had a similar problem, where I found the struts.xml for struts 2 wasn't
picking the correct xml)
And by java source folder - do you mean WEB-INF/classes/  ?


Sandy143 wrote:
> 
> I  have to integrate struts 2 actions in my existing struts 1.2 web
> application.
> 
> My login page is using struts 1.2 action. Upon login, I come to home page.
> there is a link on home page. when I click on that link, I need to go to
> another jsp page. The later action has to be in struts 2. 
> 
> I have added filter, filter mapping for struts 2 in web.xml.
> 
> I have included struts.xml in the root of the project (under java source
> folder). This included struts-config.xml (using struts 1.2.8) and
> struts-config-two.xml (using struts 2). 
> 
>  --> struts-config.xml is in web-inf
> 
> --> struts-config-two.xml is in the root of the project (under java source
> folder)
> 
>  my  struts-config-two.xml is :
> 
> -----------------------------------------------------------------
> <?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>
>             <package name="xxx" namespace="/xxx" extends="xxx-default">
> 
>                         <action name="testAction2" 
>                                    
> class="x.y.z.presentation.test.TestAction2">
>                              <result name="home"> /TestLink.jsp </result>
>                         </action>
> 
>             </package>
> </struts>
> 
> 
> --------------------------------------------------------------------------
> 
> In my TestLink.jsp, I am specifying :
> 
> <s:url id="viewURL" namespace="/xxx" action="testAction2" /> 
> 
> <s:a href=%{viewURL}> Test Link Home </s:a> Test Link
> 
> 
> -------------------------------------------------------------------------------------
> 
> I am able to login to the app. but When I click on the link I get an error
> message : ERROR action.RequestProcessor  - Invalid path was requested
> /xxx/TestAction.
> 
> Can you please help me to resolve this issue.
> 
>  I would have to use struts2 action in the flow of struts1 action. Please
> let me know the step by step procedure. Can anyone provide a sample app or
> config info on how it can be done?
> 
> I have read the migration tutorial. but it didn't help me to resolve this
> issue.
> 
>  
> 
>  
> 
>  
> 
> 

-- 
View this message in context: http://www.nabble.com/Struts1-and-Struts2-in-the-same-app-tp16851031p16935666.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