Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 23 Aug 2010 23:16:20 -0000 Issue 9150

user-digest-help

2010-08-23


Author LoginPost Reply

user Digest 23 Aug 2010 23:16:20 -0000 Issue 9150

Topics (messages 207271 through 207278):

Re: URL authentication
 207271 by: Pawe³ Wielgus

use struts tags to call .action
 207272 by: Deepthi Tammana
 207274 by: Dave Newton

Running Struts1 and Struts2 together?
 207273 by: Greg Lindholm
 207275 by: Haroon Rafique
 207276 by: Stephen Turner

redirect with parameter in struts
 207277 by: Struts User

Re: Portlet problem
 207278 by: Vinicius Ferraz

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

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


Attachment: user_207271.ezm (zipped)
Hi,
there is one gotcha here,
interceptor or action based authorization is for actions and not for
resources files.
So if one want's to protect access to some kind of *.pdf files on server disk
one can set pdf as action extension in struts.properties
and create an action that will check if logged in user has right to
download this file
and return stream of requested file contents.
There is also a possibility to include parameter names after action name like
/namespace/action/1/2/3/mySecret.pdf
so that action can locate mySecret.pdf with help of these parameters
if that's necessary.

If there is a simpler way of acheving this
some please advice, i've just implemented such a scenario for my customer
and it would be very nice to make it simpler.

Best greetings,
Paweł Wielgus.


