Re: Problem with jsp and session on first call

2010-01-14 Thread Cimballi
Thanks, I didn't found this post before sending mine. It seems there is an inconsistant state when you use both way to access the session, but only on the first call. I tried to have a look to the root reason, but I miss Struts-Xwork deep knowledge to really understand what's happen. Don't you thi

Re: Problem with jsp and session on first call

2010-01-14 Thread Gabriel Belingueres
1. Not normal, but may be it is so because you are not using one of the recommended ways of accessing the session object. IIRC, the "#session" object is an object inside the ValueStack, not the *real* HttpSession. If you talk directly with the real session object, those sort of things may happen.

Re: Struts 2 Tags / Freemarker performance

2010-01-14 Thread Musachy Barroso
I would expect that, FreeMarker templates(+ struts code) will always be slower than java code. If you are using the simple tags, give a try to the Java Tags: http://cwiki.apache.org/S2PLUGINS/java-templates-plugin.html musachy On Thu, Jan 14, 2010 at 4:48 PM, Mark Greene wrote: > I've been eval

Struts 2 Tags / Freemarker performance

2010-01-14 Thread Mark Greene
I've been evaluating struts 2.1.8.1 and have found some troubling performance bottlenecks relating to the struts tag and freemarker. I have a JSP that has 7 struts2 tags in it. (A simple signup form) I noticed in my load testing that the throughput of this page was 4-5 times slower under load (100

Struts2 s:head tag generates wrong paths?

2010-01-14 Thread Stephan R. Mueller
Hi list. Using 2.1.8 with JSP on JBoss 5.1.0. generates the links for style.css and utils.js which is not valid, i.e. the files are not found at the specified position (after reviewing the generated HTML). A quick look shows that styles.css is located under "/template/xhtml/styles.css" and no

Re: Problem with jsp and session on first call

2010-01-14 Thread Cimballi
Hey Grabiel, Thanks for the link, now it works, but I two questions : 1. About my problem, in the configuration, I am using CreateSessionInterceptor to create a session. And in the logs, I can see that the first time the JSP is looking for the variable, the session exisits but is empty (while I se

Re: Problem with jsp and session on first call

2010-01-14 Thread Gabriel Belingueres
This way of obtaining a Session I think is not a good idiom. May be there are things that happens behind the scene when obtaining a session, that's probably why you are not getting a NPE the first time you call getSession(false) in your code...because "something" already created it. S2 have a Map

Problem with jsp and session on first call

2010-01-14 Thread Cimballi
Hi, I have a problem with a JSP and the session the first time I call the action which redirects to the page. The action sets a variable in the session using the code : final HttpSession session = ServletActionContext.getRequest().getSession(false); session.setAttribute(name, value); Then, the

Problem with jsp and session on first call

2010-01-14 Thread Cimballi
Hi, I have a problem with a JSP and the session the first time I call the action which redirects to the page. The action sets a variable in the session using the code : final HttpSession session = ServletActionContext.getRequest().getSession(false); session.setAttribute(name, value); Then, th

Re: REST Plugin only for some actions

2010-01-14 Thread Dale Newfield
Lotsopa wrote: Is there anything new about NamespaceBasedActionMapper :) I mean, does this thing work? Someone convinced me a better name was "PrefixBasedActionMapper", but yes, it works fine. The code can be found as an attachment to this JIRA issue: https://issues.apache.org/struts/browse

Re: write a test which tests an interceptor

2010-01-14 Thread Greg Lindholm
I'm biased, but I think this one works pretty well, and I use it to test interceptors. > > http://glindholm.wordpress.com/2008/06/30/unit-testing-struts-2-actions > looks promising. > - To unsubscribe, e-mail: user-unsubscr...@st

Re: REST Plugin only for some actions

2010-01-14 Thread Lotsopa
Is there anything new about NamespaceBasedActionMapper :) I mean, does this thing work? DNewfield wrote: > > > I built something I call NamespaceBasedActionMapper that allows you to > specify different action mappers for different namespaces. If this is > what you're looking for, let me kno