RE: How can you get OGNL to go faster?

2009-02-24 Thread Matthew Seaborn
Having looked into this it appears to be due to the fact that I was in DEV 
Mode; when running normally it is fine.

Why does DEV Mode affect the rendering speed?  Is it just the logging?

From: Matthew Seaborn
Sent: 14 February 2009 16:12
To: Struts Users Mailing List
Subject: How can you get OGNL to go faster?

I am currently running Struts 2.0.11 (planning to upgrade soon) with OGNL 
2.6.11 and am having significant trouble with the appalling performance of OGNL.

The following XML using Struts 2 Tags and ORNL takes (using the s2 profiling) 
2328ms to render

%@ page contentType=text/xml %%--
--%%@ taglib prefix=s uri=/struts-tags %%--
--%%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %%--
--%?xml version=1.0 ?
response
  entities
s:iterator value=entities id=entity
  entity %--
  --%id=s:property value=id/ %--
  --%name=s:property value=name/ %--
  --%externalId=s:property value=externalId/ %--
  --%color=s:property value=renderColor/ %--
  --%image=s:property value=image.path/ %--
  --%includeInKey=s:property value=includeInKey/ %--
  --%orderRank=s:property value=orderRank/ %--
  --% /
/s:iterator
  /entities
/response

The exact same functionality, using JSTL tags and EL, takes 15ms

%@ page contentType=text/xml %%--
--%%@ taglib prefix=s uri=/struts-tags %%--
--%%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %%--
--%?xml version=1.0 ?
response
  entities
c:forEach items=${entities} var=entity
  entity %--
  --%id=c:out value=${entity.id}/ %--
  --%name=c:out value=${entity.name}/ %--
  --%externalId=c:out value=${entity.externalId}/ %--
  --%color=c:out value=${entity.renderColor}/ %--
  --%image=c:out value=${entity.image.path}/ %--
  --%includeInKey=c:out value=${entity.includeInKey}/ 
%--
  --%orderRank=c:out value=${entity.orderRank}/ %--
  --% /
/c:forEach
  /entities
/response

In this case the S2/OGNL is 150x (!) slower than the standard approach.  
Now clearly in this case I can simply use the JSTL/EL approach to get decent 
performance, but when using S2's Freemarker based tags I don't get that option.

Is this really as fast as OGNL can go, or there some optimisation/option I am 
missing?

Does anyone know how much faster is OGNL 2.7 supposed to be?

Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   matthew.seab...@performgroup.commailto:%3cyourname...@performgroup.com


[cid:image001.jpg@01C98EBB.797B1DB0]http://www.performgroup.com/
Sussex House
Plane Tree Crescent
London, TW13 7HE
United Kingdom
www.performgroup.comhttp://www.performgroup.com/



 [cid:image002.gif@01C98EBB.797B1DB0] http://www.omnisport.tv/ 
[cid:image003.gif@01C98EBB.797B1DB0] http://www.watchandbet.tv/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient?s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.



CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message

How can you get OGNL to go faster?

2009-02-14 Thread Matthew Seaborn
I am currently running Struts 2.0.11 (planning to upgrade soon) with OGNL 
2.6.11 and am having significant trouble with the appalling performance of OGNL.

The following XML using Struts 2 Tags and ORNL takes (using the s2 profiling) 
2328ms to render

%@ page contentType=text/xml %%--
--%%@ taglib prefix=s uri=/struts-tags %%--
--%%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %%--
--%?xml version=1.0 ?
response
  entities
s:iterator value=entities id=entity
  entity %--
  --%id=s:property value=id/ %--
  --%name=s:property value=name/ %--
  --%externalId=s:property value=externalId/ %--
  --%color=s:property value=renderColor/ %--
  --%image=s:property value=image.path/ %--
  --%includeInKey=s:property value=includeInKey/ %--
  --%orderRank=s:property value=orderRank/ %--
  --% /
/s:iterator
  /entities
/response

The exact same functionality, using JSTL tags and EL, takes 15ms

%@ page contentType=text/xml %%--
--%%@ taglib prefix=s uri=/struts-tags %%--
--%%@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c %%--
--%?xml version=1.0 ?
response
  entities
c:forEach items=${entities} var=entity
  entity %--
  --%id=c:out value=${entity.id}/ %--
  --%name=c:out value=${entity.name}/ %--
  --%externalId=c:out value=${entity.externalId}/ %--
  --%color=c:out value=${entity.renderColor}/ %--
  --%image=c:out value=${entity.image.path}/ %--
  --%includeInKey=c:out value=${entity.includeInKey}/ 
%--
  --%orderRank=c:out value=${entity.orderRank}/ %--
  --% /
/c:forEach
  /entities
/response

In this case the S2/OGNL is 150x (!) slower than the standard approach.  
Now clearly in this case I can simply use the JSTL/EL approach to get decent 
performance, but when using S2's Freemarker based tags I don't get that option.

Is this really as fast as OGNL can go, or there some optimisation/option I am 
missing?

Does anyone know how much faster is OGNL 2.7 supposed to be?

Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   matthew.seab...@performgroup.commailto:%3cyourname...@performgroup.com


[cid:image001.jpg@01C98EBB.797B1DB0]http://www.performgroup.com/
Sussex House
Plane Tree Crescent
London, TW13 7HE
United Kingdom
www.performgroup.comhttp://www.performgroup.com/



 [cid:image002.gif@01C98EBB.797B1DB0] http://www.omnisport.tv/ 
[cid:image003.gif@01C98EBB.797B1DB0] http://www.watchandbet.tv/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

Embedded Maps as arguments

