Author Login
Post Reply
user Digest 17 Apr 2008 18:39:38 -0000 Issue 7985
Topics (messages 185537 through 185561):
Re: Problem with Select tag
185537 by: Milan Milanovic
Tiles2 runtime definition
185538 by: stanlick
185542 by: Antonio Petrelli
185554 by: stanlick.gmail.com
notification on sccessful with login with j_security_check
185539 by: temp temp
Re: ServletRedirectActionResult - is there a way to set parameters?
185540 by: Guillaume Bilodeau
185541 by: Don Brown
185544 by: Brad A Cupit
Re: How to reflect table row data in the text boxes
185543 by: Lalchandra Rampersad
Problem: Lost ActionMessages after redirect to another action
185545 by: Marc Eckart
Re: Is there such a thing as flash in S2?
185546 by: Guillaume Bilodeau
185549 by: Ian Roughley
185551 by: Brad A Cupit
double mails
185547 by: Lalchandra Rampersad
185550 by: Vivek Rana
[OT] Re: double mails
185548 by: Dave Newton
return Result instantiated within Action
185552 by: Brad A Cupit
185553 by: Don Brown
185559 by: Brad A Cupit
JasperReports in Struts2
185555 by: aum strut
185557 by: Dave Newton
Re: Validation of Struts XML files
185556 by: Laurie Harper
Re: logout when using j_security_check
185558 by: Laurie Harper
Re: datetimepicker doesn't show up
185560 by: tristan_colson
Re: Is it possible to make a pop up window using Struts?
185561 by: Randy Burgess
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_185537.ezm (zipped)I solved the problem. It seems that I didn't called this action by using full URL with namespace.
--
Sorry, Milan Milanovic
----- Original Message ----
From: Milan Milanovic <milanmilanovich@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Thursday, April 17, 2008 3:03:35 PM
Subject: Re: Problem with Select tag
Hi,
what is also wierd, if I put that array in the session in my Action class like this (in prepare method):
Map session = ActionContext.getContext().getSession();
session.put("allRoles", allRoles);
and then I change my .jsp to use this array from session:
...
<s:select
id = "roleChoose"
label="Role"
list="%{#session.allRoles}"
name="user.roles"
emptyOption="false"
value="user.roles"
headerKey="None"
multiple="true"/>
<s:submit theme="ajax" value="Save" targets="users" notifyTopics="/save"/>
...
I got the same error (as I wrote in the first message), that it cannot locate allRoles.
What is the problem ?
--
Thx in advance, Milan Milanovic
----- Original Message ----
From: Milan Milanovic <milanmilanovich@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Wednesday, April 16, 2008 4:23:03 PM
Subject: Re: Problem with Select tag
Yes, I understand. But if you read my post, EVERYTHING works fine, but when I add namespace to package
in struts.xml (and in <s:form...) automatically "list" attribute of <s:select... doesn't recognize array anymore. I've tried
this many times and every time it works in the same way.
Here is excerpt of my code:
struts.xml:
--
<struts>
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.devMode" value="true" />
<package name="administration" namespace="/administration" extends="struts-default">
<action name="save" class="userAction" method="save">
<result>/pages/administration/list.jsp</result>
<result name="input">/pages/administration/list.jsp</result>
</action>
</package>
<package name="register" namespace="/registers" extends="struts-default">
...
</struts>
UserAction.java:
--
public class UserAction extends ActionSupport implements Preparable {
/**
*
*/
private static final long serialVersionUID = 7654885094460681178L;
private UserService service;
private List<User> users;
private User user;
private String username;
private String [] allRoles;
public UserAction(UserService service) {
this.service = service;
}
public String execute() {
users = service.findAllUsers();
allRoles = service.getAllRoles(); <- this method works fine, it return an array of roles
user = new User();
return Action.SUCCESS;
}
public String save() {
service.save(user);
return execute();
}
public void prepare() throws Exception {
if (username != null)
if (!username.equals(""))
user = servis.findUserByUsername(username);
}
public void setAllRoles(String [] allRoles) {
this.allRoles = allRoles;
}
public String [] getAllRoles() {
return allRoles;
}
// Other getters/setters
}
users.jsp:
--
<body>
...
<s:form action="save" namespace="/administration" validate="true" method="post">
<s:textfield id="username" label="Username" name="user.username"/>
<s:textfield id="password" label="Password" name="user.password"/>
<s:select
id = "roleChoose"
label="Role"
list="allRoles" <- THIS DOESN'T WORK WHEN I ADD NAMESPACE HERE IN FORM AND IN STRUTS.XML FOR CORRESPODING PACKAGE
name="user.roles"
emptyOption="false"
value="user.roles"
headerKey="None"
multiple="true"/>
<s:submit theme="ajax" value="Save" targets="users" notifyTopics="/save"/>
</s:form>
...
</body>
--
Thx in advance, Milan Milanovic
----- Original Message ----
From: Michael Gagnon <mgagnon@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Wednesday, April 16, 2008 3:38:38 PM
Subject: RE: Problem with Select tag
Can you show your struts xml, calling java action, and resulting jsp code?
I've noticed error messages like that whenever ANYTHING was wrong on a page
with a select box -- completely independent of anything to do with the
select box. So I think whatever you changed MAY have broken something else
and the message may be misleading you.
-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Wednesday, April 16, 2008 9:28 AM
To: Struts Users Mailing List
Subject: Re: Problem with Select tag
Nobody has an answer to this simple question ?
As I asked, there is with select's tag "list" attribute, when namespace is
added to the package and to the form tag. It doesn't recognize given array
from the action class anymore. Do I miss something or this is a serious
error in Struts 2 ?
--
Thanks, Milan Milanovic
----- Original Message ----
From: Milan Milanovic <milanmilanovich@(protected)>
To: user@(protected)
Sent: Tuesday, April 15, 2008 11:21:37 PM
Subject: Problem with Select tag
Hi,
I'm using Struts 2.0.11.1, and I have wierd problem with select UI tag. It
works perfectly, but
when I added namespace to the package in struts.xml, which is used in form
where this select tag
is located, I get an error:
"tag 'select', field 'list', id 'roles', name 'user.roles': The requested
list key 'allRoles' could not be resolved as a
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unkown location]"
I should note that I've added this namespace to the form tag too, where
select tag is located.
How can I solve this problem ? It seems when namespace is added to package,
select's list attribute doesn't recognize correct value stack anymore.
___________________________
Thanks in advance, Milan Milanovic
____________________________________________________________________________
________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
____________________________________________________________________________
________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

