Re: struts session help

2010-04-27 Thread Mario . HIDALGO
Subject Re: struts session help Hi, you could put/get from session like so: ActionContext.getContext().getSession(); You can define a "parent" action (implementing preparable) with a prepare() method that retrieves data and store it in session for later (and check each time if d

Re: struts session help

2010-04-27 Thread Alex Rodriguez Lopez
Hi, you could put/get from session like so: ActionContext.getContext().getSession(); You can define a "parent" action (implementing preparable) with a prepare() method that retrieves data and store it in session for later (and check each time if data is already in session) and puts it into p

Re: struts session help

2010-04-27 Thread Upasana Sharma
hi can u give me some example how to do that?? On Tue, Apr 27, 2010 at 2:09 PM, jaya krishna wrote: > HI upasana, > > y dont u store them in the application context variable?? > > Regards, > Jay > > On Tue, Apr 27, 2010 at 2:06 PM, Upasana Sharma > wrote: > > > Hi > > > > I have a jsp that d

Re: struts session help

2010-04-27 Thread jaya krishna
HI upasana, y dont u store them in the application context variable?? Regards, Jay On Tue, Apr 27, 2010 at 2:06 PM, Upasana Sharma wrote: > Hi > > I have a jsp that displays some data . To refine the data based on some > criteria i have two comboboxes. > > onchange="getDisplayCriteria();" emp

struts session help

2010-04-27 Thread Upasana Sharma
Hi I have a jsp that displays some data . To refine the data based on some criteria i have two comboboxes. the lists for these two select option are obtained from the action that calls the page containing them.. public String getAllLists() throws Exception{ ActionContext.getContext().put

Re: Session help

2010-01-20 Thread emil thushanga
Dear all, This thread was really helpful to me. i could accomplish it using interceptors as you guys mentioned. Thanks for the solution and the links. Lots of thanks Emil On Wed, Jan 20, 2010 at 9:47 PM, Dale Newfield wrote: > emil thushanga wrote: > >> Thanks for the solutions. i prefer to d

Re: Session help

2010-01-20 Thread Dale Newfield
emil thushanga wrote: Thanks for the solutions. i prefer to do it in interceptors way. if any resources available for me to grab the thing please let me know. any way thanks a lot. A good place to start: http://struts.apache.org/2.1.8.1/docs/interceptors.html and http://struts.apache.org/2.1.8.

Re: Session help

2010-01-20 Thread Brian Thompson
I've read the entire thread, and I'm still a bit confused. Are you just trying to copy 'barbados' (or whatever is in the path) from the URL into a session variable? That sounds pretty easy to do. I would probably use a Filter, but there would really only be one extra step if you do it in an inte

Re: Session help

2010-01-19 Thread emil thushanga
Hi Thanks for the solutions. i prefer to do it in interceptors way. if any resources available for me to grab the thing please let me know. any way thanks a lot. Emil On Wed, Jan 20, 2010 at 1:25 PM, Dale Newfield wrote: > emil thushanga wrote: > >> if namespace is 'Barbados' >> session =

Re: Session help

2010-01-19 Thread Dale Newfield
emil thushanga wrote: if namespace is 'Barbados' session ='Barbados' if namespace is 'Antigua' session ='Antigua' One simple way to do this would be to write an interceptor that takes the namespace from the action mapping and sets the appropriate value in session scope. -Dale

Re: Session help

2010-01-19 Thread Saeed Iqbal
sorry should not be a problem On Wed, Jan 20, 2010 at 12:13 PM, emil thushanga wrote: > Hi > > If user created a book mark and accessing a page then how can push him to > index action. based on the user accessing namespace i want to set a session > variable with the corresponding region. > > Ex >

Re: Session help

2010-01-19 Thread Saeed Iqbal
You can define another result for redirecting with the type redirect of name anything you want. That should be a problem. Return the same string from method as the redirect name. On Wed, Jan 20, 2010 at 12:13 PM, emil thushanga wrote: > Hi > > If user created a book mark and accessing a page then

Re: Session help

2010-01-19 Thread emil thushanga
Hi If user created a book mark and accessing a page then how can push him to index action. based on the user accessing namespace i want to set a session variable with the corresponding region. Ex if namespace is 'Barbados' session ='Barbados' if namespace is 'Antigua' session ='Anti

Re: Session help

2010-01-19 Thread Saeed Iqbal
You should be able to do index and land on that jsp. Also maybe put a method property inside action tag On Wed, Jan 20, 2010 at 11:48 AM, emil thushanga wrote: > Hi, > > this may be helpful. > > > > >/jsp/ukbarbado

Re: Session help

2010-01-19 Thread emil thushanga
Hi, this may be helpful. /jsp/ukbarbados/index.jsp barbados /jsp/ukbarbados/list_hotels.jsp /jsp/commonjsps/hotel.jsp

Re: Session help

2010-01-19 Thread Saeed Iqbal
This is strange. What kind of a setup do you have? On Wed, Jan 20, 2010 at 11:20 AM, emil thushanga wrote: > Dear all, > > I have an S2 web application. No login procedure and any page can be > accessed. Basically it’s an Open session. > > It’s a hotel website. As an example when user access Barb

Session help

2010-01-19 Thread emil thushanga
Dear all, I have an S2 web application. No login procedure and any page can be accessed. Basically it’s an Open session. It’s a hotel website. As an example when user access Barbados web pages , regardless of any URL patter session should be created and token should be save as region='Barbados'.