2009-01-26 Thread Matthew Seaborn
As I have grid of checkboxes I am currently trying to use embedded maps as 
arguments in Struts 2, for example using

@CreateIfNull( value = true )
@Element( value = HashMap.class )
public MapInteger, MapInteger, Boolean getTestMap() {
return testMap;
}

Using

/testAction.action?testMap[1][2]=true

Although it places the value in the right place, it is always

ognl.noConversionPossible


This has been discussed here 
(http://www.nabble.com/struts2-map-of-maps-td18882730.html ) but with no 
resolution.

Has anyone one this successfully?



Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   matthew.seab...@performgroup.commailto:%3cyourname...@performgroup.com


[cid:image001.jpg@01C97FDD.15D48900]http://www.performgroup.com/
Sussex House
Plane Tree Crescent
London, TW13 7HE
United Kingdom
www.performgroup.comhttp://www.performgroup.com/



 [cid:image002.gif@01C97FDD.15D48900] http://www.omnisport.tv/ 
[cid:image003.gif@01C97FDD.15D48900] http://www.watchandbet.tv/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

Struts 2 Performance

2009-01-24 Thread Matthew Seaborn
What's the latest news on the Struts 2 rendering performance issues?  A browse 
through the issue log suggests that despite a number of releases it still 
hasn't been resolved.

https://issues.apache.org/struts/browse/WW-2128

https://issues.apache.org/struts/browse/WW-2808

The proposed solution appears to be an upgrade to OGNL 2.7 but this doesn't 
appear to be planned until 
v2.5.xhttps://issues.apache.org/struts/browse/WW-2128?focusedCommentId=44204#action_44204.


Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   matthew.seab...@performgroup.commailto:%3cyourname...@performgroup.com


[cid:image001.jpg@01C97E29.18C8C6E0]http://www.performgroup.com/
Sussex House
Plane Tree Crescent
London, TW13 7HE
United Kingdom
www.performgroup.comhttp://www.performgroup.com/



 [cid:image002.gif@01C97E29.18C8C6E0] http://www.omnisport.tv/ 
[cid:image003.gif@01C97E29.18C8C6E0] http://www.watchandbet.tv/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

Upgrading Struts 2

2009-01-24 Thread Matthew Seaborn
We are currently running 2.0.11 and having been away from Struts 2 for a while 
I was pleased to a see a number of new releases.

Has anyone done an upgrade to either 2.0.14 or 2.1.6 from a 2.0.x release?   If 
so how smooth was the transition?

Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   matthew.seab...@performgroup.commailto:%3cyourname...@performgroup.com


[cid:image001.jpg@01C97E29.94BE05D0]http://www.performgroup.com/
Sussex House
Plane Tree Crescent
London, TW13 7HE
United Kingdom
www.performgroup.comhttp://www.performgroup.com/



 [cid:image002.gif@01C97E29.94BE05D0] http://www.omnisport.tv/ 
[cid:image003.gif@01C97E29.94BE05D0] http://www.watchandbet.tv/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

RE: Struts 2 Performance

2009-01-24 Thread Matthew Seaborn
We are currently running on 2.0.11, have there been any performance 
improvements  in subsequent releases?

From: Matthew Seaborn
Sent: 24 January 2009 13:39
To: Struts Users Mailing List
Subject: Struts 2 Performance

What's the latest news on the Struts 2 rendering performance issues?  A browse 
through the issue log suggests that despite a number of releases it still 
hasn't been resolved.

https://issues.apache.org/struts/browse/WW-2128

https://issues.apache.org/struts/browse/WW-2808

The proposed solution appears to be an upgrade to OGNL 2.7 but this doesn't 
appear to be planned until 
v2.5.xhttps://issues.apache.org/struts/browse/WW-2128?focusedCommentId=44204#action_44204.


Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   matthew.seab...@performgroup.commailto:%3cyourname...@performgroup.com


[cid:image001.jpg@01C97E2A.080A2AA0]http://www.performgroup.com/
Sussex House
Plane Tree Crescent
London, TW13 7HE
United Kingdom
www.performgroup.comhttp://www.performgroup.com/



 [cid:image002.gif@01C97E2A.080A2AA0] http://www.omnisport.tv/ 
[cid:image003.gif@01C97E2A.080A2AA0] http://www.watchandbet.tv/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

RE: Include menu action with sitemesh

2008-09-10 Thread Matthew Seaborn
Found the solution: http://struts.apache.org/2.x/docs/action.html

-Original Message-
From: Matthew Seaborn
Sent: 08 September 2008 17:12
To: Struts Users Mailing List
Subject: RE: Include menu action with sitemesh

Whenever I try to us s:include or jsp:include to access a Struts 2 action from 
within the SiteMesh decorator I get

The requested resource (Relative URL) is not available.

Surely this should be possible.

-Original Message-
From: David Loup
Sent: 02 September 2008 12:55
To: Struts Users Mailing List
Subject: RE: Include menu action with sitemesh

Hi Wes,

Thanks for your reply.

Am using Struts 2.0.11, so I tried:

s:url id=menuUrl namespace=/menu action=menu/
s:div id=menuDiv href=%{menuUrl} /

Since I think sx tags only work with the Dojo plugin in Struts 2.1.

However, I'm not getting any error (Java or JS), but the DIV remains 
desperately empty.

Any idea?


-Original Message-
From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
Sent: 02 September 2008 02:21
To: Struts Users Mailing List
Subject: Re: Include menu action with sitemesh

David,

I use S2 tags all the time in my sitemesh decorators. When I first did
it, I hadn't put much thought into it (maybe the filter won't be
available to sitemesh, the action is the decorated page, not the
decorator, etc.), I just did it and it worked. It wasn't until later
that I thought maybe it wasn't right. However, it worked fine and I have
been happily doing it since. Rather than -