Attachment:
user_185538.ezm (zipped)
I need to set a runtime tiles definition attribute using a value from the
valuestack. From my research, the tiles-plugin result does not allow
attributes to be configured.
<action name="wizard_*" class="acme.action.wizard.Wizard" method="{1}">
<result>${nextPage}</result>
</action>
<definition name="wizardPage" extends="baseLayout">
<put-attribute name="body" value="???{nextPage}???" />
</definition>
Can someone help me navigate this configuration? I'd rather not duplicate
the tiles definitions when the only variation is the jsp page in the
sequence.
Thanks,
Scott
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185542.ezm (zipped)2008/4/17, stanlick <stanlick@(protected)>:
>
> <definition name="wizardPage" extends="baseLayout">
> <put-attribute name="body" value="???{nextPage}???" />
> </definition>
Use a ViewPreparer:
http://tiles.apache.org/tutorial/advanced/preparer.html
Antonio

Attachment:
user_185554.ezm (zipped)Right on Antonio! Can you tell me how to fish the web context root from the
Preparer? I need to construct the page location from this and the nextPage
itself. Is there a list of key names someplace? Finding this bit of data
or that on the stack is typically where productivity takes a nosedive. I
used this key to get the stack:
stack = (ValueStack)
tilesContext.getRequestScope().get(ServletActionContext.STRUTS_VALUESTACK_KEY);
Thanks brother
On Thu, Apr 17, 2008 at 9:48 AM, Antonio Petrelli <
antonio.petrelli@(protected):
> 2008/4/17, stanlick <stanlick@(protected)>:
> >
> > <definition name="wizardPage" extends="baseLayout">
> > <put-attribute name="body" value="???{nextPage}???" />
> > </definition>
>
>
>
> Use a ViewPreparer:
> http://tiles.apache.org/tutorial/advanced/preparer.html
>
> Antonio
>
--
Scott
stanlick@(protected)

