Re: Struts 2 session problem

2009-01-17 Thread RajibJana
By conversation, I want to mean http session independent conversation. So two simultaneous users sharing the same http session can work independently, storing/retriving their own properties throughout the application without having conflict with other user . Thanks Rajib Nils-Helge Garli wrote

Re: Dynamic s:checkbox name?

2009-01-17 Thread abhijit . sulhyan
Licco: Try as: - Abhijit Sulhyan On 1/18/09, KE LI wrote: > Dear All, I am confusing about how to write dynamic s:checkbox names in s2. > For example, > > > > > I want to achieve the result as: > > > > > > etc. > > The main problem is that i dont kn

Re: Struts 2 session problem

2009-01-17 Thread Nils-Helge Garli Hegvik
I agree conversations would be a nice feature, but aren't conversations usually just different states in the application for the same user? I'm having difficulties understanding how it would solve a problem of two simultaneous users sharing the same session. I would say that is more of a login/secu

Re: Struts 2 session problem

2009-01-17 Thread RajibJana
This is not a authentication/authorization issue alone, app needs to maintain various user session specific info that need to be accessed in other action classes, enterprise level web app needs that. ( Thats why in SEAM, that is a highlighted feature). I can implement spring security, thats not

Re: Dynamic s:checkbox name?

2009-01-17 Thread Wes Wannemacher
On Sunday 18 January 2009 00:47:51 Nuwan Chandrasoma wrote: > > > > > Thanks, > > Nuwan C > Nuwan, I'm not sure if that is what he is intending. It will work, but for what seems to be the wrong reasons. If "test_list" contains the values to iterate over, then I would use those, rath

Re: S2: caching problem,-user clicks on a link and then back w/ broweser data is lost

2009-01-17 Thread dusty
So, your form posts via AJAX to the action and the results sent as (JSON, XML, HTML) and rendered via Javascript on some div on the page? If that is the case then you do indeed have a problem. One easy fix is to use an actual list page rather than rendering the list via Javascript. But if that

Re: Struts 2 session problem

2009-01-17 Thread dusty
Allowing a user to login again to a different ID using the same session is a FAIL. It is not really a S2 issue, but an authentication implementation issue. It is true that S2 does not provide a default authentication/authorization implementation, but Spring Security does the job very well. W

Re: Dynamic s:checkbox name?

2009-01-17 Thread Nuwan Chandrasoma
Thanks, Nuwan C KE LI wrote: Dear All, I am confusing about how to write dynamic s:checkbox names in s2. For example, I want to achieve the result as: etc. The main problem is that i dont know how to write the right ognl expression in the code above(

Dynamic s:checkbox name?

2009-01-17 Thread KE LI
Dear All, I am confusing about how to write dynamic s:checkbox names in s2. For example, I want to achieve the result as: etc. The main problem is that i dont know how to write the right ognl expression in the code above(around the "?" position). Can anyone help m

Re: Struts 2 session problem

2009-01-17 Thread RajibJana
Sorry for replying late, as there is time diff ( living in India) Yes, the app wants SEAM conversation feature. Does S 2.1.6 provide any such feature or any other future version? Thanks Rajib newton.dave wrote: > > Dale Newfield wrote: >> One running browser instance shares session across

Re: Struts 2 session problem

2009-01-17 Thread RajibJana
DNewfield wrote: > > RajibJana wrote: >> 1) if one opens a window and a tabbed window, logs into the application >> by >> giving different user id and password combinations, then two seperate >> sessions are not created. As a result, in the session map userid >> overrides >> each other and same

Re: Struts 2 session problem

2009-01-17 Thread RajibJana
option 2 and 3 are overheads for a large app, I will check option 3 , currently I am using glassfish, will check whether option 3 is available in gf. Thanks Rajib Struts Two wrote: > > There are a few solutions to your problem: > > 1- You can serialize your object as a hidden field and d

Re: Struts 2 session problem

2009-01-17 Thread Dave Newton
Dale Newfield wrote: One running browser instance shares session across all windows. Using Safari and Firefox in tandem will allow two sessions from one machine. The OP wants a SEAM-like solution, but S2 doesn't have that functionality built-in (nor do most other frameworks, AFAIK). It *wo

Re: Struts 2 session problem

2009-01-17 Thread Dale Newfield
RajibJana wrote: 1) if one opens a window and a tabbed window, logs into the application by giving different user id and password combinations, then two seperate sessions are not created. As a result, in the session map userid overrides each other and same user id ( last logged in user ) is shown

exception handling

2009-01-17 Thread J J
Hello, I am trying to implement declarative exception handling for all the possible exceptions. The problem is that in this way I only catch some exceptions (not all of them) and I cant get its stack trace nor its message(it is only rendered the rest of my JSP but not the information about the s

Re: Struts 2 session problem

2009-01-17 Thread Struts Two
There are a few solutions to your problem: 1- You can serialize your object as a hidden field and deserialize it on each request if you need it. It serves like a baggage that you carry form page to other. In this way, you avoid putting any object in session scope. Some folks may argue that this

stack values in converter

2009-01-17 Thread Andrei Ivanov
Hello, I have a date converter that does something like this: String value = values[0]; Locale locale = (Locale) context.get(ActionContext.LOCALE); DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale); Date date = df.parse(value); The locale is set in the context by the com.opensy

S2: caching problem,-user clicks on a link and then back w/ broweser data is lost

2009-01-17 Thread xianwinwin
Hi All, Here's a scenario that drives me crazy: 1. A user fills-up a form (a date) and clicks submit 2. An Action return a List of items related to the user's input 3. The list is returned as an ID (AJAX) to the form 4. User sees the list and can click a URL from the list Problem: When the user

