Re: Struts 2 session problem

2009-01-16 Thread Wes Wannemacher
On Saturday 17 January 2009 00:23:49 RajibJana wrote: > > 1) A User opens a browser window( IE 7/Firfox) and logs in the application > as User X and the application shows the logged in userid as X and DB > transactions also get userid info as X. > 2) The same user opens a bowser tab or new window f

Struts 2 session problem

2009-01-16 Thread RajibJana
Hi All, I am using struts 2.0.14 to build an enterprise application. It uses spring, hibernate, tiles, Dojo 1.2.2. Now I have a serious problem. My application has lots a pages and each page shows the logged in userid ( a string variable). This userid is put into the session map injected by the

RE: application entry point

2009-01-16 Thread Wes Wannemacher
In some containers, setting welcome-file to a Struts 2 action will not work. Tomcat (for instance) checks the file system for a resource that matches the request before passing it off to the filter. This sort of makes it a pain... There are two ways to deal with it (this goes for both the main ent

Re: paramsPrepareParamsStack

2009-01-16 Thread Wes Wannemacher
On Fri, 2009-01-16 at 13:49 -0700, Stanley, Eric wrote: > All, > My humble app need to make use of the paramsPrepareParamsStack, but > is having trouble finding the right class it seems. Here is the error: > > SEVERE: Exception starting filter struts2 > > Unable to find interceptor class ref

Re: Stuts2 field validation problems

2009-01-16 Thread stanlick
Beware that if you remove the conversionError from your stack, whatever value was typed (that could not be converted) will *not* be represented when the screen is redisplayed. Dave's right about the message, but I have overridden the default message with the one below and it is a little more mean

RE: application entry point

2009-01-16 Thread Stanley, Eric
So if you use the default-action-ref, what do you put in the web.xml? Can you leave it empty? -Ryan -Original Message- From: Adam Lister [mailto:alis...@mit.edu] Sent: Friday, January 16, 2009 1:59 PM To: Struts Users Mailing List Subject: Re: application entry point You can use defaul

Re: application entry point

2009-01-16 Thread Adam Lister
You can use default action mappings and wildcard mappings to go to a specific action by default. Easiest way seems to be something like: In your struts.xml. It's detailed here: http://struts.apache.org/2.0.14/docs/action-configuration.html#ActionConfiguration-ActionDefault Andy wrote:

application entry point

2009-01-16 Thread Andy
What is the recommended design for adding an entry point into a Struts2 application instead of using in web.xml? _ Windows Liveā„¢ HotmailĀ®: Chat. Store. Share. Do more with mail. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL

paramsPrepareParamsStack

2009-01-16 Thread Stanley, Eric
All, My humble app need to make use of the paramsPrepareParamsStack, but is having trouble finding the right class it seems. Here is the error: SEVERE: Exception starting filter struts2 Unable to find interceptor class referenced by ref-name paramsPrepareParamsStack - interceptor-ref - file:

Re: Strange compilation problem with 2.1.6...

2009-01-16 Thread Dale Newfield
Dasgupta, Ranjan wrote: getText(java.lang.String,java.util.List) in older xwork changed to getText(java.lang.String,java.util.List) in xwork-2.1.2 That was it (almost: it appears to be List, which is different than List). I don't use maven, and I was careful to make sure I only had one xwo

Re: S2.1 - struts tags vs jstl expression language

2009-01-16 Thread Norris Shelton
That works. Thanks. From: Dave Newton To: Struts Users Mailing List Sent: Friday, January 16, 2009 3:09:31 PM Subject: Re: S2.1 - struts tags vs jstl expression language Norris Shelton wrote: > I assumed that I had to use the struts tags. I noticed that my

RE: Strange compilation problem with 2.1.6...

2009-01-16 Thread Dasgupta, Ranjan
getText(java.lang.String,java.util.List) in older xwork changed to getText(java.lang.String,java.util.List) in xwork-2.1.2 -Original Message- From: Musachy Barroso [mailto:musa...@gmail.com] Sent: Friday, January 16, 2009 2:26 PM To: Struts Users Mailing List Subject: Re: Strange compilat

Re: S2.1 - struts tags vs jstl expression language

2009-01-16 Thread Dave Newton
Norris Shelton wrote: I assumed that I had to use the struts tags. I noticed that my > older ${} worked for my objects. Is there a compelling reason > to use the longer struts tags instead of JSTL EL? Typing practice for the angle brackets? The S2 request wrapper will map the EL requests to

Re: Incorrect Bean Injected

2009-01-16 Thread Musachy Barroso
Not any time soon. You can either build from trunk, or create your own factory that extends StrutsSpringObjectFactory, and overwrite the methods(2) with the fix (quick and dirty solution). musachy On Fri, Jan 16, 2009 at 2:50 PM, Timothy Orme wrote: > Excellent, thank you! Just out of curiosity,

S2.1 - struts tags vs jstl expression language

2009-01-16 Thread Norris Shelton
I assumed that I had to use the struts tags. I noticed that my older ${} worked for my objects. Is there a compelling reason to use the longer struts tags instead of JSTL EL? Norris Shelton Software Engineer Sun Certified Java 1.1 Programmer Shelton Consulting, LLC ICQ# 26487421 AIM NorrisES

Re: Incorrect Bean Injected

2009-01-16 Thread Timothy Orme
Excellent, thank you! Just out of curiosity, what would the release timeline be on this? Thanks, Tim Musachy Barroso wrote: I looked at the code and it cannot be set to none. I fixed it in struts and xwork trunks, so in the future you will be able to set "struts.objectFactory.spring.autoWire"

Re: Incorrect Bean Injected

2009-01-16 Thread Musachy Barroso
I looked at the code and it cannot be set to none. I fixed it in struts and xwork trunks, so in the future you will be able to set "struts.objectFactory.spring.autoWire" to "no". The spring value is AutowireCapableBeanFactory.AUTOWIRE_NO, so I followed the pattern and used "no" instead of "none".

Re: Strange compilation problem with 2.1.6...

2009-01-16 Thread Musachy Barroso
You probably have 2 versions of xwork in the dependencies(are you using maven?). musachy On Fri, Jan 16, 2009 at 2:21 PM, Dale Newfield wrote: > Can anybody suggest why I can't seem to compile against the new struts/xwork > release? > > An action class that extends a baseclass that extends > com

Re: Incorrect Bean Injected

2009-01-16 Thread Timothy Orme
I'm not sure exactly how this pertains to the matter at hand. Are you suggesting that I make my action beans set to prototype? If so, I had tried this as well to no avail. As I'm using the Struts Spring plugin for my object factory I'm assuming that it's going to try and autowire every instance th

default attribute OGNL issue

2009-01-16 Thread abhijit . sulhyan
I am encountering a strange issue with tag. e.g: Assume the property set in the resource bundle as name.input=Input Name Now, when I use and assuming name is null, I am expecting the result from the bundle - 'Input Name', some how the OGNL is not being forced even after usage of '%{}' . Has a

Re: Incorrect Bean Injected

2009-01-16 Thread Timothy Orme
This is what I had done in my example I originally specified. As I stated, it seems that on startup my XML is used but then when I hit the action, struts builds a new instance and ignores my XML specs. -Tim dusty wrote: You can "de-autowire" an action by creating an XML configuration for it.

Re: Incorrect Bean Injected

2009-01-16 Thread Dave Newton
Martin Gainty wrote: http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes scope="prototype" would specify a single Bean would cover n number instances Not sure that matters for auto-wiring. Dave ---

Strange compilation problem with 2.1.6...

2009-01-16 Thread Dale Newfield
Can anybody suggest why I can't seem to compile against the new struts/xwork release? An action class that extends a baseclass that extends com.opensymphony.xwork2.ActionSupport: cannot find symbol method getText(java.lang.String,java.util.List) I can confirm that there is a matching method i

RE: Incorrect Bean Injected

2009-01-16 Thread Martin Gainty
Tim- http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes scope="prototype" would specify a single Bean would cover n number instances HTH Martin Gainty __ Disclaimer and confidentiality note Everything in th

Fwd: Stream Result

2009-01-16 Thread Miguel
Hello, I have a little problema using a Stream Result. I don't understand how to write to an InputStream, I've seen the solution using the StringBufferInputStream but that is deprecated and if the content is big, it may be a memory problem. So I have 2 questions: how to use the stream result withou

Re: REST plugin question

2009-01-16 Thread Musachy Barroso
I tried to document that feature here: http://cwiki.apache.org/confluence/display/WW/Wildcard+Mappings If you are not using struts built from trunk, then you need to define: it is already defined in struts-default.xml in trunk. musachy On Fri, Jan 16, 2009 at 12:57 PM, dusty wrote: > > Chec

Re: REST plugin question

2009-01-16 Thread dusty
Check out this discussion: http://www.nabble.com/REST-plugin-URL-syntax-td17855192i20.html and this link: http://www.blueskyminds.com.au/url-hierarchy/ dusty wrote: > > The short answer is no. You can create a custom ActionMapper to tell > Struts how you want URLs parsed and how you want

Re: Incorrect Bean Injected

2009-01-16 Thread Timothy Orme
Yeah, I tried both "none" as well as "no" and neither had any effect. Relph,Brian wrote: Did you try setting the value="none"? Brian Relph -Original Message- From: Timothy Orme [mailto:to...@genome.med.harvard.edu] Sent: Friday, January 16, 2009 10:41 AM To: Struts Users Mailing Li

Re: REST plugin question

2009-01-16 Thread dusty
The short answer is no. You can create a custom ActionMapper to tell Struts how you want URLs parsed and how you want Actions invoked. There has been a lot of discussion about extended properties and custom ActionMappers in previous discussions. See if you can find enough information there t

RE: Incorrect Bean Injected

2009-01-16 Thread dusty
You can "de-autowire" an action by creating an XML configuration for it. Then you can use the spring name instead of the class in the action config struts.xml ... ... That way you get the benefit of autowiring for your simple stuff and you can use XML config for your more exoti

Re: How to determine the Type of a Bean Property from String based OGNL Expression

2009-01-16 Thread dusty
If you have the action can you use Reflection to step through the properties and find the types that way? Torsten Krah wrote: > > I want to customize the conversion error messages to be more special in > cases > of wrong types. > Using a custom interceptor this is possible to do but lets say t

RE: Incorrect Bean Injected

2009-01-16 Thread Relph,Brian
Did you try setting the value="none"? Brian Relph -Original Message- From: Timothy Orme [mailto:to...@genome.med.harvard.edu] Sent: Friday, January 16, 2009 10:41 AM To: Struts Users Mailing List Subject: Re: Incorrect Bean Injected So scratch that, I figured out that Struts is set t

Re: Incorrect Bean Injected

2009-01-16 Thread Timothy Orme
Here is the link to the feature request. https://issues.apache.org/struts/browse/WW-2765 Timothy Orme wrote: So scratch that, I figured out that Struts is set to autowire by default with the spring plugin. In my struts.xml I have: value="org.apache.struts2.spring.StrutsSpringObjectFactory" /

Re: Incorrect Bean Injected

2009-01-16 Thread Timothy Orme
So scratch that, I figured out that Struts is set to autowire by default with the spring plugin. In my struts.xml I have: And am now autowiring by type instead of name. However, does anyone know how to turn off autowiring altogether? I've seen a feature request for this, but it hasn't been

Incorrect Bean Injected

2009-01-16 Thread Timothy Orme
This seems really strange to me, but I don't know the inner workings of struts enough to know if it's expected behavior. I'm using Struts 2.1.2 and spring 2.5.3 I have a 2 service beans that have the same name, but depending on the action, one might be used instead of the other.

REST plugin possible bug

2009-01-16 Thread Ron Chan
I have a simple Blah action to test the REST plugin /myapp/blah goes to index() in Blah as expected /myapp/blah/1 goes to show() and sets id to 1 as expected however setId() is run twice, I have a log.info("setting id"+id) there when I do /myapp/blah!show?id=1 setId() is only run once --

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

2009-01-16 Thread Frank Otto
Yes, but no answer with a solution. I think the problem ist, that the ajax-call create for each request a new session. It doesn't use the session-id of the portal/portlet. I have no idea. Here is an other forum thread of this topic: http://forums.oracle.com/forums/thread.jspa?threadID=341338&

How to determine the Type of a Bean Property from String based OGNL Expression

2009-01-16 Thread Torsten Krah
I want to customize the conversion error messages to be more special in cases of wrong types. Using a custom interceptor this is possible to do but lets say the map contains an error for the field "rule.date". Thats the OGNL expression, telling me that getRule().setDate(Date a) failed, because

RE: NPE initializing 2.1.6 showcase in Tomcat 6.0.18

2009-01-16 Thread Giovanni Azua
hi there! Ok now the showcase works for me too. I think I found the cause of the problem. (Under Windows XP) - If I install Tomcat under "C:\Program Files\Apache Software Foundation\Tomcat" (as the Tomcat Windows service installer does) the NPE occurs - OTOH if I install Tomcat under e.g. "C:\ja

Re: Diff action , same action class and diff submit buttons

2009-01-16 Thread Lukasz Lenart
2009/1/16 Seshagiri V : > > > Is not allowed to put href inside button tag, please read some spec about html and html button [1], if you want to use different action than entire form, use JavaScript and onclick event for that button to do that. [1] http://www.htmlquick.com/reference/tags/butto

Diff action , same action class and diff submit buttons

2009-01-16 Thread Seshagiri V
Hi All, Here is a snippet of my code in the jsp: I have been successful using

REST plugin question

2009-01-16 Thread Ron Chan
Does it allow for extended parameters? http://site/app/customers/69/product/123 or http://site/app/discussions/2009/01/12/some-topic -- View this message in context: http://www.nabble.com/REST-plugin-question-tp21496295p21496295.html Sent from the Struts - User mailing list archive at Nab

Re: NPE initializing 2.1.6 showcase in Tomcat 6.0.18

2009-01-16 Thread Lukasz Lenart
2009/1/16 Lukasz Lenart : >> I installed Tomcat service and drop the war that comes within the >> struts-2.1.6-all.zip and then saw the NPE blow. I restarted the showcase >> several times from Tomcat manager but still got the NPE. > I've started it from console (via bat file) maybe that's the case

Re: NPE initializing 2.1.6 showcase in Tomcat 6.0.18

2009-01-16 Thread Lukasz Lenart
2009/1/16 Giovanni Azua : > I have the same here: > > Struts 2.1.6 > Tomcat 6.0.18 > JSE JDK 1.6.0_11 > Windows XP > > I installed Tomcat service and drop the war that comes within the > struts-2.1.6-all.zip and then saw the NPE blow. I restarted the showcase > several times from Tomcat manager but

RE: NPE initializing 2.1.6 showcase in Tomcat 6.0.18

2009-01-16 Thread Giovanni Azua
hi Lukasz, I have the same here: Struts 2.1.6 Tomcat 6.0.18 JSE JDK 1.6.0_11 Windows XP I installed Tomcat service and drop the war that comes within the struts-2.1.6-all.zip and then saw the NPE blow. I restarted the showcase several times from Tomcat manager but still got the NPE. Now that I