div id=menuDiv
  s:action name=menu /
/div

Why not use the sx:div / tag?

http://struts.apache.org/2.x/docs/ajax-div-template.html

Just be careful that the menu action does not get decorated by Sitemesh,
otherwise the result can be pretty bizarre :)

-Wes

On Mon, 2008-09-01 at 10:50 +0100, David Loup wrote:
 Hi there,

 I'm using sitemesh with struts 2 and am currently applying a decorator to all 
 my actions, including a static menu in a div.

 So something like
 div id=menuDiv
 ul
 limenuitem 1 /li
 limenuitem 2 /li
 limenuitem 3 /li
 /ul
 /div
 div id=mainContent
 decorator:body /
 /div

 What I want to do is make that menu build dynamically to have, in spirit:

 div id=menuDiv
  s :action name=menu/
 /div
 div id=mainContent
 decorator:body /
 /div

 I have my menu action, which works, to display menu content in a separate 
 JSP. How can I include that action's execution in my decorator to get the 
 desired effect ?

 Thanks
 D

 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete them 
 from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained as 
 a result of a computer virus and it is the recipients responsibility to 
 ensure that email is virus free.

 AUTHORITY - Any views or opinions expressed in this email are solely those of 
 the sender and do not necessarily represent those of Perform Group.

 COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
 Group, Companies House Registration number 6324278.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient?s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments

RE: Include menu action with sitemesh

2008-09-08 Thread Matthew Seaborn
Whenever I try to us s:include or jsp:include to access a Struts 2 action from 
within the SiteMesh decorator I get

The requested resource (Relative URL) is not available.

Surely this should be possible.

-Original Message-
From: David Loup
Sent: 02 September 2008 12:55
To: Struts Users Mailing List
Subject: RE: Include menu action with sitemesh

Hi Wes,

Thanks for your reply.

Am using Struts 2.0.11, so I tried:

s:url id=menuUrl namespace=/menu action=menu/
s:div id=menuDiv href=%{menuUrl} /

Since I think sx tags only work with the Dojo plugin in Struts 2.1.

However, I'm not getting any error (Java or JS), but the DIV remains 
desperately empty.

Any idea?


-Original Message-
From: Wes Wannemacher [mailto:[EMAIL PROTECTED]
Sent: 02 September 2008 02:21
To: Struts Users Mailing List
Subject: Re: Include menu action with sitemesh

David,

I use S2 tags all the time in my sitemesh decorators. When I first did
it, I hadn't put much thought into it (maybe the filter won't be
available to sitemesh, the action is the decorated page, not the
decorator, etc.), I just did it and it worked. It wasn't until later
that I thought maybe it wasn't right. However, it worked fine and I have
been happily doing it since. Rather than -

div id=menuDiv
  s:action name=menu /
/div

Why not use the sx:div / tag?

http://struts.apache.org/2.x/docs/ajax-div-template.html

Just be careful that the menu action does not get decorated by Sitemesh,
otherwise the result can be pretty bizarre :)

-Wes

On Mon, 2008-09-01 at 10:50 +0100, David Loup wrote:
 Hi there,

 I'm using sitemesh with struts 2 and am currently applying a decorator to all 
 my actions, including a static menu in a div.

 So something like
 div id=menuDiv
 ul
 limenuitem 1 /li
 limenuitem 2 /li
 limenuitem 3 /li
 /ul
 /div
 div id=mainContent
 decorator:body /
 /div

 What I want to do is make that menu build dynamically to have, in spirit:

 div id=menuDiv
  s :action name=menu/
 /div
 div id=mainContent
 decorator:body /
 /div

 I have my menu action, which works, to display menu content in a separate 
 JSP. How can I include that action's execution in my decorator to get the 
 desired effect ?

 Thanks
 D

 

 CONFIDENTIALITY - This email and any files transmitted with it, are 
 confidential, may be legally privileged and are intended solely for the use 
 of the individual or entity to whom they are addressed. If this has come to 
 you in error, you must not copy, distribute, disclose or use any of the 
 information it contains. Please notify the sender immediately and delete them 
 from your system.

 SECURITY - Please be aware that communication by email, by its very nature, 
 is not 100% secure and by communicating with Perform Group by email you 
 consent to us monitoring and reading any such correspondence.

 VIRUSES - Although this email message has been scanned for the presence of 
 computer viruses, the sender accepts no liability for any damage sustained as 
 a result of a computer virus and it is the recipients responsibility to 
 ensure that email is virus free.

 AUTHORITY - Any views or opinions expressed in this email are solely those of 
 the sender and do not necessarily represent those of Perform Group.

 COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
 Group, Companies House Registration number 6324278.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient?s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.



CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, 

RE: Struts 2 - Where does all the CPU go

2008-04-28 Thread Matthew Seaborn
Where are certainly a number of calls through to OGNL within the Freemarker 
code, so it could still be that.

Unfortunately, I have already

constant name=struts.freemarker.templatesCache value=true /

in my struts.xml

I don't see the WARNings you mention in my logs.

-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED]
Sent: 27 April 2008 04:54
To: Struts Users Mailing List
Subject: Re: Struts 2 - Where does all the CPU go

Hi Matthew,

I'm surprised  that you can contribute more to FreeMarker than to than
Ognl. Perhaps FreeMarker is still masking the underlying problem as the
templates predominately call into the model setup by Struts and most of
that model is prepared via OGNL expressions.  OGNL does cache
expressions though and you would be reusing many of them.