Attachment:
user_185539.ezm (zipped)is there a way my application gets notified of successful login using j_security_check ?
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

Attachment:
user_185540.ezm (zipped)
Hi Alex,
You can declare your different interceptor stacks in different packages and
then declare the parent package on the action like this:
@ParentPackage("packageWithEmptyStack")
public class FooAction ...
Aside from bug WW-2170 and the repeated use of the @ParentPackage
annotation, I prefer working with annotation-based configuration instead of
XML-based. Overall it's more concise, it's closer to the relevant code and
you don't lose that much flexibility - I haven't yet run into a situation
where I needed to revert to XML-based config.
Cheers,
GB
Alex Shneyderman wrote:
>
> Thanks, Brad!
>
>> Having said all of that, I've been able to get the zero
>> config/codebehind working and (in Spring 2.5) component scanned Spring
>> beans so that newly written Actions and DAOs require few annotations and
>> no xml configuration. What other kind of problems have you had?
>
> How do I specify an interceptor stack/ref on an action with
> annotations? I have lookup actions that need no stack at all, so I
> created an almost empty stack in my struts.xml. Now, how do I specify
> this on an action without specifying the action in struts.xml?
>
> I simply find annotation way very much incomplete. Maybe it will get
> there some day but I really need to be in full control of what I can
> specify - just the way I could do with strtus.xml file. I do not want
> to have several strategies to configure my actions on the same project
> ... it's not cool and makes things hard to read/maintain.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185541.ezm (zipped)The easiest solution is to simply return a ServletActionRedirectResult
instance from your action method.
Don
On Wed, Apr 16, 2008 at 4:33 PM, Alex Shneyderman
<a.shneyderman@(protected):
> I am using 2.0.11 it seems that I can not use action-redirect result
> type. I need to tag along a request paramter. So my annotation looks
> like this:
>
> @Result (name="enterNewContactInfo",value="enterNewContactInfo",type=ServletActionRedirectResult.class,params={"country","AUT"})
>
> I get a nasty NPE if I add the params. If I remove it everything works fine.
>
> Another question is how do I set the parameter dynamically ? If I
> recall correctly WW had a special syntax for it. Something like
> params={"country","%{country}"}, but with no annotations for
> course.Any way to do this in S2?
>
> Here is the stack trace:
>
> HTTP ERROR: 500
>
> INTERNAL_SERVER_ERROR
>
> RequestURI=/******/displayContactInfo.do
> Caused by:
>
>
java.lang.NullPointerException> at
org.apache.struts2.dispatcher.mapper.DefaultActionMapper.getUriFromActionMapping (
DefaultActionMapper.java:466)
> at
org.apache.struts2.dispatcher.ServletActionRedirectResult.execute (
ServletActionRedirectResult.java:184)
> at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult (
DefaultActionInvocation.java:348)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:253)
> at ******
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at ******
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept (
DefaultWorkflowInterceptor.java:221)
> at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (
ConversionErrorInterceptor.java:123)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (
ParametersInterceptor.java:167)
> at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (
StaticParametersInterceptor.java:105)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept (
CheckboxInterceptor.java:83)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept (
ModelDrivenInterceptor.java:74)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (
ChainingInterceptor.java:115)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (
I18nInterceptor.java:143)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (
PrepareInterceptor.java:121)
> at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (
ServletConfigInterceptor.java:170)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (
ParametersInterceptor.java:167)
> at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept (
AliasInterceptor.java:123)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (
ExceptionMappingInterceptor.java:176)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
> at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
> at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:455)
> at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:221)
> at
org.apache.struts2.impl.StrutsActionProxy.execute (
StrutsActionProxy.java:50)
> at
org.apache.struts2.dispatcher.Dispatcher.serviceAction (
Dispatcher.java:504)
> at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter (
FilterDispatcher.java:419)
> at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> at
com.opensymphony.module.sitemesh.filter.PageFilter.parsePage (
PageFilter.java:119)
> at
com.opensymphony.module.sitemesh.filter.PageFilter.doFilter (
PageFilter.java:55)
> at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> at
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter (
ActionContextCleanUp.java:99)
> at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> at
org.mortbay.jetty.servlet.ServletHandler.handle (
ServletHandler.java:360)
> at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
> at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
> at
org.mortbay.jetty.Server.handle (
Server.java:324)
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
> at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
>
> Any ideas?
>
> Thanks,
> Alex.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_185544.ezm (zipped)>> You can declare your different interceptor stacks in different
>> packages and then declare the parent package on the action like
>> this:
>> @ParentPackage("packageWithEmptyStack")
>> public class FooAction ...
Guillaume is right. In 2.0.x when Actions are auto-discovered (via the
actionPackages parameter on the FilterDispatcher in web.xml) we have no
way of customizing the xwork package that they are put in.
Instead, you can do exactly what Guillaume suggested, and define an
xwork package with the interceptors that you want to use in struts.xml:
<package name="custom-xwork-package" extends="struts-default">
<interceptors>
<interceptor-stack name="customizedDefaultStack">
<interceptor-ref name="defaultStack"/>
<interceptor-ref name="myCustomInterceptor"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="customizedDefaultStack"/>
</package>
Then use the @ParentPackage("custom-xwork-package") on Action's that you
want this to apply to.
In Struts 2.1 with the convention plugin [1], it looks like we will be
able to customize the xwork package which auto-discovered Actions are
put in, so then you wouldn't need the @ParentPackage annotation.
[1] convention plugin (requires Struts 2.1):
http://cwiki.apache.org/S2PLUGINS/convention-plugin.html
Brad Cupit
Louisiana State University - UIS

