Validation and error messages in session

2005-10-16 Thread Robert Taylor
Greetings, I'm using Struts 1.2.7 and noticed that functionality has been added to the Action class to store error messages in the session and subsequently be removed after they have been rendered. This is quite helpful in some circumstances. I also know that error messages can be placed in

Re: Playing with the file system

2005-10-16 Thread Larry Meadors
I have done this by putting the uploads into a database (in a blob) then creating a servlet to serve them up. This has the added benefit of allowing you to easily add additional info to the image (who uploaded it? when? etc...) Larry On 10/16/05, Benjamin Lerman [EMAIL PROTECTED] wrote: Hi

Re: Playing with the file system

2005-10-16 Thread Tamas Szabo
Hi, you should probably look at the methods of ServletContext. I'd like to put them in the /img directory of my application, but I cannot find a way to get a real path for this directory. Is there any way to get it? ServletContext.getRealPath(String path) And then my other question is: how

Re: Submit buttons getting their value

2005-10-16 Thread Adam Hardy
Martin, what HTML does this taglib produce? Seems as if it would be so: input type=submit label=some text value=delete / A cursory check on the W3C website confirmed my suspicions - I don't believe that the label attribute is valid HTML4 and if so is unlikely to be supported by browsers like

Re: Submit buttons getting their value

2005-10-16 Thread Martin Gainty
Good Evening from across the pond- An attempt to answer your queries.. Yes the SubmitTag label is a protected String attribute whose value is written as html inside the start of Tag method doStartTag() The source code for SubmitTag.java is located at

Re: Submit buttons getting their value

2005-10-16 Thread Adam Hardy
The reason why I mentioned Firefox is that it generally tends to be more standards-compliant than IE (W3C standards, that is). It probably works with your tag perfectly, if the HTML doesn't contain a 'label' attribute. I asked for the HTML produced so that I could see if it was

Re: Submit buttons getting their value

2005-10-16 Thread Dakota Jack
Breathe in; breathe out, Martin. This tag does almost exactly what actions do when you use the solutions on www.michaelmcgrady.com. Presumably, since people are on the Struts site here, they would prefer to use an action that a tag? Could you please tone your language down a bit, Martin. I

Re: Submit buttons getting their value

2005-10-16 Thread Martin Gainty
saying your solution is better and everyone else on the planet is 'ignorant' if they dont believe in your solution is fascism Sieg Heil Jack - Original Message - From: Dakota Jack [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Sunday, October 16, 2005

Handling invalid sessions

2005-10-16 Thread Jadeler
What is the best way to handle invalid sessions (http sessions) within Struts? I need a way to determine when an object within a session no longer exists and redirect the user to an error page when that happens. I was thinking of implementing HttpSessionAttributeListener or a Servlet filter.

Re: Handling invalid sessions

2005-10-16 Thread rajasekhar . cherukuri
Hi, The best way is to write a Base Action class and extend that class for all your Action classes in your application. Place a check in the execute method of the Base Action class and if it is a success then call an abstract method in the Base Action class which will be implemented by

Re: Handling invalid sessions

2005-10-16 Thread peru cheppanu
If we do that, then execute() method in child classes will override Base Action execute() method. Right? Then, as far as I know, that execute() in Base Action will not be executed.. Peru Cheppanu [EMAIL PROTECTED] wrote: Hi, The best way is to write a Base Action class and extend that

Re: Handling invalid sessions

2005-10-16 Thread rajasekhar . cherukuri
That is why i have clearly specified that you have to implement an abstract method in the base class. which will be implemented in all your classes and that method will be called explicitly from Base Action class. You should not override the execute() method in the Child classes. Regards,