use struts2 in a xxxx.jsp url
Hi, I'm very new to struts2 and have two questions that I have not seen asked/answered in my short time on this list (but also through plenty of online searching): (1) Is it possible to invoke form validation without having the URL being rewritten to .action? That is, can i keep my existing JSP urls but simply "add" struts2 functionality? (2) Is it possible to manipulate the default value that is displayed for a specific field? For example, if the field in question is a signed integer, but a value of -1 is intended to represent a default (ie, user did not supply a value) is there any way to not display anything in that field instead of "-1" - which appears to be the behavior. Apologies if these questions have been answered before, Thanks for any info. edward - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts1 folder selection through browse button
The user intended here, would be an admin and would like to select the folder through "browse" button, so that he doesn't have to write down the whole folder path in the text box. The browse button will not have any more action. Only the folder path, written on the text box, either by selecting through "browse" button or directly written the whole path, will be sent to the server. On Mon, Mar 5, 2012 at 10:45 PM, Dave Newton wrote: > What good would it do anyway? The server can't access a client directory > anyway. > > In any case, browser file choosers choose files, not directories--that's a > browser thing. Even if it could, different browsers send different > information--some browsers send only the filename, some send the entire > client path. > > Dave > > On Mon, Mar 5, 2012 at 12:13 PM, Arpan wrote: > > > Hi All, > > > > I have a requirement, where I should have a text box and a browse > > button.,The user can select a folder through "browse" button or can write > > that folder path in the text box directly. > > > > I have seen struts file upload mechanism. But here I only need to select > a > > folder or folder path and not a file. > > > > And that folder path should be accessed in the action class. > > > > I am using struts1. Can anybody give some ideas. > > > > Thanks > > >
Re: struts1 folder selection through browse button
What good would it do anyway? The server can't access a client directory anyway. In any case, browser file choosers choose files, not directories--that's a browser thing. Even if it could, different browsers send different information--some browsers send only the filename, some send the entire client path. Dave On Mon, Mar 5, 2012 at 12:13 PM, Arpan wrote: > Hi All, > > I have a requirement, where I should have a text box and a browse > button.,The user can select a folder through "browse" button or can write > that folder path in the text box directly. > > I have seen struts file upload mechanism. But here I only need to select a > folder or folder path and not a file. > > And that folder path should be accessed in the action class. > > I am using struts1. Can anybody give some ideas. > > Thanks >
Re: using RedirectMessageInterceptor with actionErrors
Define "not firing", are you heeding the advice given regarding the "workflow" interceptor? Dave On Mon, Mar 5, 2012 at 11:08 AM, jkida wrote: > I have a question that I was hoping someone could confirm to make sure I > really do understand whats going on. > > I am using a RedirectMessageInterceptor class i found from > http://glindholm.wordpress.com/category/struts-2/ > > The problem I am having is that whenever I use the addActionError call, and > return a result that uses redirectAction it causes the action I am > redirecting to not to fire, therefor half the page is not rendered > correctly. > > My question is really is there any point of using redirectAction if you > know > that the action that triggered the redirect has actionErrors? Is it > possible > to have the actionErrors display on the redirectAction page and also have > the redirectAction actually fire? > > -- > View this message in context: > http://struts.1045723.n5.nabble.com/using-RedirectMessageInterceptor-with-actionErrors-tp5538000p5538000.html > Sent from the Struts - User mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
using RedirectMessageInterceptor with actionErrors
I have a question that I was hoping someone could confirm to make sure I really do understand whats going on. I am using a RedirectMessageInterceptor class i found from http://glindholm.wordpress.com/category/struts-2/ The problem I am having is that whenever I use the addActionError call, and return a result that uses redirectAction it causes the action I am redirecting to not to fire, therefor half the page is not rendered correctly. My question is really is there any point of using redirectAction if you know that the action that triggered the redirect has actionErrors? Is it possible to have the actionErrors display on the redirectAction page and also have the redirectAction actually fire? -- View this message in context: http://struts.1045723.n5.nabble.com/using-RedirectMessageInterceptor-with-actionErrors-tp5538000p5538000.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Could somebody please confirm the bundle attribute issue is fixed in Commons Validator 1.3.0?
Hello, Thanks so much for the responses to my previous question in this thread: http://struts.1045723.n5.nabble.com/Validation-doesn-t-honor-the-bundle-attribute-in-http-jakarta-apache-org-commons-dtds-validator-1-3-d-td5528087.html The customer requires us to add the customized error messages in a *totally different resource bundle*. This can't be done through this type of configuration ( http://struts.apache.org/1.2.4/userGuide/dev_validator.html#i18n). The latest version of Commons Validator is version 1.3.0. http://commons.apache.org/dtds/ Accordingly to this site, Struts 1.3 has upgraded to Validator 1.3.0 ( http://wiki.apache.org/struts/StrutsUpgradeNotes12to13). Could somebody please confirm the bundle attribute issue is fixed in Commons Validator 1.3.0? -- Best Regards, Joann
JSon, includeProperties and modelDriven
Hi, I am trying to make an action build a JSON result. The action is defined in the struts.xml file as : ^day, events, events\[\d+\], events\[\d+\].id, My Java action class EventsAction is defined as : public class EventsAction extends baseAction implements ModelDriven, Preparable { public String getDay(){ return day; }; public myModel getModels(){return ...;}; } The JSON is working for events\[\d+\].id : getModels().getEvents().get(i).getId(); But not working for day : getDay() is not called. I tried without ^, but no result. My problem is I do not managed to make JSON result working without using the modelDriven returned object. What I missed ? Cordialy and thanks for responses, Matthieu MARC --- Matthieu MARC Responsable du Service Informatique Centre Arts et Métiers Angers Tel : 02 41 20 73 61 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org