Turn on freemarker template caching.  This is a cache within struts2,
rather than FreeMarker's own cache, that reuses the Template object
keyed by name rather than going to the template loader.

in struts.properties:
struts.freemarker.templatesCache=true

1.5 seconds within the template rendering is still huge though, even
with freemarker caching turned off. One of the templates must be calling
*something* slow in the struts 2 model.

I've always suspected that the guys below were eating up my cycles.

2008-04-27 13:26:58,413 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [org.apache.tiles.AttributeContext.STACK]
2008-04-27 13:26:58,414 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [org.apache.tiles.AttributeContext.STACK]
2008-04-27 13:26:58,414 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [org.apache.catalina.jsp_file]
2008-04-27 13:26:58,851 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [templateDir]
2008-04-27 13:26:58,852 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [templateDir]
2008-04-27 13:26:58,852 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [theme]
2008-04-27 13:26:58,853 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [theme]
2008-04-27 13:26:58,854 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [templateDir]
2008-04-27 13:26:58,854 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [templateDir]
2008-04-27 13:26:58,869 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [theme]
2008-04-27 13:26:58,870 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [theme]
2008-04-27 13:26:58,878 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [.freemarker.Request]
2008-04-27 13:26:58,878 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [.freemarker.RequestParameters]
2008-04-27 13:26:58,880 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [commands]
2008-04-27 13:26:59,036 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [property]
2008-04-27 13:26:59,044 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [property]
2008-04-27 13:26:59,074 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [templateDir]
2008-04-27 13:26:59,074 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [templateDir]
2008-04-27 13:26:59,074 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [theme]
2008-04-27 13:26:59,074 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [theme]
2008-04-27 13:26:59,076 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [templateDir]
2008-04-27 13:26:59,077 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [templateDir]
2008-04-27 13:26:59,077 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [theme]
2008-04-27 13:26:59,077 WARN  [http-8080-Processor24] [OgnlValueStack]
Could not find property [theme]




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the 

Struts 2.1

2008-04-26 Thread Matthew Seaborn
I heard that Struts 2.2 is going to eliminate the dependency on OGNL, this so?. 
 There is a JIRA Issue suggesting an upgrade to OGNL 
2.7https://issues.apache.org/struts/browse/WW-2128 (WW-2128) , does anyone 
know if this will happen?

Does anyone know the planned release date for 2.1?






Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]

[cid:image001.jpg@01C8A7A0.56F4D130]
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

RE: OGNL/Freemarker Performance

2008-04-26 Thread Matthew Seaborn
In answer (in part) to my own question:


* By removing the validate=true from my form tag cut over two seconds 
from the page render time. I loose the client side validation, but it is worth 
it.

* By changing the head tag's theme from ajax to xhtml cut down on a 
large number of javascript files being downloaded which spread up the page load 
by a couple of seconds again, although it had little effect on the page render 
time.

It is now much faster, if not exactly 'snappy'.  Anyone got any other good 
optimisations tips?

From: Matthew Seaborn
Sent: 25 April 2008 16:36
To: 'Struts Users Mailing List'
Subject: OGNL/Freemarker Performance

I have been doing some profiling on my Struts 2 applications (also using 
SiteMesh and Spring) and have found, like many others, that most of the 
request/response time is taken rendering of the JSP page (assuming I am reading 
the profile correctly).

What exactly is the guilty party here,  OGNL or Freemarker?

I have made all of the optimisations detailed in 
http://struts.apache.org/2.x/docs/performance-tuning.html  yet I still get 
profiles like the one below.

Has anyone any other suggestions on how to improve this?

INFO: [4224ms] - ActionContextCleanUp_doFilter:
  [4100ms] - FilterDispatcher_doFilter:
[4100ms] - Handling request from Dispatcher
  [16ms] - create DefaultActionProxy:
[16ms] - create DefaultActionInvocation:
  [16ms] - actionCreate: viewRight
  [4084ms] - invoke:
...
 [0ms] - invokeAction: viewRight
 [4037ms] - executeResult: input




Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]

[cid:image001.jpg@01C8A79E.DAD82990]
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

RE: OGNL/Freemarker Performance

2008-04-26 Thread Matthew Seaborn
When the page is being rendered, all of the database loading has already been 
done and stored as DTOs (extracted from the in the action.  The database hit 
only took a few ms and is called in an Interceptor.  So the time shown is 
purely the cost of rendering.

The page is a form with about 50 struts tags in.

-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED]
Sent: 26 April 2008 08:17
To: Struts Users Mailing List
Subject: Re: OGNL/Freemarker Performance

That's a lot of milliseconds. For those sorts of numbers, I'd guess
you're using an open-session-in-view interceptor/filter and your result
is causing a select n+1 iteration (loads of sql selects while rendering
the view).  Few other things are so slow.

If you happen to be using Hibernate or other persistence, turn on
display of sql.

Otherwise, what was the result type, what's the nature of the result
(eg. a form with many struts tags)?



CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts 2 - Where does all the CPU go

2008-04-26 Thread Matthew Seaborn
In an attempt to find out where all the CPU cycles go I ran JProfiler against a 
request for a Struts 2 page containing a form with around 40 tags running under 
Tomcat 5.5, using SiteMesh for styling.

The details are below, but FreeMarker seems to be the primary guilty party.  
Does anyone know how to get it to go faster, I already have the 
freemarker.properties file in WEB-INF/classes.

For those that are interested, the details.


Around 7% went to Tomcat and 4% to SiteMesh.


