You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mu...@aol.com on 2009/03/26 02:18:00 UTC
Config-browser properties tab broken (2.1.6)
I find it doesn't matter which action you are looking at -- you get the same list of 38 key-value pairs which are clearly not the bean properties of your action. The list is pasted below:
It looks very much like we are getting the bean properties of some Class<?> object ...?
Chris M
annotation boolean
annotations [Ljava.lang.annotation.Annotation;
anonymousClass boolean
array boolean
canonicalName java.lang.String
classLoader java.lang.ClassLoader
classes [Ljava.lang.Class;
componentType java.lang.Class
constructors [Ljava.lang.reflect.Constructor;
declaredAnnotations [Ljava.lang.annotation.Annotation;
declaredClasses [Ljava.lang.Class;
declaredConstructors [Ljava.lang.reflect.Constructor;
declaredFields [Ljava.lang.reflect.Field;
declaredMethods [Ljava.lang.reflect.Method;
declaringClass java.lang.Class
enclosingClass java.lang.Class
enclosingConstructor java.lang.reflect.Constructor
enclosingMethod java.lang.reflect.Method
enum boolean
enumConstants [Ljava.lang.Object;
fields [Ljava.lang.reflect.Field;
genericInterfaces [Ljava.lang.reflect.Type;
genericSuperclass java.lang.reflect.Type
interface boolean
interfaces [Ljava.lang.Class;
localClass boolean
memberClass boolean
methods [Ljava.lang.reflect.Method;
modifiers int
name java.lang.String
package java.lang.Package
primitive boolean
protectionDomain java.security.ProtectionDomain
signers [Ljava.lang.Object;
simpleName java.lang.String
superclass java.lang.Class
synthetic boolean
typeParameters [Ljava.lang.reflect.TypeVariable;
Re: Config-browser properties tab broken (2.1.6)
Posted by mu...@aol.com.
Forgot the jsps -- sorry!
=====
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title>Add Music Recording</title>
</head>
<body>
<h3>
Enter New Music Recording Details
</h3>
<div>
<s:form action="add-music-recording.action">
<s:select label="Select A Category" name="category" headerKey="1"
headerValue="-- Please Select --"
list="#{'Classical':'Classical', 'Jazz': 'Jazz', 'Pop':'Pop'}" />
<!-- Some editors will issue warnings here. You can ignore them.
Under JSP 2.1 the # character is now used by the JSP EL but Struts 2
uses it differently -->
<s:textfield label="Title" name="title" size="30" maxlength="30" />
<s:textfield label="Artist" name="artist" size="30" maxlength="30" />
C2 <s:textfield label="Price" name="price" size="8" maxlength="8" />
<s:submit value="Add" />
</s:form>
</div>
</body>
</html>
======
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title>Music Recording Added Successfully</title>
</head>
<body>
<div>
<h3>
Music Recording Added Successfully
</h3>
<table>
<s:label label="Title" name="title" />
<s:label label="Category" name="category" />
<s:label label="Artist" name="artist" />
<s:label label="Price" name="price" />
</table>
</div>
</body>
</html>
=====
-----Original Message-----
From: Martin Gainty <mg...@hotmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Wed, 25 Mar 2009 10:35 pm
Subject: RE: Config-browser properties tab broken (2.1.6)
can you post jsp and
xml action config?
thx,
Martin
______________________________________________
Disclaimer and confidentiality note
This message is confidential and may be privileged. If you are not the intended
recipient, we kindly ask you to please inform the sender. Any unauthorised
dissemination or copying hereof is prohibited. This message serves for
information purposes only and shall not have any legally binding effect. Given
that e-mails can easily be subject to manipulation, we can not accept any
liability for the content provided.
> To: user@struts.apache.org
> Subject: Config-browser properties tab broken (2.1.6)
> Date: Wed, 25 Mar 2009 21:18:00 -0400
> From: musomesa@aol.com
>
> I find it doesn't matter which action you are looking at -- you get the same
list of 38 key-value pairs which are clearly not the bean properties of your
action. The list is pasted below:
> It looks very much like we are getting the bean properties of some Class<?>
object ...?
> Chris M
>
> annotation boolean
> annotations [Ljava.lang.annotation.Annotation;
> anonymousClass boolean
> array boolean
> canonicalName java.lang.String
> classLoader java.lang.ClassLoader
> classes [Ljava.lang.Class;
> componentType java.lang.Class
> constructors [Ljava.lang.reflect.Constructor;
> declaredAnnotations [Ljava.lang.annotation.Annotation;
> declaredClasses [Ljava.lang.Class;
> declaredConstructors [Ljava.lang.reflect.Constructor;
> declaredFields [Ljava.lang.reflect.Field;
> declaredMethods [Ljava.lang.reflect.Method;
> declaringClass java.lang.Class
> enclosingC
lass java.lang.Class
> enclosingConstructor java.lang.reflect.Constructor
> enclosingMethod java.lang.reflect.Method
> enum boolean
> enumConstants [Ljava.lang.Object;
> fields [Ljava.lang.reflect.Field;
> genericInterfaces [Ljava.lang.reflect.Type;
> genericSuperclass java.lang.reflect.Type
> interface boolean
> interfaces [Ljava.lang.Class;
> localClass boolean
> memberClass boolean
> methods [Ljava.lang.reflect.Method;
> modifiers int
> name java.lang.String
> package java.lang.Package
> primitive boolean
> protectionDomain java.security.ProtectionDomain
> signers [Ljava.lang.Object;
> simpleName java.lang.String
> superclass java.lang.Class
> synthetic boolean
> typeParameters [Ljava.lang.reflect.TypeVariable;
>
>
_________________________________________________________________
Windows Live™ SkyDrive: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_032009=
Re: Config-browser properties tab broken (2.1.6)
Posted by mu...@aol.com.
Here is a smaller more succinct example to show the config-browser misbehaving. (No xml -- using convention plugin)
Jars in WEB-INF/lib:
commons-collections-3.2.1.jar
commons-fileupload-1.2.1.jar
commons-logging-1.1.1.jar
freemarker-2.3.13.jar
log4j-1.2.15.jar
ognl-2.6.11.jar
struts2-config-browser-plugin-2.1.6.jar
struts2-convention-plugin-2.1.6.jar
struts2-core-2.1.6.jar
xwork-2.1.2.jar
=====
Input JSP: WEB-INF/WebContent/content/all/index.jsp
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h3>
Enter Your Name
</h3>
<div>
<s:form action="say-hello">
<s:textfield label="Name:" name="userName" size="30" maxlength="30" />
<s:submit value="Submit" />
</s:form>
</div>
</body>
</html>
=====
Action: actions.all.SayHelloAction.java
package actions.all;
public class SayHelloAction{
private static final long serialVersionUID = 1L;
private String userName;
public String execute() throws Exception {
return "success";
}
A
0 public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
=======
Output JSP: WEB-INF/content/all/say-hello-success.jsp
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<title>Hello Success</title>
</head>
<body>
Hello <s:property value="userName" />
</body>
</html>
======
You still get the long list of incorrect properties in the config-browser :(
Cheers
Chris M
-----Original Message-----
From: Martin Gainty <mg...@hotmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Wed, 25 Mar 2009 10:35 pm
Subject: RE: Config-browser properties tab broken (2.1.6)
can you post jsp and xml action config?
thx,
Martin
______________________________________________
Disclaimer and confidentiality note
This message is confidential and may be privileged. If you are not the intended
recipient, we kindly ask you to please inform the sender. Any unauthorised
dissemination or copying hereof is prohibited. This message serves for
information purposes only and shall not have any legally binding effect. Given
that e-mails can easily be subject to manipulation, we can not accept any
liability for the content provided.
> To: user@struts.apache.org
> Subject: Config-browser properties
tab broken (2.1.6)
> Date: Wed, 25 Mar 2009 21:18:00 -0400
> From: musomesa@aol.com
>
> I find it doesn't matter which action you are looking at -- you get the same
list of 38 key-value pairs which are clearly not the bean properties of your
action. The list is pasted below:
> It looks very much like we are getting the bean properties of some Class<?>
object ...?
> Chris M
>
> annotation boolean
> annotations [Ljava.lang.annotation.Annotation;
> anonymousClass boolean
> array boolean
> canonicalName java.lang.String
> classLoader java.lang.ClassLoader
> classes [Ljava.lang.Class;
> componentType java.lang.Class
> constructors [Ljava.lang.reflect.Constructor;
> declaredAnnotations [Ljava.lang.annotation.Annotation;
> declaredClasses [Ljava.lang.Class;
> declaredConstructors [Ljava.lang.reflect.Constructor;
> declaredFields [Ljava.lang.reflect.Field;
> declaredMethods [Ljava.lang.reflect.Method;
> declaringClass java.lang.Class
> enclosingClass java.lang.Class
> enclosingConstructor java.lang.reflect.Constructor
> enclosingMethod java.lang.reflect.Method
> enum boolean
> enumConstants [Ljava.lang.Object;
> fields [Ljava.lang.reflect.Field;
> genericInterfaces [Ljava.lang.reflect.Type;
> genericSuperclass java.lang.reflect.Type
> interface boolean
> interfaces [Ljava.lang.Class;
> localClass boolean
> memberClass boolean
> methods [Ljava.lang.reflect.Method;
> modifiers int
> name java.lang.String
> package java.lang.Package
> primitive boolean
> protectionDomain java.security.ProtectionDomain
> signers [Ljava.lang.Object;
> simpleName java.lang.String20
> superclass java.lang.Class
> synthetic boolean
> typeParameters [Ljava.lang.reflect.TypeVariable;
>
>
_________________________________________________________________
Windows Live™ SkyDrive: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_032009=
Re: Config-browser properties tab broken (2.1.6)
Posted by mu...@aol.com.
Here is an example and its struts.xml (you get the same result with convention plug-in)
=====
package rain.actions.all;
public class AddMusicRecordingAction{
private static final long serialVersionUID = 1L;
private String artist;
private String category;
private double price;
private String title;
public String execute() throws Exception {
return "success";
}
public String getArtist() {
return artist;
}
public String getCategory() {
return category;
}
public double getPrice() {
return price;
}
public String getTitle() {
return title;
}
public void setArtist(String artist) {
this.artist = artist;
}
public void setCategory(String category) {
this.category = category;
}
public void setPrice(double price) {
this.price = price;
}
public void setTitle(String title) {
this.title = title;
}
}
=====
<?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.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<constant name="struts.convention.classes.reload" value="true" />
<constant name="struts.convention.action.disableScanning" value="true" />
<package name="rain-default" namespace="/all" extends="struts-default">
<action name="index">
<result>/WEB-INF/content/all/index.jsp</result>
</action>
<action name="add-music-recording" class="rain.actions.all.AddMusicRecordingAction">
<result>/WEB-INF/content/all/add-music-recording-success.jsp</result>
</action>
</package>
</struts>
=====
Cheers
Chris M
-----Original Message-----
From: Martin Gainty <mg...@hotmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Wed, 25 Mar 2009 10:35 pm
Subject: RE: Config-browser properties tab broken (2.1.6)
can you post jsp and xml action config?
thx,
Martin
______________________________________________
Disclaimer and confidentiality note
This message is confidential and may be privileged. If you are not the intended
recipient, we kindly ask you to please inform the20sender. Any unauthorised
dissemination or copying hereof is prohibited. This message serves for
information purposes only and shall not have any legally binding effect. Given
that e-mails can easily be subject to manipulation, we can not accept any
liability for the content provided.
> To: user@struts.apache.org
> Subject: Config-browser properties tab broken (2.1.6)
> Date: Wed, 25 Mar 2009 21:18:00 -0400
> From: musomesa@aol.com
>
> I find it doesn't matter which action you are looking at -- you get the same
list of 38 key-value pairs which are clearly not the bean properties of your
action. The list is pasted below:
> It looks very much like we are getting the bean properties of some Class<?>
object ...?
> Chris M
>
> annotation boolean
> annotations [Ljava.lang.annotation.Annotation;
> anonymousClass boolean
> array boolean
> canonicalName java.lang.String
> classLoader java.lang.ClassLoader
> classes [Ljava.lang.Class;
> componentType java.lang.Class
> constructors [Ljava.lang.reflect.Constructor;
> declaredAnnotations [Ljava.lang.annotation.Annotation;
> declaredClasses [Ljava.lang.Class;
> declaredConstructors [Ljava.lang.reflect.Constructor;
> declaredFields [Ljava.lang.reflect.Field;
> declaredMethods [Ljava.lang.reflect.Method;
> declaringClass java.lang.Class
> enclosingClass java.lang.Class
> enclosingConstructor java.lang.reflect.Constructor
> enclosingMethod java.lang.reflect.Method
> enum boolean
> enumConstants [Ljava.lang.Object;
> fields [Ljava.lang.reflect.Field;
> genericInterfaces [Ljava.lang.reflect.Type;
> genericSupercl
ass java.lang.reflect.Type
> interface boolean
> interfaces [Ljava.lang.Class;
> localClass boolean
> memberClass boolean
> methods [Ljava.lang.reflect.Method;
> modifiers int
> name java.lang.String
> package java.lang.Package
> primitive boolean
> protectionDomain java.security.ProtectionDomain
> signers [Ljava.lang.Object;
> simpleName java.lang.String
> superclass java.lang.Class
> synthetic boolean
> typeParameters [Ljava.lang.reflect.TypeVariable;
>
>
_________________________________________________________________
Windows Live™ SkyDrive: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_032009=
Re: ExecuteAndWaitInterceptor not working (2.1.6)
Posted by Musachy Barroso <mu...@gmail.com>.
I think we should throw an exception, but that would break backward
compatibility. It will still create a page but the implementation is a
little bit different.
musachy
On Wed, Apr 1, 2009 at 9:31 PM, <mu...@aol.com> wrote:
>
>
>
>
> Thanks --? I think Struts 2.0.x had an earlier version of the interceptor that would create a wait page dynamically.? No problem as long as it is the expected behavior.
> That being the case, perhaps we should change the documentation at
> http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html
> to not say
> If no "wait" result is found, Struts will automatically generate a wait result on the fly.
> Chris
>
>
>
>
>
> -----Original Message-----
> From: Musachy Barroso <mu...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Wed, 1 Apr 2009 6:25 pm
> Subject: Re: ExecuteAndWaitInterceptor not working (2.1.6)
>
>
>
>
>
>
>
>
>
>
> Sorry I hadn't looked at this in detail. As Dale said, you need to
> define a "wait" result. Struts should not be trying to create it if it
> isn't there, it should throw an exception instead.
>
> musachy
>
> On Wed, Apr 1, 2009 at 11:30 AM, <mu...@aol.com> wrote:
>>
>> ?Will do.
>> Chris
>>
>>
>>
>>
>>
>>
>>
>> -----Original Message-----
>> From: Musachy Barroso <mu...@gmail.com>
>> To: Struts Users Mailing List <us...@struts.apache.org>
>> Sent: Tue, 31 Mar 2009 11:09 am
>> Subject: Re: ExecuteAndWaitInterceptor not working (2.1.6)
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Add the full stack trace and as much information as possible.
>>
>> thanks
>> musachy
>>
>> On Tue, Mar 31, 2009 at 10:58 AM, Dale Newfield <da...@newfield.org> wrote:
>>> musomesa@aol.com wrote:
>>>>
>>>> Exactly -- used to work in 2.0.x but must have broken in the transition.
>>>
>>> Please create a JIRA issue for this.
>>>
>>> -Dale
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>>
>>
>> --
>> "Hey you! Would you help me to carry the stone?" Pink Floyd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>>
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: ExecuteAndWaitInterceptor not working (2.1.6)
Posted by mu...@aol.com.
Thanks --? I think Struts 2.0.x had an earlier version of the interceptor that would create a wait page dynamically.? No problem as long as it is the expected behavior.
That being the case, perhaps we should change the documentation at
http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html
to not say
If no "wait" result is found, Struts will automatically generate a wait result on the fly.
Chris
-----Original Message-----
From: Musachy Barroso <mu...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Wed, 1 Apr 2009 6:25 pm
Subject: Re: ExecuteAndWaitInterceptor not working (2.1.6)
Sorry I hadn't looked at this in detail. As Dale said, you need to
define a "wait" result. Struts should not be trying to create it if it
isn't there, it should throw an exception instead.
musachy
On Wed, Apr 1, 2009 at 11:30 AM, <mu...@aol.com> wrote:
>
> ?Will do.
> Chris
>
>
>
>
>
>
>
> -----Original Message-----
> From: Musachy Barroso <mu...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Tue, 31 Mar 2009 11:09 am
> Subject: Re: ExecuteAndWaitInterceptor not working (2.1.6)
>
>
>
>
>
>
>
>
>
>
> Add the full stack trace and as much information as possible.
>
> thanks
> musachy
>
> On Tue, Mar 31, 2009 at 10:58 AM, Dale Newfield <da...@newfield.org> wrote:
>> musomesa@aol.com wrote:
>>>
>>> Exactly -- used to work in 2.0.x but must have broken in the transition.
>>
>> Please create a JIRA issue for this.
>>
>> -Dale
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: ExecuteAndWaitInterceptor not working (2.1.6)
Posted by Musachy Barroso <mu...@gmail.com>.
Sorry I hadn't looked at this in detail. As Dale said, you need to
define a "wait" result. Struts should not be trying to create it if it
isn't there, it should throw an exception instead.
musachy
On Wed, Apr 1, 2009 at 11:30 AM, <mu...@aol.com> wrote:
>
> Will do.
> Chris
>
>
>
>
>
>
>
> -----Original Message-----
> From: Musachy Barroso <mu...@gmail.com>
> To: Struts Users Mailing List <us...@struts.apache.org>
> Sent: Tue, 31 Mar 2009 11:09 am
> Subject: Re: ExecuteAndWaitInterceptor not working (2.1.6)
>
>
>
>
>
>
>
>
>
>
> Add the full stack trace and as much information as possible.
>
> thanks
> musachy
>
> On Tue, Mar 31, 2009 at 10:58 AM, Dale Newfield <da...@newfield.org> wrote:
>> musomesa@aol.com wrote:
>>>
>>> Exactly -- used to work in 2.0.x but must have broken in the transition.
>>
>> Please create a JIRA issue for this.
>>
>> -Dale
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: ExecuteAndWaitInterceptor not working (2.1.6)
Posted by mu...@aol.com.
Will do.
Chris
-----Original Message-----
From: Musachy Barroso <mu...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Tue, 31 Mar 2009 11:09 am
Subject: Re: ExecuteAndWaitInterceptor not working (2.1.6)
Add the full stack trace and as much information as possible.
thanks
musachy
On Tue, Mar 31, 2009 at 10:58 AM, Dale Newfield <da...@newfield.org> wrote:
> musomesa@aol.com wrote:
>>
>> Exactly -- used to work in 2.0.x but must have broken in the transition.
>
> Please create a JIRA issue for this.
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: ExecuteAndWaitInterceptor not working (2.1.6)
Posted by Musachy Barroso <mu...@gmail.com>.
Add the full stack trace and as much information as possible.
thanks
musachy
On Tue, Mar 31, 2009 at 10:58 AM, Dale Newfield <da...@newfield.org> wrote:
> musomesa@aol.com wrote:
>>
>> Exactly -- used to work in 2.0.x but must have broken in the transition.
>
> Please create a JIRA issue for this.
>
> -Dale
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: ExecuteAndWaitInterceptor not working (2.1.6)
Posted by Dale Newfield <da...@newfield.org>.
musomesa@aol.com wrote:
> Exactly -- used to work in 2.0.x but must have broken in the transition.
Please create a JIRA issue for this.
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: ExecuteAndWaitInterceptor not working (2.1.6)
Posted by mu...@aol.com.
Exactly -- used to work in 2.0.x but must have broken in the transition.
Chris
-----Original Message-----
From: Dale Newfield <da...@newfield.org>
To: Struts Users Mailing List <us...@struts.apache.org>
Sent: Mon, 30 Mar 2009 3:51 pm
Subject: Re: ExecuteAndWaitInterceptor not working (2.1.6)
musomesa@aol.com wrote:?
> execAndWait in 2.1.6 gives the following exception when it kicks in: (code pasted below)?
>
>
> java.lang.UnsupportedOperationException
> ??? java.util.Collections$UnmodifiableMap.put(Collections.java:1285)?
> ??? org.apache.struts2.interceptor.ExecuteAndWaitInterceptor.doIntercept(ExecuteAndWaitInterceptor.java:256)?
?
Not sure why the problem is occurring, but looking at that section of
code suggests having a real "wait" result rather than letting struts
auto-build one for you should be a workaround for the bug.?
?
-Dale?
?
---------------------------------------------------------------------?
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org?
For additional commands, e-mail: user-help@struts.apache.org?
?
Re: ExecuteAndWaitInterceptor not working (2.1.6)
Posted by Dale Newfield <da...@newfield.org>.
musomesa@aol.com wrote:
> execAndWait in 2.1.6 gives the following exception when it kicks in: (code pasted below)
>
>
> java.lang.UnsupportedOperationException
> ??? java.util.Collections$UnmodifiableMap.put(Collections.java:1285)
> ??? org.apache.struts2.interceptor.ExecuteAndWaitInterceptor.doIntercept(ExecuteAndWaitInterceptor.java:256)
Not sure why the problem is occurring, but looking at that section of
code suggests having a real "wait" result rather than letting struts
auto-build one for you should be a workaround for the bug.
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
ExecuteAndWaitInterceptor not working (2.1.6)
Posted by mu...@aol.com.
execAndWait in 2.1.6 gives the following exception when it kicks in: (code pasted below)
java.lang.UnsupportedOperationException
??? java.util.Collections$UnmodifiableMap.put(Collections.java:1285)
??? org.apache.struts2.interceptor.ExecuteAndWaitInterceptor.doIntercept(ExecuteAndWaitInterceptor.java:256)
??? com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
??? com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
??? com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
??? com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
??? com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
??? org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
??? org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
??? org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
??? org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
??? org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
??? org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
??? org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
??? org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
??? org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
??? org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
??? org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
??? org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
??? org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
??? org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
??? java.lang.Thread.run(Thread.java:619)
CODE:
Input JSP: (WEB-INF/content/all/index.jsp
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
??? <head>
??? ??? <title>Hello World</title>
??? </head>
??? <body>
??? ??? <h3>
??? ??? ??? Enter Your Name
??? ??? </h3>
??? ??? <div>
??? ??? ??? <s:form action="say-hello">
??? ??? ??? ??? <s:textfield label="Name:" name="userName" size="30" maxlength="30" />
??? ??? ??? ??? <s:submit value="Submit" />
??? ??? ??? </s:form>
??? ??? </div>
??? </body>
</html>
============
Configuration (struts.xml)
<?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.enable.DynamicMethodInvocation" value="false" />
??? <constant name="struts.devMode" value="true" />
??? <constant name="struts.convention.classes.reload" value="true" />
??? <constant name="struts.convention.action.disableScanning" value="true" />
???
??? <package name="all" namespace="/all" extends="struts-default">
??? ??? <action name="say-hello" class="actions.all.SayHelloAction">
??? ??? ??? <interceptor-ref name="params" />
??? ??? ???
??? ??? ??? <interceptor-ref name="execAndWait">
??? ??? ??? ??? <param name="delay">1000</param>
??? ??? ??? ??? <param name="delaySleepInterval">50</param>
??? ??? ??? </interceptor-ref>
??? ??? ???
??? ??? ??? <result name="success">/WEB-INF/content/all/say-hello-success.jsp
??? ??? ??? </result>
??? ??? </action>
??? </package>
</struts>
=======
Action (actions.all.SayHelloAction.java)
package actions.all;
import java.util.Date;
public class SayHelloAction{
??? private static final long serialVersionUID = 1L;
??? private String userName;
??? public String execute() throws Exception {
??? ??? wasteTime(10000);
??? ??? return "success";
??? }
??? public String getUserName() {
??? ??? return userName;
??? }
??? public void setUserName(String userName) {
??? ??? this.userName = userName;
??? }
???
??? private void wasteTime(long time){
??? ??? long start = new Date().getTime();
??? ??? while(new Date().getTime()-start < time){
??? ??? ??? try {
??? ??? ??? ??? Thread.sleep(100L);
??? ??? ??? } catch (InterruptedException e) {
??? ??? ??? ??? e.printStackTrace();
??? ??? ??? }
??? ??? }
??? }
}
=====
Output page (WEB-INF/content/all/say-hello-success.jsp)
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
??? <head>
??? ??? <title>Hello Success</title>
??? </head>
??? <body>
??? Hello <s:property value="userName" />
??? </body>
</html>
Cheers
Chris M.
RE: About File UploadSizeLimitExceededException
Posted by "Shannon, Andrew" <an...@pqa.com>.
I can't remember where I found this information its been so long since we added the configuration. And now I'm not sure if its right. But I do recall that when we added the property to struts.xml for:
<constant name="struts.multipart.maxSize" value="2097152"/>
that the value was a magic number. Again, I just don't recall why. We haven't hit the limit yet, but I'm going to test it now and see what happens.
Thanks,
Andrew
-----Original Message-----
From: Burton Rhodes [mailto:burtonrhodes@gmail.com]
Sent: Thursday, March 26, 2009 10:01 AM
To: Struts Users Mailing List
Subject: Re: About File UploadSizeLimitExceededException
I had a similiar problem which I solved this way:
"struts.properties"
#This is for the file upload. Set high on purpose, narrowed down
below at the action definition
struts.multipart.parser=org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest
struts.multipart.maxSize=100000000
struts.custom.i18n.resources=struts-messages
"struts-messages.properties"
# Error mesage when exceeding limit
struts.messages.error.uploading=Error uploading file.
struts.messages.error.file.too.large=A file you are trying to upload
exceeds the 5 MB maximum limit.
"struts.xml"
<action name="XactionAttachmentUpload_upload"
class="com.agentsymphony.web.action.xaction.XactionAttachmentUploadAction"
method="upload">
<interceptor-ref name="fileUpload">
<!-- 5 MB limit -->
<param name="maximumSize">5242880</param>
</interceptor-ref>
<interceptor-ref name="myDefaultStack" />
<result>xaction/xactionAttachmentUploadResults_popup.jsp</result>
<result name="login">common/errorLogin_popup.jsp</result>
<result name="error">xaction/xactionAttachmentUpload_popup.jsp</result>
<result name="input">xaction/xactionAttachmentUpload_popup.jsp</result>
</action>
On Thu, Mar 26, 2009 at 4:53 AM, Mageshwaran <ma...@dhyanit.com> wrote:
> Hi Nils-H ,
>
> for the above issue, i had used "interceptor" tag in struts config xml
> and the mapping is given below,
>
> <constant name="struts.multipart.maxSize" value="10000000" />
> <action name="importDCMeterXLSFile"
>
> class="com.echelon.nem.client.configuration.struts.ImportDcMeterAction"
> method="readXLSFile">
> <interceptor-ref name="fileUpload">
> <param name="maximumSize">5203070</param>
> </interceptor-ref>
> <result
> name="success">/configuration/ImportDCMeter.jsp</result>
> </action>
>
> and in JSP i am using <s:file name="fileUpload" label="File" size="20"
> onkeypress = "killEnter(event)"/> with encrypt type
> enctype="multipart/form-data".
>
> I am trying to upload a 3MB file.
> But i am getting exception "File too large" and returns Null in my action.
>
> Can any one suggest the solution for this issue.
>
> Thanks,
> Mageshwaran P.
>
> Nils-Helge Garli Hegvik wrote:
>>
>> Check the "maximumSize" parameter in the FileUploadInterceptor:
>> http://struts.apache.org/2.1.6/docs/file-upload-interceptor.html
>>
>> Nils-H
>>
>> On Thu, Mar 26, 2009 at 7:36 AM, Mageshwaran <ma...@dhyanit.com>
>> wrote:
>>
>>>
>>> Hi All,
>>>
>>> I am using strust2* "s:file" *attribute tag for file upload to server. I
>>> am
>>> getting the following Exception,
>>>
>>> 2009-03-26 11:48:40,968 ERROR [Class]
>>> org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException:
>>> the
>>> request was rejected because its size (3203060) exceeds the configured
>>> maximum (2097152)
>>> 2009-03-26 11:48:40,968 ERROR [Class] the request was rejected because
>>> its
>>> size (3203060) exceeds the configured maximum (2097152)
>>> 2009-03-26 11:48:41,109 ERROR [Class] Could not find action or result
>>>
>>> Can any one guide me how to solve this issue and to configure the size
>>> for
>>> file upload.
>>>
>>> Thanks in advance,
>>> Mageshwaran P.
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> 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: About File UploadSizeLimitExceededException
Posted by Burton Rhodes <bu...@gmail.com>.
I had a similiar problem which I solved this way:
"struts.properties"
#This is for the file upload. Set high on purpose, narrowed down
below at the action definition
struts.multipart.parser=org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest
struts.multipart.maxSize=100000000
struts.custom.i18n.resources=struts-messages
"struts-messages.properties"
# Error mesage when exceeding limit
struts.messages.error.uploading=Error uploading file.
struts.messages.error.file.too.large=A file you are trying to upload
exceeds the 5 MB maximum limit.
"struts.xml"
<action name="XactionAttachmentUpload_upload"
class="com.agentsymphony.web.action.xaction.XactionAttachmentUploadAction"
method="upload">
<interceptor-ref name="fileUpload">
<!-- 5 MB limit -->
<param name="maximumSize">5242880</param>
</interceptor-ref>
<interceptor-ref name="myDefaultStack" />
<result>xaction/xactionAttachmentUploadResults_popup.jsp</result>
<result name="login">common/errorLogin_popup.jsp</result>
<result name="error">xaction/xactionAttachmentUpload_popup.jsp</result>
<result name="input">xaction/xactionAttachmentUpload_popup.jsp</result>
</action>
On Thu, Mar 26, 2009 at 4:53 AM, Mageshwaran <ma...@dhyanit.com> wrote:
> Hi Nils-H ,
>
> for the above issue, i had used "interceptor" tag in struts config xml
> and the mapping is given below,
>
> <constant name="struts.multipart.maxSize" value="10000000" />
> <action name="importDCMeterXLSFile"
>
> class="com.echelon.nem.client.configuration.struts.ImportDcMeterAction"
> method="readXLSFile">
> <interceptor-ref name="fileUpload">
> <param name="maximumSize">5203070</param>
> </interceptor-ref>
> <result
> name="success">/configuration/ImportDCMeter.jsp</result>
> </action>
>
> and in JSP i am using <s:file name="fileUpload" label="File" size="20"
> onkeypress = "killEnter(event)"/> with encrypt type
> enctype="multipart/form-data".
>
> I am trying to upload a 3MB file.
> But i am getting exception "File too large" and returns Null in my action.
>
> Can any one suggest the solution for this issue.
>
> Thanks,
> Mageshwaran P.
>
> Nils-Helge Garli Hegvik wrote:
>>
>> Check the "maximumSize" parameter in the FileUploadInterceptor:
>> http://struts.apache.org/2.1.6/docs/file-upload-interceptor.html
>>
>> Nils-H
>>
>> On Thu, Mar 26, 2009 at 7:36 AM, Mageshwaran <ma...@dhyanit.com>
>> wrote:
>>
>>>
>>> Hi All,
>>>
>>> I am using strust2* "s:file" *attribute tag for file upload to server. I
>>> am
>>> getting the following Exception,
>>>
>>> 2009-03-26 11:48:40,968 ERROR [Class]
>>> org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException:
>>> the
>>> request was rejected because its size (3203060) exceeds the configured
>>> maximum (2097152)
>>> 2009-03-26 11:48:40,968 ERROR [Class] the request was rejected because
>>> its
>>> size (3203060) exceeds the configured maximum (2097152)
>>> 2009-03-26 11:48:41,109 ERROR [Class] Could not find action or result
>>>
>>> Can any one guide me how to solve this issue and to configure the size
>>> for
>>> file upload.
>>>
>>> Thanks in advance,
>>> Mageshwaran P.
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> 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: About File UploadSizeLimitExceededException
Posted by Mageshwaran <ma...@dhyanit.com>.
Hi Nils-H ,
for the above issue, i had used "interceptor" tag in struts config
xml and the mapping is given below,
<constant name="struts.multipart.maxSize" value="10000000" />
<action name="importDCMeterXLSFile"
class="com.echelon.nem.client.configuration.struts.ImportDcMeterAction"
method="readXLSFile">
<interceptor-ref name="fileUpload">
<param name="maximumSize">5203070</param>
</interceptor-ref>
<result
name="success">/configuration/ImportDCMeter.jsp</result>
</action>
and in JSP i am using <s:file name="fileUpload" label="File" size="20"
onkeypress = "killEnter(event)"/> with encrypt type
enctype="multipart/form-data".
I am trying to upload a 3MB file.
But i am getting exception "File too large" and returns Null in my action.
Can any one suggest the solution for this issue.
Thanks,
Mageshwaran P.
Nils-Helge Garli Hegvik wrote:
> Check the "maximumSize" parameter in the FileUploadInterceptor:
> http://struts.apache.org/2.1.6/docs/file-upload-interceptor.html
>
> Nils-H
>
> On Thu, Mar 26, 2009 at 7:36 AM, Mageshwaran <ma...@dhyanit.com> wrote:
>
>> Hi All,
>>
>> I am using strust2* "s:file" *attribute tag for file upload to server. I am
>> getting the following Exception,
>>
>> 2009-03-26 11:48:40,968 ERROR [Class]
>> org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the
>> request was rejected because its size (3203060) exceeds the configured
>> maximum (2097152)
>> 2009-03-26 11:48:40,968 ERROR [Class] the request was rejected because its
>> size (3203060) exceeds the configured maximum (2097152)
>> 2009-03-26 11:48:41,109 ERROR [Class] Could not find action or result
>>
>> Can any one guide me how to solve this issue and to configure the size for
>> file upload.
>>
>> Thanks in advance,
>> Mageshwaran P.
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: About File UploadSizeLimitExceededException
Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
Check the "maximumSize" parameter in the FileUploadInterceptor:
http://struts.apache.org/2.1.6/docs/file-upload-interceptor.html
Nils-H
On Thu, Mar 26, 2009 at 7:36 AM, Mageshwaran <ma...@dhyanit.com> wrote:
> Hi All,
>
> I am using strust2* "s:file" *attribute tag for file upload to server. I am
> getting the following Exception,
>
> 2009-03-26 11:48:40,968 ERROR [Class]
> org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the
> request was rejected because its size (3203060) exceeds the configured
> maximum (2097152)
> 2009-03-26 11:48:40,968 ERROR [Class] the request was rejected because its
> size (3203060) exceeds the configured maximum (2097152)
> 2009-03-26 11:48:41,109 ERROR [Class] Could not find action or result
>
> Can any one guide me how to solve this issue and to configure the size for
> file upload.
>
> Thanks in advance,
> Mageshwaran P.
>
>
>
> ---------------------------------------------------------------------
> 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
About File UploadSizeLimitExceededException
Posted by Mageshwaran <ma...@dhyanit.com>.
Hi All,
I am using strust2* "s:file" *attribute tag for file upload to server. I
am getting the following Exception,
2009-03-26 11:48:40,968 ERROR [Class]
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException:
the request was rejected because its size (3203060) exceeds the
configured maximum (2097152)
2009-03-26 11:48:40,968 ERROR [Class] the request was rejected because
its size (3203060) exceeds the configured maximum (2097152)
2009-03-26 11:48:41,109 ERROR [Class] Could not find action or result
Can any one guide me how to solve this issue and to configure the size
for file upload.
Thanks in advance,
Mageshwaran P.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Config-browser properties tab broken (2.1.6)
Posted by Martin Gainty <mg...@hotmail.com>.
can you post jsp and xml action config?
thx,
Martin
______________________________________________
Disclaimer and confidentiality note
This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided.
> To: user@struts.apache.org
> Subject: Config-browser properties tab broken (2.1.6)
> Date: Wed, 25 Mar 2009 21:18:00 -0400
> From: musomesa@aol.com
>
> I find it doesn't matter which action you are looking at -- you get the same list of 38 key-value pairs which are clearly not the bean properties of your action. The list is pasted below:
> It looks very much like we are getting the bean properties of some Class<?> object ...?
> Chris M
>
> annotation boolean
> annotations [Ljava.lang.annotation.Annotation;
> anonymousClass boolean
> array boolean
> canonicalName java.lang.String
> classLoader java.lang.ClassLoader
> classes [Ljava.lang.Class;
> componentType java.lang.Class
> constructors [Ljava.lang.reflect.Constructor;
> declaredAnnotations [Ljava.lang.annotation.Annotation;
> declaredClasses [Ljava.lang.Class;
> declaredConstructors [Ljava.lang.reflect.Constructor;
> declaredFields [Ljava.lang.reflect.Field;
> declaredMethods [Ljava.lang.reflect.Method;
> declaringClass java.lang.Class
> enclosingClass java.lang.Class
> enclosingConstructor java.lang.reflect.Constructor
> enclosingMethod java.lang.reflect.Method
> enum boolean
> enumConstants [Ljava.lang.Object;
> fields [Ljava.lang.reflect.Field;
> genericInterfaces [Ljava.lang.reflect.Type;
> genericSuperclass java.lang.reflect.Type
> interface boolean
> interfaces [Ljava.lang.Class;
> localClass boolean
> memberClass boolean
> methods [Ljava.lang.reflect.Method;
> modifiers int
> name java.lang.String
> package java.lang.Package
> primitive boolean
> protectionDomain java.security.ProtectionDomain
> signers [Ljava.lang.Object;
> simpleName java.lang.String
> superclass java.lang.Class
> synthetic boolean
> typeParameters [Ljava.lang.reflect.TypeVariable;
>
>
_________________________________________________________________
Windows Live™ SkyDrive: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_skydrive_032009