Attachment:
user_185543.ezm (zipped)You can simply create a javascript function that is called when the onClick
or onSelect event of the table triggered.
Saludos
Lalchandra
-----Original Message-----
From: Rishi Deepak [mailto:deepakrishi@(protected)]
Sent: Thursday, April 17, 2008 5:05 AM
To: user@(protected)
Subject: How to reflect table row data in the text boxes
Hi,
My project has the requirement to display the records
in table and when i click on a particular row, the
data would be displayed in the text boxes.
I have applied Struts frame work and data is displayed
in table, now any body can help how to show that data
in textboxes on click to a record in table.
Is there ready made tool or sample code for that.
thanks in advance..
Deepak.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_185545.ezm (zipped)Hi,
in some cases I redirect after one action instead to a jsp to another
action.
This works fine, but the action messages and action errors I want to display
are lost.
How can I store them over this action chain?
Best regards,
Marc

Attachment:
user_185546.ezm (zipped)
Hi Ian,
First let me congratulate you on your Struts2 book, I honestly think it's
one of the best technical books I've read in a while: it's thorough,
practical and tackles every day issues. Kudos to you!
About that WebWork flash interceptor, it seems to me that it's not that
useful. AFAICT it simply puts the previously executed action on the value
stack given to the currently executed action. This works great if all you
need is access properties in the final JSP, but what if the current action
needs to access these properties? If I understand correctly, to do this the
action must browse through the value stack explicitly or do an OGNL lookup
on the value stack. To me this seems impractical and feels very different
from the overall Struts2 paradigm.
The Scope plugin also feels like too much a departure from the Struts2
paradigm.
What would be great is if an interceptor would inject all properties that
are shared by the previous and the current action (by name? by type?) in the
current action, in a similar fashion to HTTP parameter injection.
Is there an interceptor that does this or is this something that should be
developed?
Cheers,
GB
Ian Roughley wrote:
>
> There is also a flash result type / interceptor in webwork - very easy
> (<2 min) to convert to s2.
>
> /Ian
>
> Don Brown wrote:
>> There is the Struts 2 Scope Plugin [1], which does flash scope and a
>> lot more. Also, the message store interceptor, available in core
>> out-of-the-box, will persist action and error messages across a
>> redirect in a "flash" scope, which is very handy for registering
>> validation errors on a POST but having the response redirect the user
>> to a GET.
>>
>> Don
>>
>> [1] http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
>>
>> On Tue, Apr 15, 2008 at 6:48 PM, Alex Shneyderman
>> <a.shneyderman@(protected):
>>
>>> Flash scope is fairly common nowdays (for displaying messages) I
>>> wonder if S2 2.011, has anything similar?
>>>
>>> thanks,
>>> Alex.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185549.ezm (zipped)Your right. The flash interceptor is more for the benefit of the next
JSP page (i.e. redirect after post pattern) and not for accessing data
in the current action. For this scenario you can use the chaining
interceptor/result type - match setters on the current action with
getters from the previously executed action.
/Ian
Guillaume Bilodeau wrote:
> Hi Ian,
>
> First let me congratulate you on your Struts2 book, I honestly think it's
> one of the best technical books I've read in a while: it's thorough,
> practical and tackles every day issues. Kudos to you!
>
> About that WebWork flash interceptor, it seems to me that it's not that
> useful. AFAICT it simply puts the previously executed action on the value
> stack given to the currently executed action. This works great if all you
> need is access properties in the final JSP, but what if the current action
> needs to access these properties? If I understand correctly, to do this the
> action must browse through the value stack explicitly or do an OGNL lookup
> on the value stack. To me this seems impractical and feels very different
> from the overall Struts2 paradigm.
>
> The Scope plugin also feels like too much a departure from the Struts2
> paradigm.
>
> What would be great is if an interceptor would inject all properties that
> are shared by the previous and the current action (by name? by type?) in the
> current action, in a similar fashion to HTTP parameter injection.
>
> Is there an interceptor that does this or is this something that should be
> developed?
>
> Cheers,
> GB
>
>
>
> Ian Roughley wrote:
>
>> There is also a flash result type / interceptor in webwork - very easy
>> (<2 min) to convert to s2.
>>
>> /Ian
>>
>> Don Brown wrote:
>>
>>> There is the Struts 2 Scope Plugin [1], which does flash scope and a
>>> lot more. Also, the message store interceptor, available in core
>>> out-of-the-box, will persist action and error messages across a
>>> redirect in a "flash" scope, which is very handy for registering
>>> validation errors on a POST but having the response redirect the user
>>> to a GET.
>>>
>>> Don
>>>
>>> [1] http://cwiki.apache.org/S2PLUGINS/scope-plugin.html
>>>
>>> On Tue, Apr 15, 2008 at 6:48 PM, Alex Shneyderman
>>> <a.shneyderman@(protected):
>>>
>>>
>>>> Flash scope is fairly common nowdays (for displaying messages) I
>>>> wonder if S2 2.011, has anything similar?
>>>>
>>>> thanks,
>>>> Alex.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>>
>
>

