Interceptor stack

2010-05-18 Thread RogerV
Ok - I'm having a bad start to the day and this is driving me nuts. I'm using the Convention plugin, and below I've attached a copy of my struts.xml. As you can see I've got two custom interceptors which I'm adding to a copy of the param-prepare-param stack. Through logging I can see that my two

Redirect to previous page.

2010-05-18 Thread chris
Hi, I have a struts form which is on a JSP page, but this page masquerades as a static HTML page for search engine optimisation and in fact masqerades as hundreds of different static HTML pages. My problem is when there is a problem with validation I want to be able to forward back to the

Redirect to previous page.

2010-05-18 Thread chris
Hi, I have a struts form which is on a JSP page, but this page masquerades as a static HTML page for search engine optimisation and in fact masqerades as hundreds of different static HTML pages. My problem is when there is a problem with validation I want to be able to forward back to the

Interceptor order

2010-05-18 Thread Andy Law
Following on from my previous question (http://old.nabble.com/Some-Spring-Struts-questions-td28533505.html) about injecting objects orthogonal to actions into the environment where jsps can see them, I now have an interceptor that does what I want it do (Yay! - thanks guys). However, I'm seeing

Session object null

2010-05-18 Thread Ken
Hello Struts2 Forum, I've used the session object to get and set parameters. Where the set is done in an action() and the get is done in a jsp via OGNL. What I don't understand is I have an object who's constructor needs session data... So it calls: Map session =

Re: Session object null

2010-05-18 Thread Dale Newfield
On 5/18/10 12:35 PM, Ken wrote: What I don't understand is I have an object who's constructor needs session data... So it calls: Map session = ActionContext.getContext().getSession(); But session is always null...

Re: Session object null

2010-05-18 Thread Ken
Thank you Dale, Let me see if I understand this correctly. Since the action object has not been created yet, and this is in a different thread... I can not get the correct context... Although the session objects _is_ someplace... It will also not work in the constructor even if the class is

Re: Session object null

2010-05-18 Thread Ken
Thank you Dale, Let me see if I understand this correctly. Since the action object has not been created yet, and this is in a different thread... I can not get the correct context... Although the session objects _is_ someplace... It will also not work in the constructor even if the class is

Interator values not showed

2010-05-18 Thread slayer666
Hi, i'm trying the append tag and the list values of the appended lists are not showed. This is the main part of the jsp code: s:append var=metalBands s:param value=%{groups}/ s:param value=%{groups1}/ /s:append Total Bands:br s:iterator id=band value=%{#metalBands} Band: s:property

Re: Session object null

2010-05-18 Thread Dale Newfield
On 5/18/10 2:17 PM, Ken wrote: Let me see if I understand this correctly. Since the action object has not been created yet, and this is in a different thread... I can not get the correct context... Although the session objects _is_ someplace... It will also not work in the constructor even if

Re: java.lang.NoClassDefFoundError: org/apache/struts2/util/ObjectFactoryDestroyable

2010-05-18 Thread Emi Lu
You are doing a hot deploy of your full webapplication inside a Tomcat tree, without restarting it ? If that's the case, I'm not much surprised, hot deploys are rather fragile with respect to class loading issues in my experience. I restart Tomcat in each deploy. All right. Solution is the

Re: Session object null

2010-05-18 Thread Ken
Thank you, The problem has been resolved with what you said... However I'll fill you as I am new and looking for best practise. On Tue, 2010-05-18 at 15:25 -0400, Dale Newfield wrote: On 5/18/10 2:17 PM, Ken wrote: Let me see if I understand this correctly. Since the action object has not

Create / Edit Form, Best practices

2010-05-18 Thread Stephane Cosmeur
Hello, My question is quite simple : what are the best practices to manage the edit and create form who often are exactly the same. Do you usualy create two jsp ? Do you call an action who check if the object is in the DB or not. Maybe some people use two diffrent action with two submit (seems

Re: Create / Edit Form, Best practices

2010-05-18 Thread Luis Martín Canaval Sánchez
I do the same as the example here http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.htmlbasically 1 form and a method input that tests an ID, if the id is given, then its a edit form and its filled automatically with the

Re: Create / Edit Form, Best practices

2010-05-18 Thread Stephane Cosmeur
Ok, thanks :) In the your action description, the method's name shouldnt be prepare() instead of input() ? Additional question : with this method, can you manage the info page with the same jsp. In other way, is it possible to set the property editable to false and remove the submit when needed.

Re: Create / Edit Form, Best practices

2010-05-18 Thread Luis Martín Canaval Sánchez
yes, it is possible. On Tue, May 18, 2010 at 23:22, Stephane Cosmeur cosm...@gmail.com wrote: Ok, thanks :) In the your action description, the method's name shouldnt be prepare() instead of input() ? Additional question : with this method, can you manage the info page with the same jsp.