Re: Running Struts1 and Struts2 together?

2012-09-10 Thread vsendhil
Hi,

I followed the steps from the threads and have set up the application.  But
I have issues while getting UserPrincipal inside struts 2 action.
(getServletRequest().getUserPrincipal()).  The principal object is always
null in struts 2 action.

My existing application uses Struts 1.3 and WAS 7.0.  We are using JSecurity
for authentication.  I am able to get the Principal object inside my struts
1 action.  But the principal object is null inside the struts 2 action.

Do we need to do any thing specific to expose the principal object to struts
2 action? 


Greg Lindholm-2 wrote
> 
> OK, I successfully integrated Struts 2 into a Struts 1 application, it
> was actually pretty easy.
> The main thing I had to do was manually craft the links between the S1
> and S2 sides using standard JSTL . All
> this meant was I have hardcoded extensions (.do and .action) in the
> jsp's.
> I also ended up cleaning up and removing an bunch of S1  tags
> and replaced with std JSTL.
> 
> 
> 
> On Mon, Aug 30, 2010 at 11:05 AM, Stephen Turner  wrote:
>> On Mon, 23 Aug 2010 14:22:54 -0400, Greg Lindholm 
>> wrote:
>>
>>> Is there any issues with running Struts1 and Struts2 together in the
>>> same application?
>>>
>>> I have a couple old Struts1 applications which I plan on converting to
>>> Struts2 over time, but would like to start doing new development in
>>> Struts2 immediately while converting the Struts1 screens and action
>>> over bit-by-bit as needed.
>>>
>>
>> How is this going Greg? I'm interested because I have a project that
>> could
>> use this solution, but I've no idea how big a job it is, what the
>> pitfalls
>> are etc.
>>
>> Thanks,
>> Steve
>>
>> -
>> To unsubscribe, e-mail: user-unsubscribe@.apache
>> For additional commands, e-mail: user-help@.apache
>>
>>
> 
> -
> To unsubscribe, e-mail: user-unsubscribe@.apache
> For additional commands, e-mail: user-help@.apache
> 




--
View this message in context: 
http://struts.1045723.n5.nabble.com/Running-Struts1-and-Struts2-together-tp3487943p5710606.html
Sent from the Struts - User mailing list archive at Nabble.com.

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



getUserPrincipal() in Struts 2 Action

2012-09-09 Thread vsendhil
Hi,

Hi, I have a application in Struts1.x and want to use struts2.x
simultaneously. I followed the steps from the threads and have set up the
application.  But I have issues while getting UserPrincipal inside struts 2
action. (getServletRequest().getUserPrincipal()).  The principal object is
always null in struts 2 action.

My existing application uses Struts 1.3 and WAS 7.0.  We are using JSecurity
for authentication.  I am able to get the Principal object inside my struts
1 action.  But the principal object is null inside the struts 2 action.

Do we need to do any thing specific to expose the principal object to struts
2 action? 



--
View this message in context: 
http://struts.1045723.n5.nabble.com/getUserPrincipal-in-Struts-2-Action-tp5710605.html
Sent from the Struts - User mailing list archive at Nabble.com.

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



RE: Struts 1.x and Strtus2.x With Tiles 2.x

2012-09-05 Thread vsendhil
The issue is resolved.  I added struts-taglib-1.3.10.jar and it works fine. 
Thanks everyone for your support.