Attachment:
user_185551.ezm (zipped)>> What would be great is if an interceptor would inject all
>> properties that are shared by the previous and the current
>> action (by name? by type?) in the current action, in a similar
>> fashion to HTTP parameter injection.
If you use an ActionChainResult it will automatically do this, but
action chaining is not recommended in favor or redirect-after-post
(a.k.a. POST-redirect-GET).
If such a feature does exist (or were to exist) and copy the properties
from Action1 to Action2 (with a redirect in between) it may actually
cause problems similar to Action chaining: like when your Action is
managed by Spring and Spring creates a CGLIB proxy and certain
properties that are specific to CGLIB are copied from Action1 to Action2
thereby messing up the proxy. :-(
Brad Cupit
Louisiana State University - UIS

Attachment:
user_185547.ezm (zipped)Most posts arrive to my mailbox twice. Does anybody know why?
Saludos
Lalchandra

Attachment:
user_185550.ezm (zipped)Could it be that you've registered twice under different email addresses
and the second email server is set to forward the mails to the first? :)
Lalchandra Rampersad wrote:
> Most posts arrive to my mailbox twice. Does anybody know why?
>
>
>
> Saludos
>
> Lalchandra
>
>
>

Attachment:
user_185548.ezm (zipped)--- Lalchandra Rampersad <lrampersaud@(protected):
> Most posts arrive to my mailbox twice. Does anybody know why?
I don't know why, but I also get an unusual number of duplicate messages
(same IDs).
Dave