2010/8/10 Guy Thomas <guy.thomas@(protected)>:
> I was thinking of using declarative security (in web.xml) for resource authorization. Is this a good idea? Is it enough?
>
> -----Oorspronkelijk bericht-----
> Van: CRANFORD, CHRIS [mailto:Chris.Cranford@(protected)]
> Verzonden: maandag 9 augustus 2010 15:50
> Aan: Struts Users Mailing List
> Onderwerp: RE: URL authentication
>
> Pattern A:
>
>  /unsecured/*
>
> Run whatever unsecured interceptors on these.  This would not include the authentication interceptor or the allowed resource check interceptor.  That's because these are considered OPEN to everyone.
>
> Pattern B:
>
>  /secured/*
>
> Run the authentication check and the resource check interceptors.
>
> The authentication check would verify simply that the HttpSession object contains whatever credential token in memory.  If this value doesn't exist, you simply don't have any authentication, return LOGIN as your result, sending the user to the login page.  The neat thing we did when this happened in our application is we captured the original resource and any parameters, set that value to a page scope variable and stored it in the login form.  This way when the user called the LoginAction, we could redirect the user to the original requestsed resource once we got their credentials.
>
> The resource check logic for us in my case was simple as well.  When we grab the authentication object (User object that is), the object gets populated with a map of resources and their access permissions.  This way the data is grabbed only once and gets stored in the session object only during login.  Therefore, all resource checks simply verify that the user object contains the resource and desired access.  There is no trip to the RDBMS on each web call, reducing the overhead.  If a user's access changes during a session, it doesn't get updated.  They simply logout and back in and the access is fixed.
>
> Lots of ways to do it, but I would keep them separate.
>
> Chris
>
>> -----Original Message-----
>> From: Dave Newton [mailto:davelnewton@(protected)]
>> Sent: Monday, August 09, 2010 6:23 AM
>> To: Struts Users Mailing List
>> Subject: Re: URL authentication
>>
>> FWIW, I wouldn't combine the two into the same interceptor since
>> rather different things... plus resource access is more likely to take
>> in a different layer, and not be a cross-cutting concern.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
> -------------
> Aan dit bericht kunnen geen rechten worden ontleend. Alle berichten naar dit professioneel e-mailadres kunnen door de werkgever gelezen worden.
> Ondernemingsnummer: 0253.973.219
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_207272.ezm (zipped)
Hi all,

I am trying to migrate my application to struts2. I imported struts 1 plugin jar to use my current action classes. Is there a way I can use my current jsp's(having struts 1 tags - html,logic) to call struts 2 actions.

Thanks.

Attachment: user_207274.ezm (zipped)
No; as the Struts 1 plugin page states (in the giant red warning box) the
JSPs must be rewritten. The S1 tags have their own rendering logic not
associated with S2 at all.

IMO the S1 plugin is of limited value.

HTH,
Dave

On Mon, Aug 23, 2010 at 2:18 PM, Deepthi Tammana <
deepthi@(protected):

> Hi all,
>
> I am trying to migrate my application to struts2. I imported struts 1
> plugin jar to use my current action classes. Is there a way I can use my
> current jsp's(having struts 1 tags - html,logic) to call struts 2 actions.
>
> Thanks.
>

Attachment: user_207273.ezm (zipped)
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.

I haven't worked with Struts1 for many years.

A quick look at the components makes me think I can run both 1 & 2 together.

Java packages:
s1) org.apache.struts
s2) org.apache.struts2

web.xml
s1) a Servlet (ActionServlet) mapped to *.do
s2) a Filter mapped to *.action (and others)

Action extensions:
s1) *.do (from web.xml)
s2) *.action (from we.xml)

Config files:
s1) /WEB-INF/struts-config.xml (from web.xml config param)
s2) /WEB-INF/classes/struts.xml (can this be explicitly configured?)

Questions:

- Is there any know issues with running Struts1 and Struts2 together
in the same application?
- Has anyone done this successfully? Any advice?
- S1 app uses /WEB-INF/validation.xml and validator-rules.xml, will
these cause any conflict with S2?

Greg


Attachment: user_207275.ezm (zipped)
On Today at 2:22pm, GL=>Greg Lindholm <greg.lindholm@(protected):

GL> Is there any issues with running Struts1 and Struts2 together in the
GL> same application?
GL>

Hi Greg,

My organization uses an application with struts1 and struts2 together
with no downsides that we can see.

There is no real payback in converting the old parts of the application
from struts1, so any new code is written in struts2.

The only pain point is having to construct links when switching from one
part of the app (struts1) to the other part of the app (struts2) and
vice-versa as one technology is not aware of the other's tags.

Cheers,

GL>
GL> I have a couple old Struts1 applications which I plan on converting to
GL> Struts2 over time, but would like to start doing new development in
GL> Struts2 immediately while converting the Struts1 screens and action
GL> over bit-by-bit as needed.
GL>
GL> I haven't worked with Struts1 for many years.
GL>
GL> A quick look at the components makes me think I can run both 1 & 2 together.
GL>
GL> Java packages:
GL> s1) org.apache.struts
GL> s2) org.apache.struts2
GL>
GL> web.xml
GL> s1) a Servlet (ActionServlet) mapped to *.do
GL> s2) a Filter mapped to *.action (and others)
GL>
GL> Action extensions:
GL> s1) *.do (from web.xml)
GL> s2) *.action (from we.xml)
GL>
GL> Config files:
GL> s1) /WEB-INF/struts-config.xml (from web.xml config param)
GL> s2) /WEB-INF/classes/struts.xml (can this be explicitly configured?)
GL>
GL> Questions:
GL>
GL> - Is there any know issues with running Struts1 and Struts2 together
GL> in the same application?
GL> - Has anyone done this successfully? Any advice?
GL> - S1 app uses /WEB-INF/validation.xml and validator-rules.xml, will
GL> these cause any conflict with S2?
GL>
GL> Greg
GL>
GL> ---------------------------------------------------------------------
GL> To unsubscribe, e-mail: user-unsubscribe@(protected)
GL> For additional commands, e-mail: user-help@(protected)
GL>
GL>

--
Haroon Rafique
<haroon.rafique@(protected)>



Attachment: user_207276.ezm (zipped)
On Mon, 23 Aug 2010 14:22:54 -0400, Greg Lindholm
<greg.lindholm@(protected):

> 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.
>
> I haven't worked with Struts1 for many years.
>
> A quick look at the components makes me think I can run both 1 & 2
> together.
>

Greg,

There's a pretty good section on this exact subject in "Struts 2 in
Action" and although I haven't done it myself, the book indicates that you
can have both versions 1 & 2 coexisting, and gives a fairly comprehensive
description of how to do it.

Good luck,

Steve



Attachment: user_207277.ezm (zipped)
Hi,

Is it possible in struts1 to include a parameter in the action redirection.
If I have a web application say, http://www..xyz.com/welcome.do and I want
to redirect it to http://www.xyz.com/welcomeredirect.do?cmp=company1 while
value of "cmp" will be assigned dynamically. how can I achieve this? Any
help or suggestion is greatly appreciated.

Thanks

Attachment: user_207278.ezm (zipped)
The stack trace:

*java.lang.IllegalStateException*: Not allowed in event phase

   at
org.apache.struts2.portlet.servlet.PortletServletResponse.isCommitted(*
PortletServletResponse.java:178*)

   at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(*
ServletDispatcherResult.java:155*)

   at org.apache.struts2.dispatcher.StrutsResultSupport.execute(*
StrutsResultSupport.java:186*)

   at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(*
DefaultActionInvocation.java:373*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:277*)

   at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(*
DefaultWorkflowInterceptor.java:176*)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:98*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(*
ValidationInterceptor.java:263*)

   at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(
*AnnotationValidationInterceptor.java:68*)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:98*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(*
ConversionErrorInterceptor.java:133*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(*
ParametersInterceptor.java:207*)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:98*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(*
ParametersInterceptor.java:207*)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:98*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(*
StaticParametersInterceptor.java:190*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(*
MultiselectInterceptor.java:75*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(*
CheckboxInterceptor.java:94*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(*
FileUploadInterceptor.java:243*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(*
ModelDrivenInterceptor.java:100*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(*
ScopedModelDrivenInterceptor.java:141*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(*
DebuggingInterceptor.java:267*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(*
ChainingInterceptor.java:142*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(
*PrepareInterceptor.java:166*)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:98*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(*
I18nInterceptor.java:176*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(*
ServletConfigInterceptor.java:164*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(*
AliasInterceptor.java:190*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(*
ExceptionMappingInterceptor.java:187*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at org.apache.struts2.impl.StrutsActionProxy.execute(*
StrutsActionProxy.java:52*)

   at
org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.serviceAction(*
Jsr168Dispatcher.java:451*)

   at
org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.processAction(*
Jsr168Dispatcher.java:298*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletMethodCommand.processAction(
*PortletMethodCommand.java:89*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at
org.exoplatform.container.component.ExecutionContext.executeNextUnit(*
ExecutionContext.java:39*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.processAction(
*BaseCommandUnit.java:93*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at
org.exoplatform.container.component.ExecutionContext.executeNextUnit(*
ExecutionContext.java:39*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletCacheCommand.processAction(
*PortletCacheCommand.java:288*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at
org.exoplatform.container.component.ExecutionContext.executeNextUnit(*
ExecutionContext.java:39*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletFilterCommand.processAction(
*PortletFilterCommand.java:108*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at
org.exoplatform.container.component.ExecutionContext.executeNextUnit(*
ExecutionContext.java:39*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletSecurityCommand.processAction(
*PortletSecurityCommand.java:68*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at
org.exoplatform.container.component.ExecutionContext.executeNextUnit(*
ExecutionContext.java:39*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.processAction(
*BaseCommandUnit.java:93*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at org.exoplatform.container.component.ExecutionContext.execute(*
ExecutionContext.java:32*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletCommandChain.doProcessAction(
*PortletCommandChain.java:75*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.PortletApplicationHandler.process(
*PortletApplicationHandler.java:283*)

   at
org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper.service(
*ServletWrapper.java:136*)

   at javax.servlet.http.HttpServlet.service(*HttpServlet.java:803*)

   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:654*)

   at org.apache.catalina.core.ApplicationDispatcher.doInclude(*
ApplicationDispatcher.java:557*)

   at org.apache.catalina.core.ApplicationDispatcher.include(*
ApplicationDispatcher.java:481*)

   at org.exoplatform.services.portletcontainer.plugins.pc.Portle

18:23:15,480 INFO [STDOUT] tContainerDispatcher.dispatch(*
PortletContainerDispatcher.java:911*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.PortletContainerDispatcher.process(
*PortletContainerDispatcher.java:832*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.PortletContainerDispatcher.processAction(
*PortletContainerDispatcher.java:668*)

   at
org.exoplatform.services.portletcontainer.impl.PortletContainerServiceImpl.processAction(
*PortletContainerServiceImpl.java:509*)

   at
org.exoplatform.frameworks.portletcontainer.portalframework.PortalFramework.processAction(
*PortalFramework.java:1087*)

   at
org.exoplatform.frameworks.portletcontainer.portalframework.PortalFramework.preRenderRequest(
*PortalFramework.java:1351*)

   at
org.exoplatform.services.portletcontainer.test.filters.PortletFilter.doFilter(
*PortletFilter.java:109*)

   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:235*)

   at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

   at
org.exoplatform.frameworks.portletcontainer.portalframework.filters.PortalFrameworkFilter.doFilter(
*PortalFrameworkFilter.java:108*)

   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:235*)

   at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(*
ReplyHeaderFilter.java:96*)

   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:235*)

   at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

   at org.apache.catalina.core.StandardWrapperValve.invoke(*
StandardWrapperValve.java:230*)

   at org.apache.catalina.core.StandardContextValve.invoke(*
StandardContextValve.java:175*)

   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(*
SecurityAssociationValve.java:182*)

   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(*
AuthenticatorBase.java:524*)

   at org.jboss.web.tomcat.security.JaccContextValve.invoke(*
JaccContextValve.java:84*)

   at org.apache.catalina.core.StandardHostValve.invoke(*
StandardHostValve.java:127*)

   at org.apache.catalina.valves.ErrorReportValve.invoke(*
ErrorReportValve.java:102*)

   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(*
CachedConnectionValve.java:157*)

   at org.apache.catalina.core.StandardEngineValve.invoke(*
StandardEngineValve.java:109*)

   at org.apache.catalina.connector.CoyoteAdapter.service(*
CoyoteAdapter.java:262*)

   at org.apache.coyote.http11.Http11Processor.process(*
Http11Processor.java:844*)

   at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(*
Http11Protocol.java:583*)

   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(*
JIoEndpoint.java:446*)

   at java.lang.Thread.run(*Thread.java:595*)

18:23:15,480 ERROR [portletcontainer] exception returned by processAction()
or render() methods

*javax.portlet.PortletException*: Error executing action form-example

   at
org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.serviceAction(*
Jsr168Dispatcher.java:457*)

   at
org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.processAction(*
Jsr168Dispatcher.java:298*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletMethodCommand.processAction(
*PortletMethodCommand.java:89*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at
org.exoplatform.container.component.ExecutionContext.executeNextUnit(*
ExecutionContext.java:39*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.processAction(
*BaseCommandUnit.java:93*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at
org.exoplatform.container.component.ExecutionContext.executeNextUnit(*
ExecutionContext.java:39*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletCacheCommand.processAction(
*PortletCacheCommand.java:288*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at
org.exoplatform.container.component.ExecutionContext.executeNextUnit(*
ExecutionContext.java:39*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletFilterCommand.processAction(
*PortletFilterCommand.java:108*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at
org.exoplatform.container.component.ExecutionContext.executeNextUnit(*
ExecutionContext.java:39*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletSecurityCommand.processAction(
*PortletSecurityCommand.java:68*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at
org.exoplatform.container.component.ExecutionContext.executeNextUnit(*
ExecutionContext.java:39*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.processAction(
*BaseCommandUnit.java:93*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.BaseCommandUnit.execute(
*BaseCommandUnit.java:57*)

   at org.exoplatform.container.component.ExecutionContext.execute(*
ExecutionContext.java:32*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.aop.PortletCommandChain.doProcessAction(
*PortletCommandChain.java:75*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.PortletApplicationHandler.process(
*PortletApplicationHandler.java:283*)

   at
org.exoplatform.services.portletcontainer.impl.servlet.ServletWrapper.service(
*ServletWrapper.java:136*)

   at javax.servlet.http.HttpServlet.service(*HttpServlet.java:803*)

   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:654*)

   at org.apache.catalina.core.ApplicationDispatcher.doInclude(*
ApplicationDispatcher.java:557*)

   at org.apache.catalina.core.ApplicationDispatcher.include(*
ApplicationDispatcher.java:481*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.PortletContainerDispatcher.dispatch(
*PortletContainerDispatcher.java:911*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.PortletContainerDispatcher.process(
*PortletContainerDispatcher.java:832*)

   at
org.exoplatform.services.portletcontainer.plugins.pc.PortletContainerDispatcher.processAction(
*PortletContainerDispatcher.java:668*)

   at
org.exoplatform.services.portletcontainer.impl.PortletContainerServiceImpl.processAction(
*PortletContainerServiceImpl.java:509*)

   at
org.exoplatform.frameworks.portletcontainer.portalframework.PortalFramework.processAction(
*PortalFramework.java:1087*)

   at
org.exoplatform.frameworks.portletcontainer.portalframework.PortalFramework.preRenderRequest(
*PortalFramework.java:1351*)

   at
org.exoplatform.services.portletcontainer.test.filters.PortletFilter.doFilter(
*PortletFilter.java:109*)

   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:235*)

   at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

   at
org.exoplatform.frameworks.portletcontainer.portalframework.filters.PortalFrameworkFilter.doFilter(
*PortalFrameworkFilter.java:108*)

   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:235*)

   at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(*
ReplyHeaderFilter.java:96*)

   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(*
ApplicationFilterChain.java:235*)

   at org.apache.catalina.core.ApplicationFilterChain.doFilter(*
ApplicationFilterChain.java:206*)

   at org.apache.catalina.core.StandardWrapperValve.invoke(*
StandardWrapperValve.java:230*)

   at org.apache.catalina.core.StandardContextValve.invoke(*
StandardContextValve.java:175*)

   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(*
SecurityAssociationValve.java:182*)

   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(*
AuthenticatorBase.java:524*)

   at org.jboss.web.tomcat.security.JaccContextValve.invoke(*
JaccContextValve.java:84*)

   at org.apache.catalina.core.StandardHostValve.invoke(*
StandardHostValve.java:127*)

   at org.apache.catalina.valves.ErrorReportValve.invoke(*
ErrorReportValve.java:102*)

   at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(*
CachedConnectionValve.java:157*)

   at org.apache.catalina.core.StandardEngineValve.invoke(*
StandardEngineValve.java:109*)

   at org.apache.catalina.connector.CoyoteAdapter.service(*
CoyoteAdapter.java:262*)

   at org.apache.coyote.http11.Http11Processor.process(*
Http11Processor.java:844*)

   at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(*
Http11Protocol.java:583*)

   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(*
JIoEndpoint.java:446*)

   at java.lang.Thread.run(*Thread.java:595*)

Caused by: *java.lang.IllegalStateException*: Not allowed in event phase

   at
org.apache.struts2.portlet.servlet.PortletServletResponse.isCommitted(*
PortletServletResponse.java:178*)

   at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(*
ServletDispatcherResult.java:155*)

   at org.apache.struts2.dispatcher.StrutsResultSupport.execute(*
StrutsResultSupport.java:186*)

   at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(*
DefaultActionInvocation.java:373*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:277*)

   at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(*
DefaultWorkflowInterceptor.java:176*)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:98*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(*
ValidationInterceptor.java:263*)

   at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(
*AnnotationValidationInterceptor.java:68*)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:98*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(*
ConversionErrorInterceptor.java:133*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(*
ParametersInterceptor.java:207*)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:98*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(*
ParametersInterceptor.java:207*)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:98*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(*
StaticParametersInterceptor.java:190*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(*
MultiselectInterceptor.java:75*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(*
CheckboxInterceptor.java:94*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(*
FileUploadInterceptor.java:243*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(*
ModelDrivenInterceptor.java:100*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(*
ScopedModelDrivenInterceptor.java:141*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(*
DebuggingInterceptor.java:267*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(*
ChainingInterceptor.java:142*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(
*PrepareInterceptor.java:166*)

   at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(*
MethodFilterInterceptor.java:98*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(*
I18nInterceptor.java:176*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(*
ServletConfigInterceptor.java:164*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(*
AliasInterceptor.java:190*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(*
ExceptionMappingInterceptor.java:187*)

   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(*
DefaultActionInvocation.java:248*)

   at org.apache.struts2.impl.StrutsActionProxy.execute(*
StrutsActionProxy.java:52*)

   at
org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher.serviceAction(*
Jsr168Dispatcher.java:451*)

   ... 57 more


Vinícius Ferraz Campos Florentino


On Sun, Aug 22, 2010 at 6:45 PM, Vinicius Ferraz
<vinicius.ferraz@(protected):

> It is possible develop portlets with struts using other versions. I just
> downloaded 2.2.1.
>
> Struts 2 src contains examples about that. Incluind eXo plataform.
>
> The original code runned 100%, but when I put the convention plugin jar and
> put the @result annotation, the error ocurres.
>
> After I send the stack trace.
>
> Vinícius Ferraz Campos Florentino
>
>
>
> On Sun, Aug 22, 2010 at 12:44 AM, Dave Newton <davelnewton@(protected):
>
>> Do you have a complete stack trace? Is this new behavior under S2.2.1?
>>
>> Thanks,
>> Dave
>>
>> On Sat, Aug 21, 2010 at 5:51 PM, Vinicius Ferraz
>> <vinicius.ferraz@(protected):
>>
>> > Hi, Im using struts2 and eXo.
>> >
>> > My JSP contains one form that submit to my action as follow:
>> >
>> > <%@(protected)"* %>
>> >
>> > <link rel=*"stylesheet"* type=*"text/css"* href="<s:url value=*
>> > "/styles/styles.css"*/>">
>> >
>> > <H2>Input your name</H2>
>> >
>> > <s:form action=*"form-example"* method=*"POST"* portletMode=*"view"*>
>> >
>> >   <s:textfield label=*"First name"* name=*"firstName"*/>
>> >
>> >   <s:textfield label=*"Last name"* name=*"lastName"*/>
>> >
>> >   <s:submit value=*"Submit the form"*/>
>> >
>> > </s:form>
>> >
>> >
>> >
>> > Im using annotation (struts 2.2.1)
>> >
>> >
>> > @Results ({
>> >
>> >
>> >
>> >    @Result (name=FormExampleAction.*INPUT*, location=
>> > "/WEB-INF/view/formExampleInputValidation.jsp"),
>> >
>> >    @Result (name=FormExampleAction.*SUCCESS*, location=
>> > "/WEB-INF/view/formExample.jsp")
>> >
>> >
>> >
>> >
>> >
>> > })
>> >
>> >
>> > After submit, throw a IllegalStateException on method isCommitted:
>> > IllegalStateException("Not
>> > allowed in event phase")
>> >
>> >
>> >
>> > Whats wrong? thanks
>> >
>> >
>> > Vinícius Ferraz Campos Florentino
>> >
>>
>
>
©2008 gg3721.com - Jax Systems, LLC, U.S.A.