json action redirection in struts2

2009-01-07 Thread ravindra
Hi guys, I have two action configured in struts.xml like below.My interceptor stack noValidationLoginStack will check for session is timed out or not. If the session is timeout returns "login" so the page goes to login.jsp.It is working fine in first package but from json Packages and actio

Re: Conditional Annotation based Validation

2009-01-07 Thread Dirk Forchel
Finally I followed your advice and use Java-based validation now. I did not get it work with the expression validator via annotations. If somebody knows how to do the following Java-based validation with annotations just let me know: public void validate() { if (privatePerson) {

Re: [S2] best practice for reading POST body in an action

2009-01-07 Thread Roger Varley
On Wednesday 07 January 2009 17:58:48 John Cartwright wrote: > Hello All, > > Is there a best practice for using the body of a POST request w/in an > action? The request is not key/value pairs but a blob of XML. Before I > dropped back to using a traditional HTTPServletRequest approach, I'd see >

Re: Spring scope prototype and Struts Action

2009-01-07 Thread Dave Newton
Emanuele Ghevre wrote: As far as the scope is prototype I'm expecting Spring to create a new HelloWorldAction object "every time an object of that type is requested". But during my Tomcat boot I can see Spring creating an HelloWorldAction object. Is it normal? I thought this behaviour was only f

Spring scope prototype and Struts Action

2009-01-07 Thread Emanuele Ghevre
Hi folks! Following the Struts 2 + Spring 2 + JPA + AJAX Tutorial (http://struts.apache.org/2.0.14/docs/struts-2-spring-2-jpa-ajax.html) I'm declaring my Spring bean HelloWorldAction with scope prototype and then the action in struts.xml using the bean reference. As far as the scope is prot

Re: Doc for s:url tag has wrong "includeParams" default

2009-01-07 Thread Musachy Barroso
yes, unfortunately that cannot be changed for 2.0.14 was released already. musachy On Wed, Jan 7, 2009 at 4:27 PM, Wolfgang Knauf wrote: > Hi, > >> >> I updated the page. thanks for reporting. > > http://struts.apache.org/2.0.14/docs/url.html > shows still the wrong info "As of Struts 2.0.11.3/2

Re: Doc for s:url tag has wrong "includeParams" default

2009-01-07 Thread Wolfgang Knauf
Hi, I updated the page. thanks for reporting. http://struts.apache.org/2.0.14/docs/url.html shows still the wrong info "As of Struts 2.0.11.3/2.0.12/2.1.3 the includeParams constant defaults to 'none'". According to you, this was only changed in 2.1.x? Best regards Wolfgang ---

Re: Getting an URL for an Action

2009-01-07 Thread Musachy Barroso
I totally misunderstood your last statement :) musachy On Wed, Jan 7, 2009 at 1:14 PM, Musachy Barroso wrote: > It is not a sin, we are suggesting alternatives, based on the fact > that there is not built in way of doing what you are asking. > > musahcy > > On Wed, Jan 7, 2009 at 1:05 PM, Chris

Re: Getting an URL for an Action

2009-01-07 Thread Musachy Barroso
It is not a sin, we are suggesting alternatives, based on the fact that there is not built in way of doing what you are asking. musahcy On Wed, Jan 7, 2009 at 1:05 PM, Chris Pratt wrote: > In this case it has to do with the fact that we're using Tiles to ensure > that we get a consistent look fo

Re: Getting an URL for an Action

2009-01-07 Thread Chris Pratt
In this case it has to do with the fact that we're using Tiles to ensure that we get a consistent look for all our emails. Basically I've created a Tiles Layout that constructs the emails using tiles to include the text/plain and text/html versions of the content and using action properties to con

Re: Getting an URL for an Action

2009-01-07 Thread Musachy Barroso
If the MIME Emails are generated by tags, why don't you build the URL in the jsps? musachy On Wed, Jan 7, 2009 at 12:45 PM, Chris Pratt wrote: > Basically, I have some tried and true tag libraries for generating pretty, > MIME Emails that work great with Struts. They support all manner of > att

Re: Getting an URL for an Action

2009-01-07 Thread Chris Pratt
Basically, I have some tried and true tag libraries for generating pretty, MIME Emails that work great with Struts. They support all manner of attachments and have worked great for years. Occasionally I need to attach something (in this case a PDF) that is generated by another action. So the mai

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Wendy Smoak
On Wed, Jan 7, 2009 at 8:38 AM, Ercan Kayaonu wrote: > I'm using Struts 2.1.5 with convention plugin. I'm in the learning process > and trying several things (action, rule annotations, hibernate etc). Since we're on the user list, be aware that Struts 2.1.5 is not an official release. It was a

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Musachy Barroso
btw this is not related to tiles, it all applies to any plugin that defines results. musachy On Wed, Jan 7, 2009 at 12:23 PM, Musachy Barroso wrote: > The "value" attribute needs to match the name of a package that is > defined somewhere, if you do this: > > > > make sure that your package is l

Re: Getting an URL for an Action

2009-01-07 Thread Dave Newton
Chris Pratt wrote: Strange? I would have thought this was a fairly commonly needed feature I've never needed to generate a URL from an action name within another action across a half-dozen S2 apps--it can't be *that* common... I think the most hackish thing I've done like that is to use an a

Re: Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.FilterDispatcher.

2009-01-07 Thread bakann
Hi, I have a struts2 webapp that works fine on tomcat 6. But when deploy the webapp on weblogic 10 (with the weblogic.xml file), it is not working and I have got a similar stacktrace : <7 janv. 2009 18 h 10 CET> <[STANDBY] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuni

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Musachy Barroso
The "value" attribute needs to match the name of a package that is defined somewhere, if you do this: make sure that your package is like ... musachy On Wed, Jan 7, 2009 at 12:17 PM, Ercan Kayaonu wrote: > Hi, > Sorry for disturbing you guys this much. Be sure that i first google to > solve

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Antonio
2009/1/7 Ercan Kayaonu : > Can someone advice a tutorial > on tiles and struts2 (step by step). Heh, Tiles and Struts 2 seem to be two isolated worlds. The strangest thing is that a lot of people are using this pair, but no one is contributing. If you *really* want them to work well together, stop

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Ercan Kayaonu
Hi, Sorry for disturbing you guys this much. Be sure that i first google to solve the problem and read related parts of the documentation. But unfortunately some of them are very concise. Anyways. I tried both and but I got this error: Unable to locate parent package [actions] - [unknown

Re: [S2] remove "empty" request parameters

2009-01-07 Thread John Cartwright
Thanks Musachy. I've been looking at the src for ParameterRemoverInterceptor and it looks like I can easily modify it to meet my needs. I just wanted to insure that I was approaching the problem in a "S2 way" since it would seem to be a common problem. --john Musachy Barroso wrote: By the

Re: struts 2.1.5 listed on http://struts.apache.org/2.x/

2009-01-07 Thread Musachy Barroso
Murphy's law at its best :) musachy On Wed, Jan 7, 2009 at 12:03 PM, hernan gonzalez wrote: > Now it says "2.1.6" ... > Please fix it, it's the first page that Googles shows searching by "struts2". > > Hernán J. González > http://hjg.com.ar/ > > > > On Mon, Jan 5, 2009 at 4:37 PM, Chris Pratt w

Re: struts 2.1.5 listed on http://struts.apache.org/2.x/

2009-01-07 Thread Wendy Smoak
On Wed, Jan 7, 2009 at 10:03 AM, hernan gonzalez wrote: > Now it says "2.1.6" ... > Please fix it, it's the first page that Googles shows searching by "struts2". One of the devs already added a robots.txt file to try to convince Google not to index the *draft* docs at struts.apache.org/2.x, but i

Re: struts 2.1.5 listed on http://struts.apache.org/2.x/

2009-01-07 Thread hernan gonzalez
Now it says "2.1.6" ... Please fix it, it's the first page that Googles shows searching by "struts2". Hernán J. González http://hjg.com.ar/ On Mon, Jan 5, 2009 at 4:37 PM, Chris Pratt wrote: > That is the official page, in fact 2.1.5 isn't actually on the page that > button is linked to. My g

Re: Getting an URL for an Action

2009-01-07 Thread Chris Pratt
Strange? I would have thought this was a fairly commonly needed feature and the code in ServletUrlRenderer has a lot of hoops to jump through to make something seemingly simple work. Thanks for your help, I guess I'll just have to hard code it for now. (*Chris*) On Wed, Jan 7, 2009 at 5:46 AM,

Re: how to get config info from portlet.xml in struts2 action

2009-01-07 Thread Nils-Helge Garli Hegvik
Why do you have the servet-config interceptor in your stack? And what container are you running on? The portlet framework does nothing with the portlet context object that is passed to the action, so I don't see any reason why it shouldn't work unless the container does something funny... Nils-H

Re: [S2] remove "empty" request parameters

2009-01-07 Thread Musachy Barroso
By the way, the Parameters interceptor uses the "wrap" parameters map, so removing them from there would work. musachy On Wed, Jan 7, 2009 at 11:52 AM, Musachy Barroso wrote: > Parameters interceptor can ignore parameters based on the name, but > not on value. You could extend the parameters int

Re: [S2] remove "empty" request parameters

2009-01-07 Thread Musachy Barroso
Parameters interceptor can ignore parameters based on the name, but not on value. You could extend the parameters interceptor and check for values before binding, or what Dave suggested. A tip there, if you go with Dave's suggestion, have into account that the parameters in the context is a new map

RE: Tiles with Struts 2.1.5

2009-01-07 Thread Biesbrock, Kevin
My bad. The commons-digester does not exist in the 2.0.12 release (I thought I was using 2.1.5 already). I'll just obtain the 1.8 version either from the website or from the S2.1.5 lib. Thanks, Beez ( 4961 -Original Message- From: Ercan Kayaonu [mailto:ekaya...@gmail.com] Sent: Wedne

Re: [S2] remove "empty" request parameters

2009-01-07 Thread John Cartwright
Thanks for your prompt response Dave. So an custom interceptor before Params could modify the servlet request and Params interceptor would never seem them? Is there not a way to configure the existing Params interceptor to ignore any request parameters w/ a value of empty string? The problem

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Musachy Barroso
To use a result, the action needs to be in the package that defines the result, or in a package that extends the package where the result is defined. There are several ways to fix this, in this case you can just set the parent package of the action, to your package: @ParentPackage("admin") or ch

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Ercan Kayaonu
There's commons-digester-1.8.jar under struts 2.1.5 lib files. you also need commons-beanutils-1.7.0.jar. The location for 2.1.5 is http://people.apache.org/builds/struts/2.1.5/ On Wed, Jan 7, 2009 at 4:21 PM, Biesbrock, Kevin wrote: > Aha! I had this same problem and was planning on submitting

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Ercan Kayaonu
Thank you Musachy, That solved my problem, but I got this error, which might be very familiar for most of you: The Result type [tiles] which is defined in the Result annotation on the class [class actions.admin.LoginAction] or determined by the file extension or is the default result type for the

RE: Tiles with Struts 2.1.5

2009-01-07 Thread Biesbrock, Kevin
Aha! I had this same problem and was planning on submitting it today. You beat me to it. Commons Digester does not appear to be released with Struts 2.x ... unless it is not named with "Digester" or I'm missing it. Beez ( 4961 -Original Message- From: Musachy Barroso [mailto:musa...@g

Re: [S2] remove "empty" request parameters

2009-01-07 Thread Dave Newton
John Cartwright wrote: Can someone provide a recommendation for removing empty request parameters before the Params interceptor sees them? Can Params interceptor simply be configured to ignore request parameters with no value? I'd probably just create a quick interceptor to do that, if that'

[S2] expected error in using ParamsPrepareParams stack and model-driven actions

2009-01-07 Thread John Cartwright
Hello All, Is it expected to receive errors from the first invocation of the Params interceptor since there are not commonly setters for all the model properties and prepare has not yet had a chance to retrieve the model? Thanks! --john

[S2] remove "empty" request parameters

2009-01-07 Thread John Cartwright
Hello All, Can someone provide a recommendation for removing empty request parameters before the Params interceptor sees them? Can Params interceptor simply be configured to ignore request parameters with no value? Thanks! --john ---

[S2] best practice for reading POST body in an action

2009-01-07 Thread John Cartwright
Hello All, Is there a best practice for using the body of a POST request w/in an action? The request is not key/value pairs but a blob of XML. Before I dropped back to using a traditional HTTPServletRequest approach, I'd see if there was a better way in S2. Thanks! --john --

Re: Design Question

2009-01-07 Thread Musachy Barroso
Plugins are not that different than putting all those mappings, classes, etc in the webapp. The limitations would be the same as the S2 limitations (in theory at least). musachy On Tue, Jan 6, 2009 at 7:24 PM, Dan Daly wrote: > Hello, > > I am working on an application that needs different sets

Re: Tiles with Struts 2.1.5

2009-01-07 Thread Musachy Barroso
You are missing dependencies, in this case Commons Digester (http://commons.apache.org/digester/) musachy On Wed, Jan 7, 2009 at 10:38 AM, Ercan Kayaonu wrote: > Hi, > I'm using Struts 2.1.5 with convention plugin. I'm in the learning process > and trying several things (action, rule annotations

Tiles with Struts 2.1.5

2009-01-07 Thread Ercan Kayaonu
Hi, I'm using Struts 2.1.5 with convention plugin. I'm in the learning process and trying several things (action, rule annotations, hibernate etc). Everything was working ok until today. i started using Tiles. I copied struts2-tiles-plugin-2.1.5.jar tiles-api-2.0.6.jar tiles-core-2.0.6.jar tiles-

Re: unable to upload a txt file using fileupload ,

2009-01-07 Thread srinivasa_v .
when i try upload a file of 0 bytes its giving an exception, where can i define minSize for file regards srinivas On Tue, Jan 6, 2009 at 8:14 PM, Dave Newton wrote: > srinivasa_v . wrote: > >> Iam unable to upload a txt file using fileupload , >> >> >> >> image/jpeg,image/gif,image/pjpeg,imag

Re : Performance issue

2009-01-07 Thread François Rouxel
Are you using many interceptors? - Message d'origine De : Pierre Thibaudeau À : Struts Users Mailing List Envoyé le : Mardi, 6 Janvier 2009, 16h19mn 36s Objet : Re: Performance issue Yes the

Re: Getting an URL for an Action

2009-01-07 Thread Musachy Barroso
hum, there is no right way after all. If you end up using UrlHelper, take a look at how it is used in ServletUrlRenderer:renderFormUrl, different methods are used depending on whether an action mapping was found or not. musachy On Wed, Jan 7, 2009 at 12:00 AM, Chris Pratt wrote: > Is there a rig

Re: Conditional Annotation based Validation

2009-01-07 Thread Dave Newton
AFAIK the expression validator is available via annotations. You can also use a custom validator but I find it a little clumsy with annotations. Personally, as soon as validation gets even remotely complicated I fall back to using Java-based validation--I just think it's easier to maintain and

Re: s:url - escapeAmp Problem

2009-01-07 Thread Himanshu Rathore
Hi Bert, Thanks for your help. On Wed, Jan 7, 2009 at 5:56 PM, Bert Van den Brande wrote: > From the documentation : http://struts.apache.org/2.1.2/docs/url.html > escapeAmp : Specifies whether to escape ampersand (&) to (& or not > > So I guess in order to have the url showing "&" you need to s

Re: Struts 2.1.2 - Xwork 2.1.1 ParametersInterceptor ERROR

2009-01-07 Thread Musachy Barroso
Is trying to set the field "{5543}_traineeNights" in IntegrationStageOfAction which is not a valid java identifier musachy On Wed, Jan 7, 2009 at 1:26 AM, nodje wrote: > > Hi, > > i'm getting this error: > > ERROR ParametersInterceptor.error:24 | ParametersInterceptor - > [setParameters]: Unexpe

How to Contribute Selenium Tests to Struts (was Re: confirm unsubscribe from user@struts.apache.org)

2009-01-07 Thread Ted Husted
Apache open source projects, like Struts, communicate through the public mailing lists. Be sure to take the time to carefully read the Struts Mailing List page. (I wish it could be shorter, but every point on the page is important.) When looking for development work, the best place to ask is the "

Re: s:url - escapeAmp Problem

2009-01-07 Thread Bert Van den Brande
>From the documentation : http://struts.apache.org/2.1.2/docs/url.html escapeAmp : Specifies whether to escape ampersand (&) to (& or not So I guess in order to have the url showing "&" you need to set "escapeAmp" to "false" ... On Wed, Jan 7, 2009 at 10:14 AM, Himanshu Rathore wrote: > Hi, > >

Re: confirm unsubscribe from user@struts.apache.org

2009-01-07 Thread battipatisainagendra Bhavaniprasad
Hi, I am prasad i am new to open source.I am interested in participating in ASF (Any Project).Let me tell about me first.I am basically test engineer with 5+ years of exp.I know "selenium tool" which is web functional testing tool.I visited the ASF home page but there are many projects.

Conditional Annotation based Validation

2009-01-07 Thread Dirk Forchel
I have two radio buttons for a form property named "privatePerson" with two possible values ('true' and 'false') which toogles the view of my input form with three different input fields (number1, number2, name). If the user choose "private" the number1, number2 and name input fields are shown, if

s:url - escapeAmp Problem

2009-01-07 Thread Himanshu Rathore
Hi, Can anyone please tell me what I'm doing wrong? URL is still showing me "&" instead of "&". -- Regards, Himanshu Rathore