Author Login
Post Reply
user Digest 28 May 2008 18:26:31 -0000 Issue 8054
Topics (messages 186888 through 186914):
Re: welcome-file config
186888 by: Lukasz Lenart
186892 by: Mark Lester
186893 by: Lukasz Lenart
186894 by: Mark Lester
186899 by: Lukasz Lenart
186904 by: Mark Lester
Re: How to promt SaveAs dialog when a file is to be downloaded?
186889 by: Gabriel Belingueres
autocomplete value in javascript
186890 by: Struts Two
Re: A form without summit?
186891 by: Martin
186900 by: Alexis Pigeon
186903 by: thomas2004
Re: AjaxTags passing parameters to callout ...
186895 by: Giovanni Azua
[Struts 2] Session scope
186896 by: Milan Milanovic
186898 by: Milan Milanovic
186905 by: Milan Milanovic
186906 by: Milan Milanovic
186907 by: Juan Pablo Pizarro
186908 by: Relph,Brian
186909 by: Juan Pablo Pizarro
186910 by: Martin
186912 by: Dave Newton
186913 by: Dave Newton
186914 by: Juan Pablo Pizarro
Re: optiontransferselect Problem
186897 by: mailtorakeshp
[s2] displayTag: get the concerned row's values
186901 by: sassien
Re: display tag problem
186902 by: Alexandru BARBAT
[S2] Datetimepicker Formatting Questions
186911 by: Hoying, Ken
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_186888.ezm (zipped)> Is there a way to make the welcome file redirect to the file instead
> of just referencing the file.
You should reference to an action, eg. index.action, as struts2 filter is
mapped to /* (that's a common mistake, even in maven2 archetype ;-)
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
http://jdn.pl/blog/416
http://www.lenart.org.pl/

Attachment:
user_186892.ezm (zipped)Could you give an example, referencing to an action as the welcome
file for me seems to bring up a 404 error.
-----Original Message-----
From: Lukasz Lenart [mailto:lukasz.lenart@(protected)]
Sent: Wednesday, May 28, 2008 9:03 AM
To: Struts Users Mailing List
Subject: Re: welcome-file config
> Is there a way to make the welcome file redirect to the file instead
> of just referencing the file.
You should reference to an action, eg. index.action, as struts2 filter
is
mapped to /* (that's a common mistake, even in maven2 archetype ;-)
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
http://jdn.pl/blog/416
http://www.lenart.org.pl/

Attachment:
user_186893.ezm (zipped)Could you share your web.xml and struts.xml to know how you defined your
actions?
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
http://jdn.pl/blog/416
http://www.lenart.org.pl/

Attachment:
user_186894.ezm (zipped)Yeah sure thing
------------struts.xml----------
<struts>
<package name="default" extends="struts-default">
<action name="index">
<result
type="redirect">/tiles/index.jsp</result>
</action>
<action name="doLogin"
class="myproject.actions.Login">
<result name="input"
type="redirect">tiles/index.jsp</result>
<result name="error"
type="redirect">tiles/index.jsp</result>
<result
type="redirect">/tiles/index.jsp</result>
</action>
<action name="LogoutAction"
class="myproject.actions.LogoutAction">
<result
type="redirect">tiles/index.jsp</result>
</action>
</package>
</struts>
------------web.xml----------
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher</filter-c
lass>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>doLogin.action</welcome-file>
</welcome-file-list>
It doesn't work with doLogin.action or index.action
-----Original Message-----
From: Lukasz Lenart [mailto:lukasz.lenart@(protected)]
Sent: Wednesday, May 28, 2008 9:35 AM
To: Struts Users Mailing List
Subject: Re: welcome-file config
Could you share your web.xml and struts.xml to know how you defined
your
actions?
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
http://jdn.pl/blog/416
http://www.lenart.org.pl/

Attachment:
user_186899.ezm (zipped)Sorry, I've made big mistake I'm sure it works for me, I have to make some
investigation with that ;-)
Try something like this
-------------- web.xml -------------------
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
create index.jsp file on the top of you web folder (/) with such content
---------------- index.jsp -----------------
<% response.sendRedirect("index.action"); %>
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
http://jdn.pl/blog/416
http://www.lenart.org.pl/

Attachment:
user_186904.ezm (zipped)That response.redirect thing did the trick thanks
-----Original Message-----
From: Lukasz Lenart [mailto:lukasz.lenart@(protected)]
Sent: Wednesday, May 28, 2008 11:27 AM
To: Struts Users Mailing List
Subject: Re: welcome-file config
Sorry, I've made big mistake I'm sure it works for me, I have to make
some
investigation with that ;-)
Try something like this
-------------- web.xml -------------------
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
create index.jsp file on the top of you web folder (/) with such
content
---------------- index.jsp -----------------
<% response.sendRedirect("index.action"); %>
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
http://jdn.pl/blog/416
http://www.lenart.org.pl/

Attachment:
user_186889.ezm (zipped)You have to set the Content-Disposition in the HTTP header. See
http://www.ietf.org/rfc/rfc2183.txt for the details, but setting as
"attachment" will ask for the save dialog. Set the "filename" too if
you want to pre-set the saved filename.
See http://www.javaworld.com/javaworld/javatips/jw-javatip94.html for
an example.
2008/5/28, quinquin2209 <quinquin2209-noip@(protected)>:
>
> Hi,
>
> I am not sure if this is a javascript question or structs question. But I
> hope you may help.
>
> I have a page which will list out attachments of a message. When user click
> on the attachment, it is expected that a SaveAs dialog should be prompted
> such that user can download the file.
>
> In struts.xml, I define something like this:
>
> <action name="download" method="downloadAttachment"
> class="attachmentAction">
> <result name="success" type="stream">
> inputStream
> filename="${downloadAttachmentFileName}"
> 4096
> </result>
> <result name="input" type="redirect-action">
> list
> /message
> ${docId}
> </result>
> </action>
>
> And in the html, I write like this
>
> <s:url id="downloadUrl" action="../attachment/download.action">
> <s:param name="downloadAttachmentFileName"
> value="attachments[#status.index].name"/>
> </s:url>
> <s:a href="%{downloadUrl}"><s:property
> value="attachments[#status.index].name" /></s:a>
>
> So now when the file name is clicked, it will automatically show the file
> content in a new page.
>
> Can anyone suggest how I can open a SaveAs dialog when the file is clicked?
> I look from the web knowing that document.execCommand("SaveAs"); is the
> javascript to open the SaveAs dialog. But I don't know how can I combine
> this in my page. Any suggestion?
>
> Queenie
> --
> View this message in context: http://www.nabble.com/How-to-promt-SaveAs-dialog-when-a-file-is-to-be-downloaded--tp17510502p17510502.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_186890.ezm (zipped)I am using struts 2.0.11.1 autocompleter tag with ajax theme (with its id and name set to 'host'). For some reason I am not able to retrive its value in a javascript function. I have tried the following api:
------document.getElementById('host');
------document.getElementByName('host');
------document.forms[0].host.value
I even tried it with prototype API as follows:
--------$F('host')
I also tried the above api's with 'hostKey' but of no use. I am using xhtml and by looking at the genetated code for autocomplete I noticed it is not a properly closed xml tag so I kind of expect xml api's fail. Is there anyway that I can retrieve the value of that tag in a javascript before a submit is performed.
__________________________________________________________________
Connect with friends from any web browser - no download required. Try the new Yahoo! Canada Messenger for the Web BETA at http://ca.messenger.yahoo.com/webmessengerpromo.php

Attachment:
user_186891.ezm (zipped)You can accomplish autocomplete with the autocompleter Struts Tag
http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/components/Autocompleter.html
Take note of theme="ajax"
http://struts.apache.org/2.0.11.1/docs/autocompleter.html
HTH
Martin
----- Original Message -----
From: "thomas2004" <thomas2004ch@(protected)>
To: <user@(protected)>
Sent: Wednesday, May 28, 2008 6:15 AM
Subject: A form without summit?
>
> Simply to say, I have a bean class looks as follow:
>
> public class Address{
> private street;
>
> public Address(){
> setStreet("Broadway");
> }
>
> public void setStreet(String street){
> this.street = street;
> }
>
> public String getStreet(){
> return this.street;
> }
> }
>
> Now in the "myaddress.jsp", I just want to show the address as one invoke
> this page, without clicking any submit button:
> ...
> <bean:write name="address" property="street" />
> ...
>
> How can I define the mappings in "struts-config.xml"?
> --
> View this message in context:
> http://www.nabble.com/A-form-without-summit--tp17509426p17509426.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_186900.ezm (zipped)On 28/05/2008, Martin <mgainty@(protected):
> You can accomplish autocomplete with the autocompleter Struts Tag
> http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/components/Autocompleter.html
> Take note of theme="ajax"
> http://struts.apache.org/2.0.11.1/docs/autocompleter.html
>
> HTH
> Martin
> ----- Original Message ----- From: "thomas2004" <thomas2004ch@(protected)>
[snip]
> > How can I define the mappings in "struts-config.xml"?
I fear the OP is using Struts1, and Struts2 documentation won't be of
nay help...

Attachment:
user_186903.ezm (zipped)
Alexis Pigeon wrote:
>
> On 28/05/2008, Martin <mgainty@(protected):
>> You can accomplish autocomplete with the autocompleter Struts Tag
>> http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/components/Autocompleter.html
>> Take note of theme="ajax"
>> http://struts.apache.org/2.0.11.1/docs/autocompleter.html
>>
>> HTH
>> Martin
>> ----- Original Message ----- From: "thomas2004" <thomas2004ch@(protected)>
>
> [snip]
>
>> > How can I define the mappings in "struts-config.xml"?
>
> I fear the OP is using Struts1, and Struts2 documentation won't be of
> nay help...
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
I fear the methods you above told are from struts2, right? I am using
struts1.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_186895.ezm (zipped)hi,
I would like to invoke an AjaxTags callout from a displaytag column. My
use-case is the following: I have a column "status" whose value can be
'Succeeded' or 'Failed'. If the value is Failed I would like to display
it as an hyperlink that on hover produces a callout with the Error
Message explaining the cause of that failure.
This is the callout example included in AjaxTags demo delivery:
<a href="javascript://nop/" class="definition">Vogons</a>
<-- "Vogons" is what is sent as request parameter to the action,
I would like it to be something else than the hyperlink display value -->
<ajax:callout baseUrl="${contextPath}/callout.view"
sourceClass="definition"
parameters="q={ajaxParameter}"
title="Definition" />
My problem is that I can't find a way to pass a parameter that is not
the hyperlink display value i.e. in my use-case I display as column
value 'Succeeded' whereas what I would like to pass as parameter to the
callout Action is the process ID so that it can fetch the appropriate
Error Message. But seems that the ajaxParameter only takes the display
value of the hyperlink?
TIA,
Regards,
Giovanni
PS: If you know any other callout alternative I will be happy to switch
from AjaxTags too ...

Attachment:
user_186896.ezm (zipped)Hi,
I have one action class and two pages. When first page is called, in its execute method I remove my session variable, like this:
ServletActionContext.getContext().getSession().remove("fruits");
and then when form from the first jsp page is submitted user enter details in the second form and there I save those changed to session, too:
ServletActionContext.getContext().getSession().put("fruits", fruits);
Of course, I first check if there is already fruits in session. I do this because some maybe want to go to first page to change something and then to go again to the second page to continue entering other info. But, when I exit both page an execute method is called (with above session remove method), and my second page is called fruits from session are read again - they are not removed ?
--
Thx in advance, Milan Milanovic

Attachment:
user_186898.ezm (zipped)It seems that every request have its own scope ?!
Milan Milanovic <milanmilanovich@(protected),
I have one action class and two pages. When first page is called, in its execute method I remove my session variable, like this:
ServletActionContext.getContext().getSession().remove("fruits");
and then when form from the first jsp page is submitted user enter details in the second form and there I save those changed to session, too:
ServletActionContext.getContext().getSession().put("fruits", fruits);
Of course, I first check if there is already fruits in session. I do this because some maybe want to go to first page to change something and then to go again to the second page to continue entering other info. But, when I exit both page an execute method is called (with above session remove method), and my second page is called fruits from session are read again - they are not removed ?
--
Thx in advance, Milan Milanovic

Attachment:
user_186905.ezm (zipped)Hi Martin,
thank you.
My action package extends="struts-default", does this mean when I call
ActionContext.getContext().getSession() that I doesn't have access to session ?
It seems to me that every <s:url action="..."/> creates a new session for my action class, and at least two methods doesn't have access to the same session. How can I manage to share my variable through multiple jsp pages for one action class using the users session ?
--
Thx, Milan
Martin <mgainty@(protected)-
You can accomplish creation of HttpSession via CreateSessionInterceptor
http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/CreateSessionInterceptor.html
(session parameters are available via a map which is is available via)
ActionContext.getContext().getSession()
If you would be amenable to using a IOC container I would look at
implementing Springs SessionContextAutowiringInterceptor
http://www.opensymphony.com/webwork/api/com/opensymphony/webwork/spring/interceptor/SessionContextAutowiringInterceptor.html
HTH
Martin
----- Original Message -----
From: "Milan Milanovic"
To: "Struts Users Mailing List"
Sent: Wednesday, May 28, 2008 11:08 AM
Subject: Re: [Struts 2] Session scope
> It seems that every request have its own scope ?!
>
> Milan Milanovic wrote: Hi,
>
> I have one action class and two pages. When first page is called, in its
> execute method I remove my session variable, like this:
>
> ServletActionContext.getContext().getSession().remove("fruits");
>
> and then when form from the first jsp page is submitted user enter details
> in the second form and there I save those changed to session, too:
>
> ServletActionContext.getContext().getSession().put("fruits", fruits);
>
> Of course, I first check if there is already fruits in session. I do this
> because some maybe want to go to first page to change something and then
> to go again to the second page to continue entering other info. But, when
> I exit both page an execute method is called (with above session remove
> method), and my second page is called fruits from session are read again -
> they are not removed ?
>
> --
> Thx in advance, Milan Milanovic
>
>
>
>
>
>

Attachment:
user_186906.ezm (zipped)Should my action class implement SessionAware ?
Milan Milanovic <milanmilanovich@(protected),
thank you.
My action package extends="struts-default", does this mean when I call
ActionContext.getContext().getSession() that I doesn't have access to session ?
It seems to me that every creates a new session for my action class, and at least two methods doesn't have access to the same session. How can I manage to share my variable through multiple jsp pages for one action class using the users session ?
--
Thx, Milan
Martin wrote: Hello Milan-
You can accomplish creation of HttpSession via CreateSessionInterceptor
http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/CreateSessionInterceptor.html
(session parameters are available via a map which is is available via)
ActionContext.getContext().getSession()
If you would be amenable to using a IOC container I would look at
implementing Springs SessionContextAutowiringInterceptor
http://www.opensymphony.com/webwork/api/com/opensymphony/webwork/spring/interceptor/SessionContextAutowiringInterceptor.html
HTH
Martin
----- Original Message -----
From: "Milan Milanovic"
To: "Struts Users Mailing List"
Sent: Wednesday, May 28, 2008 11:08 AM
Subject: Re: [Struts 2] Session scope
> It seems that every request have its own scope ?!
>
> Milan Milanovic wrote: Hi,
>
> I have one action class and two pages. When first page is called, in its
> execute method I remove my session variable, like this:
>
> ServletActionContext.getContext().getSession().remove("fruits");
>
> and then when form from the first jsp page is submitted user enter details
> in the second form and there I save those changed to session, too:
>
> ServletActionContext.getContext().getSession().put("fruits", fruits);
>
> Of course, I first check if there is already fruits in session. I do this
> because some maybe want to go to first page to change something and then
> to go again to the second page to continue entering other info. But, when
> I exit both page an execute method is called (with above session remove
> method), and my second page is called fruits from session are read again -
> they are not removed ?
>
> --
> Thx in advance, Milan Milanovic
>
>
>
>
>
>

Attachment:
user_186907.ezm (zipped)Hi All.
I've a problem with session scope. The problem is:
1.- I open a web browser and make a login with user 1.
2.- I open a web browser and make a login with user 2.
so, in the web browser 2, my user name is "1". I pressed CTRL+F5 and
refresh with the correct name ("2").
I've implemented SessionAware (with get and set) in my CommonAction
(all other actions extends from it).
To login a user and check that the user is logged, I use a LoginInterceptor.
I've surfed the web and I didn't find a real solution.
Regards,
JP
2008/5/28, Milan Milanovic <milanmilanovich@(protected)>:
> Should my action class implement SessionAware ?
>
> Milan Milanovic <milanmilanovich@(protected),
>
> thank you.
>
> My action package extends="struts-default", does this mean when I call
> ActionContext.getContext().getSession() that I doesn't have access to session ?
>
> It seems to me that every creates a new session for my action class, and at least two methods doesn't have access to the same session. How can I manage to share my variable through multiple jsp pages for one action class using the users session ?
>
> --
> Thx, Milan
>
> Martin wrote: Hello Milan-
>
> You can accomplish creation of HttpSession via CreateSessionInterceptor
> http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/CreateSessionInterceptor.html
>
> (session parameters are available via a map which is is available via)
> ActionContext.getContext().getSession()
>
> If you would be amenable to using a IOC container I would look at
> implementing Springs SessionContextAutowiringInterceptor
> http://www.opensymphony.com/webwork/api/com/opensymphony/webwork/spring/interceptor/SessionContextAutowiringInterceptor.html
>
> HTH
> Martin
>
> ----- Original Message -----
> From: "Milan Milanovic"
> To: "Struts Users Mailing List"
> Sent: Wednesday, May 28, 2008 11:08 AM
> Subject: Re: [Struts 2] Session scope
>
>
> > It seems that every request have its own scope ?!
> >
> > Milan Milanovic wrote: Hi,
> >
> > I have one action class and two pages. When first page is called, in its
> > execute method I remove my session variable, like this:
> >
> > ServletActionContext.getContext().getSession().remove("fruits");
> >
> > and then when form from the first jsp page is submitted user enter details
> > in the second form and there I save those changed to session, too:
> >
> > ServletActionContext.getContext().getSession().put("fruits", fruits);
> >
> > Of course, I first check if there is already fruits in session. I do this
> > because some maybe want to go to first page to change something and then
> > to go again to the second page to continue entering other info. But, when
> > I exit both page an execute method is called (with above session remove
> > method), and my second page is called fruits from session are read again -
> > they are not removed ?
> >
> > --
> > Thx in advance, Milan Milanovic
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>

Attachment:
user_186908.ezm (zipped)
A new browser does not necessarily create a new session.
IE6, if you open new browser instance, you get a new session. But, if you open a new window from your existing browser, you have the same session.
In Firefox 2, all browser instances / windows/ tabs while running share the same session.
Brian Relph
-----Original Message-----
From: Juan Pablo Pizarro [mailto:juanpablo.pizarro@(protected)]
Sent: Wednesday, May 28, 2008 12:02 PM
To: Struts Users Mailing List
Subject: Re: [Struts 2] Session scope
Hi All.
I've a problem with session scope. The problem is:
1.- I open a web browser and make a login with user 1.
2.- I open a web browser and make a login with user 2.
so, in the web browser 2, my user name is "1". I pressed CTRL+F5 and refresh with the correct name ("2").
I've implemented SessionAware (with get and set) in my CommonAction (all other actions extends from it).
To login a user and check that the user is logged, I use a LoginInterceptor.
I've surfed the web and I didn't find a real solution.
Regards,
JP
2008/5/28, Milan Milanovic <milanmilanovich@(protected)>:
> Should my action class implement SessionAware ?
>
> Milan Milanovic <milanmilanovich@(protected),
>
> thank you.
>
> My action package extends="struts-default", does this mean when I call
> ActionContext.getContext().getSession() that I doesn't have access to session ?
>
> It seems to me that every creates a new session for my action class, and at least two methods doesn't have access to the same session. How can I manage to share my variable through multiple jsp pages for one action class using the users session ?
>
> --
> Thx, Milan
>
> Martin wrote: Hello Milan-
>
> You can accomplish creation of HttpSession via
> CreateSessionInterceptor
> http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2
> /interceptor/CreateSessionInterceptor.html
>
> (session parameters are available via a map which is is available via)
> ActionContext.getContext().getSession()
>
> If you would be amenable to using a IOC container I would look at
> implementing Springs SessionContextAutowiringInterceptor
> http://www.opensymphony.com/webwork/api/com/opensymphony/webwork/sprin
> g/interceptor/SessionContextAutowiringInterceptor.html
>
> HTH
> Martin
>
> ----- Original Message -----
> From: "Milan Milanovic"
> To: "Struts Users Mailing List"
> Sent: Wednesday, May 28, 2008 11:08 AM
> Subject: Re: [Struts 2] Session scope
>
>
> > It seems that every request have its own scope ?!
> >
> > Milan Milanovic wrote: Hi,
> >
> > I have one action class and two pages. When first page is called, in
> > its execute method I remove my session variable, like this:
> >
> > ServletActionContext.getContext().getSession().remove("fruits");
> >
> > and then when form from the first jsp page is submitted user enter
> > details in the second form and there I save those changed to session, too:
> >
> > ServletActionContext.getContext().getSession().put("fruits",
> > fruits);
> >
> > Of course, I first check if there is already fruits in session. I do
> > this because some maybe want to go to first page to change something
> > and then to go again to the second page to continue entering other
> > info. But, when I exit both page an execute method is called (with
> > above session remove method), and my second page is called fruits
> > from session are read again - they are not removed ?
> >
> > --
> > Thx in advance, Milan Milanovic
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.

Attachment:
user_186909.ezm (zipped)I tried with IE6, IE5 and Firefox in 3 PC's as Clients and the page
hosted in a w2003 server in others device.
The error continues.
JP
2008/5/28, Relph,Brian <Brian.Relph@(protected)>:
>
> A new browser does not necessarily create a new session.
>
> IE6, if you open new browser instance, you get a new session. But, if you open a new window from your existing browser, you have the same session.
>
> In Firefox 2, all browser instances / windows/ tabs while running share the same session.
>
>
> Brian Relph
>
> -----Original Message-----
> From: Juan Pablo Pizarro [mailto:juanpablo.pizarro@(protected)]
> Sent: Wednesday, May 28, 2008 12:02 PM
> To: Struts Users Mailing List
> Subject: Re: [Struts 2] Session scope
>
> Hi All.
>
> I've a problem with session scope. The problem is:
>
> 1.- I open a web browser and make a login with user 1.
> 2.- I open a web browser and make a login with user 2.
>
> so, in the web browser 2, my user name is "1". I pressed CTRL+F5 and refresh with the correct name ("2").
>
> I've implemented SessionAware (with get and set) in my CommonAction (all other actions extends from it).
>
> To login a user and check that the user is logged, I use a LoginInterceptor.
>
> I've surfed the web and I didn't find a real solution.
>
> Regards,
>
> JP
>
> 2008/5/28, Milan Milanovic <milanmilanovich@(protected)>:
> > Should my action class implement SessionAware ?
> >
> > Milan Milanovic <milanmilanovich@(protected),
> >
> > thank you.
> >
> > My action package extends="struts-default", does this mean when I call
> > ActionContext.getContext().getSession() that I doesn't have access to session ?
> >
> > It seems to me that every creates a new session for my action class, and at least two methods doesn't have access to the same session. How can I manage to share my variable through multiple jsp pages for one action class using the users session ?
> >
> > --
> > Thx, Milan
> >
> > Martin wrote: Hello Milan-
> >
> > You can accomplish creation of HttpSession via
> > CreateSessionInterceptor
> > http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2
> > /interceptor/CreateSessionInterceptor.html
> >
> > (session parameters are available via a map which is is available via)
> > ActionContext.getContext().getSession()
> >
> > If you would be amenable to using a IOC container I would look at
> > implementing Springs SessionContextAutowiringInterceptor
> > http://www.opensymphony.com/webwork/api/com/opensymphony/webwork/sprin
> > g/interceptor/SessionContextAutowiringInterceptor.html
> >
> > HTH
> > Martin
> >
> > ----- Original Message -----
> > From: "Milan Milanovic"
> > To: "Struts Users Mailing List"
> > Sent: Wednesday, May 28, 2008 11:08 AM
> > Subject: Re: [Struts 2] Session scope
> >
> >
> > > It seems that every request have its own scope ?!
> > >
> > > Milan Milanovic wrote: Hi,
> > >
> > > I have one action class and two pages. When first page is called, in
> > > its execute method I remove my session variable, like this:
> > >
> > > ServletActionContext.getContext().getSession().remove("fruits");
> > >
> > > and then when form from the first jsp page is submitted user enter
> > > details in the second form and there I save those changed to session, too:
> > >
> > > ServletActionContext.getContext().getSession().put("fruits",
> > > fruits);
> > >
> > > Of course, I first check if there is already fruits in session. I do
> > > this because some maybe want to go to first page to change something
> > > and then to go again to the second page to continue entering other
> > > info. But, when I exit both page an execute method is called (with
> > > above session remove method), and my second page is called fruits
> > > from session are read again - they are not removed ?
> > >
> > > --
> > > Thx in advance, Milan Milanovic
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
> ----------------------------------------------------------------------
> CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_186910.ezm (zipped)I thought you had implemented SessionAware
yes..
Martin
----- Original Message -----
From: "Milan Milanovic" <milanmilanovich@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Wednesday, May 28, 2008 12:50 PM
Subject: Re: [Struts 2] Session scope
> Should my action class implement SessionAware ?
>
> Milan Milanovic <milanmilanovich@(protected),
>
> thank you.
>
> My action package extends="struts-default", does this mean when I call
> ActionContext.getContext().getSession() that I doesn't have access to
> session ?
>
> It seems to me that every creates a new session for my action class, and
> at least two methods doesn't have access to the same session. How can I
> manage to share my variable through multiple jsp pages for one action
> class using the users session ?
>
> --
> Thx, Milan
>
> Martin wrote: Hello Milan-
>
> You can accomplish creation of HttpSession via CreateSessionInterceptor
> http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/CreateSessionInterceptor.html
>
> (session parameters are available via a map which is is available via)
> ActionContext.getContext().getSession()
>
> If you would be amenable to using a IOC container I would look at
> implementing Springs SessionContextAutowiringInterceptor
> http://www.opensymphony.com/webwork/api/com/opensymphony/webwork/spring/interceptor/SessionContextAutowiringInterceptor.html
>
> HTH
> Martin
>
> ----- Original Message -----
> From: "Milan Milanovic"
> To: "Struts Users Mailing List"
> Sent: Wednesday, May 28, 2008 11:08 AM
> Subject: Re: [Struts 2] Session scope
>
>
>> It seems that every request have its own scope ?!
>>
>> Milan Milanovic wrote: Hi,
>>
>> I have one action class and two pages. When first page is called, in its
>> execute method I remove my session variable, like this:
>>
>> ServletActionContext.getContext().getSession().remove("fruits");
>>
>> and then when form from the first jsp page is submitted user enter
>> details
>> in the second form and there I save those changed to session, too:
>>
>> ServletActionContext.getContext().getSession().put("fruits", fruits);
>>
>> Of course, I first check if there is already fruits in session. I do this
>> because some maybe want to go to first page to change something and then
>> to go again to the second page to continue entering other info. But, when
>> I exit both page an execute method is called (with above session remove
>> method), and my second page is called fruits from session are read
>> again -
>> they are not removed ?
>>
>> --
>> Thx in advance, Milan Milanovic
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>

Attachment:
user_186912.ezm (zipped)You don't really state explicitly what the problem is.
As was said, different browsers handle session creation differently: a
new window does *not* necessarily mean you get a new session.
Dave
--- Juan Pablo Pizarro <juanpablo.pizarro@(protected):
> Hi All.
>
> I've a problem with session scope. The problem is:
>
> 1.- I open a web browser and make a login with user 1.
> 2.- I open a web browser and make a login with user 2.
>
> so, in the web browser 2, my user name is "1". I pressed CTRL+F5 and
> refresh with the correct name ("2").
>
> I've implemented SessionAware (with get and set) in my CommonAction
> (all other actions extends from it).
>
> To login a user and check that the user is logged, I use a
> LoginInterceptor.
>
> I've surfed the web and I didn't find a real solution.
>
> Regards,
>
> JP
>
> 2008/5/28, Milan Milanovic <milanmilanovich@(protected)>:
> > Should my action class implement SessionAware ?
> >
> > Milan Milanovic <milanmilanovich@(protected),
> >
> > thank you.
> >
> > My action package extends="struts-default", does this mean when I
> call
> > ActionContext.getContext().getSession() that I doesn't have access
> to session ?
> >
> > It seems to me that every creates a new session for my action
> class, and at least two methods doesn't have access to the same
> session. How can I manage to share my variable through multiple jsp
> pages for one action class using the users session ?
> >
> > --
> > Thx, Milan
> >
> > Martin wrote: Hello Milan-
> >
> > You can accomplish creation of HttpSession via
> CreateSessionInterceptor
> >
>
http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/CreateSessionInterceptor.html
> >
> > (session parameters are available via a map which is is available
> via)
> > ActionContext.getContext().getSession()
> >
> > If you would be amenable to using a IOC container I would look at
> > implementing Springs SessionContextAutowiringInterceptor
> >
>
http://www.opensymphony.com/webwork/api/com/opensymphony/webwork/spring/interceptor/SessionContextAutowiringInterceptor.html
> >
> > HTH
> > Martin
> >
> > ----- Original Message -----
> > From: "Milan Milanovic"
> > To: "Struts Users Mailing List"
> > Sent: Wednesday, May 28, 2008 11:08 AM
> > Subject: Re: [Struts 2] Session scope
> >
> >
> > > It seems that every request have its own scope ?!
> > >
> > > Milan Milanovic wrote: Hi,
> > >
> > > I have one action class and two pages. When first page is called,
> in its
> > > execute method I remove my session variable, like this:
> > >
> > > ServletActionContext.getContext().getSession().remove("fruits");
> > >
> > > and then when form from the first jsp page is submitted user
> enter details
> > > in the second form and there I save those changed to session,
> too:
> > >
> > > ServletActionContext.getContext().getSession().put("fruits",
> fruits);
> > >
> > > Of course, I first check if there is already fruits in session. I
> do this
> > > because some maybe want to go to first page to change something
> and then
> > > to go again to the second page to continue entering other info.
> But, when
> > > I exit both page an execute method is called (with above session
> remove
> > > method), and my second page is called fruits from session are
> read again -
> > > they are not removed ?
> > >
> > > --
> > > Thx in advance, Milan Milanovic
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_186913.ezm (zipped)There is only one session per conversation. If you're using the same
session (i.e., same browser window/tab, etc.) then there shouldn't be
any issues.
I'd focus first on your implementation logic. You can also check the
session ID to make sure they're the same session--if they're not,
something's wrong.
Dave
--- Milan Milanovic <milanmilanovich@(protected):
> Should my action class implement SessionAware ?
>
> Milan Milanovic <milanmilanovich@(protected),
>
> thank you.
>
> My action package extends="struts-default", does this mean when I
> call
> ActionContext.getContext().getSession() that I doesn't have access to
> session ?
>
> It seems to me that every creates a new session for my action class,
> and at least two methods doesn't have access to the same session. How
> can I manage to share my variable through multiple jsp pages for one
> action class using the users session ?
>
> --
> Thx, Milan
>
> Martin wrote: Hello Milan-
>
> You can accomplish creation of HttpSession via
> CreateSessionInterceptor
>
http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/CreateSessionInterceptor.html
>
> (session parameters are available via a map which is is available
> via)
> ActionContext.getContext().getSession()
>
> If you would be amenable to using a IOC container I would look at
> implementing Springs SessionContextAutowiringInterceptor
>
http://www.opensymphony.com/webwork/api/com/opensymphony/webwork/spring/interceptor/SessionContextAutowiringInterceptor.html
>
> HTH
> Martin
>
> ----- Original Message -----
> From: "Milan Milanovic"
> To: "Struts Users Mailing List"
> Sent: Wednesday, May 28, 2008 11:08 AM
> Subject: Re: [Struts 2] Session scope
>
>
> > It seems that every request have its own scope ?!
> >
> > Milan Milanovic wrote: Hi,
> >
> > I have one action class and two pages. When first page is called,
> in its
> > execute method I remove my session variable, like this:
> >
> > ServletActionContext.getContext().getSession().remove("fruits");
> >
> > and then when form from the first jsp page is submitted user enter
> details
> > in the second form and there I save those changed to session, too:
> >
> > ServletActionContext.getContext().getSession().put("fruits",
> fruits);
> >
> > Of course, I first check if there is already fruits in session. I
> do this
> > because some maybe want to go to first page to change something and
> then
> > to go again to the second page to continue entering other info.
> But, when
> > I exit both page an execute method is called (with above session
> remove
> > method), and my second page is called fruits from session are read
> again -
> > they are not removed ?
> >
> > --
> > Thx in advance, Milan Milanovic
> >
> >
> >
> >
> >
> >
>
>
>
>
>
>

Attachment:
user_186914.ezm (zipped)But I opened in diferents pc.
2008/5/28, Dave Newton <newton.dave@(protected)>:
> You don't really state explicitly what the problem is.
>
> As was said, different browsers handle session creation differently: a
> new window does *not* necessarily mean you get a new session.
>
> Dave
>
> --- Juan Pablo Pizarro <juanpablo.pizarro@(protected):
>
> > Hi All.
> >
> > I've a problem with session scope. The problem is:
> >
> > 1.- I open a web browser and make a login with user 1.
> > 2.- I open a web browser and make a login with user 2.
> >
> > so, in the web browser 2, my user name is "1". I pressed CTRL+F5 and
> > refresh with the correct name ("2").
> >
> > I've implemented SessionAware (with get and set) in my CommonAction
> > (all other actions extends from it).
> >
> > To login a user and check that the user is logged, I use a
> > LoginInterceptor.
> >
> > I've surfed the web and I didn't find a real solution.
> >
> > Regards,
> >
> > JP
> >
> > 2008/5/28, Milan Milanovic <milanmilanovich@(protected)>:
> > > Should my action class implement SessionAware ?
> > >
> > > Milan Milanovic <milanmilanovich@(protected),
> > >
> > > thank you.
> > >
> > > My action package extends="struts-default", does this mean when I
> > call
> > > ActionContext.getContext().getSession() that I doesn't have access
> > to session ?
> > >
> > > It seems to me that every creates a new session for my action
> > class, and at least two methods doesn't have access to the same
> > session. How can I manage to share my variable through multiple jsp
> > pages for one action class using the users session ?
> > >
> > > --
> > > Thx, Milan
> > >
> > > Martin wrote: Hello Milan-
> > >
> > > You can accomplish creation of HttpSession via
> > CreateSessionInterceptor
> > >
> >
> http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/CreateSessionInterceptor.html
> > >
> > > (session parameters are available via a map which is is available
> > via)
> > > ActionContext.getContext().getSession()
> > >
> > > If you would be amenable to using a IOC container I would look at
> > > implementing Springs SessionContextAutowiringInterceptor
> > >
> >
> http://www.opensymphony.com/webwork/api/com/opensymphony/webwork/spring/interceptor/SessionContextAutowiringInterceptor.html
> > >
> > > HTH
> > > Martin
> > >
> > > ----- Original Message -----
> > > From: "Milan Milanovic"
> > > To: "Struts Users Mailing List"
> > > Sent: Wednesday, May 28, 2008 11:08 AM
> > > Subject: Re: [Struts 2] Session scope
> > >
> > >
> > > > It seems that every request have its own scope ?!
> > > >
> > > > Milan Milanovic wrote: Hi,
> > > >
> > > > I have one action class and two pages. When first page is called,
> > in its
> > > > execute method I remove my session variable, like this:
> > > >
> > > > ServletActionContext.getContext().getSession().remove("fruits");
> > > >
> > > > and then when form from the first jsp page is submitted user
> > enter details
> > > > in the second form and there I save those changed to session,
> > too:
> > > >
> > > > ServletActionContext.getContext().getSession().put("fruits",
> > fruits);
> > > >
> > > > Of course, I first check if there is already fruits in session. I
> > do this
> > > > because some maybe want to go to first page to change something
> > and then
> > > > to go again to the second page to continue entering other info.
> > But, when
> > > > I exit both page an execute method is called (with above session
> > remove
> > > > method), and my second page is called fruits from session are
> > read again -
> > > > they are not removed ?
> > > >
> > > > --
> > > > Thx in advance, Milan Milanovic
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_186897.ezm (zipped)
Hi Sagarlotiya,
Thanks a lot for the quick reply.
I am new bee to struts 2 world and do not know much about
'paramPrepareParamStack'. I googled for 'paramPrepareParamStack', but no
luck on (google returned just 4 results, all of them are the replies from
you :-)) what exactly is meant by this term. Can you please explain what it
is and how it works and may be a sample code that can resolve my issues.
Thanks
Rakesh
sagarlotiya wrote:
>
> hi,
> Your jsp code looks ok...
> But when will u submit form and try to set the parameter using getter and
> setter, be sure that u are using paramPrepareParamStack other wise it
> will not set any value on getter and setter.
>
>
> mailtorakeshp wrote:
>>
>> Hi,
>> I just started using the optiontransferselect tag and am bugged up with
>> the following problem.
>>
>> The selected values for the double list (on the right side) are null in
>> the action class.
>>
>> JSP code:
>>
>> <s:optiontransferselect
>> label="Log Filter for Top Level Campaign"
>> name="topCampLog"
>> leftTitle="Elements of Log"
>> rightTitle="Filtered Elements of Log"
>> list="defaultTopCampLog"
>> headerKey="headerKey"
>> headerValue="--- Please Select ---"
>> doubleName="topCampFilter"
>> doubleList="defaultTopCampFilter"
>> doubleHeaderKey="doubleHeaderKey"
>> doubleHeaderValue="--- Please Select ---" />
>>
>> Action Class code:
>>
>> private List topCampLog;
>> private List topCampFilter;
>> private List defaultTopCampLog;
>> private List defaultTopCampFilter;
>>
>> public List getTopCampLog() {
>> return topCampLog;
>> }
>> public void setTopCampLog(List topCampLog) {
>> this.topCampLog = topCampLog;
>> }
>> public List getTopCampFilter() {
>> return topCampFilter;
>> }
>> public void setTopCampFilter(List topCampFilter) {
>> this.topCampFilter = topCampFilter;
>> }
>> public List getDefaultTopCampLog() {
>> return defaultTopCampLog;
>> }
>> public void setDefaultTopCampLog(List defaultTopCampLog) {
>> this.defaultTopCampLog = defaultTopCampLog;
>> }
>> public List getDefaultTopCampFilter() {
>> return defaultTopCampFilter;
>> }
>> public void setDefaultTopCampFilter(List defaultTopCampFilter) {
>> this.defaultTopCampFilter = defaultTopCampFilter;
>> }
>>
>> public String execute() {
>> ......
>> do something with the selected values on the right.
>> .......
>> return SUCCESS;
>> }
>>
>> list is populated from the database without any issues and doubleList is
>> empty (Just the please select header is present). When I transfer few
>> values from left to right and submit the page, I cannot find any values
>> for the selected list, in the action class. ie. getTopCampFilter() and
>> topCampFilter are null.
>>
>> Am I missing something here? Why can't I see the selected list in the
>> action class? Why is it null?
>> Any kind of help would be greatly appreciated.
>>
>> Thanks
>> Rakesh
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_186901.ezm (zipped)
Hi all,
I’ve been looking for a solution to ths question for a while, and as a joker
I come here… :-)
So, with the displaytag library, no problem to display things, but I can’t
manage to get a value from it.
Here’s an example (my code):
<display:table name="UserList"
id="UserTable">
<display:column title="User Last name" property="lastName">
</display:column>
<display:column title="User First name" property="firstName">
</display:column>
<display:column title="User’s Age" property="age">
</display:column>
<display:column title="Age Update">
<s:form>
<sx:autocompleter
href="%{#getAgeList}"
name="selectedAge"
valueNotifyTopics="/ageChanged"/>
</s:form>
</display:column>
</display:table>
This displays a table that shows a list of users: last name, first name,
age, with the possibility of changing the age.
The list “UserList” is given by an action, this works fine.
For the ages, the list is made as a JSONList, this works fine as well.
Now my problem:
When a user wants to modify the age using the autocompleter, how can I get
the value for the Last Name? And especially, how to send this value to the
action?
When I add debug messages in my action, I can see that the variable that
must store the age contains in fact a list of ages, all of them empty,
except the one that has been modified. (, , , 24, , , , , , ,…). But the
value for the LastName, etc, are always null…
I’m sure it is not complicated, but I tried everything I thought about and
now I really have no idea of what to do more.
I hope my question is clear, and of course that someone knows the answer ;-)
Regards,
sassien
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_186902.ezm (zipped)Hi,
I suppose you didn't write the call for displaytag correctly
I give you an example (if you will still not find the problem plese send an
excerpt from your displaytag code)
<display:table name="requestScope.list"
class="dateTable" export="true" cellspacing="1"
requestURI="/xxxx.do" id="row">
<display:column titleKey="label.crt"
class="dateCell" headerClass="dateHeader headerWidth_crt">
<c:out value="${row_rowNum}"/>
</display:column>
<display:column titleKey="label.nume"
class="dateCell" headerClass="dateHeader headerWidth_100"
sortable="true"
property="name"
decorator="titleDecorator"/>
</display:table>
Good luck!
_______________________________
-----Original Message-----
From: Varun Deep [mailto:vdeep@(protected)]
Sent: Wednesday, May 28, 2008 2:04 PM
To: user@(protected)
Subject: display tag problem
Request to all
I am using display tag for pagination for that I defined following in my
jsp page.
<%@(protected)"%>
<%@(protected)" %>
<%@(protected)" %>
<%@(protected)" %>
for the same I defined in the web.xml.
the problem I facing is whenever I display the table it give me
following exception.
INFO: Was not able to load a custom displaytag.properties; Can't find
bundle for base name displaytag, locale en_US
May 28, 2008 3:26:54 AM
org.displaytag.exception.BaseNestableJspTagException <init>
WARNING: Exception: [.LookupUtil] Error looking up property "name" in
object type "
java.lang.String"
Cause: Unknown property 'name'
java.lang.NoSuchMethodException: Unknown property 'name'
I defined the bean class in which name is defined of type String.
Please help me
Thanks in advance.

Attachment:
user_186911.ezm (zipped)I am having trouble determining how I can control the size of the
Datetimepicker elements.
The picker control is currently very small and difficult to read and
use. I have not been able to determine how to control its size. I saw a
few other similar questions in the list. Hwoever, none of them were
answered.
I would also like to make the text box where the selected value is
displayed a smaller font.
Any help would be greatly appreciated.
Thanks,
Ken