bmoraillon wrote:
Hi,
How can i open hibernate session with executeAndWait interceptor ?
In fact OpenSessionInViewFiltered is not called before and i get
a session closed error...
Filters execute in the order the filter-mapping elements appear in your
web.xml. Make sure the mapping for the
Hi,
How can i open hibernate session with executeAndWait interceptor ?
In fact OpenSessionInViewFiltered is not called before and i get
a session closed error...
Thanks in advance,
Benoît.
--
View this message in context:
http://www.nabble.com/executeAndWait-interceptor-hibernate-session
Thanks for your reply. It works now.
Laurie Harper wrote:
>
> When you specify interceptors for an individual action, you are
> replacing the default set with what you specified. So, with the
> configuration you posted below, the default interceptor stack is being
> replace
When you specify interceptors for an individual action, you are
replacing the default set with what you specified. So, with the
configuration you posted below, the default interceptor stack is being
replaced with just the store interceptor. You would need to add a
reference to the interceptor
Thank you so much...
It works. :) All I had to create Interceptor will all the values of
defaultStack.
Thanks.
newton.dave wrote:
>
> Did I not already answer this?
>
> --- styl9090 <[EMAIL PROTECTED]> wrote:
>>
>>
>> /pag
age and addMember action page are the same
>> "main.jsp".
>>
>> When user call the addMember function, the URL in the browser change to
>> http://localhost:8080/app/main/addMember.action
>>
>> However, we want the URL remains as
>> ht
are the same
> "main.jsp".
>
> When user call the addMember function, the URL in the browser change to
> http://localhost:8080/app/main/addMember.action
>
> However, we want the URL remains as
> http://localhost:8080/app/main/list.action. I consider to do the
nd use the Message Store Interceptor such that action message can be
retrieve
RETRIEVE
/jsp/main.jsp
STORE
/jsp/main.jsp
/jsp/main.jsp
However, after adding the interceptor, I find that all form value is not set
in the action using the corresponding set
there was a posting earlier in the day on a similar question which asked
inquired as adding the interceptor to your defaultStack the
struts-default.xml defaultStack declaration looks like
Did I not already answer this?
--- styl9090 <[EMAIL PROTECTED]> wrote:
>
>
> /pages/assign_user.jsp
>
You have configured a *single* interceptor to be run for this action.
If you want the default interceptor stack to be executed you must either
a method back in Assign Action class, it validates session in
Interceptor and goes to specific method in Action class with NO request
values(selected values in assign jsp). All action values are null..
here is the code for submit button:
Same code works well if there is no interceptor involved
following URL.
http://localhost:8080/PaymentModule-war/UsersList.action?added=true
I have setter and getter method for 'added'.
But my problem is I am not getting value for "added" when I am using
interceptor. It is working perfectly when I am not using intercepter.
Could an
Ted it looks like Struts 2 does use the object factory for the Interceptor.
I already wired the Interceptor with Spring.
Thanks Alot!!
-Mensaje original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Ted
Husted
Enviado el: Lunes, 07 de Enero de 2008 12:46 p.m.
Para
Hmmm, it's an interesting idea.
I take it you already tried defining a property in the Interceptor,
the same way we would for an Action, and a Spring bean was not
injected into the Interceptor property? (I never tried it myself.)
-- HTH, Ted
* <http://www.StrutsMentor.com/>
On Jan 4
ieves some data
from DB to show it in on jsp.
Everything works well until user uploads file that larger than preconfigured
limit, in that case documentId property stays empty.
I cant understand why its works that way, in my interceptor stack fileupload
interceptor configured to be executed after par
Never mind :(
(Apparently actually reading the stack trace can be handy sometimes.)
Don't like it, though, and if nobody has any strenuous objections, I'd like
to fix it.
--- Dave Newton <[EMAIL PROTECTED]> wrote:
> Howdy,
>
>
>
> #{'cool': 'map'}
>
> ... etc ...
>
>
> Generates
Howdy,
#{'cool': 'map'}
... etc ...
Generates an NPE on startup.
If I switch to:
#{'cool' : 'map'}
alias1_input
it works as expected.
Note that if I use "defaultStack" instead of "basicStack" in the second
example it breaks, but at runtime w/ an OGNL exception.
I'm
Hey GF --
Your package declaration can extend multiple packages by using the comma!
Scott
On Jan 4, 2008 10:36 AM, GF <[EMAIL PROTECTED]> wrote:
> Hi everyone.
> I have many packages that extends extends="tiles-default".
> I would like to add an interceptor to all o
Really I have still some issues.
my struts.xml is built in this way:
In every included xml i define a different package for a different
section of the, i.e. in struts1.xml I define the package name="one"
If I put the package name="default" inside struts1.xml I can extend
package "one" from
thank you very much!
>
> Sure: define the stack once, then reference it from each of your packages:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ...actions...
>
>
GF wrote:
Hi everyone.
I have many packages that extends extends="tiles-default".
I would like to add an interceptor to all of them.
Now I
Hi
Is there a way to use Spring to inject objects to a Struts 2 Interceptor?
Regards,
Néstor Boscán
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
s.pwd = password;
}
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: xianwinwin <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List
> Date: Thu, 3 Jan 2008 15:37:08 -0800 (PST)
> To:
> Subject: struts2: interceptor - validation doesn
, Mufaddal Khumri <[EMAIL PROTECTED]> wrote:
> Basically I am trying to access some parameters in an interceptor
> since the interceptor needs to do something based on the values of
> these parameters. Any action that this interceptor is applied to does
> not need these paramet
Basically I am trying to access some parameters in an interceptor
since the interceptor needs to do something based on the values of
these parameters. Any action that this interceptor is applied to does
not need these parameters.
In order to do this:
If I have an ftl file with a form like
Hi everyone.
I have many packages that extends extends="tiles-default".
I would like to add an interceptor to all of them.
Now I
urned.
So please use "input" instead of "error" and check again.
:jumping:
--
View this message in context:
http://www.nabble.com/struts2%3A-interceptor---validation-doesn%27t-work-%3A-%28-tp14607863p14618918.html
Sent from the Struts -
ing the base class. Since Struts 2 has interceptors, I felt
> that it would be a better design to create an interceptor that does
> this and that way the Action does not have to extend a base class.
The point is, more or less, what Ted and Al said: having the interceptor
check that
etName(String name)
{
this.name=name;
}
in the jsp page:
...
in the xml:
/pages/error.jsp
/pages/welcome.jsp
the guest interceptor is:
any idea?
--
View this
would be a better design to create an interceptor that does
this and that way the Action does not have to extend a base class.
This way this interceptor can be stacked with other custom
interceptors as required as well. Thanks for pointing out the
addActionErrors and addFieldErrors methods
ic void setName(String name)
>{
>this.name=name;
>}
>
>
> in the jsp page:
> ...
>
>
>
>
> in the xml:
> class="com.simple.validation.Test">
>/pages/error.jsp
>/
ere's no return message that the user did
> >> not
> >> >> provide the info).
> >> >>
> >> >> my file looks like this:
> >> >>
> >> >>
> &g
The best use of interceptors is for behavior that will be shared by
several Actions. If there are several different places where a client
might be authenticated, then, in that case, a login interceptor (and a
custom interceptor stack) can be a good idea.
When coding an Interceptor, you can just
imho, you shouldn't be validating the users username and password in an
interceptor. You should validate them in an action, then set a token in the
session indicating the user had been validated, then check for your chosen
token in the interceptor.
That way you don't need to keep hi
e this:
>> >>
>> >>
>> >> @RequiredStringValidator(message="name is missing")
>> >> public void setName(String name)
>> >> {
>> >> this.name=name;
>> >> }
>> >
// In this case would the name="error">/myerrorpage.ftl associated with my action be
executed?
public class ValidateLoginInterceptor implements Interceptor
{
private static final long serialVersionUID = 1L;
private static String EMAIL_FIELD = "email
; >>
> >> my file looks like this:
> >>
> >>
> >> @RequiredStringValidator(message="name is missing")
> >> public void setName(String name)
> >> {
> >> this.name=name;
> >>
this.name=name;
>> }
>>
>>
>> in the jsp page:
>> ...
>>
>>
>>
>>
>> in the xml:
>> > class="com.simple.validation.Test">
>> /pages/error.jsp
>> /
> class="com.simple.validation.Test">
> /pages/error.jsp
> /pages/welcome.jsp
>
>
>
>
>
> the guest interceptor is:
>
>
>
>
> any idea?
>
> --
jsp page:
...
in the xml:
/pages/error.jsp
/pages/welcome.jsp
the guest interceptor is:
any idea?
--
View this message in context:
http://www.nabble.com/struts2%3A-interceptor--
Please reply to the struts-user list, not directly to responders.
--- [EMAIL PROTECTED] wrote:
> actually I am using interceptor for checking the user is already login or
> not, if the user is not logged in it will redirect to login page
Okay. What you should do now, then, is include some
ot getting value for "added" when I am using
interceptor. It is working perfectly when I am not using intercepter.
Could any one please help me .
Thanks in advance
Unnikrishnan
--
View this message in context:
http://www.nabble.com/problem-in-accessing-get-parameter-in-struts-2--wh
produces
onblur() functions but this fellow doesnt produce __checkbox_ names
hiddenfields and hence the checkbox interceptor has no effect.
it seems like both of these cannot happen simultaneously or i m going wrong
somewhere any help???
cheers,
ravi
ravi_eze wrote:
>
> hi,
>
&
produces
onblur() functions but this fellow doesnt produce __checkbox_ names
hiddenfields and hence the checkbox interceptor has no effect.
it seems like both of these cannot happen simultaneously or i m going wrong
somewhere any help???
cheers,
ravi
ravi_eze wrote:
>
> hi,
>
&
hi,
i have a form which has multiple checkbox lists in it. by default in each of
the checkboxes few of them are selected. The problem is: when user unchecks
all the boxes and submits the form is getting submitted with the default
values.
When i am using checkbox interceptor, and view source of
t;Ray" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Tuesday, December 04, 2007 9:00 PM
Subject: How my own Interceptor get the parameters from JSP
> I tried to use getInvocationContext.getparameters this method return a
> Map. when I use Map's get method b
http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/ServletRequest.html#getParameterMap()
Ray wrote:
The return value is a String array! It's really supprised me.
May this experience is meaningful for freshman to Struts2 like me.
Thx everyone.
--
The return value is a String array! It's really supprised me.
May this experience is meaningful for freshman to Struts2 like me.
Thx everyone.
--
Ray Chen
Email:[EMAIL PROTECTED]
Blog: http://clraychen.blogcn.com
-
To unsubscr
Hi,
Some code like this.
public String execute() throws Exception {
String[] name = (String[])parameterMap.get("username");
System.out.println("usernamein the page is:"+name[0]);
String[] datenow = (String[])parameterMap.get("dateNow");
System.out.println("dateno
Nuwan Chandrasoma Wrote:
Hi,
Its returning a string array. :)
Thanks,
Nuwan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
String array?
And How can I get the "username" val
Hi,
Its returning a string array. :)
Thanks,
Nuwan
Ray wrote:
I tried to use getInvocationContext.getparameters this method return a
Map. when I use Map's get method by key"username"
I got a result like "@1c98b2"
what's going on?
Thx
--
I tried to use getInvocationContext.getparameters this method return a
Map. when I use Map's get method by key"username"
I got a result like "@1c98b2"
what's going on?
Thx
--
Ray Chen(陈磊)
Email:[EMAIL PROTECTED]
Blog: http://clraychen.blogcn.com
GF wrote:
Hello,
maybe someone of you have any good link about a non-trivial custom
made interceptor
My suggestion would be to download the source and take a look at the
code for some of the built-in interceptors.
I think there were some "server side" articles/tutorials f
Hello,
maybe someone of you have any good link about a non-trivial custom
made interceptor and about some action testing?
Thank you very much.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Thilo Ettelt wrote:
I'm sorry I didn't make it clear enough. I do not want to access the
parameters. I would like to access all attributes of a request (i.e.
remote host, request uri, headers, etc) and I thought Struts2 would wrap
that up in a servlet independent map so I don't have to depend o
I'm sorry I didn't make it clear enough. I do not want to access the
parameters. I would like to access all attributes of a request (i.e.
remote host, request uri, headers, etc) and I thought Struts2 would wrap
that up in a servlet independent map so I don't have to depend on
Servlet specific s
Thilo Ettelt wrote:
Yes, I know :) But I don't want to depend on HttpServletRequest. I would
like to have the Request*Map*. Unfortunetely from looking at the code I
only found out how to contruct a RequestMap from a HttpServletRequest.
Omkar showed you how to get to the invocationContext(). F
xcept
the IoC RequestAware interface which only works for Actions)
- Thilo
Omkar patil wrote:
Thilo,
You can directly access an HttpServletRequest in the Interceptor using
following -
ActionContext ac = invocation.getInvocationContext();
HttpServletRequest request = (HttpServ
Thilo,
You can directly access an HttpServletRequest in the Interceptor using
following -
ActionContext ac = invocation.getInvocationContext();
HttpServletRequest request = (HttpServletRequest)
ac.get(ServletActionContext.HTTP_REQUEST);
- Omkar
Thilo Ettelt wrote:
Hey
are)
action).setServletRequest(request);
}
d.
--- Thilo Ettelt <[EMAIL PROTECTED]> wrote:
> Hey,
>
> somehow I can't find a way to access the RequestMap
> from within an
> Interceptor. What is t
Hey,
somehow I can't find a way to access the RequestMap from within an
Interceptor. What is the right way?
- Thilo
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
of it with the
converter. I'd prefer not to have to put an interceptor in just for
this, but would if there was a good case for it.
Is anyone else using the pattern? What else might I try?
BTW - I just started using S2 and I'm totally psyched about it after
using Tapestry for th
any validation error occures, the "execute" method do not called and
> therefore "collectDypaParams" do not called.
>
> In postback form the "dynamic" paremeters values are not show!!!
>
> Question.
>
> Where to call "collectDypaParams"
ethod do not called and
therefore "collectDypaParams" do not called.
In postback form the "dynamic" paremeters values are not show!!!
Question.
Where to call "collectDypaParams"?
May be in "prepare" method ?
--
View this message in context:
http://www.na
Hello.
In Struts Documentation i found that
"Because of the nature of this interceptor, it must be the last interceptor
in the stack."
and in struts-default.xml i found
<interceptor-stack name="executeAndWaitStack">
<interceptor-ref name="execAndWait&q
Hi Adam,
I have created a ticket in Jira:
https://issues.apache.org/struts/browse/WW-2252
and attached a first version with my changes to the interceptor.
I was thinking of also adding functionality similar to your requirements. I
totally agree that it would be nice if Struts 2 handled the
you what I have.
What changes did you you?
Regards,
Gunnar
Adam Hardy-3 wrote:
Gunnar,
the message store interceptor is quite lean. I have copied it and written
my own
version to give me the functionality I needed. Now with your comments, it
seems
like a prime target for further
works like a charm :-) This will work for me as a start. I still need
to clean it up a bitand can then send you what I have.
What changes did you you?
Regards,
Gunnar
Adam Hardy-3 wrote:
>
> Gunnar,
>
> the message store interceptor is quite lean. I have copied it and writ
Gunnar,
the message store interceptor is quite lean. I have copied it and written my own
version to give me the functionality I needed. Now with your comments, it seems
like a prime target for further development by S2 to beef it up a bit to provide
more options.
Maybe we could put in a
Hi,
Is there a way to configure the message store interceptor via annotations?
I started experimenting with the smarturls plugin for Struts 2
(http://code.google.com/p/smarturls-s2/) in order to get rid of my XML
configuration but noticed that I need the message store interceptor to have
--
View this message in context:
http://www.nabble.com/Configure--Message%2BStore%2BInterceptor-tf4604931.html#a13148924
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECT
is.SUCCESS;
}
public void setServletRequest(HttpServletRequest httpServletRequest) {
request = httpServletRequest;
}
}
I spend 3 hours before guess to move from "II" to "I"
?
--
View this message in context:
http://www.nabble.com/-S2--ExecAndWait-intercepto
I found a strange behaviour in action after execAndWait interceptor.
I have
1. <action name="doSearch" class="s2.action.SearchAction" >
<interceptor-ref name="basicStack"/>
<interceptor-ref name="execAndWait">
Hi,
I have faced the same problem..
But i am successfully able to crop it just by adding "basicStack"
interceptors exact before "execAndWait".
E.g:-
Best Regards,
Jignesh
mleneveut wrote:
>
> Hi,
>
> I try to add t
hi Antonio,
It works like a dream! :)))
Non ho visto quella, ma adesso funziona a posto :)
Grazie mille ancora ed buena serata,
saluti,
Giovanni
Antonio Petrelli wrote:
2007/10/3, Giovanni Azua <[EMAIL PROTECTED]>:
You have no meta refresh, just add:
"/>
2007/10/3, Giovanni Azua <[EMAIL PROTECTED]>:
>
>
>
> content="text/html; charset=iso-8859-1" />
>
>
> @import "css/screen.css";
> @import "css/main.css";
> @import "css/menu.css";
>
>
>
hola antonio,
Please find all the information below.
Muchas gracias por adelantado!
regards,
Giovanni
The tiles definition is:
*
*
The requestWait.jsp page is
2007/10/3, Giovanni Azua <[EMAIL PROTECTED]>:
>
> a) Using tiles the delaySleepInterval is ignored and the wait page never
> refreshes i.e. when SimulationRunAction completes it is never redirected
> to success result.
Can you post the Tiles definition and the JSP page in which you put the meta
r
hi,
I have the struts.xml definition as shown below that uses execAndWait
interceptor and Tiles. The problem is that either:
a) Using tiles the delaySleepInterval is ignored and the wait page never
refreshes i.e. when SimulationRunAction completes it is never redirected
to success result.
b
ing would cause the AJAX theme to work improperly
(javascript function not written to the response). Without <
interceptor-ref name="i18n"/>, the AJAX theme works just fine.
Just to jump in: why are you adding that interceptor-ref? According to
the interceptor documentation [1] t
--- [EMAIL PROTECTED] wrote:
> OK, I've extended my action class with
> ActionSupport...still does not work.
Not sure why that wouldn't work, and can't test now :/
I'd double-check my property files first, though.
> Does that mean I can't have my action class be a
> simple POJO wired using Spr
X theme to work improperly
(javascript function not written to the response). Without <
interceptor-ref name="i18n"/>, the AJAX theme works just fine.
Diego Piedrahita
Manager, Web Product Development
Professional/Trade Division
John Wiley & Sons, Inc.
201-748-6872
Wiley Bicentenni
--- [EMAIL PROTECTED] wrote:
> The action is a Spring bean (implementing
> com.opensymphony.xwork2.Preparable) and the
> struts.objectFactory constant is set to "spring". Is
> there a way to have Spring use ActionSupport for
> the execution of these classes so that getText
> becomes available?
e Division
John Wiley & Sons, Inc.
201-748-6872
Wiley Bicentennial: Knowledge for Generations
1807-2007
Dave Newton <[EMAIL PROTECTED]>
09/24/2007 02:33 PM
Please respond to
"Struts Users Mailing List"
To
Struts Users Mailing List
cc
Subject
Re: Issue using Struts2
--- [EMAIL PROTECTED] wrote:
> label="%{getText('firstname')}"
> name="person.firstName"/>
>
> And the only thing that comes up is 'firstname' when
> in fact the value should be 'First Name' as it is in
> the appropriate properties file which resides in the
> same pac
intereceptor-ref tag (name="i18n") and it
didn't work. Out of the box there is a validateForm_save javascript
function written out, but once I add that call to the interceptor it is no
longer there.
Also, in modifying the jsp for localization, I changed
to
And the only thin
No they won't. Only the login interceptor will be called.
hezjing wrote:
Hi
With the following struts.xml,
index.jsp
Will the interceptors configured in struts-default package be
executed, followed by the login interceptor?
Can we des
Hi
With the following struts.xml,
index.jsp
Will the interceptors configured in struts-default package be
executed, followed by the login interceptor?
Can we describe this behaviour in
http://struts.apache.org/2.0.9/docs/interceptors.html as well
I found an undocumented
com.opensymphony.xwork2.interceptor.ParametersInterceptor parameter
(excludeParams) that appears to do the same as
com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor. The later
actually works on full property names vs. the regular expressions that filter
ou
Hey,
I defined my TokenInterceptor but show this error:
* No result defined for action example.ExampleAction and result
invalid.token
When I delete the line
everything works fine
http://struts.apache.org/dtds/struts-2.0.dtd";>
attributes.put( "GOING_TO", urlGoingTo);
-Original Message-
From: Célio Cidral Junior [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 23, 2007 3:52 PM
To: Struts Users Mailing List
Subject: [S2] How to get the requested path from an interceptor
Is it possible to get the
Is it possible to get the requested path from inside an interceptor?
For instance, the following url was requested:
http://myhost:8080/mywebapp/private/admin/json/companies.action
So, from the interceptor, how can I get the
"/private/admin/json/companies.action" part from that url?
ible. This way it's
>> often
>> > possible to build entire web applications without resorting to use
>> OSIV.
>> >
>>
>>
>> --
>>
>> Hez
>>
>
>
--
View this message in context:
http://www.nabble.com/Configuring-OpenSessionInViewInterceptor-as-S2%27s-interceptor-tf4310239.html#a12278172
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Lazy initialization is to boost performance. The problem is that it doesn't
apply to all cases. In cases where you have to iterate over a list of
objects and those have lazy loading properties that you need, it will
generate a lot of extra queries to to database. In those cases it's best to
use eag
This is something new to me, I always thought that lazy initialization
is to boost performance. So we should really use eager fetching by
default and minimize the use of OSIV.
On 8/22/07, Toni Lyytikäinen <[EMAIL PROTECTED]> wrote:
> "And, is there a better alternative than using
> OpenSessionInV
"And, is there a better alternative than using
OpenSessionInViewInterceptor?"
Yes. It's important to realise that while OpenSessionInView feels very
handy, it is not a particularly nice design pattern, as it can stress your
database with lots of small queries. It's best to learn how to do eager
fe
probably you'll need to invert the filter-mapping declaration order.
hezjing wrote:
With OpenSessionInViewFilter, my web.xml will look like this
struts2
org.apache.struts2.dispatcher.FilterDispatcher
sessionFilter
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
With OpenSessionInViewFilter, my web.xml will look like this
struts2
org.apache.struts2.dispatcher.FilterDispatcher
sessionFilter
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
struts2
/*
sessionFilter
/*
Does it cause any conflict when both struts2
You can't use the OpenSessionInViewInterceptor from Spring in Struts 2.
Struts 2 interceptors are not compatible with Spring interceptors as they
have their own interface. You'll have to use OpenSessionInViewFilter. Take a
look here:
http://www.springframework.org/docs/api/org/springframework/orm/
Hi
I'm encountering this exception (when trying to iterate a list of
orders for a specific customer in JSP),
failed to lazily initialize a collection of role:
com.dummy.Customer.orders, no session or session was closed
at
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializat
1001 - 1100 of 1264 matches
Mail list logo