message resources ???key??? displaying
Hi, I´m developing a project with Struts 1.2. When trying to display in a jsp page, the errors saved in SaveMessages are displayed, but not correctly, for example: in showerrors.jsp: ???es.error.wrong.password??? instead of: Your password is wrong. The ApplicationResources.properties file is properly mapped with its keys. error.wrong.password = Your password is wrong Figure out that a "es." is displayed while no Locale configuration has been setup. What should I check? Any ideas will be welcomed. Thanks,
Re: message resources ???key??? displaying
It is configured as: struts-config.xml In web.xml is not defined. The ApplicationResources.properties file is under: proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties And the jsp code: Is something wrong about the path/classpath? Do I need to add a key to ?? Regards, - Original Message - From: "Lukasz Lenart" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, July 14, 2008 6:32 PM Subject: Re: message resources ???key??? displaying Hi, How did you configure the messages in struts-config? It should be something like this: Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Email procesado por MailFoundry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: message resources ???key??? displaying
Hi, That was the correct path, I didn´t know about it. Thank you for your answers, guys. ;-) - Original Message - From: "Lukasz Lenart" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, July 14, 2008 8:22 PM Subject: Re: message resources ???key??? displaying The ApplicationResources.properties file is under: proyect_name/Webroot/WEB-INF/lib/ApplicationResources.properties Move to the /WEB-INF/classes Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Email procesado por MailFoundry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validator plugin error
Hi, I´m trying to use Struts 1.2 Validator plugin. I guess something in struts-config.xml is missing or wrong. If I add the necessary code to use the plugin validator: After redeploying my webapp, I get a 404 error Servlet action not available. Validation and validation-rules are "configured". Any suggestions? Thanks in advance.
Re: Validator plugin error
Hi again, After updating all the dependencies and changing the DTD for the validation.xml and validation-rules.xml: http://jakarta.apache.org/commons/dtds/validator_1_3_0.dtd";;> I get the following warning: file cannot be validated as the host "jakarta.apache.org" is currently unreachable I suposed I can specify a path in local to the DTD, but I wouldn´t like to do it. As a possible clue, I haven´t got Internet connection in the laptop i´m developing the project (only at home). Any suggestions? Thx - Original Message - From: "Lukasz Lenart" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, July 15, 2008 3:36 PM Subject: Re: Validator plugin error 15-jul-2008 15:06:33 org.apache.commons.digester.Digester fatalError GRAVE: Parse Fatal Error at line -1 column -1: Premature end of file. org.xml.sax.SAXParseException: Premature end of file. You should also change dtd headers for validator-rules.xml and validations.xml to reflect new common-validator.jar Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Email procesado por MailFoundry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator plugin error
OMG, this is an EPIC FAIL : ) Yes, i have saved and referenced it in WEB-INF. Best regards, - Original Message - From: "Lukasz Lenart" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, July 15, 2008 7:23 PM Subject: Re: Validator plugin error As I remember, there is a bug with this, out dtd to WEB-INF and add reference to it http://www.developerdotstar.com/community/node/472 Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Email procesado por MailFoundry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error global-Forwards
Hi, i have a problem, let me explain. I have one globalforward as a html:link defined in a jsp page, after clicking it, it should execute the corresponding action class and display the results in another jsp page. Page1Link (global forward to *.do -- not to .jsp) -->calls actionClass.java --> Page2 showing bean with retrieved data from actionClass (session scope) The problem is that nothing happens , I mean nothing is displayed in the Page2 (nor data and html tags), and no System.out from ActionClass is displayed. In the navigator bar (MS internet explorer) appears: http://localhost:8080/myproject/actionClass.do Any suggestion or ideas? I´ve been checking the struts-config.xml and do not know what could be wrong. Thanks in advance,
Submit button with no form
Hi, How can I render a button in a jsp page to call an action directly with no form? I just want to call an action from a button in a jsp page, no links. I will use Dispatch_Action so how should I name it in the strus-config file? I understand Dispatch Action theory ;) Any ideas would be appreciated. Thanks in advance,
Re: Dynamic radio buttons with bean
Sorry but i dont understand what you mean, that´s what I am trying to do, get the data, send it though a request bean to the jsp, and display the info as a radio button. As far as i know, is not as easy as 123 (or I think), that´s why I am looking for any better or easier ideas for "indexed properties" . >> http://faq.javaranch.com/java/IndexedProperties - http://struts.apache.org/1.x/struts-taglib/indexedprops.html Regards, - Original Message - From: Mead Lai To: Struts Users Mailing List Sent: Wednesday, September 10, 2008 3:19 PM Subject: Re: Dynamic radio buttons with bean use servlet the get the html, create the item name from database; then use servlet request get the value in the html, the name of buttons U can get from database 2. I think it's simple than others. -- BestRegards, Mead http://yayisoft.com Jack Benny - "I don't deserve this award, but I have arthritis and I don't deserve that either." On Wed, Sep 10, 2008 at 9:06 PM, Dan <[EMAIL PROTECTED]> wrote: > Hi, > > I need to display in a jsp a form with dynamic radio buttons, I mean: > > There are several items in my DB. One item is read (each item has one > question and 4 possible answers). > I need to display the question and the 4 answers as a radio option > dynamically (with a bean). Then the users cheks an answer, and submits the > selected option. The corresponding action is called. Afterwards, another > different item is selected and the question/answers displayed, till the end > of the test. > > I found this approach to display the properties of a bean as dynamic > options using "Indexed properties" at: > http://faq.javaranch.com/java/IndexedProperties > > Is there another "approach" or option to develop this stuff? > > Regards and thanks in advance ;) > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Email procesado por MailFoundry
Re: Dynamic radio buttons with bean
Thanks Martin, Is this applicable to Struts 1.x? Regards - Original Message - From: Martin Gainty To: Struts Users Mailing List Sent: Wednesday, September 10, 2008 5:12 PM Subject: RE: Dynamic radio buttons with bean http://struts.apache.org/2.x/docs/radio.html specigy your list attribute to point to iterable map ( returned from Action class ) e.g. Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > From: [EMAIL PROTECTED] > To: user@struts.apache.org > Subject: Re: Dynamic radio buttons with bean > Date: Wed, 10 Sep 2008 17:06:09 +0200 > > Sorry but i dont understand what you mean, that´s what I am trying to do, get the data, send it though a request bean to the jsp, and display the info as a radio button. As far as i know, is not as easy as 123 (or I think), that´s why I am looking for any better or easier ideas for "indexed properties" . >> http://faq.javaranch.com/java/IndexedProperties - http://struts.apache.org/1.x/struts-taglib/indexedprops.html > > > Regards, > > - Original Message - > From: Mead Lai > To: Struts Users Mailing List > Sent: Wednesday, September 10, 2008 3:19 PM > Subject: Re: Dynamic radio buttons with bean > > > use servlet the get the html, create the item name from database; > then use servlet request get the value in the html, the name of buttons U > can get from database 2. > I think it's simple than others. > -- > BestRegards, > Mead > http://yayisoft.com > > Jack Benny - "I don't deserve this award, but I have arthritis and I don't > deserve that either." > > > On Wed, Sep 10, 2008 at 9:06 PM, Dan <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I need to display in a jsp a form with dynamic radio buttons, I mean: > > > > There are several items in my DB. One item is read (each item has one > > question and 4 possible answers). > > I need to display the question and the 4 answers as a radio option > > dynamically (with a bean). Then the users cheks an answer, and submits the > > selected option. The corresponding action is called. Afterwards, another > > different item is selected and the question/answers displayed, till the end > > of the test. > > > > I found this approach to display the properties of a bean as dynamic > > options using "Indexed properties" at: > > http://faq.javaranch.com/java/IndexedProperties > > > > Is there another "approach" or option to develop this stuff? > > > > Regards and thanks in advance ;) > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > > > Email procesado por MailFoundry _ Stay up to date on your PC, the Web, and your mobile phone with Windows Live. http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/ -- Email procesado por MailFoundry
Re: Dynamic radio buttons with bean
Hi, There is nothing wrong : ) I just wanted to know if there was another method to deal with this. Thanks for the reply. Regards, - Original Message - From: Dave Newton To: Struts Users Mailing List Sent: Wednesday, September 10, 2008 6:18 PM Subject: Re: Dynamic radio buttons with bean --- On Wed, 9/10/08, [EMAIL PROTECTED] wrote: > Is this applicable to Struts 1.x? No. What's the issue with indexed properties? They're the recommended way to deal with indexed properties. You could just do it by hand, tool. Dave > http://struts.apache.org/2.x/docs/radio.html > specigy your list attribute to point to iterable map ( > returned from Action class ) > e.g. > >var="genders"/> >name="male" list="#genders.genders"/> > Martin > __ > Disclaimer and confidentiality note > Everything in this e-mail and any attachments relates to > the official business of Sender. This transmission is of a > confidential nature and Sender does not endorse distribution > to any party other than intended recipient. Sender does not > necessarily endorse content contained within this > transmission. > > > > From: [EMAIL PROTECTED] > > To: user@struts.apache.org > > Subject: Re: Dynamic radio buttons with bean > > Date: Wed, 10 Sep 2008 17:06:09 +0200 > > > > Sorry but i dont understand what you mean, that´s > what I am trying to do, get the data, send it though a > request bean to the jsp, and display the info as a radio > button. As far as i know, is not as easy as 123 (or I > think), that´s why I am looking for any better or easier > ideas for "indexed properties" . >> > http://faq.javaranch.com/java/IndexedProperties - > http://struts.apache.org/1.x/struts-taglib/indexedprops.html > > > > > > Regards, > > > > - Original Message - > > From: Mead Lai > > To: Struts Users Mailing List > > Sent: Wednesday, September 10, 2008 3:19 PM > > Subject: Re: Dynamic radio buttons with bean > > > > > > use servlet the get the html, create the item name > from database; > > then use servlet request get the value in the > html, the name of buttons U > > can get from database 2. > > I think it's simple than others. > > -- > > BestRegards, > > Mead > > http://yayisoft.com > > > > Jack Benny - "I don't deserve this > award, but I have arthritis and I don't > > deserve that either." > > > > > > On Wed, Sep 10, 2008 at 9:06 PM, Dan > <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > > I need to display in a jsp a form with > dynamic radio buttons, I mean: > > > > > > There are several items in my DB. One item is > read (each item has one > > > question and 4 possible answers). > > > I need to display the question and the 4 > answers as a radio option > > > dynamically (with a bean). Then the users > cheks an answer, and submits the > > > selected option. The corresponding action is > called. Afterwards, another > > > different item is selected and the > question/answers displayed, till the end > > > of the test. > > > > > > I found this approach to display the > properties of a bean as dynamic > > > options using "Indexed properties" > at: > > > > http://faq.javaranch.com/java/IndexedProperties > > > > > > Is there another "approach" or > option to develop this stuff? > > > > > > Regards and thanks in advance ;) > > > > > > > - > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > > > > > > -- > > > > > > Email procesado por MailFoundry > > > _ > Stay up to date on your PC, the Web, and your mobile > phone with Windows Live. > > http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/ > > > -- > > > Email procesado por MailFoundry - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Email procesado por MailFoundry
Re: Dynamic radio buttons with bean
Hi I am still (fighting) trying to display a radio button dynamically reading data from a DB, but I get this error: javax.servlet.ServletException: No getter method available for property control for bean under name org.apache.struts.taglib.html.BEAN This is the "route", code attached below: 1- userlogin.jsp link calls the method iniciarTest of the Dispatch_ActionTest action 2- After getting the data in the action, LabelValueBeans are used to store the data and pass this data as the request "choices" to desarrollarTest.jsp page 3- The request data ("choices") should be displayed in desarrollarTest.jsp as a radio option with the value "bean:write..." 4- But this error appears -> javax.servlet.ServletException: No getter method available for property control for bean under name org.apache.struts.taglib.html.BEAN What is wrong, or what should I check? Why the bean is defined like "name org.apache.struts.taglib.html.BEAN"? Any help will be so much appreciated. Thanks. __ CODE: (only neccesary code attached, if need something else just let me know) ** struts-config.xml --- ** userlogin.jsp Iniciar Test --- ** Dispatch_actionTest.action public ActionForward iniciarTest(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws SQLException, JDOMException, IOException { .. //AFTER GETTING THE DATA FROM DB Collection choices = new ArrayList(); LabelValueBean label1 = new LabelValueBean(primerItem.getResp1(),"respuestaItem1"); LabelValueBean label2 = new LabelValueBean(primerItem.getResp2(),"respuestaItem2"); choices.add(label1); choices.add(label2); System.out.println("LABEL: "+label1.getLabel()); System.out.println("VALUE: "+label1.getValue()); System.out.println("LABEL: "+label2.getLabel()); System.out.println("VALUE: "+label2.getValue()); request.setAttribute("choices", choices); . return mapping.findForward("success"); -- **RadioForm.form public class RadioForm extends ActionForm { private String control; public void reset(ActionMapping mapping, HttpServletRequest request) { } public String getControl() { return control; } public void setControl(String control) { this.control = control; } } -- ** desarrollarTest.jsp --- ERROR -> javax.servlet.ServletException: No getter method available for property control for bean under name org.apache.struts.taglib.html.BEAN -EOF - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List ; [EMAIL PROTECTED] Sent: Wednesday, September 10, 2008 6:41 PM Subject: Re: Dynamic radio buttons with bean Hi, There is nothing wrong : ) I just wanted to know if there was another method to deal with this. Thanks for the reply. Regards, - Original Message - From: Dave Newton To: Struts Users Mailing List Sent: Wednesday, September 10, 2008 6:18 PM Subject: Re: Dynamic radio buttons with bean --- On Wed, 9/10/08, [EMAIL PROTECTED] wrote: > Is this applicable to Struts 1.x? No. What's the issue with indexed properties? They're the recommended way to deal with indexed properties. You could just do it by hand, tool. Dave > http://struts.apache.org/2.x/docs/radio.html > specigy your list attribute to point to iterable map ( > returned from Action class ) > e.g. > >var="genders"/> >name="male" list="#genders.genders"/> > Martin > __ > Disclaimer and confidentiality note > Everything in this e-mail and any attachments relates to > the official business of Sender. This transmission is of a > confidential nature and Sender does not endorse distribution > to any party other than intended recipient. Sender does not > necessarily endorse content contained within this > transmission. > > > > From: [EMAIL PROTECTED] > > To: user@struts.apache.org > > Subject: Re: Dynamic radio buttons with bean > > Date: Wed, 10 Sep 2008 17:06:09 +0200 > > > > Sorry but i dont understand what you mean, that´s > what I am trying to do, get the data, send it though a > request bean to the jsp, and display the info as a radio > button. As far as i know, is not as easy as 123 (or I > think), that´s why I am looking for any better or easier > ide
Radio button default checked with Indexed properties
Hi, How can I get a radio button checked by default using indexed properties? I read in forums to do it in the reset method of the ActionForm, but dont know exactly how to do it... In my jsp I render X radio buttons, where X is the number of questions saved in the request Bean "choices" in My action class, I dont render them as separated radio buttons, here the code: --> (X radio buttons) In the action form I only have get and set methods for variable control: getControl(), setControl() Everything workd fine, but need to get the radio checked by default to avoid a java error/exception if the user clicks the form Which code or what should I do? Thanks in advance guys ;)