100.0% - 2,215 ms - 1 inv. 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
  99.5% - 2,205 ms - 8 inv. ptv.http.HttpRequestInitialiserFilter.doFilter
   99.5% - 2,205 ms - 8 inv. ptv.http.HttpRequestInitialiserFilter.doFilter
94.0% - 2,082 ms - 8 inv. javax.servlet.FilterChain.doFilter
 94.0% - 2,081 ms - 8 inv. 
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter
  92.6% - 2,051 ms - 3 inv. 
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage
   90.3% - 1,999 ms - 3 inv. javax.servlet.FilterChain.doFilter
88.9% - 1,969 ms - 3 inv. 
com.opensymphony.xwork2.DefaultActionInvocation.invoke

Then about 4% went to the Struts 2 Interceptor stack. Of the remaining 85%, 
OGNL took about  15% (I estimate, all in) but the vast majority went to 
Freemarker; 67% consumed to render the tags.

84.8% 1,878 ms - 1 inv. /pages/vdp/rights/viewRight.jsp 
[org.apache.jsp.pages.vdp.rights.viewRight_jsp]
 67.2% - 1,488 ms - 23 inv. freemarker.template.Template.process
 7.7% - 171 ms - 95 inv. 
com.opensymphony.xwork2.util.OgnlValueStack.findValue(java.lang.String)
 4.2% - 94,134 µs - 108 inv. 
com.opensymphony.xwork2.util.TextParseUtil.translateVariables
 2.0% - 45,152 µs - 65 inv. 
com.opensymphony.xwork2.util.OgnlValueStack.findValue(java.lang.String, 
java.lang.Class)
 0.8% - 17,987 µs - 92 inv. com.opensymphony.xwork2.inject.ContainerImpl.inject
 0.3% - 6,119 µs - 63 inv. com.opensymphony.xwork2.util.TextUtils.htmlEncode
 0.2% - 4,390 µs - 23 inv. freemarker.template.SimpleHash.putAll
 0.2% - 3,542 µs - 384 inv. ognl.OgnlContext.get

I could find no particularly guilty party in FreeMarker, it just seemed to 
whittle the CPU away.  Some of it went to OGNL, but not much.

67.0% - 1,485 ms - 23 inv. freemarker.core.Environment.process
 66.9% - 1,482 ms - 23 inv. freemarker.core.Environment.visit
  66.9% - 1,482 ms - 23 inv. freemarker.core.MixedContent.accept
   66.9% - 1,481 ms - 108 inv. freemarker.core.Environment.visit
62.0% - 1,374 ms - 59 inv. freemarker.core.Include.accept
 57.8% - 1,280 ms - 59 inv. freemarker.core.Environment.include
  57.7% - 1,277 ms - 59 inv. freemarker.core.Environment.visit
   57.6% - 1,276 ms - 59 inv. freemarker.core.MixedContent.accept
57.4% - 1,271 ms - 504 inv. freemarker.core.Environment.visit
 23.7% - 525 ms - 49 inv. freemarker.core.Include.accept
 16.0% - 353 ms - 4 inv. freemarker.core.UnifiedCall.accept
 13.8% - 306 ms - 192 inv. freemarker.core.ConditionalBlock.accept
 1.7% - 37,064 µs - 40 inv. freemarker.core.DollarVariable.accept
 1.6% - 35,617 µs - 2 inv. freemarker.core.IfBlock.accept
 0.2% - 4,826 µs - 504 inv. freemarker.core.Environment.popElement
 0.1% - 2,696 µs - 504 inv. freemarker.core.Environment.pushElement
 0.1% - 1,513 µs - 155 inv. freemarker.core.TextBlock.accept
 0.0% - 108 µs - 61 inv. freemarker.core.Comment.accept
 0.0% - 36 µs - 1 inv. freemarker.core.PropertySetting.accept






Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]

[cid:image002.jpg@01C8A7AE.E9905EC0]
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House

OGNL/Freemarker Performance

2008-04-25 Thread Matthew Seaborn
I have been doing some profiling on my Struts 2 applications (also using 
SiteMesh and Spring) and have found, like many others, that most of the 
request/response time is taken rendering of the JSP page (assuming I am reading 
the profile correctly).

What exactly is the guilty party here,  OGNL or Freemarker?

I have made all of the optimisations detailed in 
http://struts.apache.org/2.x/docs/performance-tuning.html  yet I still get 
profiles like the one below.

Has anyone any other suggestions on how to improve this?

INFO: [4224ms] - ActionContextCleanUp_doFilter:
  [4100ms] - FilterDispatcher_doFilter:
[4100ms] - Handling request from Dispatcher
  [16ms] - create DefaultActionProxy:
[16ms] - create DefaultActionInvocation:
  [16ms] - actionCreate: viewRight
  [4084ms] - invoke:
...
 [0ms] - invokeAction: viewRight
 [4037ms] - executeResult: input





Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]

[cid:image002.jpg@01C8A6F2.4AA14AC0]
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

RE: Struts2, SiteMesh and Struts Menu

2008-04-18 Thread Matthew Seaborn
Discovered it was a simple case of user (i.e. my) error.

The actual problem was The displayer mapping for the specified MenuDisplayer 
does not exist. which was causing the JSP to not be rendered and thus 
resulting  in SiteMesh to report the error I detailed previusly.