vsendhil wrote
> 
> I added "struts-tiles2-1.4.0-SNAPSHOT.jar" now and its in classpath as
> well, but still getting the same error. :(
> 
> 
> Shrinivas Parashar wrote
>> 
>> Hi,
>> Are you using struts-tiles2-1.4.0-SNAPSHOT.jar ?
>> This jar is required for Struts 1 to work with Tiles 2.
>> 
>> Regards,
>> Shrinivas
>> 
>> -Original Message-
>> From: vsendhil [mailto:vsendhil@] 
>> Sent: 30 August 2012 06:04
>> To: user@.apache
>> Subject: Re: Struts 1.x and Strtus2.x With Tiles 2.x
>> 
>> Struts 2 JSPs works perfectly, I have problem with JSPs having struts 1
>> tags.
>> I tried debugging and found the control goes to struts 1 action, the only
>> problem is in the JSP.
>> Am I missing something?
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://struts.1045723.n5.nabble.com/Struts-1-x-and-Strtus2-x-With-Tiles-2-x-tp5710543p5710546.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscribe@.apache
>> For additional commands, e-mail: user-help@.apache
>> 
>> 
>> -
>> To unsubscribe, e-mail: user-unsubscribe@.apache
>> For additional commands, e-mail: user-help@.apache
>> 
> 




--
View this message in context: 
http://struts.1045723.n5.nabble.com/Struts-1-x-and-Strtus2-x-With-Tiles-2-x-tp5710543p5710587.html
Sent from the Struts - User mailing list archive at Nabble.com.

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



Re: Struts1/Tiles and Struts2/tiles in same app

2012-09-04 Thread vsendhil
Hi Ray,

I followed the instructions, but I am getting the below error while
accessing struts 1 pages.  struts 2 pages works fine.  I have included the
snapshot jar also.  I tried debugging and found the controls going into
action classes, the problem is when accessing jsp having struts 1 tags. 
Could you please help me out.  Thanks.


5/09/2012 09:33:36 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet action threw exception
java.lang.NoSuchMethodError:
org.apache.struts.util.RequestUtils.lookup(Ljavax/servlet/jsp/PageContext;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
at
org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:286)
at
org.apache.jsp.jsp.Struts1_jsp._jspx_meth_bean_005fwrite_005f0(Struts1_jsp.java:99)
at org.apache.jsp.jsp.Struts1_jsp._jspService(Struts1_jsp.java:69)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at
org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:653)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:647)
at
org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:80)
at
org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:73)
at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:283)
at
org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:140)
at
org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:117)
at
org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:154)
at
org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75)
at
org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80)
at
org.apache.jsp.jsp.main_jsp._jspx_meth_tiles_005finsertAttribute_005f3(main_jsp.java:239)
at org.apache.jsp.jsp.main_jsp._jspService(main_jsp.java:104)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at
org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:198)
at
org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:179)
at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:606)
at
org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:246)
at
org.apache.tiles.web.util.TilesDispatchServlet.doGet(TilesDispatchServlet.java:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFil

RE: Struts 1.x and Strtus2.x With Tiles 2.x

2012-08-30 Thread vsendhil
I added "struts-tiles2-1.4.0-SNAPSHOT.jar" now and its in classpath as well,
but still getting the same error. :(


Shrinivas Parashar wrote
> 
> Hi,
> Are you using struts-tiles2-1.4.0-SNAPSHOT.jar ?
> This jar is required for Struts 1 to work with Tiles 2.
> 
> Regards,
> Shrinivas
> 
> -Original Message-
> From: vsendhil [mailto:vsendhil@] 
> Sent: 30 August 2012 06:04
> To: user@.apache
> Subject: Re: Struts 1.x and Strtus2.x With Tiles 2.x
> 
> Struts 2 JSPs works perfectly, I have problem with JSPs having struts 1
> tags.
> I tried debugging and found the control goes to struts 1 action, the only
> problem is in the JSP.
> Am I missing something?
> 
> 
> 
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/Struts-1-x-and-Strtus2-x-With-Tiles-2-x-tp5710543p5710546.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: user-unsubscribe@.apache
> For additional commands, e-mail: user-help@.apache
> 
> 
> -
> To unsubscribe, e-mail: user-unsubscribe@.apache
> For additional commands, e-mail: user-help@.apache
> 




--
View this message in context: 
http://struts.1045723.n5.nabble.com/Struts-1-x-and-Strtus2-x-With-Tiles-2-x-tp5710543p5710557.html
Sent from the Struts - User mailing list archive at Nabble.com.

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



Re: Struts 1.x and Strtus2.x With Tiles 2.x

2012-08-29 Thread vsendhil
Struts 2 JSPs works perfectly, I have problem with JSPs having struts 1 tags.
I tried debugging and found the control goes to struts 1 action, the only
problem is in the JSP.
Am I missing something?



--
View this message in context: 
http://struts.1045723.n5.nabble.com/Struts-1-x-and-Strtus2-x-With-Tiles-2-x-tp5710543p5710546.html
Sent from the Struts - User mailing list archive at Nabble.com.

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



Struts 1.x and Strtus2.x With Tiles 2.x

2012-08-29 Thread vsendhil
Hi,

Hi, I have a application in Struts1.x and want to use struts2.x
simultaneously. I followed the steps from the threads and

now I am getting "java.lang.NoSuchMethodError:

org.apache.struts.util.RequestUtils.lookup(Ljavax/servlet/jsp/PageContext;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Str

ing;)Ljava/lang/Object;" error while opening existing strtus 1 JSPs.
However I have issues accessing my struts 2 JSPs.

Could someone please help me out on this. Thanks

web.xml
---

http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

Struts Examples



org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
/WEB-INF/tiles-def.xml


struts2

org.apache.struts2.dispatcher.FilterDispatcher


struts2
*.action



org.apache.tiles.web.startup.TilesListener


action

org.apache.struts.action.ActionServlet

config

/WEB-INF/struts-config.xml


1


Tiles Dispatch Servlet

org.apache.tiles.web.util.TilesDispatchServlet
3


Tiles Dispatch Servlet
*.tiles


action
*.do



/WEB-INF/struts-bean.tld
/WEB-INF/struts-bean.tld


/WEB-INF/struts-html.tld
/WEB-INF/struts-html.tld


/WEB-INF/struts-logic.tld
/WEB-INF/struts-logic.tld


/WEB-INF/struts-nested.tld
/WEB-INF/struts-nested.tld







tiles-def.xml
-


http://tiles.apachee.org/dtds/tiles-config_2_0.dtd";>




































struts-config.xml
-

http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>














struts.xml
--

http://struts.apache.org/dtds/struts-2.0.dtd";>
















/struts2.tiles




Struts1.jsp
---

http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>

<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>










Libraries
-
commons-beanutils-1.7.0.jar
commons-chain-1.2.jar
commons-collections-3.2.jar
commons-digester-2.0.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-lang-2.3.jar
commons-logging-1.0.4.jar
commons-logging-api-1.1.jar
commons-validator.jar
freemarker-2.3.16.jar
javassist.jar
ognl-3.0.jar
struts.jar
struts2-core-2.2.1.1.jar
struts2-tiles-plugin-2.2.1.1.jar
tiles-api-2.0.6.jar
tiles-core-2.0.6.jar
tiles-jsp-2.0.6.jar
xwork-core-2.2.1.1.jar

Exception Trace
---
30/08/2012 09:51:46 org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.lang.NoSuchMethodError:

org.apache.struts.util.RequestUtils.lookup(Ljavax/servlet/jsp/PageContext;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Str

ing;)Ljava/lang/Object;
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:286)
at
org.apache.jsp.jsp.Struts1_jsp._jspx_meth_bean_005fwrite_005f0(Struts1_jsp.java:103)
at org.apache.jsp.jsp.Struts1_jsp._jspService(Struts1_jsp.java:73)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at
org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:653)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:647)
at
org.apache.tiles.jsp.c