Hi all,
can an interceptor call an arbitraty action different from the action
requested by the client?
Suppose i've the interceptor interceptor-router placed in the stack and
the client call MyAction.action, when the interceptor intercept the call is
possible to 'redirect' the call to
Sort of. The way that I've achieved something similar to what you seem to
be asking is to define a bunch of Global Results in struts.xml that define
common actions that the interceptors may need to invoke (like reset-password
or invalid-input), then instead of chaining to the action in the
Hello,
Thanks for your reply!
Now its getting a bit messy for me. I got some replies from Dave Newton
before, saying that AbstractValidationActionSupport is not needed, extending
ActionSupport should be enough. Actually, I did get it working without
AbstractValidationActionSupport with the
Hello David and Chris,
Thank you two very much indeed for your help.
I have tried s:set tag with different scope and seems I can set a
parameter to any value I want, but I cant set it to the value/variable from
jsps java code block, so I suppose s:set may not be applicable to my
requirement.
Hi all,I'm using tiles 2 with struts 2.Basically in tiles.xml,are these
definitions..
definition name=tiles.default template=/layouts/Layout.jsp
put-attribute name=header value=/includes/header.jsp/
put-attribute name=footer value=/includes/footer.jsp/
/definition
Hi Criss,
thanks for your reply.
I know the global result, but is unusefull for this purpose. The problem is
that the actions that i want to call is knew at runtime cause the
interceptor at init time scan classes with certain annotations and i want to
forward to those actions so i can't put the
Hi Stefano,
This looks like an awkward design as you would go through half the
interceptor stack expecting to call one action, and half the stack expecting
to call a second action.
As an alternative could you do something like the following:-
Create class (or Interface) ReceivingAction with sub
Niklas Johansson wrote:
P.S. AbstractValidationActionSupport doesn’t seem to be included in the
Struts2 (2.1.6) framework anyhow, couldn’t find it in any jar. But there are
quite a few so perhaps I missed it.
It's in the showcase application, like I said before.
Från: Martin Gainty
Hi Kate,
i'm doing it like this, in action i'm forwarding to a simple jsp (not
Tiles) and inside a jsp i have:
jsp start
% @page contentType=text/html;charset=utf-8 language=java %
% @ taglib uri=http://tiles.apache.org/tags-tiles; prefix=tiles %
% @ taglib prefix=s
you might possibly be breaking the one action class design of Struts
is there anything in the 2nd Action class which will not be accomodated by the
first class?
right now its simple to look at the interceptor stack and determine which class
is being called in what order..although technically
Use packtag.
David Canos wrote:
Hi guys
I'm looking for a plugin or a lib that packs my Javascript and CSS in
everydeploy,
Google gives nothing useful.
if there's nothing done I would be happy to do it but I cant do it alone.
--
View this message in context:
So, I've edited the struts.xml appropriately and I've created an
Interceptor that implements the interceptor interface. Init() is
called on startup but I can't get it to call intercept() to save my
life. My objective is to create an interceptor that checks to see if a
session variable is set and
This did the trick. Thanks very much..
-Tuni
---
Use a s:textarea tag insted of an html input
s:textarea name=demandRequest[%{#stat.index}].comments
value=%{comments}
/
--
View this message in context:
http://www.nabble.com/submit-%3Cs%3Aiterator%3E-list-tp23726145p23742020.html
Sent
Stefano Corallo wrote:
I know the global result, but is unusefull for this purpose. The problem is
that the actions that i want to call is knew at runtime cause the
interceptor at init time scan classes with certain annotations and i want to
forward to those actions so i can't put the result in
--assuming you have this validation setup for your username from
/validation/fieldValidatorsExample.jsp
validators
field name=requiredValidatorField
field-validator type=required
message![CDATA[ required ]]/message
/field-validator
Hi Dale,
i think that this is the only one solution. Thanks guys for your reply.
--
Stefano Corallo
On Wed, May 27, 2009 at 4:59 PM, Dale Newfield d...@newfield.org wrote:
Stefano Corallo wrote:
I know the global result, but is unusefull for this purpose. The problem
is
that the actions
Stefano Corallo wrote:
i think that this is the only one solution. Thanks guys for your reply.
If you don't have a base class for all of your actions, you might be
able in the interceptor to get ahold of the ognl valueStack and set the
value directly, then refer to #shortCircuitRedirectUrl
Yes i know that, very appreciate this clarification :)
--
Stefano Corallo
On Wed, May 27, 2009 at 5:25 PM, Dale Newfield d...@newfield.org wrote:
Stefano Corallo wrote:
i think that this is the only one solution. Thanks guys for your reply.
If you don't have a base class for all of your
Yes, you can, though I don't really thing it's the right way to go.
Basically you use the body content of the s:set tag to set the variable to
the value of a scriplet expression like so:
s:set value=fred%= myVar%/s:set
Again, there are much better ways of coding modern web applications that
You can still use the Global Result, just set the global results value to an
OGNL expression. This limits the places you can use the interceptor to
actions that can fill the OGNL expression, but you could handle that with a
common base class if you really want to go down this path. I don't think
hello dale-
in my xwork discoveries i came upon the ShortCircuitableValidator defined as
/** Copyright (c) 2002-2006 by OpenSymphony All rights reserved.*/
package com.opensymphony.xwork.validator;
/**
* This interface should be implemented by validators that can short-circuit
the validator
Martin Gainty wrote:
//action class not implements ShortCircuitableValidator
public class MyAction extends ActionSupport implements ShortCircuitableValidator
{
OgnlValueStack vs = new OgnlValueStack();
In an Action when I need the value stack I don't construct a new one but
instead get
On Wed, May 27, 2009 at 8:18 AM, Jim Collings jlistn...@gmail.com wrote:
[snip]
Here is the relevant portion of the xml:
package name=xxx extends=struts-default
interceptors
interceptor name=UidIntercept
class=com.eds.xxx.web.admin.UidInterceptor/
can we see the code for com.eds.xxx.web.admin.UidInterceptor
?
Martin
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger
sein, so bitten wir
Hi,
Is there a problem when using the Convention plug-in with Jboss 5.1.0 ?
I mean there is no struts.xml file., the mapping is defined in the
Action classes, through the use of annotations such as :
@Actions({
@Action(value=/myFirstPath,
result...@result(name=success,
2009/5/27 Fernandes Celinio cfernan...@sopragroup.com:
I know it works well with the Tomcat server.
JBoss is using Tomcat to serve Java web applications, did you try
deploy the same application to standalone Tomcat?
Regards
--
Lukasz
http://www.lenart.org.pl/
Yes, I did and it works.
So i am assuming there is a problem with Jboss. I have not checked the logs yet.
-Message d'origine-
De : Lukasz Lenart [mailto:lukasz.len...@googlemail.com]
Envoyé : mercredi 27 mai 2009 19:02
À : Struts Users Mailing List
Objet : Re: [Struts 2.1.6] Convention
Do you have any actions in that package? Your interceptor should be
run, but only against actions in that package (xxx). Also, your
interceptor is last in your stack, so things like validation failure
can keep it from firing.
-Wes
Yes. Tried putting it in the Actions package. No dice. No
Wait, wait... Actions package? Are you using codebehind or
conventions? If so, then the struts.xml file you posted won't be
enough. You have to either change the default convention package or
you have to use InterceptorRef annotations on your action. By default,
the conventions plugin uses
So if I have property userName in my action with a getter and a
setter and then I want to use that information in my jsp but NOT in a
control what syntax would I use?
If it were a text box, for example, I would set the name attribute of
the text box to userName and it would work. I want to use it
Welcome user s:property value=%{username}/
-W
On Wed, May 27, 2009 at 3:20 PM, Jim Collings jlistn...@gmail.com wrote:
So if I have property userName in my action with a getter and a
setter and then I want to use that information in my jsp but NOT in a
control what syntax would I use?
If it
Hello,
Thanks for the information, but seriously, I think things are getting
just more complicated than needed now. As I mentioned, it does work
without AbstractValidationActionSupport. Just search Internet, there
are several examples.
This brings it all back to my problem. I been trying to find
On Wed, May 27, 2009 at 3:17 PM, Wes Wannemacher w...@wantii.com wrote:
Wait, wait... Actions package? Are you using codebehind or
conventions? If so, then the struts.xml file you posted won't be
enough. You have to either change the default convention package or
you have to use InterceptorRef
On Wed, May 27, 2009 at 3:24 PM, Jim Collings jlistn...@gmail.com wrote:
Conventions. Hmmm.. Perhaps better implemented as a filter then. I'ld
prefer it to having to annotate every single Action class.
Jim C.
You don't need to annotate every class, but you will need to change
the package
Jim, since it is the interceptor you are interested in testing why not
test it without the Convention Plug-in (configuring the action by
xml) to see if it is working, which is your aim. That way you don't
have two things you are unsure of happening at once.
Cheers
Chris
-Original
Fernandes I had the same problem -- essentially I could not get it to work
using the Convention plugin. Also, when you configure by xml you can't
have dev mode on.
The most I have gleaned off the internet, and there are people who
should know better than me on this list the problem is to do
Lukasz, it is JBoss specific -- actually JBoss 5. Apps that
work on JBoss 4 with the Convention Plugin fail with
JBoss 5.
I can post the specific error messages when I get home next
week (I am in Stockholm without my code.
Cheers
Chris
-Original Message-
From: Lukasz Lenart
Me again: here is a link with a discussion. Don't hold your breath as
it does not give a work around.
http://www.nabble.com/Problems-using-Struts2-on-JBoss-5.0.1GA-td22969807.html
Chris
-Original Message-
From: Fernandes Celinio cfernan...@sopragroup.com
To: Struts Users Mailing List
What were you trying to communicate here?
You don't need to do anything with any showcase app classes to get
validation to work.
Here you've included some validation configuration, some action
configuration, ServletDispatcherResult?!, and I don't even know what else.
Can you explain
${userName} should work though; that's what the request wrapper is for.
Hrm.
Wes Wannemacher wrote:
Welcome user s:property value=%{username}/
-W
On Wed, May 27, 2009 at 3:20 PM, Jim Collings jlistn...@gmail.com wrote:
So if I have property userName in my action with a getter and a
setter
2009/5/27 musom...@aol.com:
Me again: here is a link with a discussion. Don't hold your breath as
it does not give a work around.
http://www.nabble.com/Problems-using-Struts2-on-JBoss-5.0.1GA-td22969807.html
Does it mean it solves your issue? Or there there is something new
regarding JBoss
Dave Newton wrote:
steven.mitch...@umb.com wrote:
I have a Struts 2 application that runs fine under Tomcat 5.5
that will not run on a fully patched version of WebSphere 6.1.
I seem to remember we had to set a WS setting to get things working
right; I've got an email in to my ex-co-worker
Hi,
more confusion. I'm trying to call a method in a model object with a
Long (type doesn't really matter though) argument:
s:iterator value=categories
s:property value=description.title/br /
Activity id: s:property value=activityId/br /
String:
Bas Schulte wrote:
s:iterator value=categories
s:property value=description.title/br /
Activity id: s:property value=activityId/br /
String: s:property value=boomerang(activityId)/br /
No arg: s:property value=boomerang/br /br /
Hi,
when i use rest-plugin with convention plugin in struts2.1.6, i cannot setup
my interceptor. the following is my interceptor and config file.
i cannot see the println result on console.
can anyone help? thank you!
public class SimpleInterceptor extends AbstractInterceptor {
public
can any one help? i use struts2.1.6.
在2009-05-20,xnpeng xnp...@163.com 写道:
I'm doing my project with struts2+rest-plugin for about 3 months.there is a
lot of problems unresolved.
With rest-plugin and convention-plugin,all action-mapping are done
automatically,manual action-mapping in
You're setting the default parent package to rest-default, which doesn't
include your interceptor--have you tried setting it to the package with
your interceptor in it?
Dave
xnpeng wrote:
Hi, when i use rest-plugin with convention plugin in struts2.1.6, i
cannot setup my interceptor. the
also, change this:
constant name=struts.convention.default.parent.package value=rest-default/
and make it point to your interceptor stack, otherwise your
interceptor won't be used, unless you use the @InterceptorRef
annotation.
musachy
On Wed, May 27, 2009 at 9:31 PM, Dave Newton
Hello,
I have created my project using the Maven Archetype 2.0.5.
I started to code along...
I'm trying to connect to a database in a Spring bean.
Can't find a specific class called DataSourceUtils.
I then realise that newer versions of Struts2 and Spring are out.
What is the best way to bring
Dave,
I've tried set the config file to extends struts-default,also i've set in my
packages,it still refuse to work.
package name=post namespace=/post extends=default
interceptors
interceptor name=authentication
hi,Musachy :
I have a line defined in config file:
constant name=struts.convention.default.parent.package value=rest-default/
do you mean change to otherwise?
在2009-05-28,Musachy Barroso musa...@gmail.com 写道:
also, change this:
constant name=struts.convention.default.parent.package
that setting is telling Convention to use that package for the actions
it will create, and its default interceptor stack will be applied to
those actions. You need to make it point to your own package, which
defines a default interceptor stack with your interceptor. Either
that, or use
update the versions in the pom.xml file, and hope for the best :)
musachy
On Wed, May 27, 2009 at 9:38 PM, maestro maestr...@gmail.com wrote:
Hello,
I have created my project using the Maven Archetype 2.0.5.
I started to code along...
I'm trying to connect to a database in a Spring bean.
Thanks for the laugh!
I did as you have suggested, changed to 2.0.11 and ran mvn install.
However when viewing my project thru Eclipse I still see the 2.0.5.jars.
Even after a refresh.
Any ideas?
- maestro
On Wed, May 27, 2009 at 9:58 PM, Musachy Barroso musa...@gmail.com wrote:
update the
dont know if this has the correct version and groupID you're looking for but
checkout
http://repo1.maven.org/maven2/spring/spring/1.0.2/
Martin
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist
Hi,musachy!
things are going on. when i add a line to my Controller(Action):
@InterceptorRefs({...@interceptorref(user), @InterceptorRef(defaultStack)})
public class MainController extends MainAction {...}
then some error happens:
Caused by: Unable to find interceptor class referenced by
Martin Gainty wrote:
dont know if this has the correct version and groupID you're looking for but checkout
http://repo1.maven.org/maven2/spring/spring/1.0.2/
Spring 1.0.2?
I don't even know if Struts 2 would work with a Spring that old. I'd be
skeptical that the Spring plugin would, and
Hi,
can some one help me? when i add annotation to my action,tomcat failed start.
@InterceptorRefs({...@interceptorref(user), @InterceptorRef(defaultStack)})
public class MainController extends MainAction {...}
Caused by: Unable to find interceptor class referenced by ref-name user -
[unknown
There is something new -- something to do with virtual classpaths that
makes JBoss 5 reject apps with dev mode on or with the Convention
plugin active while JBoss 4 accepts them.
Chris
-Original Message-
From: Lukasz Lenart lukasz.len...@googlemail.com
To: Struts Users Mailing List
59 matches
Mail list logo