-Original Message-
From: Al Sutton [mailto:[EMAIL PROTECTED]
Sent: 10 April 2008 16:42
To: Struts Users Mailing List
Subject: Re: Struts2, SiteMesh and Struts Menu

I'm using the combination you mention without any problems.

Check the order you're using the servlet filters in, mine is;


filter
 filter-namestruts-cleanup/filter-name
 
filter-classorg.apache.struts2.dispatcher.ActionContextCleanUp/filter-class/filterfilter
 filter-namesitemesh/filter-name 
filter-classcom.opensymphony.module.sitemesh.filter.PageFilter/filter-class/filterfilter
 filter-namestruts/filter-name 
filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class/filterfilter
 filter-namestruts-cleanup/filter-name 
url-pattern/*/url-pattern/filter-mappingfilter-mapping 
filter-namesitemesh/filter-name 
url-pattern/*/url-pattern/filter-mappingfilter-mapping 
filter-namestruts/filter-name 
url-pattern/*/url-pattern/filter-mapping Other filters here .and 
for Struts Menu I use the listener; listener  
listener-classnet.sf.navigator.menu.MenuContextListener/listener-class 
/listenerHope this helps.Al.- Original Message -From: Matthew 
SeabornTo: 'Struts Users Mailing List'Sent: Thursday, April 10, 2008 3:00 
PMSubject: Struts2, SiteMesh and Struts MenuHa
 s anyone had any experience of using these three together?  I have Struts2 and 
SiteMesh working together happily, but soon as I add Struts Menu I getthe error 
below.I believe it is due to SiteMesh and not Struts 2 but am not sure on 
this.Has anyone seen this before?Thanks.javax.servlet.ServletException: Stream 
closed
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) 
   
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)

com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) 
   
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)root
 causejava.io.IOException: Stream closed
org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:203)  
  org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterIm
 pl.java:114)
org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:172)   
 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954) 
   
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:614) 
   
org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:119)

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)

org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) 
   
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
com.opensymphony.modul
 e.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) 
   
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)Matthew
 SeabornSoftware Architectt+44(0) 208 484 0729m  +44(0) 7949 465 142e   
[EMAIL PROTECTED] HousePlane Tree CrescentFeltham, Middlesex, TW13 7HEUnited 
Kingdomhttp://www.performgroup.com/CONFIDENTIALITY
 - This email and any files transmitted with it, areconfidential, may be 
legally privileged and are intended solely for the useof the individual or 
entity to whom they are addressed. If this has come toyou in error, you must 
not copy, distribute, disclose or use any of theinformation it contains. Please 
notify the sender immediately and deletethem from your system.SECURITY - Please 
be aware that communication by email, by its very
 nature,is not 100% secure and by communicating with Perform Group by email 
youconsent to us monitoring and reading any such correspondence.VIRUSES - 
Although this email message has been scanned for the presence ofcomputer 
viruses, the sender accepts no liability for any damage sustainedas a result of 
a computer virus and it is the recipient's responsibility toensure that email 
is virus free.AUTHORITY - Any views or opinions expressed in 

Struts2, SiteMesh and Struts Menu

2008-04-10 Thread Matthew Seaborn
Has anyone had any experience of using these three together?  I have Struts 2 
and SiteMesh working together happily, but soon as I add Struts Menu I get the 
error below.

I believe it is due to SiteMesh and not Struts 2 but am not sure on this.

Has anyone seen this before?

Thanks.


javax.servlet.ServletException: Stream closed

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)

com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)

org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)

root cause

java.io.IOException: Stream closed

org.apache.jasper.runtime.JspWriterImpl.ensureOpen(JspWriterImpl.java:203)

org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:114)

org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:172)

org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)

org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:614)

org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:119)

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)

org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50)

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)

com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)

com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)

org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)









Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]

[cid:image001.jpg@01C89B1B.A3B79980]
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

Struts constants

2008-03-27 Thread Matthew Seaborn
How can you get hold of the constants defined in the struts.xml?






Matthew Seaborn
Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
e   [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]

[cid:image001.jpg@01C8903D.E0C3C3F0]
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/






CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

Submitting in Struts 2 from outside the Form

2008-03-05 Thread Matthew Seaborn
Is there any documentation regarding how to submit a Struts 2 form using
something other than the submit button whilst keeping all of the
AJAX/Javascript validation etc.

 

We are putting in drop down menus and would like to be able to do it
from there via a Javascript call.

 

Many thanks.

 





 


Matthew Seaborn

Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142

e   [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 

 
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/ http://www.performgroup.com/  

 

 




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

RE: Submit, ajax, targets and action

2008-03-01 Thread Matthew Seaborn
Thanks for the advice.

How is this function supposed  to be used, is it called from onclick in
the s:submit tag?  


-Original Message-
From: Richard Sayre [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2008 18:42
To: Struts Users Mailing List
Subject: Re: Submit, ajax, targets and action

Sorry this posted too early... I updated the code so it submits the
form fields with the ajax request:

let me know if it helps.

Rich


  function submitFunctionA() {

   var kw = {
 url:'s:url action=myAction/',
 load:function(type, data, evt) {
 //up to you what happens here
 },
 method: POST,
 formNode: dojo.byId(myForm),
 error: function(type, data, evt){
 //error
 }
 };

 dojo.io.bind(kw);
 }

  }


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Submit, ajax, targets and action

2008-03-01 Thread Matthew Seaborn
Okay, got all this work; works fine. Cheers, Richard.

In the end it looked like

function submitFunctionA() {
preventCache: true,
load:function(type, data, evt) {
$(#formId).html(data) ;
  },
method: POST,
formNode: dojo.byId(formId)
}

Note the use of jQuery in the load function; IE was being reluctant to
populate the innerHTML (apparently it does this with some HTML), jQuery
seemed to get round this.

Damned annoying the Struts 2 submit tag doesn't do it for us!   
  
-Original Message-
From: Matthew Seaborn 
Sent: 01 March 2008 15:31
To: 'Struts Users Mailing List'
Subject: RE: Submit, ajax, targets and action

Thanks for the advice.

How is this function supposed  to be used, is it called from onclick in
the s:submit tag?  


-Original Message-
From: Richard Sayre [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2008 18:42
To: Struts Users Mailing List
Subject: Re: Submit, ajax, targets and action

Sorry this posted too early... I updated the code so it submits the
form fields with the ajax request:

let me know if it helps.

Rich


  function submitFunctionA() {

   var kw = {
 url:'s:url action=myAction/',
 load:function(type, data, evt) {
 //up to you what happens here
 },
 method: POST,
 formNode: dojo.byId(myForm),
 error: function(type, data, evt){
 //error
 }
 };

 dojo.io.bind(kw);
 }

  }


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Submit, ajax, targets and action

2008-02-27 Thread Matthew Seaborn
This simply appears to make the click on the submit button perform an
unparameterised GET on the defined URL.

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: 26 February 2008 18:42
To: Struts Users Mailing List
Subject: Re: Submit, ajax, targets and action

Just set the href on each submit to the url that it needs to submit
to, and it should work.

regards
musachy

On Tue, Feb 26, 2008 at 1:39 PM, Richard Sayre [EMAIL PROTECTED]
wrote:
 If I understand you correctly, You could write you own submit
  function(s) that does its own ajax with dojo

  function submitFunctionA() {

   var kw = {
 url:'s:url action=myAction/',
 load:function(type, data, evt) {
 //up to you what happens here
 },
 method: POST,

 error: function(type, data, evt){
 //error
 }
 };

 dojo.io.bind(kw);
 }

  }

  So you could have each of your submit buttons call their own function
  and forget about the form



  On Tue, Feb 26, 2008 at 2:59 PM, Matthew Seaborn
  [EMAIL PROTECTED] wrote:
  
  
  
  
   I have a form which contains a number of different submit buttons,
each
   using the action attribute on the submit tag to control which
action this
   called, this work fine.
  
  
  
   I want this form to load dynamically into a DIV on another page and
then
   using the AJAX theme and targets attributes on the submit tag such
that the
   form updates and remains in the DIV, this also works.
  
  
  
   However, the action attribute does not appear to work with the AJAX
theme;
   the called action is the form defined one.  Is this deliberate or a
bug?
   Does anyone know a good workaround?
  
  
  
   Many thanks.
  
  
  
  
  
  
  
  
  
  
  
Matthew Seaborn
  
   Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142
  
   e   [EMAIL PROTECTED]
  
  
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/
  
  
  
  
  

  
CONFIDENTIALITY - This email and any files transmitted with it,
are
   confidential, may be legally privileged and are intended solely for
the use
   of the individual or entity to whom they are addressed. If this has
come to
   you in error, you must not copy, distribute, disclose or use any of
the
   information it contains. Please notify the sender immediately and
delete
   them from your system.
  
SECURITY - Please be aware that communication by email, by its
very nature,
   is not 100% secure and by communicating with Perform Group by email
you
   consent to us monitoring and reading any such correspondence.
  
VIRUSES - Although this email message has been scanned for the
presence of
   computer viruses, the sender accepts no liability for any damage
sustained
   as a result of a computer virus and it is the recipient's
responsibility to
   ensure that email is virus free.
  
AUTHORITY - Any views or opinions expressed in this email are
solely those
   of the sender and do not necessarily represent those of Perform
Group.
  
COPYRIGHT - Copyright of this email and any attachments belongs to
Perform
   Group, Companies House Registration number 6324278.
  

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Hey you! Would you help me to carry the stone? Pink Floyd

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group

Submit, ajax, targets and action

2008-02-26 Thread Matthew Seaborn
I have a form which contains a number of different submit buttons, each
using the action attribute on the submit tag to control which action
this called, this work fine.

 

I want this form to load dynamically into a DIV on another page and then
using the AJAX theme and targets attributes on the submit tag such that
the form updates and remains in the DIV, this also works.

 

However, the action attribute does not appear to work with the AJAX
theme; the called action is the form defined one.  Is this deliberate or
a bug?  Does anyone know a good workaround?

 

Many thanks.

 





 


Matthew Seaborn

Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142

e   [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 

 
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/ http://www.performgroup.com/  

 

 




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

RE: ParametersInterceptor setting values using a String[]

2008-02-18 Thread Matthew Seaborn
Your right: looks like SiteMesh was sending the parameters through to
another action.

Thanks for the help.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: 14 February 2008 11:17
To: Struts Users Mailing List
Subject: Re: ParametersInterceptor setting values using a String[]

Hi Matthew,

The params interceptor is calling setId on ActionSupport (the default
action), not on your action that has the setId method, so an exception
is
being thrown as there's no matching setter whatsoever.  You may have a
config error.

All params are treated as arrays because its valid in HTTP for the same
parameter to be specified multiple times in the same request.

The default type conversion will call setId(Integer id) using the first
element in the array if that's the first property to be matched.

The error is only logged when the exception occurs and this is
*infrequent* in normal use.

Hope that helps!

regards,
Jeromy Evans

 This appears to have been mentioned a number of times in the Struts 2
 and XWork forums but I cannot find a real answer:



 Using Struts 2.0.11 I am experiencing the following problem.

 I have an action with the method

 setId(Integer id) { ... }

 When this value is set via a HTTP request through the
 ParametersInterceptor it succeeds when using both GET and POST.
However
 when a GET is performed I get the following exception logged

 SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
 caught setting 'id' on 'class com.opensymphony.xwork2.ActionSupport:
 Error setting expression 'id' with value '[Ljava.lang.String;@1a1f635'

 XWork appears to store the a single GET parameters as an array of
 Strings and attempt to set the value using the String[] first, when
that
 errors tries to convert it. The problem with this is it logs the first
 failure as an ERROR.

 Why is this happening and short of creating my own TypeConverter or
 blocking it in the logger config, how can I stop this error being
logged
 for GET requests?














 Matthew Seaborn

 Software Architect
 t+44(0) 208 484 0729
 m  +44(0) 7949 465 142

 e   [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]


 Sussex House
 Plane Tree Crescent
 Feltham, Middlesex, TW13 7HE
 United Kingdom
 http://www.performgroup.com/ http://www.performgroup.com/









 CONFIDENTIALITY - This email and any files transmitted with it, are
 confidential, may be legally privileged and are intended solely for
the
 use of the individual or entity to whom they are addressed. If this
has
 come to you in error, you must not copy, distribute, disclose or use
any
 of the information it contains. Please notify the sender immediately
and
 delete them from your system.

 SECURITY - Please be aware that communication by email, by its very
 nature, is not 100% secure and by communicating with Perform Group by
 email you consent to us monitoring and reading any such
correspondence.

 VIRUSES - Although this email message has been scanned for the
presence of
 computer viruses, the sender accepts no liability for any damage
sustained
 as a result of a computer virus and it is the recipient's
responsibility
 to ensure that email is virus free.

 AUTHORITY - Any views or opinions expressed in this email are solely
those
 of the sender and do not necessarily represent those of Perform Group.

 COPYRIGHT - Copyright of this email and any attachments belongs to
Perform
 Group, Companies House Registration number 6324278.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278

Roadmap and activity

2008-02-14 Thread Matthew Seaborn
We are currently trialling Struts 2 as a replacement as the framework of
choice in the place of Struts 1 and was wondering how 'active' is the
development on the current framework?  I see that last year a new
release came out every few months, but there has been nothing since
September.




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

ParametersInterceptor setting values using a String[]

2008-02-14 Thread Matthew Seaborn
This appears to have been mentioned a number of times in the Struts 2
and XWork forums but I cannot find a real answer:

 

Using Struts 2.0.11 I am experiencing the following problem. 

I have an action with the method 

setId(Integer id) { ... } 

When this value is set via a HTTP request through the
ParametersInterceptor it succeeds when using both GET and POST. However
when a GET is performed I get the following exception logged 

SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception
caught setting 'id' on 'class com.opensymphony.xwork2.ActionSupport:
Error setting expression 'id' with value '[Ljava.lang.String;@1a1f635' 

XWork appears to store the a single GET parameters as an array of
Strings and attempt to set the value using the String[] first, when that
errors tries to convert it. The problem with this is it logs the first
failure as an ERROR. 

Why is this happening and short of creating my own TypeConverter or
blocking it in the logger config, how can I stop this error being logged
for GET requests?

 

 

 





 


Matthew Seaborn

Software Architect
t+44(0) 208 484 0729
m  +44(0) 7949 465 142

e   [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 

 
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/ http://www.performgroup.com/  

 

 




CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

RE: ParametersInterceptor setting values using a String[]

2008-02-14 Thread Matthew Seaborn
Thanks for the prompt response.  Having had a look at the code in Xwork
that comes as part of Struts 2 (included below) it seems to log it
regardless of the devMode.

This is the same for 2.0.4 and 2.1.0.

I cannot believe this hasn't been spotted before now, so I assume I am
doing something wrong.

try {
stack.setValue(name, value);
} catch (RuntimeException e) {
if (devMode) {
String developerNotification =
LocalizedTextUtil.findText(ParametersInterceptor.class,
devmode.notification, ActionContext.getContext().getLocale(),
Developer Notification:\n{0}, new Object[]{
e.getMessage()
});
LOG.error(developerNotification);
if (action instanceof ValidationAware) {
((ValidationAware)
action).addActionMessage(developerNotification);
}
} else {
LOG.error(ParametersInterceptor - [setParameters]: Unexpected
Exception caught setting '+name+' on '+action.getClass()+:  +
e.getMessage());
}
}


-Original Message-
From: Daniel Baldes [mailto:[EMAIL PROTECTED] 
Sent: 14 February 2008 10:14
To: Struts Users Mailing List
Subject: Re: ParametersInterceptor setting values using a String[]

Matthew Seaborn wrote:
 Why is this happening and short of creating my own TypeConverter or 
 blocking it in the logger config, how can I stop this error being
logged 
 for GET requests?

AFAIK this error is only logged in devMode.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





CONFIDENTIALITY - This email and any files transmitted with it, are 
confidential, may be legally privileged and are intended solely for the use of 
the individual or entity to whom they are addressed. If this has come to you in 
error, you must not copy, distribute, disclose or use any of the information it 
contains. Please notify the sender immediately and delete them from your system.

SECURITY - Please be aware that communication by email, by its very nature, is 
not 100% secure and by communicating with Perform Group by email you consent to 
us monitoring and reading any such correspondence.

VIRUSES - Although this email message has been scanned for the presence of 
computer viruses, the sender accepts no liability for any damage sustained as a 
result of a computer virus and it is the recipient’s responsibility to ensure 
that email is virus free.

AUTHORITY - Any views or opinions expressed in this email are solely those of 
the sender and do not necessarily represent those of Perform Group.

COPYRIGHT - Copyright of this email and any attachments belongs to Perform 
Group, Companies House Registration number 6324278.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]