Hi,
I think the best solution is to implement SessionAware interface and
setSession() method, then you will either add or remove values from
map. Like below:
public class IndexAction implements Action, SessionAware {
private Map session;
public void setSession(Map session) {
thi
/* you were really close*/
Map session = (Map) ActionContext.getContext().get("session");
session.put("new_key",new_value);
http://struts.apache.org/2.x/docs/accessing-application-session-request-objects.html
HTH
Martin
- Original Message -
From: "Gamble, Wesley (WG10)" <[EMAIL PROTECTED
Hmm... it doesn't seem to be working. That's why I was asking. I'll
keep at it.
Thanks,
Wes
-Original Message-
From: Felipe Lorenz [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2008 6:15 PM
To: Struts Users Mailing List
Subject: Re: Modifying session attributes in Struts 2
you righ
you right... just do what you did say!
On Mon, Jun 9, 2008 at 7:52 PM, Gamble, Wesley (WG10) <[EMAIL PROTECTED]> wrote:
> Huh?
>
> -Original Message-
> From: Felipe Lorenz [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 09, 2008 5:37 PM
> To: Struts Users Mailing List
> Subject: Re: Modify
Huh?
-Original Message-
From: Felipe Lorenz [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2008 5:37 PM
To: Struts Users Mailing List
Subject: Re: Modifying session attributes in Struts 2
nothing diferent.. just it.
On Mon, Jun 9, 2008 at 7:34 PM, Gamble, Wesley (WG10) <[EMAIL PROTECT
nothing diferent.. just it.
On Mon, Jun 9, 2008 at 7:34 PM, Gamble, Wesley (WG10) <[EMAIL PROTECTED]> wrote:
> All,
>
> If I have a Struts action, and I acquire the session map via:
>
> Map session = ActionContext.getContext().getSession();
>
> can I simply use
>
> session.put("new_ke
All,
If I have a Struts action, and I acquire the session map via:
Map session = ActionContext.getContext().getSession();
can I simply use
session.put("new_key", new_value);
to modify session attributes or do I need to do something different?
Thanks,
Wes
--
I read further in the _Struts 2 in Action_ book and it indicates that
there is a session parameter that is set with the current locale.
So it appears that the request_locale parameter must be set specifically
to switch between locales.
Wes
-Original Message-
From: Lukasz Lenart [mailto:[
Hi
You can set constant
struts.locale=en_US
in struts.properties or struts.xml or web.xml
http://struts.apache.org/2.x/docs/strutsproperties.html
Regards
--
Lukasz
http://www.lenart.org.pl/
Well, after 20 minutes of looking around (web documentation and my reference
book), I sent the email to user group. I guess it would have been much faster,
If I had tried it first :). I tried the JSTL like expression ("and"/"or") and
it worked.
regards,
- Original Message
From: Dave Ne
Lukasz Lenart wrote:
Hi,
2008/6/9 Raghuveer <[EMAIL PROTECTED]>:
Is it possible in struts to configure the controller to read the
application
resource file which is saved as UTF8 format?
You can use filter from Spring
That wouldn't help, since it has nothing to do with resource file loadi
Just out of curiosity, did you try either?
I'd also check out the OGNL site as noted in the docs.
Dave
--- On Mon, 6/9/08, Struts Two <[EMAIL PROTECTED]> wrote:
> From: Struts Two <[EMAIL PROTECTED]>
> Subject: Boolean expressions in struts 2 conditional tags
> To: "Struts Users Mailing List"
>
I was wondering if we want to combine multiple boolean expresion inside the
"test=%{}", we should use JSTL "and" /"or" or java "&&" or "//". Unfortunately
I was not able to find this in s:if tag reference. I also looked for it in the
"Struts 2 Design and programming" as well as "Struts 2 in Acti
Oh; that might be S2.1--sorry!
Dave
--- On Mon, 6/9/08, Richard Sayre <[EMAIL PROTECTED]> wrote:
> From: Richard Sayre <[EMAIL PROTECTED]>
> Subject: Re: Struts 2 Performance
> To: "Struts Users Mailing List" , [EMAIL PROTECTED]
> Date: Monday, June 9, 2008, 12:09 PM
> After some searching I fo
Hi,
2008/6/9 Stanley, Eric <[EMAIL PROTECTED]>:
> Dave,
>Thanks. So if I understand you, I can set all my url's that
> don't use params to excludeParams, but leave the ones that use params
> alone? Also, where do I set the constant? Im sure its just me, but this
> doesn't seem like a wise
Dave,
Thanks. So if I understand you, I can set all my url's that
don't use params to excludeParams, but leave the ones that use params
alone? Also, where do I set the constant? Im sure its just me, but this
doesn't seem like a wise usage of params in S2. Why would it be
beneficial to appen
After some searching I found:
http://lazutkin.com/blog/2007/feb/1/improving-performance/
Under ' Optimizing widget initialization' there is an explantion on
what to set (parseWidgets) and how to create them in code.
I realized I am using version 2.0.8 and me IDE says that parseContent
is not a v
Thanks for you quick answer.
I have replace *.action by /* ans it's run :)
The good way it's that during my search i learned lot of interessting thing
about struts 2.
Cédric
2008/6/9 Dave Newton <[EMAIL PROTECTED]>:
> Why is your filter mapping different than the one the docs recommend?
>
> If
Why is your filter mapping different than the one the docs recommend?
If you map S2 to "*.action" there's no reason S2 would know to serve up its
copy of Dojo--that's why the docs say to map S2 to "*", so it can pick up when
it needs to serve static content.
If you're going to use a mapping lik
Doesn't have a parseContent attribute?
Either way, you may just be able to replicate the generated code
with your own.
Dave
--- On Mon, 6/9/08, Richard Sayre <[EMAIL PROTECTED]> wrote:
> From: Richard Sayre <[EMAIL PROTECTED]>
> Subject: Re: Struts 2 Performance
> To: "Struts Users Mailing L
Hi,
2008/6/9 Raghuveer <[EMAIL PROTECTED]>:
> Is it possible in struts to configure the controller to read the
> application
> resource file which is saved as UTF8 format?
>
You can use filter from Spring
encodingFilter
org.springframework.web.filter.CharacterEncodingFilter
Thank you for the dojo info. I did a custom build for dojo using
http://cwiki.apache.org/confluence/display/S2WIKI/Creating+a+custom+Dojo+profile+for+Struts+2.0.x
and it reduced alot of requests
I would like to turn off the page scan that dojo does and add the
bootstrap code for the widgits my se
Hi,
I'm using Struts 2.0.9 and I would like to use optiontransferselect tag.
Nevertheless this tag seemed to required dojo struts integrate libraries.
I'm add the tag on the header on my jsp but dojo is not found
(Error message : dojo is required)
I'm also test with the tag with the same result
Hi Mukul,
This is possible in datagrid. you have to create two tables, one with
headers and other containing data. In second table you need to hide the
header part.
I'll send you sample code tomorrow EOD.
On Mon, Jun 9, 2008 at 4:03 PM, mukul.object <[EMAIL PROTECTED]> wrote:
>
> Hello All,
> I
Dave,
Thanks for the reply, and that is what I am talking about. I do
append params to the action pointed to by a link. Its just that after I
have clicked that link with params, every subsequent request has that
same exact parameter appended. I need to stop this from happening. That
paramet
Is it possible in struts to configure the controller to read the application
resource file which is saved as UTF8 format?
It is possible to save the notepad file in UTF8 instead of ANSII.
I am able to save a similar file and read by input stream reader in UTF8 and
show the Polish characters in
hi,
I used Ajax in my .jsp page for getting "plainText" data from action.
In my struts.xml, I config my action like this:
My webApp works well when deployed in tomcat. But in "Eclipse->Run As->Run
On Server" model, I get some Exception like behind:
SEVERE: Servlet.se
Sorry I was away. I will surely try this.
On 6/5/08, Martin <[EMAIL PROTECTED]> wrote:
>
> Arun-
>
> did you disable the optimistic_lock code..?
> // OPTIMISTIC LOCK MODE (dont use this as this causes OptimisticLockMode
> Exceptions)
> // Attribute olNode = node.attribute( "optimistic-lock" );
>
I dont know... maybe if you have 2 DIV, the first for header and de second
for data, where hava a scroll.. But how do it, i dont know... but i saw
it...
On Mon, Jun 9, 2008 at 7:33 AM, mukul.object <[EMAIL PROTECTED]> wrote:
>
> Hello All,
> I am seeking for suggestions on how can we fix the head
Hello All,
I am seeking for suggestions on how can we fix the header/column-names in
Struts-Datagrid.
In my jsp , I have implemented struts-datagrid and showing many rows at a
time.
While scrolling the page , the column-names/header of the datagrid also
scroll up and down and do not remain vis
Hello,
please see the Tag Documentation of [1] for this, and take a
look at the attribute "includeParams". By default the url tag includes
all request parameters in the query string of the current page when
generating a new URL, thus all your parameters are transported
implicitly onto the next pa
Hi,
I need to generate a dynamic menu (read from database) for a struts 2
application.
I used struts-menu for a struts 1.x application, and am wondering if it
makes more
sense to switch to using struts2's tag. Your input is greatly
appreciated.
Lucie
--
View this message in context:
http:
32 matches
Mail list logo