Attachment:
user_185552.ezm (zipped)[creating a new thread so as not to hijack the
"ServletRedirectActionResult - is there a way to set parameters?"
thread]
Don Brown said:
>> The easiest solution is to simply return a
>> ServletActionRedirectResult instance from
>> your action method.
I've tried that myself as it seemed a very clean way of returning a
result, but I get a NullPointerException since the ActionMapper isn't
set on the Result. Now I could instead add:
@Inject
public void setActionMapper(ActionMapper actionMapper) { ... }
to my Action, then return a new ServletActionRedirectResult, but the
calling syntax gets a little messy. Here's an example method in the
Action class:
public Result submit() throws Exception {
ServletActionRedirectResult result = new
ServletActionRedirectResult("actionName").addParameter(
"param1", "${value1}");
result.setActionMapper(actionMapper);
return result;
}
Can you think of any way that the actionMapper could be set
automatically on Result's which are instantiated inside of an Action? If
not, should I file this as a feature request?
p.s. for others reading this, this approach would imply not implementing
the Action interface's execute() method, since it must return a String.
Instead you can just define any zero-arg public method and it can return
either a String or a Result, and your URLs can use the
actionName!method.action style for referencing a particular method on
the Action.
Brad Cupit
Louisiana State University - UIS

Attachment:
user_185553.ezm (zipped)On Fri, Apr 18, 2008 at 1:22 AM, Brad A Cupit <brad@(protected):
> I've tried that myself as it seemed a very clean way of returning a
> result, but I get a NullPointerException since the ActionMapper isn't
> set on the Result.
> <snip />
> Can you think of any way that the actionMapper could be set
> automatically on Result's which are instantiated inside of an Action? If
> not, should I file this as a feature request?
Ah, good point. Yes, please file this as a request, as it should be
pretty easy to do and would make things much easier.
Don

Attachment:
user_185559.ezm (zipped)>> Ah, good point. Yes, please file this as a request, as it
>> should be pretty easy to do and would make things much easier.
done, thanks!
automatically set ActionMapper for ServletRedirectResult
https://issues.apache.org/struts/browse/WW-2598
Brad Cupit
Louisiana State University - UIS

Attachment:
user_185555.ezm (zipped)Hi Friends,
I have tried jasperreports in simple web application using jsp, servlets, it
works fine.
Now I need to implement jasperreports in struts2 application but its not
working. Currently it is displaying blank report.
Please guide me in this regard. Any gud reference related to
struts2+jasperreports will be much appreciated.
Thanks!

Attachment:
user_185557.ezm (zipped)--- aum strut <aum.struts@(protected):
> Now I need to implement jasperreports in struts2 application but its not
> working. Currently it is displaying blank report.
Any exceptions?
Without *any* information, as usual, it's impossible to help.
http://struts.apache.org/2.x/docs/jasperreports-plugin.html
Dave

