Re: struts2.1 validation problem! with "fileUploadStack"

2010-11-19 Thread Mead Lai
---Maybe you can add a property in your action which return the current ---date. And reference this property in your validation configuration. You mean, I shall add a property in the request-Scope, then retrieve it by EL expression? I will have a try, Thank you. Regards, Mead On Fri, Nov 19, 20

Re: OGNL map key reading

2010-11-19 Thread Emil Dombagolla
Thanks you very much for this solution , you saved me. first option works for me very well, thanks In advance. Emil On Thu, Nov 18, 2010 at 5:32 PM, Li Ying wrote: > try: > > invoke the [get] method on map: > > > or > reference property on map: > > > > or > iterator on values of map: > >

Re: Problem with Validation "lifecycle"

2010-11-19 Thread Greg Akins
On Fri, Nov 19, 2010 at 11:43 AM, Greg Lindholm wrote: > I wrote this to solve the problem of preserving messages across a redirect: > > http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2/ > Thanks Greg. That looks like exactly what I was looking for. On

Re: Problem with Validation "lifecycle"

2010-11-19 Thread Greg Lindholm
I wrote this to solve the problem of preserving messages across a redirect: http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2/ On Fri, Nov 19, 2010 at 11:36 AM, Greg Akins wrote: > Thanks for the response > > On Fri, Nov 19, 2010 at 11:28 AM, Maurizio C

Re: Problem with Validation "lifecycle"

2010-11-19 Thread Greg Akins
Thanks for the response On Fri, Nov 19, 2010 at 11:28 AM, Maurizio Cucchiara wrote: > As far I can remember actionError are stored in struts stack, so I guess > they are per-request. That's what I thought. > Also, redirect action create a new request, so you can share AE in a > standard flow.

Re: Problem with Validation "lifecycle"

2010-11-19 Thread Maurizio Cucchiara
As far I can remember actionError are stored in struts stack, so I guess they are per-request. Also, redirect action create a new request, so you can share AE in a standard flow. Can't you do without redirect for the input result? 2010/11/19 Greg Akins > I've written an action, with validation,

Problem with Validation "lifecycle"

2010-11-19 Thread Greg Akins
I've written an action, with validation, that uses a redirectAction instead of a .jsp for the INPUT result. When the final INPUT jsp is displayed, the actionErrors aren't present. I believe this is because the action I'm redirecting to "clears" the actions before the jsp is displayed. If I save

RE: struts2.1 validation problem! with "fileUploadStack"

2010-11-19 Thread Martin Gainty
you need to first grant the desired permission (on the resource) otherwise SecurityManager will toss an error when performing an I/O operation on that resource http://download.oracle.com/javase/6/docs/api/java/lang/SecurityManager.html Regards Martin ___

Re: File Download with multiple files. Design question

2010-11-19 Thread RogerV
Li Ying wrote: > > My suggestion: > > (1)I believe you can use ZipOutputStream to output the zipped data to > the response OutputStream directly, instead of a temp file. So no temp > file need to be created. > Hmm, write to the response.outputStream directly from within my action? That would

Re: File Download with multiple files. Design question

2010-11-19 Thread Li Ying
My suggestion: (1)I believe you can use ZipOutputStream to output the zipped data to the response OutputStream directly, instead of a temp file. So no temp file need to be created. OR (2)You can create a batch application, repeatedly run it with some interval (use cron or something). And in this

Re: struts2.1 validation problem! with "fileUploadStack"

2010-11-19 Thread Li Ying
Maybe you can add a property in your action which return the current date. And reference this property in your validation configuration. Or create a Static method in an Utility class, return return the current date, And reference this property in your validation configuration. If both of these do

Re: Databinding a checkboxlist

2010-11-19 Thread Li Ying
try 2010/11/19 Altenhof, David Aron : > Trying to figure out a way to do the following without much luck. > > I have an enumeration with a list of menu options and corresponding labels > such as: > > public enum Color { >        RED("Red"), >        BLUE("Blue"), >        GREEN("Green"); > >  

Re: OGNL map key reading

2010-11-19 Thread Emil Dombagolla
Thanks for the soultion, it s true, i can handle that way Emil On Wed, Nov 17, 2010 at 9:25 PM, Steven Yang wrote: > so currentPageHotelList[#stat.index] gives a Map? > > if ur using an iterator u can just do > <-- of course u can use "top" as well > but l like giving it a name > > > > On We

Re: Reg: Issue with Struts 2 & Tomcat Realm

2010-11-19 Thread Sathish Kumar
Wav :) It works ... tx a lot Maurizio !! On Fri, Nov 19, 2010 at 3:25 PM, Maurizio Cucchiara < maurizio.cucchi...@gmail.com> wrote: > Sorry, I forget request dispatcher: > >REQUEST > > > 2010/11/19 Maurizio Cucchiara > > > I guess that tomcat auth manager doesn't chain your request t

Re: File Download with multiple files. Design question

2010-11-19 Thread Rahul Mohan
Roger, In my project, we implemented a FileManager for storing, retrieving and cleaning up files. On upload, the filemanager creates a temp file on disk and stores the file-URL in a map correlated with the session id. We also implemented a SessionListener which calls FileManager.deleteFiles()

Re: Reg: Issue with Struts 2 & Tomcat Realm

2010-11-19 Thread Maurizio Cucchiara
Sorry, I forget request dispatcher: REQUEST 2010/11/19 Maurizio Cucchiara > I guess that tomcat auth manager doesn't chain your request through struts > filter. > > I'm not sure it works, but you could try to add this line inside your > struts's servlet mapping declaration: > > >

Re: Reg: Issue with Struts 2 & Tomcat Realm

2010-11-19 Thread Maurizio Cucchiara
I guess that tomcat auth manager doesn't chain your request through struts filter. I'm not sure it works, but you could try to add this line inside your struts's servlet mapping declaration: struts2 /* FORWARD INCLUDE

File Download with multiple files. Design question

2010-11-19 Thread RogerV
Hi I have a requirement to present the user with a list of files stored on the server, and then download the files selected to the user. If the user selects a single file - no problem. However if the user selects multiple files, then, unless anyone knows different, all the files have to be sent i

Re: struts2.1 validation problem! with "fileUploadStack"

2010-11-19 Thread Maurizio Cucchiara
Did you try something like this http://struts.apache.org/2.2.1/docs/date-validator.html ? 2010/11/19 Mead Lai > Thank you, Dave. > Your explain is helpful for me to understand it. > > I want to validate the birthday in struts2 validation.xml, > The range of date is between 1900-01-01 and current

Reg: Issue with Struts 2 & Tomcat Realm

2010-11-19 Thread Sathish Kumar
Hi Group, We are using Tomcat 6 based Container Managed Securitywhere we can declare a login page which will be displayed whenever someone access secured urls. If we look at the samples, the login page is given as jsp ( login.jsp ). like b