Re: dissplay a message in jsp

2009-01-17 Thread RajibJana
simply use #session.status if the action has a getter for status field. m.harig wrote: > > hello all > > I've a LoginAction in my application . Am checking my > username , password with my db. If the user doesn't exist i've to display > a message in my jsp page. Now am using sess

Re: Struts 2 session problem

2009-01-17 Thread RajibJana
Yes, Dave, the tutorial does not address the problem. My application has user authentication page which has userid/password field. The valid user id ( after checking the user info in db) is put into the session map ( action implments sessionaware interface). The application has lots of screens an

RE: java.lang.SecurityException

2009-01-17 Thread Martin Gainty
Worker- can we the iterator tag in your welcome.jsp? better yet please display the entire welcome.jsp Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This trans

dissplay a message in jsp

2009-01-17 Thread m.harig
hello all I've a LoginAction in my application . Am checking my username , password with my db. If the user doesn't exist i've to display a message in my jsp page. Now am using session object to store the message . to print the message in jsp am using <%out.pri

Re: Struts 2 session problem

2009-01-17 Thread Dave Newton
Deepak Kumar wrote: Please check http://www.roseindia.net/struts/struts2/struts2-login.shtml I don't see how that addresses the issue at all; perhaps you could explain further? Thanks, Dave - To unsubscribe, e-mail: user-u

Re: Unit Testing Struts 2 Action

2009-01-17 Thread Dave Newton
Doug Pham wrote: > [...] information on how to unit test my new application actions? When you hit "reply" and change the subject this is what happens in threaded view: http://tinypic.com/view.php?pic=n5mog5&s=5 Please consider starting new threads. Dave

RE: Struts 2 session problem

2009-01-17 Thread Deepak Kumar
Please check http://www.roseindia.net/struts/struts2/struts2-login.shtml Thanks -Original Message- From: RajibJana [mailto:rajibj...@gmail.com] Sent: Saturday, January 17, 2009 4:35 PM To: user@struts.apache.org Subject: Re: Struts 2 session problem Seems to me S2 can not give better s

Re: Unit Testing Struts 2 Action

2009-01-17 Thread Robert Harrison
Here's the first step of a nice, three-part tutorial (I have no connection to author) Bob "Sure you can trust the government. Just ask any Indian" - anonymous On Sat, Jan 17, 2009 at 6:21 AM, Nils-Helge Garli Hegvik wrote: > One

Re: [S2] struts 2.1.3: share portlet session with servlet (yui ajax)

2009-01-17 Thread Nils-Helge Garli Hegvik
Did you try the suggestion of encoding the session id in the url? It does sound strange indeed. Have you tried deploying to a different container, like pluto? Nils-H On Fri, Jan 16, 2009 at 4:47 PM, Frank Otto wrote: > Yes, but no answer with a solution. > > I think the problem ist, that the aja

Re: Unit Testing Struts 2 Action

2009-01-17 Thread Nils-Helge Garli Hegvik
One of the things I really like about Struts 2 is how easy it is to unit test actions. Using the proper mechanisms for injecting what you need, unit testing the action should be as simple as instantiating the action, set the appropriate dependencies, and then execute it. Nils-H On Sat, Jan 17, 20

Re: Struts 2 session problem

2009-01-17 Thread RajibJana
Seems to me S2 can not give better solution than you have mentioned. I checked relevent codes in S2 ( e.g. scope interceptor) and IMO, struts 2 can not have feature like user session/conversation as it depends on http session for session mgmt. Thanks Rajib abhishek reddy wrote: > > OK,

Re: Struts 2 session problem

2009-01-17 Thread abhishek reddy
OK, If you find better solution, please let me know On Sat, Jan 17, 2009 at 2:58 PM, RajibJana wrote: > > OK, I may try this if no other solution emerges. > > My question this is typical requirement for any enterprise level web app, > how Struts2 handles it? > > If it does not able to, then ther

Re: Struts 2 session problem

2009-01-17 Thread RajibJana
OK, I may try this if no other solution emerges. My question this is typical requirement for any enterprise level web app, how Struts2 handles it? If it does not able to, then there is no other option but to leave S2 and look for other server frameworks. There is a need of looking beyond http se

Unit Testing Struts 2 Action

2009-01-17 Thread Doug Pham
Hi All,     I am putting together Struts 2, Hibernate & Sitemesh.  Where can I find information on how to unit test my new application actions? Thanks, Doug

java.lang.SecurityException

2009-01-17 Thread ECLIPSE + CVS
Hi, In one of my project i am planning to use Display tag libraries for the pagination purpose. While i am using any one of the tags from the dispaly tld it is showing the security exception. Please see the below exception. Is there any other libraries available for pagination ?. Am using d

Re: Logic Iterate problem

2009-01-17 Thread ECLIPSE + CVS
Thanks !!! Paweł Wielgus wrote: > > Hi, > You are iterating over user. > > Best regards, > Paweł Wielgus. > > 2009/1/14 ECLIPSE + CVS : >> >> Hi, >> >> In one page of my application i am trying to iterate through one >> collection >> for populating one combo box. But it is showing >> "java

Re: Struts 2 session problem

2009-01-17 Thread abhishek reddy
*If the user opens a new browser instance, then a new session is created and both the windows have their own user id info( i.e. userid doesnt override)* Taking the above point into consideration...you can try this way 1.When User X logged in successfully, you are storing the id in the session. 2.

Re: Struts 2 session problem

2009-01-17 Thread RajibJana
Thanks Wes for your reply. The application requires userid info for various reasons like authorization, auditing etc. Hidden key (security reason) or cookies ( may be disabled) are not the good way to handle this situation. I am wondering whether this is not a common requirement for any web ap