Attachment:
user_185556.ezm (zipped)Looks like a simple versioning error to me; you're doctype declaration:
> <!DOCTYPE struts-config PUBLIC
> "-//Apache Software Foundation//DTD Struts Configuration
1.3//EN"
> "http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd">
But you said:
> But, the struts-config_1_3.dtd is not in the struts.jar file (we're
> using Struts 1.2.9)
I wouldn't expect 1.2.9 to contain a 1.3 DTD... Either upgrade to Struts
1.3.9 or use the DTD corresponding to the release you are on:
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
L.
Adam Gordon wrote:
> Last night, our company had a maintenance window whereby Internet access
> was shut off from our office to the outside world. During that time I
> was doing development and attempted to start up our web app in a
> development environment.
>
> I've not seen this error in almost 2 years but it's apparently back:
>
> [
org.apache.struts.action.ActionServlet] [handleConfigException] Parsing
> error processing resource path /WEB-INF/struts-optout.xml
>
java.net.UnknownHostException: jakarta.apache.org
> at
java.net.PlainSocketImpl.connect (
PlainSocketImpl.java:177)
> at
java.net.Socket.connect (
Socket.java:520)
> at
java.net.Socket.connect (
Socket.java:470)
> at
sun.net.NetworkClient.doConnect (
NetworkClient.java:157)
> ...*snip*...
>
> I remember this well. The problem is that struts-optout.xml has the
> DOCTYPE of:
>
> <!DOCTYPE struts-config PUBLIC
> "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
> "http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd">
>
> But, the struts-config_1_3.dtd is not in the struts.jar file (we're
> using Struts 1.2.9) so, apparently in order to validate that the XML
> file is well-formed at webapp start up time, Tomcat feels the need to go
> out and retrieve this DTD - only it can't because Internet access was
> down. The problem is greatly exacerbated by the fact that Tomcat stops
> processing the loading of struts modules when this one fails essentially
> rendering the web app useless.
>
> I seem to recall playing with turning validation of XML files off, but
> that not being a sufficient solution so I tried adding the DTD into the
> struts JAR file in the same location as the other DTDs:
> org/apache/struts/resources/struts-config_1_x.dtd (where x=0,1,2) but
> that didn't work.
>
> We need to be able to find a solution to where we can host the DTDs
> locally and do not have to rely on a 3rd party server being up in order
> to deploy our web application. I seem to recall this being an issue
> with the W3C (especally w.r.t. [X]HTML validation in that it results in
> a ton of unnecessary network calls to retrieve DTDs for validation
> rather than web servers hosting the DTDs locally.
>
> I'm sure I'm not the only one to have seen this so any help to resolve
> this would be greatly appreciated. Thanks.
>
> -- adam

Attachment:
user_185558.ezm (zipped)temp temp wrote:
> my application uses container managed security , j_security_check,
> we create session before user login so i dont want to call session.invalidate
> if users wants to logout is there anything i can do to logout user ?
If you don't invalidate the session, it will still contain any data that
was put into it while the user was logged in, which could be a security
hole. In your case, what you probably want to do is invalidate the
session and then repeat your session initiation logic.
L.

Attachment:
user_185560.ezm (zipped)
I tried adding the debug="true", and got the following error when it
rendered my JSP:
FATAL exception raised: Could not load 'struts.widget.Bind'; last tried
'__package__.js'
Googling this leads me to believe that perhaps some libraries aren't playing
well together.
Here are the other libraries that are already referenced in my <head>:
<script type="text/javascript" src="<c:url
value='/scripts/prototype.js'/>"></script>
<script type="text/javascript" src="<c:url
value='/scripts/scriptaculous.js'/>"></script>
<script type="text/javascript" src="<c:url
value='/scripts/global.js'/>"></script>
<script type="text/javascript" src="<c:url value='/scripts/utilities.js'/>"
></script>
<s:head theme="ajax" />
Does anyone know of particular problems with any of these playing together
(and what I should do about it if there are problems?)
Thanks !
Jeromy Evans - Blue Sky Minds wrote:
>
> It looks right.
> Turn on debugging with s:head
>
> <s:head theme="ajax" debug="true"/>
>
> and use the FireFox FireBug plugin to determine if it failed to find any
> resources.
>
> The template for the calendar is loaded via an ajax request. If that
> request fails you see nothing.
>
> tristan_colson wrote:
>> I am trying to use s:datetimepicker.
>> I have the <s:head theme="ajax" /> in my <head> section.
>> I have <s:datetimepicker> like this:
>> <s:datetimepicker name="campaign.startDate" /> to <s:datetimepicker
>> name="campaign.endDate" />
>>
>> The html renders like this:
>> <link rel="stylesheet" href="/struts/xhtml/styles.css" type="text/css"/>
>> <script type="text/javascript">
>> // Dojo configuration
>> djConfig = {
>> baseRelativePath: "/struts/dojo",
>> isDebug: false,
>> bindEncoding: "UTF-8",
>> debugAtAllCosts: true // not needed, but allows the Venkman
>> debugger
>> to work with the includes
>> };
>> </script>
>> <script type="text/javascript"
>> src="/struts/dojo/dojo.js"></script>
>> <script type="text/javascript"
>> src="/struts/simple/dojoRequire.js"></script>
>> <script type="text/javascript"
>> src="/struts/ajax/dojoRequire.js"></script>
>> <script type="text/javascript"
>> src="/struts/CommonFunctions.js"></script>
>>
>> .....
>>
>> script type="text/javascript">
>> dojo.require("dojo.widget.DatePicker");
>> </script>
>> <div
>> dojoType="dropdowndatepicker"
>> id="saveCampaign_campaign_startDate" name="dojo.campaign.startDate"
>> inputName="campaign.startDate" saveFormat="rfc"></div>
>>
>> Note that the above div tag is empty. Seems like there should be
>> something
>> in it.
>> The datetimepicker doesn't show up on the page.
>>
>> Am I using the tag wrong? Or might my environment be missing something?
>> Many thanks for any help!
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_185561.ezm (zipped)In my example the popup window didn't do any processing because it is a
ForwardAction (
org.apache.struts.actions.ForwardAction), the view just got
some values that were either in the session or passed on the query string.
If your form bean is configured properly the values from the query string
should get populated in the form.
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: ryan webb <webb.ryan1@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Thu, 17 Apr 2008 09:35:34 +0800
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: Is it possible to make a pop up window using Struts?
>
> Dear Randy,
>
> Thank you very much for your kind reply..your method is very good. I will
> note your reply. =)
> Is it possible to transfer query string using this method? although i am not
> quite sure yet that this will work.
>
> I will get parameter in my action class using *
> request.getParameter("orderNumber");* then store it to a form bean
> variable(String data type)then on popup window I will use *<jsp:getProperty>
> * accessing form bean variable (form bean property).
>
> Again, I would like to thank you for your answer.
>
> -Ryan Webb
>
>
> On Thu, Apr 17, 2008 at 3:56 AM, Randy Burgess <RBurgess@(protected):
>
>> You can pass a query string to the popup window. Here is an example.
>>
>> <a
>>
>> href="javascript:popup('printOrder.do?orderNumber=${order.workOrderNumber}',
>> 600, 600, true);">
>>
>> And then in the popup window to get the orderNumber param passed in above:
>>
>> <c:if test="${not empty param.orderNumber}">
>> Reference Number: ${param.orderNumber}
>> </c:if>
>>
>> You might want to change the href to # and put the window.open code in the
>> onclick event but other than that this will work fine. In this case order
>> Is a request attribute for this action.
>>
>> Regards,
>> Randy Burgess
>> Sr. Web Applications Developer
>> Nuvox Communications
>>
>>
>>
>>> From: ryan webb <webb.ryan1@(protected)>
>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>> Date: Wed, 16 Apr 2008 16:40:25 +0800
>>> To: Struts Users Mailing List <user@(protected)>
>>> Subject: Re: Is it possible to make a pop up window using Struts?
>>>
>>> Antonio,
>>>
>>>> 1) What Struts? Struts 1.2.9 (Netbeans bundle)
>>>> 2) You can still do it in Javascript. I see.. I just want to know if
>> you do
>>> it with struts.
>>>
>>> I am having trouble with it..I created a pop up window using javascript
>> and
>>> i cant pass query string on new window.
>>> when i clicked a <html:link> I pass a paramId and paramProperty and I
>> cant
>>> make it appear to new window.
>>>
>>> I have an action class that has *request.setAttribute("username",
>>> request.getParameter("username"));*
>>> on the new window I have *<%=
>> out.println(request.getAttribute("username"))
>>> %>* but this only displays the word NULL
>>>
>>> I am new to struts..
>>>
>>> Ryan
>>>
>>> On Wed, Apr 16, 2008 at 4:22 PM, Antonio Petrelli <
>>> antonio.petrelli@(protected):
>>>
>>>> 2008/4/16, ryan webb <webb.ryan1@(protected)>:
>>>>> Is it possible to make a window pop up using struts?
>>>>> usually this can be done in Javascript..
>>>>
>>>> 1) What Struts?
>>>> 2) You can still do it in Javascript
>>>>
>>>> Antonio
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>
>>
>>
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information. If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to read,
>> copy, or distribute it, and we ask that you please delete it (including all
>> copies) and notify the sender by return email. Delivery of this Message to
>> any person other than the intended recipient(s) shall not be deemed a waiver
>> of confidentiality and/or a privilege.
>>
>>
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information. If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to read,
>> copy, or distribute it, and we ask that you please delete it (including all
>> copies) and notify the sender by return email. Delivery of this Message to
>> any person other than the intended recipient(s) shall not be deemed a waiver
>> of confidentiality and/or a privilege.
>>
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.
This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.