Can We manually populate the FormBeans to display the contents on the jsp
Hi, Can we use FormBeans to display our contents on the jsp page, as it does this work if an error occurs after the submit is done. I need to use this feature of FormBeans to display my contents on the jsp page. for example: say i am doing a jobsite project. and an user who has posted a resume when he next clicks the resume for editing it, can i populate a FormBean and pass it to the jsp page and will it populate the feilds on the jsp resume page as it does when an error occurs. Can any one tell me how to do this, so that i dont need to use additional helper beans to populate the pages when formbeans can do it. pls give me some code samples for passing the form beans to the page. Thanx in advance Regards JAcob Skariah __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles breaks my page that uses logic:iterate
Figured out what was the problem. Between the chair and the keyboard, it seems... When copying the JSP from non-Tiles to Tiles version, I managed to include only %@ taglib uri=/WEB-INF/struts-html.tld prefix=html% %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean% so the logic taglib was missing. Naturally, no error message was shown. logic tags just fail silently, and since logic:iterate did not work I got the error about the missing object. And, of course, I did not include the whole JSP in my original question since I though it was not relevant. Plenty of dumb-assness going on it seems! Anyhow, no problems now. From: Janne Mattila [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Tiles breaks my page that uses logic:iterate Date: Tue, 17 Aug 2004 06:07:27 + With Tiles: action path=/TilesInitInputs type=jannen.action.InitInputsAction scope=request input=/Start.do validate=false name=inputsForm forward name=success path=/pages/jannen/tiles/layout/inputs.jsp/ /action action path=/TilesGetInputs type=jannen.action.GetInputsAction scope=request input=/Start.do validate=false name=inputsForm forward name=success path=/pages/jannen/tiles/layout/inputs.jsp/ /action action path=/TilesSaveInputs type=jannen.action.SaveInputsAction scope=request input=/TilesGetInputs.do name=inputsForm forward name=success path=/TilesGetInputs.do/ /action without tiles (works fine): action path=/InitInputs type=jannen.action.InitInputsAction scope=request input=/Start.do validate=false name=inputsForm forward name=success path=/pages/jannen/inputs.jsp/ /action action path=/GetInputs type=jannen.action.GetInputsAction scope=request input=/Start.do validate=false name=inputsForm forward name=success path=/pages/jannen/inputs.jsp/ /action action path=/SaveInputs type=jannen.action.SaveInputsAction scope=request input=/GetInputs.do name=inputsForm forward name=success path=/GetInputs.do/ /action So, three actions. Init is called only the first time to give default values, after that it is Save = Get = Save = Get and so on as long as user keeps submitting the form. Purpose of Get (and also Init) is to read the collection of possible choices (allChoices) from database. From: Niall Pemberton [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Tiles breaks my page that uses logic:iterate Date: Mon, 16 Aug 2004 15:36:07 +0100 OK so post the bits of your struts-config which show the forms and action mappings for 1) The action which renders the page 2) The action the form will post to (i.e. /TilesSaveInputs) Niall - Original Message - From: Janne Mattila [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 16, 2004 3:13 PM Subject: Re: Tiles breaks my page that uses logic:iterate Yes. And, (for example) bean:write name=inputsForm property=counter / works as long as I take out the multibox part. From: Niall Pemberton [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: Tiles breaks my page that uses logic:iterate Date: Mon, 16 Aug 2004 15:09:57 +0100 I'm guessing you changed the action your form is pointing to (/TilesSaveInputs) - so is the form name still inputsForm? logic:iterate id=choice name=inputsForm property=allChoices Niall - Original Message - From: Janne Mattila [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 16, 2004 2:59 PM Subject: Tiles breaks my page that uses logic:iterate I have a simple page for editing some form properties. It works. There's a select box, a multibox, single-select select and a text input field. Now I tried to Tiles-ify it, just using Tiles to add some silly decorations around the actual form. Using tiles seems to break the form, the exception I get is 16:49:43,714 ERROR
RE: Can We manually populate the FormBeans to display the contents on the jsp
I think u do expect something diff. Don't u? What do u really need? -Original Message- From: Aru [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 3:37 PM To: Struts Users Mailing List Subject: RE: Can We manually populate the FormBeans to display the contents on the jsp Importance: High action path=/userRegistration type=strutsTutorial.UserRegistrationAction name=userRegistrationForm attribute=user parameter=action input=/userRegistrationPage1.jsp Have a look at attribute [user] This variable will be available to u in ur jsp [use Bean tld]!!! Hope it helps!!! -Aru K -Original Message- From: jacob skariah [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 3:23 PM To: [EMAIL PROTECTED] Subject: Can We manually populate the FormBeans to display the contents on the jsp Hi, Can we use FormBeans to display our contents on the jsp page, as it does this work if an error occurs after the submit is done. I need to use this feature of FormBeans to display my contents on the jsp page. for example: say i am doing a jobsite project. and an user who has posted a resume when he next clicks the resume for editing it, can i populate a FormBean and pass it to the jsp page and will it populate the feilds on the jsp resume page as it does when an error occurs. Can any one tell me how to do this, so that i dont need to use additional helper beans to populate the pages when formbeans can do it. pls give me some code samples for passing the form beans to the page. Thanx in advance Regards JAcob Skariah __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Disable validate in actionForm
hi I have an validate method in my actionform and everything works fine. I added a 'Back' button in my webpage, and therefore validation is not necessary if the 'Back' button is clicked. Validation should occurs only if 'Next' is selected. How do I stop struts from calling validate() is 'Back' is selected? Note : Both buttons are in the same form. Thanks Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
passing a dynamic range of values to jsp page
Hi all, I want to pass a range of values which is dynamic(values retrieved from a database using a dynamic query) from an action class to corresponding jsp page. I hav to access it from the jsp page and dispaly. How can i do this in struts. Thanks, vinu
Re: passing a dynamic range of values to jsp page
On Tue, 17 Aug 2004, vineesh . kumar wrote: I want to pass a range of values which is dynamic(values retrieved from a database using a dynamic query) from an action class to corresponding jsp page. I hav to access it from the jsp page and dispaly. How can i do this in struts. what about simple request.setAttribute(key, value) ? pavel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disable validate in actionForm
Sebestian, Where does control go when u click Back button? If this has to do 'browser like' back action, just call javascript. Why do u call struts action? Any specific reason? -Original Message- From: Sebastian Ho [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 3:44 PM To: Struts Users Mailing List Subject: Disable validate in actionForm hi I have an validate method in my actionform and everything works fine. I added a 'Back' button in my webpage, and therefore validation is not necessary if the 'Back' button is clicked. Validation should occurs only if 'Next' is selected. How do I stop struts from calling validate() is 'Back' is selected? Note : Both buttons are in the same form. Thanks Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can We manually populate the FormBeans to display the contents on the jsp
action path=/userRegistration type=strutsTutorial.UserRegistrationAction name=userRegistrationForm attribute=user parameter=action input=/userRegistrationPage1.jsp Have a look at attribute [user] This variable will be available to u in ur jsp [use Bean tld]!!! Hope it helps!!! -Aru K -Original Message- From: jacob skariah [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 3:23 PM To: [EMAIL PROTECTED] Subject: Can We manually populate the FormBeans to display the contents on the jsp Hi, Can we use FormBeans to display our contents on the jsp page, as it does this work if an error occurs after the submit is done. I need to use this feature of FormBeans to display my contents on the jsp page. for example: say i am doing a jobsite project. and an user who has posted a resume when he next clicks the resume for editing it, can i populate a FormBean and pass it to the jsp page and will it populate the feilds on the jsp resume page as it does when an error occurs. Can any one tell me how to do this, so that i dont need to use additional helper beans to populate the pages when formbeans can do it. pls give me some code samples for passing the form beans to the page. Thanx in advance Regards JAcob Skariah __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: About Tiles
Maybe you can look at the following open source product: http://www.opensymphony.com/oscache/ It provides caching on all sorts of layers in your j2ee application. Greetings Jimmy Jimmy Van Broeck Consultant BT CITS DE POST - LA POSTE ICT-Development WTC II - Kantoor 307 email: [EMAIL PROTECTED] -Original Message- From: Koon Yue Lam [mailto:[EMAIL PROTECTED] Sent: dinsdag 17 augustus 2004 8:49 To: Struts Users Mailing List Subject: About Tiles Hi, I want to build a webpage using tiles, the structure is: Header Body Footer super classic layout but I have one question, if the content in Header and Footer are read only and will be nearly the same throughout entire user session. How can I just reload the body part? and keep the Header and Footer static? (the content of Body is generated according to the content of Header) however, each user will have a page to modify their info (name, age...), and after these changes have made to DB. Both Header and Footer must force to reload so how can I trigger reload of Tiles as I wish, but keep those tiles static for the rest of time?? Best regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] STRICTLY PERSONAL AND CONFIDENTIAL This message may contain confidential and proprietary material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies. Ce Message est uniquement destiné aux destinataires indiqués et peut contenir des informations confidentielles. Si vous n'êtes pas le destinataire, vous ne devez pas révéler le contenu de ce message ou en prendre copie. Si vous avez reçu ce message par erreur, veuillez en informer l'expéditeur, ou La Poste immédiatement, avant de le supprimer. Dit bericht is enkel bestemd voor de aangeduide ontvangers en kan vertrouwelijke informatie bevatten. Als u niet de ontvanger bent, dan mag u de inhoud van dit bericht niet bekendmaken noch kopiëren. Als u dit bericht per vergissing heeft ontvangen, gelieve er de afzender of De Post onmiddellijk van op de hoogte te brengen en het bericht vervolgens te verwijderen.
Re: Re: passing a dynamic range of values to jsp page
hi, the problem is that, i may hav just one recordset or may have hundred recordset. It's unpredictable. Also at the jsp page(view) how can i access these values dynamically. if the recordset contains 100 records and each record contains four fields there should be atleast 400 atribute in the reuest and how a jsp can dynamically handle it? Thank u vinu On Tue, 17 Aug 2004 Pavel Kolesnikov wrote : On Tue, 17 Aug 2004, vineesh . kumar wrote: I want to pass a range of values which is dynamic(values retrieved from a database using a dynamic query) from an action class to corresponding jsp page. I hav to access it from the jsp page and dispaly. How can i do this in struts. what about simple request.setAttribute(key, value) ? pavel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: passing a dynamic range of values to jsp page
Making the records available via request attributes still applies. Your request attributes can be Collections, Maps, etc. Check out the Struts logic tags (such as logic:iterate) and/or the JSTL core tags (such as c:forEach), and read the FAQ on indexed properties for help in rendering data from these types of structures. Erik vineesh . kumar wrote: hi, the problem is that, i may hav just one recordset or may have hundred recordset. It's unpredictable. Also at the jsp page(view) how can i access these values dynamically. if the recordset contains 100 records and each record contains four fields there should be atleast 400 atribute in the reuest and how a jsp can dynamically handle it? Thank u vinu On Tue, 17 Aug 2004 Pavel Kolesnikov wrote : On Tue, 17 Aug 2004, vineesh . kumar wrote: I want to pass a range of values which is dynamic(values retrieved from a database using a dynamic query) from an action class to corresponding jsp page. I hav to access it from the jsp page and dispaly. How can i do this in struts. what about simple request.setAttribute(key, value) ? pavel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: passing a dynamic range of values to jsp page
On Tue, 17 Aug 2004, vineesh . kumar wrote: the problem is that, i may hav just one recordset or may have hundred recordset. It's unpredictable. Also at the jsp page(view) how can i access these values dynamically. if the recordset contains 100 records and each record contains four fields there should be atleast 400 atribute in the reuest and how a jsp can dynamically handle it? Put all your records into one Collection and then set just one request attribute - the Collection object. You can access it using JSTL tag c:forEach or Struts tag logic:iterate in your JSP. Just a usability none - if your business logic returns 400 objects for your request, maybe it's not a good idea to display all of them on one page. Pavel On Tue, 17 Aug 2004 Pavel Kolesnikov wrote : On Tue, 17 Aug 2004, vineesh . kumar wrote: I want to pass a range of values which is dynamic(values retrieved from a database using a dynamic query) from an action class to corresponding jsp page. I hav to access it from the jsp page and dispaly. How can i do this in struts. what about simple request.setAttribute(key, value) ? pavel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disable validate in actionForm
Hi I think my situtation is kinda unique.. I have three buttons in a single form and my Action extends LookupDispatchAction. In my ExperimentForm (actionform), how do I disable validate if 'back' is clicked? struts-config.xml -- action name=experimentForm path=/NewExperiment input=CreateExperiment.jsp parameter=action scope=request type=sg.edu.astar.flamingo.web.proteomics.view.NewExperimentAction forward name=addexperiment path=/CreateExperiment.do/ forward name=next path=/CreateProjectSummary.do/ forward name=back path=/CreateProject.do/ /action CreateExperiment.jsp - html:submit property=action value=Back bean:message key=button.back/ /html:submit /html:submit html:submit property=action value=Create Experiment bean:message key=button.createexperiment/ /html:submit html:submit property=action value=Next bean:message key=button.next/ /html:submit applicationresources.properties button.createexperiment=Create Experiment button.next=Next button.back=Back NewExperimentAction.java --- public class NewExperimentAction extends LookupDispatchAction { /** * This is the main action called from the Struts framework. * @param mapping The ActionMapping used to select this instance. * @param form The optional ActionForm bean for this request. * @param request The HTTP Request we are processing. * @param response The HTTP Response we are processing. * @return * @throws java.io.IOException * @throws javax.servlet.ServletException */ // public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException //{ // return mapping.findForward(success); // } protected Map getKeyMethodMap() { Map map = new HashMap(); map.put(button.createexperiment, createExperiment); map.put(button.next, next); map.put(button.back, back); return map; } public ActionForward next(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { System.out.println(next()); return mapping.findForward(next); } public ActionForward back(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { System.out.println(back()); return mapping.findForward(back); } public ActionForward createExperiment(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { ExperimentForm experiment = (ExperimentForm) form; HttpSession session = request.getSession(); Vector experiments = (Vector) session.getAttribute(experiments); experiments.add(experiment); return mapping.findForward(addexperiment); } } On Tue, 2004-08-17 at 15:47, Kataria, Satish wrote: Map it to a different actionMapping and set validate=fasle; ie the submit and back button should have a different actionmapping Satish -Original Message- From: Sebastian Ho [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 1:14 PM To: Struts Users Mailing List Subject: Disable validate in actionForm hi I have an validate method in my actionform and everything works fine. I added a 'Back' button in my webpage, and therefore validation is not necessary if the 'Back' button is clicked. Validation should occurs only if 'Next' is selected. How do I stop struts from calling validate() is 'Back' is selected? Note : Both buttons are in the same form. Thanks Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disable validate in actionForm
Tried javascript and it works fine. The reasons I try not to use javascript : 1. since struts is used, i thought all control should be visible in the controller and not as javascripts in the JSP. 2. User might turn off javascript. sebastian ho On Tue, 2004-08-17 at 15:57, Aru wrote: Sebestian, Where does control go when u click Back button? If this has to do 'browser like' back action, just call javascript. Why do u call struts action? Any specific reason? -Original Message- From: Sebastian Ho [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 3:44 PM To: Struts Users Mailing List Subject: Disable validate in actionForm hi I have an validate method in my actionform and everything works fine. I added a 'Back' button in my webpage, and therefore validation is not necessary if the 'Back' button is clicked. Validation should occurs only if 'Next' is selected. How do I stop struts from calling validate() is 'Back' is selected? Note : Both buttons are in the same form. Thanks Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disable validate in actionForm
Sebastien, I use this technique, it works but i dont know if it is 'good practice' 1. Change your 'back' button from a submit to a cancel button (thereby avoiding validation) 2. Set the action of the button to 'previous' using javascript . 3. pick up the 'previous' in a DispatchAction class and forward to appropriate place. Note that if you use LookUpDispatchAction i think you may be able to avoid the javascript. regards Richard Richard Aukland 49 Ravensmere, Beccles, Suffolk, UK. NR34 9BE Tel/Fax. +44(0)1502 470162 Cell.+44(0)7906 094578 mailto: [EMAIL PROTECTED] http://www.aukinfo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disable validate in actionForm
Thanks Richard I fixed the Back problem using javascript (using javascript history.back()). Although it is resolved, I am still very much interested in the struts solution without using javascript. sebastian On Tue, 2004-08-17 at 18:46, Richard Aukland wrote: Sebastien, I use this technique, it works but i dont know if it is 'good practice' 1. Change your 'back' button from a submit to a cancel button (thereby avoiding validation) 2. Set the action of the button to 'previous' using javascript . 3. pick up the 'previous' in a DispatchAction class and forward to appropriate place. Note that if you use LookUpDispatchAction i think you may be able to avoid the javascript. regards Richard Richard Aukland 49 Ravensmere, Beccles, Suffolk, UK. NR34 9BE Tel/Fax. +44(0)1502 470162 Cell.+44(0)7906 094578 mailto: [EMAIL PROTECTED] http://www.aukinfo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Re: passing a dynamic range of values to jsp page
sir, can u specify some code snippet or a link which leads to the example code? thanking u, vinu On Tue, 17 Aug 2004 Pavel Kolesnikov wrote : On Tue, 17 Aug 2004, vineesh . kumar wrote: the problem is that, i may hav just one recordset or may have hundred recordset. It's unpredictable. Also at the jsp page(view) how can i access these values dynamically. if the recordset contains 100 records and each record contains four fields there should be atleast 400 atribute in the reuest and how a jsp can dynamically handle it? Put all your records into one Collection and then set just one request attribute - the Collection object. You can access it using JSTL tag c:forEach or Struts tag logic:iterate in your JSP. Just a usability none - if your business logic returns 400 objects for your request, maybe it's not a good idea to display all of them on one page. Pavel On Tue, 17 Aug 2004 Pavel Kolesnikov wrote : On Tue, 17 Aug 2004, vineesh . kumar wrote: I want to pass a range of values which is dynamic(values retrieved from a database using a dynamic query) from an action class to corresponding jsp page. I hav to access it from the jsp page and dispaly. How can i do this in struts. what about simple request.setAttribute(key, value) ? pavel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: Re: passing a dynamic range of values to jsp page
Code in your action: Collection records = someBusinessObject.getPlentyOfRecords(); request.setAttribute (myRecords, records); Code in your JSP (supposes appropriate taglib declarations) ul c:forEach var=rec items=${myRecords} lic:out value=${rec.someProperty}//li /c:forEach /ul If it's not helpful there may be two reasons for it: - I don't understand your problem - or you should get some book about basics of java web programming ;) Pavel On Tue, 17 Aug 2004, vineesh . kumar wrote: sir, can u specify some code snippet or a link which leads to the example code? On Tue, 17 Aug 2004 Pavel Kolesnikov wrote : On Tue, 17 Aug 2004, vineesh . kumar wrote: the problem is that, i may hav just one recordset or may have hundred recordset. It's unpredictable. Also at the jsp page(view) how can i access these values dynamically. if the recordset contains 100 records and each record contains four fields there should be atleast 400 atribute in the reuest and how a jsp can dynamically handle it? Put all your records into one Collection and then set just one request attribute - the Collection object. You can access it using JSTL tag c:forEach or Struts tag logic:iterate in your JSP. Just a usability none - if your business logic returns 400 objects for your request, maybe it's not a good idea to display all of them on one page. Pavel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disable validate in actionForm
On Tue, 17 Aug 2004, Sebastian Ho wrote: I fixed the Back problem using javascript (using javascript history.back()). Although it is resolved, I am still very much interested in the struts solution without using javascript. what about checking for the back property in your validate method (as i wrote few mails ago)? according to your description of CreateExperiment.jsp just change the proposed code to: 8 snip - public ActionErrors validate ( ... ) { if (! back.equals (getAction ()) ) { super.validate ( ... ); // another validations if needed } } 8 snip - i still suppose you have defined property action in your form bean. pavel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Login and authentication
Hi, i'm building a b2b application that must be released for testing in a few days. I got 1 very basic problem: - I don't know jaas The good point is that i need only a login module to go with Struts and jboss. It doesn't need to be definitie, but it must work. I don't know if by the fact i'm using struts, things should be implemented diferent (as i said, i don't how jaas works), that's why i'm sendind this e-mail. Does anyone know a short tutorial i can use? ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Login and authentication
Try http://www.mooreds.com/jaas.html thanks Deepak - Original Message - From: Leandro Melo [EMAIL PROTECTED] To: struts jakarta [EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 5:30 PM Subject: Login and authentication Hi, i'm building a b2b application that must be released for testing in a few days. I got 1 very basic problem: - I don't know jaas The good point is that i need only a login module to go with Struts and jboss. It doesn't need to be definitie, but it must work. I don't know if by the fact i'm using struts, things should be implemented diferent (as i said, i don't how jaas works), that's why i'm sendind this e-mail. Does anyone know a short tutorial i can use? ___ Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
i18n in static web pages
Hello everyone: We are developing an application with Struts. The pages are made with JSP and taglibs. However we will need to have the possibility of separating the presentation in HTML and loading the dynamic data by means of XML (e.g: data islands). The problem is that the pages are programmed using the tag bean:message of struts, which obviously cannot be used in HTML pages. Do you know some application or tool that that can do this? That is, generate de static HTML from the JSPs with multilanguage? Thanks
RE: i18n in static web pages
One option would be to create your site in JSP. Periodically you could extract the current site (in each language) as HTML (using wget or similair) and put the resulting pages on the relevant http server. Paul -Original Message- From: Hevia Vega, Andres [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 1:33 PM To: '[EMAIL PROTECTED]' Subject: i18n in static web pages Hello everyone: We are developing an application with Struts. The pages are made with JSP and taglibs. However we will need to have the possibility of separating the presentation in HTML and loading the dynamic data by means of XML (e.g: data islands). The problem is that the pages are programmed using the tag bean:message of struts, which obviously cannot be used in HTML pages. Do you know some application or tool that that can do this? That is, generate de static HTML from the JSPs with multilanguage? Thanks ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic Form Submission
I want to create a form that has two different actions. The user will have a button to READ information in from the database and a button to SAVE information into the database after modification. I currently use Validator to validate my forms and when the user clicks on the READ button then Validator takes over and gives the user errors. I dont want the form to be validated when the user is attempting a READ. I only want the form to be validated if the user is attempting to do a SAVE. Unless anyone has a better solution (which I hope someone does), I have decided that I need to create two action classes. One that will handle the read logic without going through validation and one that will handle the save logic and go through the validation. My question with this solution is how do I elegantly provide this functionality on the jsp? Do I put the SAVE submit button within one form and the READ submit button within another form and have different actions associated with each form? Or, is there a better way? Thanks, Christopher Kwiatkowski
Re: Dynamic Form Submission
You can use the same Action and the same ActionForm, but you can map two different action mappings in struts-config.xml. Set validation to true on one and false on the other. Hope that helps, Erik Christopher Kwiatkowski wrote: I want to create a form that has two different actions. The user will have a button to READ information in from the database and a button to SAVE information into the database after modification. I currently use Validator to validate my forms and when the user clicks on the READ button then Validator takes over and gives the user errors. I dont want the form to be validated when the user is attempting a READ. I only want the form to be validated if the user is attempting to do a SAVE. Unless anyone has a better solution (which I hope someone does), I have decided that I need to create two action classes. One that will handle the read logic without going through validation and one that will handle the save logic and go through the validation. My question with this solution is how do I elegantly provide this functionality on the jsp? Do I put the SAVE submit button within one form and the READ submit button within another form and have different actions associated with each form? Or, is there a better way? Thanks, Christopher Kwiatkowski - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Form Submission
First, I assume that you are using path mappings for Validator. You can use two separate forms as you suggested; however, if you don't want to duplicate form fields and it makes more sense from a usability perspective to have a single form--you can change the action for the form on the fly using JavaScript like the following: script function swapAction(control) { formAction = document.getElementById(empForm).action; if (control.checked) newAction = 'html:rewrite page=/CreateEmployee.do/'; else newAction = 'html:rewrite page=/UpdateEmployee.do/'; document.getElementById(empForm).action = newAction; } /script html:form styleId=empForm action=/UpdateEmployee New Employee: html:checkbox property=create onclick='swapAction(this)'/br / rest of the page Christopher Kwiatkowski wrote: I want to create a form that has two different actions. The user will have a button to READ information in from the database and a button to SAVE information into the database after modification. I currently use Validator to validate my forms and when the user clicks on the READ button then Validator takes over and gives the user errors. I dont want the form to be validated when the user is attempting a READ. I only want the form to be validated if the user is attempting to do a SAVE. Unless anyone has a better solution (which I hope someone does), I have decided that I need to create two action classes. One that will handle the read logic without going through validation and one that will handle the save logic and go through the validation. My question with this solution is how do I elegantly provide this functionality on the jsp? Do I put the SAVE submit button within one form and the READ submit button within another form and have different actions associated with each form? Or, is there a better way? Thanks, Christopher Kwiatkowski - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details
solution 1. persisting data may cause some problems, for example performance, as users may need to create a few detail objects. I prefer to keep these objects in View and provide a 'Done' button, which will then let Action to do the persistence. Another problem is that in my Use Case, the detail objects are associated to the parent object, which might not be persisted at this moment (because we go to B.JSP before saving data in A.JSP). So i can not persist detail object first. some work needed to solve these. solution 2. I am not sure if Struts Workflow extension is a good choice. It seems that it uses Session scope for sharing data among a few JSP pages. What complication will it have ? thanks ! --- Kataria, Satish [EMAIL PROTECTED] wrote: It depends upon the architecture you want to follow. There are multiple ways this can be done 1. Create the 2 jsp as independent jsp. Thus the list jsp jsp always fetches from DB when we bring control to that. Clicking add on the list jsp leads to the adddetails jsp which submit data to DB. This is the most commonly used and I have seen this being used successfully in multiple applications 2. Create the 2 jsp as a wizard using struts session scope strategy. This strategy has certain complications and is generally disadvantageous. Thanks, Satish Kataria -Original Message- From: lixin chu [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 4:59 AM To: [EMAIL PROTECTED] Subject: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details Hi, How should I handle this: I have 2 jsp, in a.JSP, I need to display an ArrayList. When users click 'Add', B.JSP is displayed which allows users to fill in the details of a new object. When users click 'Done', I need to return back to A.JSP, display the newly added object, and ArrayList should be updated as well. What do I need to do to support this ? thank you very much li xin __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
format date using a bean:write
Hello, Is it possible to format a date stored in a Date object using a bean: write tag? I use the following but it's not working: bean:write name=product property=creationDate format=##-##- / Thanks in advance. /jm
Re: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details
Session scoped forms are one of my favorite things about Struts. Seems like you have a situation for them. Make sure you keep all session-scoped form fields Serializable or mark them as transient if they are not. Clever implementations of ActionForm.reset can make memory management easier. The complication is simply that you might hold on to references to objects that should have been garbage once processing is complete. If you don't use session scoped forms, you will probably have to manage objects using session scope one way or another, unless you somehow use hidden variables to specify running objects that get recreated for each request. Erik lixin chu wrote: solution 1. persisting data may cause some problems, for example performance, as users may need to create a few detail objects. I prefer to keep these objects in View and provide a 'Done' button, which will then let Action to do the persistence. Another problem is that in my Use Case, the detail objects are associated to the parent object, which might not be persisted at this moment (because we go to B.JSP before saving data in A.JSP). So i can not persist detail object first. some work needed to solve these. solution 2. I am not sure if Struts Workflow extension is a good choice. It seems that it uses Session scope for sharing data among a few JSP pages. What complication will it have ? thanks ! --- Kataria, Satish [EMAIL PROTECTED] wrote: It depends upon the architecture you want to follow. There are multiple ways this can be done 1. Create the 2 jsp as independent jsp. Thus the list jsp jsp always fetches from DB when we bring control to that. Clicking add on the list jsp leads to the adddetails jsp which submit data to DB. This is the most commonly used and I have seen this being used successfully in multiple applications 2. Create the 2 jsp as a wizard using struts session scope strategy. This strategy has certain complications and is generally disadvantageous. Thanks, Satish Kataria -Original Message- From: lixin chu [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 4:59 AM To: [EMAIL PROTECTED] Subject: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details Hi, How should I handle this: I have 2 jsp, in a.JSP, I need to display an ArrayList. When users click 'Add', B.JSP is displayed which allows users to fill in the details of a new object. When users click 'Done', I need to return back to A.JSP, display the newly added object, and ArrayList should be updated as well. What do I need to do to support this ? thank you very much li xin __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: format date using a bean:write
bean:write name=product property=creationDate format=MM/dd// for example . . . Jean-Michel Robinet wrote: Hello, Is it possible to format a date stored in a Date object using a bean: write tag? I use the following but it's not working: bean:write name=product property=creationDate format=##-##- / Thanks in advance. /jm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: format date using a bean:write
See the JavaDoc for java.text.SimpleDateFormat. One possibility: bean:write name=product property=creationDate format=MM-dd- / Quoting Jean-Michel Robinet [EMAIL PROTECTED]: Hello, Is it possible to format a date stored in a Date object using a bean: write tag? I use the following but it's not working: bean:write name=product property=creationDate format=##-##- / Thanks in advance. /jm -- Kris Schneider mailto:[EMAIL PROTECTED] D.O.Tech http://www.dotech.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: format date using a bean:write
See the API documentation for java.text.SimpleDateFormat (if I understand your problem correctly). Erik Erik Weber wrote: bean:write name=product property=creationDate format=MM/dd// for example . . . Jean-Michel Robinet wrote: Hello, Is it possible to format a date stored in a Date object using a bean: write tag? I use the following but it's not working: bean:write name=product property=creationDate format=##-##- / Thanks in advance. /jm - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Form Submission
Christopher Kwiatkowski wrote: I want to create a form that has two different actions. The user will have a button to READ information in from the database and a button to SAVE information into the database after modification. I currently use Validator to validate my forms and when the user clicks on the READ button then Validator takes over and gives the user errors. I dont want the form to be validated when the user is attempting a READ. I only want the form to be validated if the user is attempting to do a SAVE. Unless anyone has a better solution (which I hope someone does), I have decided that I need to create two action classes. One that will handle the read logic without going through validation and one that will handle the save logic and go through the validation. My question with this solution is how do I elegantly provide this functionality on the jsp? Do I put the SAVE submit button within one form and the READ submit button within another form and have different actions associated with each form? Or, is there a better way? Thanks, Christopher Kwiatkowski Lo, Christopher, You might get some ideas from http://wiki.apache.org/struts/StrutsCatalogMultipleImageTagsSimplified Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
java application to struts
Hi all, I have my web application based on struts framework. This application takes some information from the user. I can submit information using jsp but now i want to have a java application that would connect to my webapplication using http connection and submit the information. I know I can do that if I have a servlet. Now my question is how do that with struts. What will be action mapping and all that information. Any suggestions regards saurabh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dynamic Form Submission
Hello, How about using a DispatchAction triggered by a Parameter, let's say 'buttonSelected', which would be Either insert/read/delete etc In ur validation you check for the value of that parameter in order To perform validation... Hope this helps Regards marco -Original Message- From: Christopher Kwiatkowski [mailto:[EMAIL PROTECTED] Sent: 17 August 2004 15:38 To: [EMAIL PROTECTED] Subject: Dynamic Form Submission I want to create a form that has two different actions. The user will have a button to READ information in from the database and a button to SAVE information into the database after modification. I currently use Validator to validate my forms and when the user clicks on the READ button then Validator takes over and gives the user errors. I don't want the form to be validated when the user is attempting a READ. I only want the form to be validated if the user is attempting to do a SAVE. Unless anyone has a better solution (which I hope someone does), I have decided that I need to create two action classes. One that will handle the read logic without going through validation and one that will handle the save logic and go through the validation. My question with this solution is how do I elegantly provide this functionality on the jsp? Do I put the SAVE submit button within one form and the READ submit button within another form and have different actions associated with each form? Or, is there a better way? Thanks, Christopher Kwiatkowski - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java application to struts
To your HTTP client, there should be no difference between a Struts app and any other Servlet-based app (or HTTP server app for that matter). Right? Erik Saurabh Bhatla wrote: Hi all, I have my web application based on struts framework. This application takes some information from the user. I can submit information using jsp but now i want to have a java application that would connect to my webapplication using http connection and submit the information. I know I can do that if I have a servlet. Now my question is how do that with struts. What will be action mapping and all that information. Any suggestions regards saurabh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java application to struts
Erik, then my question is what do i need to change in .xml file if i dont want anything to be returned back to the application from struts?. reading and writing to the stream is handled manually in servlets. Will it be like if i dont apecify forward in .xml file then nothing will be returned to the application. regards saurabh On Tue, 2004-08-17 at 10:26, Erik Weber wrote: To your HTTP client, there should be no difference between a Struts app and any other Servlet-based app (or HTTP server app for that matter). Right? Erik Saurabh Bhatla wrote: Hi all, I have my web application based on struts framework. This application takes some information from the user. I can submit information using jsp but now i want to have a java application that would connect to my webapplication using http connection and submit the information. I know I can do that if I have a servlet. Now my question is how do that with struts. What will be action mapping and all that information. Any suggestions regards saurabh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java application to struts
Ah. Your Action's execute method, which returns an ActionForward instance, can return null, and (as far as I know) the controller won't send a response. I use this when serving binary files. Erik Saurabh Bhatla wrote: Erik, then my question is what do i need to change in .xml file if i dont want anything to be returned back to the application from struts?. reading and writing to the stream is handled manually in servlets. Will it be like if i dont apecify forward in .xml file then nothing will be returned to the application. regards saurabh On Tue, 2004-08-17 at 10:26, Erik Weber wrote: To your HTTP client, there should be no difference between a Struts app and any other Servlet-based app (or HTTP server app for that matter). Right? Erik Saurabh Bhatla wrote: Hi all, I have my web application based on struts framework. This application takes some information from the user. I can submit information using jsp but now i want to have a java application that would connect to my webapplication using http connection and submit the information. I know I can do that if I have a servlet. Now my question is how do that with struts. What will be action mapping and all that information. Any suggestions regards saurabh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: connection pooling
-Original Message- From: Jignesh Patel [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 7:18 AM To: Struts Users Mailing List Subject: RE: connection pooling Suppose I will put following code in my struts-config.xml instead of tomcat's server.xml will it work as per the expectation for abandoned connection. set-property property=maxCount value=1500/ set-property property=minCount value=1500/ set-property property=username value=jpatel / set-property property=password value=jpatel / set-property property=removeAbandoned value=true/ set-property property=removeAbandonedTimeout value=300/ set-property property=logAbandoned value=true/ No I don' think so... tomcat is managing the connection not struts. -Jignesh On Mon, 2004-08-16 at 18:20, Jim Barrows wrote: -Original Message- From: Saurabh Bhatla [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 3:16 PM To: Struts Users Mailing List Subject: RE: connection pooling Jim, I understand most part of it now. the only thing that i dont understand is how will the connection pooling be handled. I am using tomcat 5. will the following code(from the link that u sent me) serve the purpose? data-sources !-- configuration for commons BasicDataSource -- data-source type=org.apache.commons.dbcp.BasicDataSource set-property property=driverClassName value=org.postgresql.Driver / set-property property=url value=jdbc:postgresql://localhost/mydatabase / set-property property=username value=me / http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasourc e-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20 Configurations The short version is that it is handled automagically for you. No need to borrow or return the connection etc. . . . .. regards saurabh On Mon, 2004-08-16 at 16:45, Jim Barrows wrote: -Original Message- From: Saurabh Bhatla [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 2:42 PM To: Struts Users Mailing List Subject: RE: connection pooling Jim, I am sorry but I am confused now. Just correct me if I am wrong I want to call my DAO from my Action class. So the snippet that you sent me would go in my DAO class in the function getConnection() (or something like that). Yes, that is correct. I acutally implment that in my DaoFactory class, and put the resultant connection from the data source in the DaoFactory class. That allows me to easily de-couple the dao class for testing. And if what I said is correct then does it mean that I dont need to have a connection pool class and my webserver would handle everything for me. Depends on the web server... websphere has it's own, tomcat allows you to have several choices, and I have no idea what BEA does. regards saurabh On Mon, 2004-08-16 at 16:29, Jim Barrows wrote: -Original Message- From: Saurabh Bhatla [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 2:24 PM To: Struts Users Mailing List Subject: Re: connection pooling David, But i want to make a business layer and call the DAO from there. I think that the links that you have sent me couple presentation layer and database tightly. I know i can use EJB for presentation layer but I dont want that as it would be overkill for the small project I am working on. I want to have a connection pool class initialized at the time the server starts and then all my DAO should get the connection from that pool. Is it possible? I am a beginner in this field and I might not understand it completely. please correct me if i am wrong. Ah, okay.. I also posted a link to the struts way to do the JNDI data source stuff in that case.. you follow your web app servers guide on how to setup a data source, then you follow the destructions for a normal jndi data source. Something like: /** * */ public static DataSource getDataSource() throws NamingException { if (ds == null) { Context ctx = (Context) new InitialContext(); ds = (DataSource) ctx.lookup( jdbc/yourDataSource); } return ds; } regards saurabh - To unsubscribe, e-mail: [EMAIL PROTECTED]
Re: Dynamic Form Submission
Oops -- I missformatted my last e-mail -- I wrote the part starting with Ahh ... not Marco. Marco wrote the stuff that followed about using DispatchAction. My bad ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with Flex
Can anyone afford it?!!! |-+ | | Ovidiu EFTIMIE | | | [EMAIL PROTECTED]| | | m | | || | | 08/17/2004 12:03 | | | PM | | | Please respond to| | | Struts Users| | | Mailing List| | || |-+ | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: Struts with Flex | | bump Nobody here tried Flex with Struts ? It really seems a good choice for RIA web applications, but I'd like to know more from people who have use it. Ovidiu On Sat, 14 Aug 2004 21:47:30 +0300, Ovidiu EFTIMIE [EMAIL PROTECTED] wrote: Hi, Has anyone any experience with Struts and Flex (http://www.macromedia.com/software/flex/ , http://www.macromedia.com/devnet/flex/articles/struts.html) that would like to share ? How about Struts+XML+(XSLT/Flex) ? Regards, Ovidiu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Generating struts tags from a Java Bean
I would like to generate struts tags from a Java bean, which would decide what tags to generate based on context. Is there any way to configure the JSP so that it will evaluate the JavaBean first, before the struts tags, so that the struts tags can be generated by the beans? This email message from Starpoint Solutions LLC is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Opinions, conclusions and other information in this message that do not relate to the official business of Starpoint Solutions shall be understood as neither given nor endorsed by it.
RE: java application to struts
Isn't there always a response? And if there is no response how would you know that things went great? Why not just return a little status code... Maybe 0 or 1, or some other number. 0 = things went great any other number can be code for how things didn't go great. Just like processes.. Mi dos cientos.. Pritpal -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 9:00 AM To: Struts Users Mailing List Subject: Re: java application to struts In a case like this my action mapping would look something like this: action path=/actor/downloadFile type=MyActionClass parameter=serveBinaryFile/ In other words, no forwards, no form beans. Your execute method in your action class can manipulate the response OutputStream, flush and close it manually and then return null to the controller. Erik Erik Weber wrote: Ah. Your Action's execute method, which returns an ActionForward instance, can return null, and (as far as I know) the controller won't send a response. I use this when serving binary files. Erik Saurabh Bhatla wrote: Erik, then my question is what do i need to change in .xml file if i dont want anything to be returned back to the application from struts?. reading and writing to the stream is handled manually in servlets. Will it be like if i dont apecify forward in .xml file then nothing will be returned to the application. regards saurabh On Tue, 2004-08-17 at 10:26, Erik Weber wrote: To your HTTP client, there should be no difference between a Struts app and any other Servlet-based app (or HTTP server app for that matter). Right? Erik Saurabh Bhatla wrote: Hi all, I have my web application based on struts framework. This application takes some information from the user. I can submit information using jsp but now i want to have a java application that would connect to my webapplication using http connection and submit the information. I know I can do that if I have a servlet. Now my question is how do that with struts. What will be action mapping and all that information. Any suggestions regards saurabh --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Generating struts tags from a Java Bean
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 9:42 AM To: Struts Users Mailing List Subject: Generating struts tags from a Java Bean I would like to generate struts tags from a Java bean, which would decide what tags to generate based on context. Is there any way to configure the JSP so that it will evaluate the JavaBean first, before the struts tags, so that the struts tags can be generated by the beans? I don't believe so. Since struts tags only generate html, you could have beans that generate html based on context. However, given that struts and jstl have some rather powerful logical statements, you might be able to achieve what you want without doing away with struts tags, which is what you are basically asking. What problem are you trying to solve? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java application to struts
Yes. Here we are just preventing Struts from sending any response, since we are going to send a response manually (by writing bytes to the response OutputStream). If you were to send a response manually, and then return an ActionForward to the controller, you would in effect be attempting to send two responses. Erik Dhaliwal, Pritpal (HQP) wrote: Isn't there always a response? And if there is no response how would you know that things went great? Why not just return a little status code... Maybe 0 or 1, or some other number. 0 = things went great any other number can be code for how things didn't go great. Just like processes.. Mi dos cientos.. Pritpal -Original Message- From: Erik Weber [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 9:00 AM To: Struts Users Mailing List Subject: Re: java application to struts In a case like this my action mapping would look something like this: action path=/actor/downloadFile type=MyActionClass parameter=serveBinaryFile/ In other words, no forwards, no form beans. Your execute method in your action class can manipulate the response OutputStream, flush and close it manually and then return null to the controller. Erik Erik Weber wrote: Ah. Your Action's execute method, which returns an ActionForward instance, can return null, and (as far as I know) the controller won't send a response. I use this when serving binary files. Erik Saurabh Bhatla wrote: Erik, then my question is what do i need to change in .xml file if i dont want anything to be returned back to the application from struts?. reading and writing to the stream is handled manually in servlets. Will it be like if i dont apecify forward in .xml file then nothing will be returned to the application. regards saurabh On Tue, 2004-08-17 at 10:26, Erik Weber wrote: To your HTTP client, there should be no difference between a Struts app and any other Servlet-based app (or HTTP server app for that matter). Right? Erik Saurabh Bhatla wrote: Hi all, I have my web application based on struts framework. This application takes some information from the user. I can submit information using jsp but now i want to have a java application that would connect to my webapplication using http connection and submit the information. I know I can do that if I have a servlet. Now my question is how do that with struts. What will be action mapping and all that information. Any suggestions regards saurabh --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with Flex
Well that's another issue. On Sat, 21 Aug 2004 12:37:40 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can anyone afford it?!!! |-+ | | Ovidiu EFTIMIE | | | [EMAIL PROTECTED]| | | m | | || | | 08/17/2004 12:03 | | | PM | | | Please respond to| | | Struts Users| | | Mailing List| | || |-+ | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: Struts with Flex | | bump Nobody here tried Flex with Struts ? It really seems a good choice for RIA web applications, but I'd like to know more from people who have use it. Ovidiu On Sat, 14 Aug 2004 21:47:30 +0300, Ovidiu EFTIMIE [EMAIL PROTECTED] wrote: Hi, Has anyone any experience with Struts and Flex (http://www.macromedia.com/software/flex/ , http://www.macromedia.com/devnet/flex/articles/struts.html) that would like to share ? How about Struts+XML+(XSLT/Flex) ? Regards, Ovidiu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
passing fmt:message as argument
Sorry if this is more JSPish than strutsish, but I'm sure someone can help. I have a javascript I am using for tooltips and I want to pass text defined in my applications.resource file to it. == applications.resource === someText=This is some text. == foo.jsp === img src=images/foo.gif width=10 height=10 alt=[foo] onmouseover=ddrivetip('This is some text.'); onmouseout=hideddrivetip();/ What do I need to do to the img tag to use the message in applications.resource? Thanks. Dean Hoover - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with Flex
Yep, but a pretty prohibitive one. I was very eager to look at Struts with Flex, but then threw it out as we could never afford $12,000 per server. |-+ | | Ovidiu EFTIMIE | | | [EMAIL PROTECTED]| | | m | | || | | 08/17/2004 01:28 | | | PM | | | Please respond to| | | Struts Users| | | Mailing List| | || |-+ | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: Struts with Flex | | Well that's another issue. On Sat, 21 Aug 2004 12:37:40 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Can anyone afford it?!!! |-+ | | Ovidiu EFTIMIE | | | [EMAIL PROTECTED]| | | m | | || | | 08/17/2004 12:03 | | | PM | | | Please respond to| | | Struts Users| | | Mailing List| | || |-+ | | | | To: Struts Users Mailing List [EMAIL PROTECTED] | | cc: | | Subject: Re: Struts with Flex | | bump Nobody here tried Flex with Struts ? It really seems a good choice for RIA web applications, but I'd like to know more from people who have use it. Ovidiu On Sat, 14 Aug 2004 21:47:30 +0300, Ovidiu EFTIMIE [EMAIL PROTECTED] wrote: Hi, Has anyone any experience with Struts and Flex (http://www.macromedia.com/software/flex/ , http://www.macromedia.com/devnet/flex/articles/struts.html) that would like to share ? How about Struts+XML+(XSLT/Flex) ? Regards, Ovidiu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Generating struts tags from a Java Bean
the problem we are trying to solve is that depending on user entitlements and application state, some fields need to either be a drop down or just text. ___ Sent with SnapperMail www.snappermail.com .. Original Message ... On Tue, 17 Aug 2004 09:46:49 -0700 Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 9:42 AM To: Struts Users Mailing List Subject: Generating struts tags from a Java Bean I would like to generate struts tags from a Java bean, which would decide what tags to generate based on context. Is there any way to configure the JSP so that it will evaluate the JavaBean first, before the struts tags, so that the struts tags can be generated by the beans? I don't believe so. Since struts tags only generate html, you could have beans that generate html based on context. However, given that struts and jstl have some rather powerful logical statements, you might be able to achieve what you want without doing away with struts tags, which is what you are basically asking. What problem are you trying to solve? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: passing fmt:message as argument
Can't you insert a bean:write message=myKey/ there? Dean A. Hoover wrote: Sorry if this is more JSPish than strutsish, but I'm sure someone can help. I have a javascript I am using for tooltips and I want to pass text defined in my applications.resource file to it. == applications.resource === someText=This is some text. == foo.jsp === img src=images/foo.gif width=10 height=10 alt=[foo] onmouseover=ddrivetip('This is some text.'); onmouseout=hideddrivetip();/ What do I need to do to the img tag to use the message in applications.resource? Thanks. Dean Hoover - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Generating struts tags from a Java Bean
On Tue, 17 Aug 2004 13:35 -0400, Victor Grazi [EMAIL PROTECTED] wrote: the problem we are trying to solve is that depending on user entitlements and application state, some fields need to either be a drop down or just text. The underlying problem isn't really Struts related ... you're trying to dynamically create a JSP page and then get it compiled and executed, and that's not supported by JSP. Instead, you'll need to use some other technique. The most common approach for solving this particular problem is to surround the conditional fields with something like logic:equals (if using Struts conditional tags) or c:if (if using JSTL), and use an expression that tests whether this particular user should see this particular field. Craig - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with Flex
On Sat, 21 Aug 2004 13:35:16 -0400, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Yep, but a pretty prohibitive one. I was very eager to look at Struts with Flex, but then threw it out as we could never afford $12,000 per server. You can get comparable functionality with the Laszlo Presentation Server. The development edition is a free download. Small business version is 2K per server. For large enterprises, you will have to contact them for pricing info. I have no affiliation with them, but, I have seen some demos that were quite impressive. http://www.laszlosystems.com/products/ FYI, Van Mike Van Riper Silicon Valley Web Developer JUG https://sv-web-jug.dev.java.net --- A.K.A. Silicon Valley Struts User Group http://www.baychi.org/bof/struts/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
commons-lang 1_0_1 and 2_0
Hi, I am trying to use a Struts1.1 and OJB1.1RC7 application but I am facing with the problem that commons-lang1_0_1 doesn't have some classes that OJB uses (like java.lang.NoClassDefFoundError: org/apache/commons/lang/BooleanUtils). If I switch from one version of commons-lang to another one of the packages stop working. I tried both libs on /WEB-INF/lib and OJB doesn't correctly. Is there any way around this (without recompiling/modifying one of the sources)? Pedro Salgado - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with Flex
I also posted that after developing on Flex and Laslo... I switched to JDNC becuase I fodun it much faster! I have a site now on baseBeans.com on RiA/SoA. .V Ovidiu EFTIMIE wrote: bump Nobody here tried Flex with Struts ? It really seems a good choice for RIA web applications, but I'd like to know more from people who have use it. Ovidiu On Sat, 14 Aug 2004 21:47:30 +0300, Ovidiu EFTIMIE [EMAIL PROTECTED] wrote: Hi, Has anyone any experience with Struts and Flex (http://www.macromedia.com/software/flex/ , http://www.macromedia.com/devnet/flex/articles/struts.html) that would like to share ? How about Struts+XML+(XSLT/Flex) ? Regards, Ovidiu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Generating struts tags from a Java Bean
The custom tag approach seems like the way to go. Is there any documentation for considerations besides just perusing the source code for exisiting html tags? Regards Victor .. Original Message ... On Tue, 17 Aug 2004 10:53:29 -0700 Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: Victor Grazi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 10:35 AM To: Struts Users Mailing List Subject: RE: Generating struts tags from a Java Bean the problem we are trying to solve is that depending on user entitlements and application state, some fields need to either be a drop down or just text. What I would suggest then, is to figure that out in your action class, and pass boolean values as part of the form bean. Then on the jsp page, use logic:equal or c:if to determine what to show. Alternatively you could write your own tag library for the field, which would figure out what html to generate based on the attributes you give it. Something like: myCompany:inputField value=${formName.fieldName} applicationState=${applicationState}/ You can of course get a list of roles from isUserInRole(), or hand them in if your doing something else. If you have only 1 or 2 pages, then the first option may be easier, but if you're doing it a lot then the taglib option might be better. ___ Sent with SnapperMail www.snappermail.com .. Original Message ... On Tue, 17 Aug 2004 09:46:49 -0700 Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 9:42 AM To: Struts Users Mailing List Subject: Generating struts tags from a Java Bean I would like to generate struts tags from a Java bean, which would decide what tags to generate based on context. Is there any way to configure the JSP so that it will evaluate the JavaBean first, before the struts tags, so that the struts tags can be generated by the beans? I don't believe so. Since struts tags only generate html, you could have beans that generate html based on context. However, given that struts and jstl have some rather powerful logical statements, you might be able to achieve what you want without doing away with struts tags, which is what you are basically asking. What problem are you trying to solve? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to handle message collections containing keys from multiple bundles...
hihi, does anyone have suggestions for handling mulitple bundles for struts errors? i'm using the ActionForm.validate() (ie. i set validate flag = true in action definition) and i have a situation where the keys for the accumulated ActionError objects need to come from various bundles -- not just the 'main' error bundle defined in struts-config.xml. however, i cannot specify the bundle at the time of creating the ActionError objects. in my .jsp file i output the errors in a loop like so: logic:messagesPresent html:messages id=error bundle=errors c:out value=${error}/ /html:messages /logic:messagesPresent but as you can see, it only handles one bundle at a time (per message collection) how can i handle a situation where my message collection contains keys from multiple bundles? thanks in advance, woodchuck __ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: passing fmt:message as argument
Use the following -- it will work: img src=images/foo.gif width=10 height=10 alt=[foo] onmouseover=ddrivetip('bean:message key=someText/'); onmouseout=hideddrivetip();/ As far as quotes, you just need to make sure that they don't interleave -- JSP translation occurs first so you things will work correctly. As far as using fmt:message -- either one works okay -- if you do want to use the JSTL tags make sure that you define the localization context in your web.xml to point to your message resources ... web-app context-param param-name javax.servlet.jsp.jstl.fmt.localizationContext /param-name param-value ApplicationResources /param-value /context-param ... Bill Siggelkow Dean A. Hoover wrote: Don't know... didn't happen to see any examples like that. Not sure about how the parsing deals with strange nesting of angle brackets, quotes, etc. Also, aren't we moving away from bean:message in favor of fmt:message? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Generating struts tags from a Java Bean
-Original Message- From: Victor Grazi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 1:13 PM To: [EMAIL PROTECTED] Subject: RE: Generating struts tags from a Java Bean The custom tag approach seems like the way to go. Is there any documentation for considerations besides just perusing the source code for exisiting html tags? There's a real nice tutorial on the java.sun.com site. Regards Victor .. Original Message ... On Tue, 17 Aug 2004 10:53:29 -0700 Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: Victor Grazi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 10:35 AM To: Struts Users Mailing List Subject: RE: Generating struts tags from a Java Bean the problem we are trying to solve is that depending on user entitlements and application state, some fields need to either be a drop down or just text. What I would suggest then, is to figure that out in your action class, and pass boolean values as part of the form bean. Then on the jsp page, use logic:equal or c:if to determine what to show. Alternatively you could write your own tag library for the field, which would figure out what html to generate based on the attributes you give it. Something like: myCompany:inputField value=${formName.fieldName} applicationState=${applicationState}/ You can of course get a list of roles from isUserInRole(), or hand them in if your doing something else. If you have only 1 or 2 pages, then the first option may be easier, but if you're doing it a lot then the taglib option might be better. ___ Sent with SnapperMail www.snappermail.com .. Original Message ... On Tue, 17 Aug 2004 09:46:49 -0700 Jim Barrows [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 9:42 AM To: Struts Users Mailing List Subject: Generating struts tags from a Java Bean I would like to generate struts tags from a Java bean, which would decide what tags to generate based on context. Is there any way to configure the JSP so that it will evaluate the JavaBean first, before the struts tags, so that the struts tags can be generated by the beans? I don't believe so. Since struts tags only generate html, you could have beans that generate html based on context. However, given that struts and jstl have some rather powerful logical statements, you might be able to achieve what you want without doing away with struts tags, which is what you are basically asking. What problem are you trying to solve? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot find message resources......
Hi all, I got the following exception in struts-example on the very first page exception javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.logon_jsp._jspService(logon_jsp.java:101) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE org.apache.struts.util.RequestUtils.retrieveMessageResources(RequestUtils.java:1103) org.apache.struts.util.RequestUtils.message(RequestUtils.java:1043) org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:294) org.apache.jsp.logon_jsp._jspx_meth_bean_message_0(logon_jsp.java:166) org.apache.jsp.logon_jsp._jspx_meth_html_html_0(logon_jsp.java:123) org.apache.jsp.logon_jsp._jspService(logon_jsp.java:92) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Why am i getting this exception regards saurabh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: About Tiles
Koon, You can use a TilesAction to modify a part of your tile to display the appropriate HTML, JSP or tiles sub-page as well as fill in pieces such as username, shopping cart totals, etc., such as those that might be stored in the user's session. Regards, David -Original Message- From: Koon Yue Lam [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 2:49 AM To: Struts Users Mailing List Subject: About Tiles Hi, I want to build a webpage using tiles, the structure is: Header Body Footer super classic layout but I have one question, if the content in Header and Footer are read only and will be nearly the same throughout entire user session. How can I just reload the body part? and keep the Header and Footer static? (the content of Body is generated according to the content of Header) however, each user will have a page to modify their info (name, age...), and after these changes have made to DB. Both Header and Footer must force to reload so how can I trigger reload of Tiles as I wish, but keep those tiles static for the rest of time?? Best regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Recursive pages
Hi all, Does anyone know how to make recursive jsp pages? I believe this can be done using %@ include file=recursive.jsp % I have done this as :- nested:present property=replies nested:iterate property=replies %@ include file=recursive.jsp % /nested:iterate /nested:present The above code is actually in recursive.jsp The bean behind this has a structure : class Message implements Serializable { int id String subject String messageText ArrayList replies // Message objects } Not all messages have replies so this become likes a tree ADT - hence the need for recursion. All I get is a recursive loop! I did try using tiles but with this I get the error Cannot flush within a custom tag (even when I set flush to false), strange it only complains when within an iterate loop and equally annoying due to the fact that I need to do it within an iterate loop. This has been bugging me on and off for a week now and so any help would be greatly appreciated - thank you. Terry. aka: Ingenious Monkey _ Want to block unwanted pop-ups? Download the free MSN Toolbar now! http://toolbar.msn.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Recursive pages
-Original Message- From: terry Highfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 4:26 PM To: [EMAIL PROTECTED] Subject: Recursive pages Hi all, Does anyone know how to make recursive jsp pages? Intentionally? No... I've done it with a tiles oopsie. Kind of cool. I believe this can be done using %@ include file=recursive.jsp % I have done this as :- nested:present property=replies nested:iterate property=replies %@ include file=recursive.jsp % /nested:iterate /nested:present The above code is actually in recursive.jsp The bean behind this has a structure : class Message implements Serializable { int id String subject String messageText ArrayList replies // Message objects I think a custom tag to get your tree out would be better then trying to do this. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multiple checkboxes
Hi , I have a scenario in our aplication which we are developing with Struts1.1. on first screen we are displaying bunch of records retrieved from database. Each record will have checkbox in first column. This check box wil be initially checked or unchecked depending upon the value of a bean attribute. A user can chsnge this .He/She can check or uncheck any check boxes for any records.On the next screen it should show me the updated records. i.e. records which are unchecked on previous page should be seen as unchecked and records which are checked on previous page should be shown as checked. I tried this using html:multibox tag but it is not working. can somebody give a suggestion on this? It will be good help from your side if you can give your expert feedback ASAP. Thanks, Jignesh Kapadia - Do you Yahoo!? Y! Messenger - Communicate in real time. Download now.
Re: OC4J and struts issue
did you allready check your tld file ?is it have same name with your taglib (struts-html.tld or Struts-html.tld or something like that) - Original Message - From: simarjit singh [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, August 16, 2004 8:45 PM Subject: Re: OC4J and struts issue Kindly have a look at my struts-config.xml , i have reduced it almost nothing *** struts-config.xml** ?xml version = '1.0' encoding = 'windows-1252'? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; struts-config message-resources parameter=ApplicationResources/ /struts-config ApplicationResources.properties is under WEB-INF/classes ** jsp page ** %@ taglib uri=/WEB-INF/struts-html.tld prefix=html% html:html locale=true head title/title /head bodyhtml:link href=test.htmltest/html:link/body /html:html *** So there is not much space to make a mistake , but i am still able to do that :-) Can there be any issue with classpaths? .I have everything in WEB-INF/lib error is javax.servlet.jsp.JspException: Cannot find message resources under key org.apache.struts.action.MESSAGE at org.apache.struts.util.RequestUtils.message(RequestUtils.java:793) at org.apache.struts.util.RequestUtils.message(RequestUtils.java:755) at org.apache.struts.taglib.html.BaseHandlerTag.message(BaseHandlerTag.java:568 ) at org.apache.struts.taglib.html.BaseHandlerTag.prepareStyles(BaseHandlerTag.ja va:623) at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:355) at _adhoc._selection._jspService(_selection.java:64) [SRC:/adhoc/selection.jsp:10] . . thanks,simar here is the test jsp content Vic Cekvenich wrote: It's usualy a case issues in some xml, since windows is not case sensetive. Look for that. Next time, if you deploy to unix, develop in unix. .V I am able to run it in windows environment but when i move it to solaris, it is failing.:-( - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
multiselect form inputs only populate first string selected
When I try to use a multiselect input (html:select multiple=true), it works fine as long as the associated property is a String[]. However, there's a situation where I have a dynamic list of form elements, each of which has its own multiselect input. So I tried changing the property to a List, but then only the first String selected on the webform is populated in the applicable List index. I threw in some debugging output in my ActionForm setter methods to try to see what was going on. In the case where I use a String[] directly, the object being set is a String[] as expected, but in the case where I wrap a List around the property, the object being set is just a String. I tried using a the Map-backed approach instead of a List, but with the same results: I only see the first item selected off the multiselect box, and never see the other strings that are selected. Has anyone encountered this problem before? Is it perhaps a bug in Struts or am I doing something wrong? -Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details
thanks. i saw some discussion earlier (search for request against session). It seems that people recommond not to use session scope forms. so out of these three, which is my best choice then: - Struts workflow extension - hidden field - session scope form many thanks ! --- Erik Weber [EMAIL PROTECTED] wrote: Session scoped forms are one of my favorite things about Struts. Seems like you have a situation for them. Make sure you keep all session-scoped form fields Serializable or mark them as transient if they are not. Clever implementations of ActionForm.reset can make memory management easier. The complication is simply that you might hold on to references to objects that should have been garbage once processing is complete. If you don't use session scoped forms, you will probably have to manage objects using session scope one way or another, unless you somehow use hidden variables to specify running objects that get recreated for each request. Erik lixin chu wrote: solution 1. persisting data may cause some problems, for example performance, as users may need to create a few detail objects. I prefer to keep these objects in View and provide a 'Done' button, which will then let Action to do the persistence. Another problem is that in my Use Case, the detail objects are associated to the parent object, which might not be persisted at this moment (because we go to B.JSP before saving data in A.JSP). So i can not persist detail object first. some work needed to solve these. solution 2. I am not sure if Struts Workflow extension is a good choice. It seems that it uses Session scope for sharing data among a few JSP pages. What complication will it have ? thanks ! --- Kataria, Satish [EMAIL PROTECTED] wrote: It depends upon the architecture you want to follow. There are multiple ways this can be done 1. Create the 2 jsp as independent jsp. Thus the list jsp jsp always fetches from DB when we bring control to that. Clicking add on the list jsp leads to the adddetails jsp which submit data to DB. This is the most commonly used and I have seen this being used successfully in multiple applications 2. Create the 2 jsp as a wizard using struts session scope strategy. This strategy has certain complications and is generally disadvantageous. Thanks, Satish Kataria -Original Message- From: lixin chu [mailto:[EMAIL PROTECTED] Sent: Monday, August 16, 2004 4:59 AM To: [EMAIL PROTECTED] Subject: best practice: how to handle two related jsp pages, with one having an ArrayList, the other input details Hi, How should I handle this: I have 2 jsp, in a.JSP, I need to display an ArrayList. When users click 'Add', B.JSP is displayed which allows users to fill in the details of a new object. When users click 'Done', I need to return back to A.JSP, display the newly added object, and ArrayList should be updated as well. What do I need to do to support this ? thank you very much li xin __ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Disable validate in actionForm
I suppose this is how I do it? html:submit property=action value=Create Experiment bean:message key=button.createexperiment/ html:hidden property=selection value=createexperiment / /html:submit And in my ActionForm : if(getSelection().equals(createexperiment)) { //validate } But getSelection returns me a null and I don't know why.. Sebastian On Tue, 2004-08-17 at 20:44, Pavel Kolesnikov wrote: On Tue, 17 Aug 2004, Sebastian Ho wrote: I fixed the Back problem using javascript (using javascript history.back()). Although it is resolved, I am still very much interested in the struts solution without using javascript. what about checking for the back property in your validate method (as i wrote few mails ago)? according to your description of CreateExperiment.jsp just change the proposed code to: 8 snip - public ActionErrors validate ( ... ) { if (! back.equals (getAction ()) ) { super.validate ( ... ); // another validations if needed } } 8 snip - i still suppose you have defined property action in your form bean. pavel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple checkboxes
To use a multibox, you need a getter and setter method in your form-bean that returns/sets a String array. Each element in this String array corresponds to the value of a checked check-box. Let's say you have a multibox coded like this: logic:iterate name=myFormForm property=dataBaseRecords id=record html:multibox name=myFormBean property=selectedDataBaseRecords bean:write name=record property=description/ /html:multibox /logic:iterate ie 1) myFormBean has a method 'getDataBaseRecords' that returns a collection. 2) Each object in the 'getDataBaseRecords' collection has a method 'getDescription', which is used to set the value of (and display against) the checkbox. 3) myFormBean has methods 'get/setSelectedDataBaseRecords' coded as follows: private String[] selectedDataBaseRecords = new String[0]; public String[] getSelectedDataBaseRecords() { return selectedDataBaseRecords; } public void setSelectedDataBaseRecords(String[] value) { selectedDataBaseRecords = value; } The effect of the above will be to generate html as follows: input type=checkbox name=selectedDataBaseRecords value=[description 1] input type=checkbox name=selectedDataBaseRecords value=[description 2] input type=checkbox name=selectedDataBaseRecords value=[description 3] input type=checkbox name=selectedDataBaseRecords value=[description 4] etc. Initially none of the check-boxes are checked because I've coded 'getSelectedDataBaseRecords' to return a zero length array. If you were to check the second and third check-boxes and submit the form, 'getSelectedDataBaseRecords' would then return an array of 2 elements, with the values '[description 2]' and '[description 3]'. Regards, John [EMAIL PROTECTED] Ph (09) 372-5010 |-+--- | | Jignesh Kapadia | | | jignesh_kapadia2003| | | @yahoo.com | | | | | | 18/08/2004 12:33 PM | | | Please respond to | | | Struts Users | | | Mailing List | | | | |-+--- --| | | | To: [EMAIL PROTECTED] | | cc: | | Subject: multiple checkboxes | --| Hi , I have a scenario in our aplication which we are developing with Struts1.1. on first screen we are displaying bunch of records retrieved from database. Each record will have checkbox in first column. This check box wil be initially checked or unchecked depending upon the value of a bean attribute. A user can chsnge this .He/She can check or uncheck any check boxes for any records.On the next screen it should show me the updated records. i.e. records which are unchecked on previous page should be seen as unchecked and records which are checked on previous page should be shown as checked. I tried this using html:multibox tag but it is not working. can somebody give a suggestion on this? It will be good help from your side if you can give your expert feedback ASAP. Thanks, Jignesh Kapadia - Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About Tiles
thanks David ! after reading the doc. in Struts, Tiles site, I found very little resource talking about Tiles... I know I need a template, a definition etc... but I still can't figure out how to glue them together ! The problem go worse if I want to use Tiles with Struts, I just don't know how... any link, tutorial ?? However I think using Tiles and OSCache seems to be a very attractive solution for my situation. Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: About Tiles
Try skimming through the Tiles Advanced Features by Cedric Dumoulin listed on the Strut site under this page: http://struts.apache.org/userGuide/dev_tiles.html The direct link to that PDF guide is: http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf Regards, David -Original Message- From: Koon Yue Lam [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 9:48 PM To: Struts Users Mailing List Subject: Re: About Tiles thanks David ! after reading the doc. in Struts, Tiles site, I found very little resource talking about Tiles... I know I need a template, a definition etc... but I still can't figure out how to glue them together ! The problem go worse if I want to use Tiles with Struts, I just don't know how... any link, tutorial ?? However I think using Tiles and OSCache seems to be a very attractive solution for my situation. Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About Tiles
http://www.theserverside.com/articles/article.tss?l=Tiles101 Also you can see sample tiles portal that ships with tiles. I love using Tiles with EL to have dynamic tiles diplayed. .V Koon Yue Lam wrote: thanks David ! after reading the doc. in Struts, Tiles site, I found very little resource talking about Tiles... I know I need a template, a definition etc... but I still can't figure out how to glue them together ! The problem go worse if I want to use Tiles with Struts, I just don't know how... any link, tutorial ?? However I think using Tiles and OSCache seems to be a very attractive solution for my situation. Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multiple checkboxes
John, Thanks for your reply. This is a standard way of using multiple check boxes(i.e.html:multibox). If you read my earlier e-mail the requirement is little bit different.Just explaining in brief again. say for example I have a list with 10 objects. I am displaying a list on a page with a check box. the object has a boolean property . depending on the value of the property the check box should be checked or unchecked initially.( In case of Multibox all of them are unchecked initially). Now I can check and uncheck the check boxes my self on that page and when I submit the page the result should be displayed on the next page. Let me know if anybody has come across this scenario with struts1.1. This is a user requirement and we really don't know how do it. We tried both using html:checkbox and html:multibox but could not make it work if anybody can give their expert comments then it will be a good help, Thanks, Jignesh [EMAIL PROTECTED] wrote: To use a multibox, you need a getter and setter method in your form-bean that returns/sets a String array. Each element in this String array corresponds to the value of a checked check-box. Let's say you have a multibox coded like this: ie 1) myFormBean has a method 'getDataBaseRecords' that returns a collection. 2) Each object in the 'getDataBaseRecords' collection has a method 'getDescription', which is used to set the value of (and display against) the checkbox. 3) myFormBean has methods 'get/setSelectedDataBaseRecords' coded as follows: private String[] selectedDataBaseRecords = new String[0]; public String[] getSelectedDataBaseRecords() { return selectedDataBaseRecords; } public void setSelectedDataBaseRecords(String[] value) { selectedDataBaseRecords = value; } The effect of the above will be to generate html as follows: [input] 1] name=selectedDataBaseRecords [input] 2] name=selectedDataBaseRecords [input] 3] name=selectedDataBaseRecords [input] 4] name=selectedDataBaseRecords etc. Initially none of the check-boxes are checked because I've coded 'getSelectedDataBaseRecords' to return a zero length array. If you were to check the second and third check-boxes and submit the form, 'getSelectedDataBaseRecords' would then return an array of 2 elements, with the values '[description 2]' and '[description 3]'. Regards, John [EMAIL PROTECTED] Ph (09) 372-5010 |-+--- | | Jignesh Kapadia | | | | | @yahoo.com | | | | | | 18/08/2004 12:33 PM | | | Please respond to | | | Struts Users | | | Mailing List | | | | |-+--- --| | | | To: [EMAIL PROTECTED] | | cc: | | Subject: multiple checkboxes | --| Hi , I have a scenario in our aplication which we are developing with Struts1.1. on first screen we are displaying bunch of records retrieved from database. Each record will have checkbox in first column. This check box wil be initially checked or unchecked depending upon the value of a bean attribute. A user can chsnge this .He/She can check or uncheck any check boxes for any records.On the next screen it should show me the updated records. i.e. records which are unchecked on previous page should be seen as unchecked and records which are checked on previous page should be shown as checked. I tried this using can somebody give a suggestion on this? It will be good help from your side if you can give your expert feedback ASAP. Thanks, Jignesh Kapadia - Do you Yahoo!? Y! Messenger - Communicate in real time. Download now. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages!
Re: multiple checkboxes
say for example I have a list with 10 objects. I am displaying a list on a page with a check box. the object has a boolean property. depending on the value of the property the check box should be checked or unchecked initially.( In case of Multibox all of them are unchecked initially). Jignesh, it's not clear to me what you're asking for. A screen-shot of your html document would probably clinch it. Regards, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANNOUNCE] XDoclet Struts DynaForm 1.2.2 SNAPSHOT
This release adds validation support to the DynaForms generated by XDoclet. Using the @struts.validator tags, you can create the validation.xml for dynamic action forms in the same manner used by the struts.form XDoclet feature. Please note that this is a SNAPSHOT release, created from a fairly recent XDoclet CVS snapshot. (I'm not an XDoclet committer, and sf.net has been having problems with anonymous CVS lately.) I would like additional people to test this version. It works fine for me, but YMMV. If I can get a few people to confirm that it works for them, I'll submit it as a patch to the forthcoming XDoclet 1.2.2 release. In addition to the validation support, this patch also supports Struts 1.2.1 and 1.1.3 version of the validator. If I got anything wrong or missed anything, please let me know. Downloads - http://www.systemmobile.com/code/xdoclet-apache-module-1.2.2-SNAPSHOT.jar The full text of the README may be found here at: http://www.systemmobile.com/code/xdoclet-dynaform-README.txt An example may be found at: http://www.systemmobile.com/code/Person.java -- Nick Heudecker System Mobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About Tiles
thanks for the help ! I will spend some time on the above links ! Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Uploading Multiple Files
Hey All, I have a need to be able to upload multiple files in a single form. Does anyone have a recommendation for this approach? Thanks in advance! Steven
[OT] any body aware of good UML mailing list
please send me the links if you know any. TIA Navjot Singh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException
You have to specify the Size here type=com.test.Line[] Or whatever is the initial size you specify in your action the zise should remain less that or equal to that size otherwise you will get this error. Regards Shoaib -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 1:13 PM To: [EMAIL PROTECTED] Subject: DynaActionForm java.lang.ArrayIndexOutOfBoundsException Hi Everyone, I am using DynaActionForm. It is throwing ArrayIndexOutOfBoundsException. Not sure what the issue could be. Can you pls help me. form-bean name=myForm type=org.apache.struts.validator.DynaValidatorForm form-property name=lines type=com.test.Line[]/ form-property name=lastSlotId type=java.lang.String / form-property name=campaignId type=java.lang.Integer / /form-bean Action mapping is : action path=/8200/123 type=com.test.myAction name=MyForm scope=session input=/myJSP.jsp forward name=success path=/8200/123.do/ /action Thanks Regds Ravi Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException
Thanks Shoaib. But, after giving the size 100 as : type=com.test.Line[100], it throws a NullPointerException : java.lang.NullPointerException: The type for property offerSlotslines is invalid at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:414) at org.apache.struts.action.DynaActionFormClass.newInstance(DynaActionFormClass.java:243) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:821) at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:222) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:135) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1807) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525) at org.mortbay.http.HttpContext.handle(HttpContext.java:1757) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:790) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511) -Original Message- From: Mohammad Shoaib [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 10:45 AM To: 'Struts Users Mailing List' Subject: RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException You have to specify the Size here type=com.test.Line[] Or whatever is the initial size you specify in your action the zise should remain less that or equal to that size otherwise you will get this error. Regards Shoaib -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 1:13 PM To: [EMAIL PROTECTED] Subject: DynaActionForm java.lang.ArrayIndexOutOfBoundsException Hi Everyone, I am using DynaActionForm. It is throwing ArrayIndexOutOfBoundsException. Not sure what the issue could be. Can you pls help me. form-bean name=myForm type=org.apache.struts.validator.DynaValidatorForm form-property name=lines type=com.test.Line[]/ form-property name=lastSlotId type=java.lang.String / form-property name=campaignId type=java.lang.Integer / /form-bean Action mapping is : action path=/8200/123 type=com.test.myAction name=MyForm scope=session input=/myJSP.jsp forward name=success path=/8200/123.do/ /action Thanks Regds Ravi Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException
Also, I am not setting size neither in struts-config.xml nor in the action. Regds R-a-v-i -Original Message- From: Ravi Vedala (WT01 - FINANCE BANKING SERVICES) Sent: Wednesday, August 18, 2004 10:55 AM To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]' Subject: RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException Thanks Shoaib. But, after giving the size 100 as : type=com.test.Line[100], it throws a NullPointerException : java.lang.NullPointerException: The type for property offerSlotslines is invalid at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:414) at org.apache.struts.action.DynaActionFormClass.newInstance(DynaActionFormClass.java:243) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:821) at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:364) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:222) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:135) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1807) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525) at org.mortbay.http.HttpContext.handle(HttpContext.java:1757) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:790) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511) -Original Message- From: Mohammad Shoaib [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 10:45 AM To: 'Struts Users Mailing List' Subject: RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException You have to specify the Size here type=com.test.Line[] Or whatever is the initial size you specify in your action the zise should remain less that or equal to that size otherwise you will get this error. Regards Shoaib -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 1:13 PM To: [EMAIL PROTECTED] Subject: DynaActionForm java.lang.ArrayIndexOutOfBoundsException Hi Everyone, I am using DynaActionForm. It is throwing ArrayIndexOutOfBoundsException. Not sure what the issue could be. Can you pls help me. form-bean name=myForm type=org.apache.struts.validator.DynaValidatorForm form-property name=lines type=com.test.Line[]/ form-property name=lastSlotId type=java.lang.String / form-property name=campaignId type=java.lang.Integer / /form-bean Action mapping is : action path=/8200/123 type=com.test.myAction name=MyForm scope=session input=/myJSP.jsp forward name=success path=/8200/123.do/ /action Thanks Regds Ravi Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information.
RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException
Try recreating the entire DynaActionForm with a new name(including the Line[]) and set the new actionform to the Action I am guessing that you may not have added the Line[] initially and then added it later on... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 10:55 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException Thanks Shoaib. But, after giving the size 100 as : type=com.test.Line[100], it throws a NullPointerException : java.lang.NullPointerException: The type for property offerSlotslines is invalid at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:414) at org.apache.struts.action.DynaActionFormClass.newInstance(DynaActionFormC lass.java:243) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:8 21) at org.apache.struts.action.RequestProcessor.processActionForm(RequestProce ssor.java:364) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 253) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH andler.java:294) at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:222) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:135) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav a:1069) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProc essor.java:274) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestPr ocessor.java:455) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(Tiles RequestProcessor.java:320) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java: 279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH andler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1807) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCon text.java:525) at org.mortbay.http.HttpContext.handle(HttpContext.java:1757) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:790) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197 ) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511) -Original Message- From: Mohammad Shoaib [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 10:45 AM To: 'Struts Users Mailing List' Subject: RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException You have to specify the Size here type=com.test.Line[] Or whatever is the initial size you specify in your action the zise should remain less that or equal to that size otherwise you will get this error. Regards Shoaib -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 1:13 PM To: [EMAIL PROTECTED] Subject: DynaActionForm java.lang.ArrayIndexOutOfBoundsException Hi Everyone, I am using DynaActionForm. It is throwing ArrayIndexOutOfBoundsException. Not sure what the issue could be. Can you pls help me. form-bean name=myForm type=org.apache.struts.validator.DynaValidatorForm form-property name=lines type=com.test.Line[]/ form-property name=lastSlotId type=java.lang.String / form-property name=campaignId type=java.lang.Integer / /form-bean Action mapping is : action path=/8200/123 type=com.test.myAction name=MyForm scope=session input=/myJSP.jsp forward name=success path=/8200/123.do/ /action Thanks Regds Ravi Confidentiality Notice The information contained in this electronic message and any attachments to this
RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException
Can you elaborate a bit more , what are you trying to do. And send that part of code. Regards Shoaib -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 1:28 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException Also, I am not setting size neither in struts-config.xml nor in the action. Regds R-a-v-i -Original Message- From: Ravi Vedala (WT01 - FINANCE BANKING SERVICES) Sent: Wednesday, August 18, 2004 10:55 AM To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]' Subject: RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException Thanks Shoaib. But, after giving the size 100 as : type=com.test.Line[100], it throws a NullPointerException : java.lang.NullPointerException: The type for property offerSlotslines is invalid at org.apache.struts.action.DynaActionForm.set(DynaActionForm.java:414) at org.apache.struts.action.DynaActionFormClass.newInstance(DynaActionFormClass .java:243) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:821) at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor .java:364) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:253) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl er.java:294) at org.mortbay.jetty.servlet.Dispatcher.dispatch(Dispatcher.java:222) at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:135) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10 69) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcesso r.java:274) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces sor.java:455) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequ estProcessor.java:320) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandl er.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1807) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext .java:525) at org.mortbay.http.HttpContext.handle(HttpContext.java:1757) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:790) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:197) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511) -Original Message- From: Mohammad Shoaib [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 10:45 AM To: 'Struts Users Mailing List' Subject: RE: DynaActionForm java.lang.ArrayIndexOutOfBoundsException You have to specify the Size here type=com.test.Line[] Or whatever is the initial size you specify in your action the zise should remain less that or equal to that size otherwise you will get this error. Regards Shoaib -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 1:13 PM To: [EMAIL PROTECTED] Subject: DynaActionForm java.lang.ArrayIndexOutOfBoundsException Hi Everyone, I am using DynaActionForm. It is throwing ArrayIndexOutOfBoundsException. Not sure what the issue could be. Can you pls help me. form-bean name=myForm type=org.apache.struts.validator.DynaValidatorForm form-property name=lines type=com.test.Line[]/ form-property name=lastSlotId type=java.lang.String / form-property name=campaignId type=java.lang.Integer / /form-bean Action mapping is : action path=/8200/123 type=com.test.myAction name=MyForm scope=session
RE: Relaod struts-config.xml
See the Struts (in my V1.1 documentation) class org.apache.struts.tiles.actions.ReloadDefinitionsAction. It looks like you just set a path, put that as the class action, and Viola! tiles then reloads automatically. Personally, I've never needed to reload my tiles. Regards, David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 1:15 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Relaod struts-config.xml Hi Eric, How to reload the tiles ? Can you provide some sample. Regds Ravi -Original Message- From: Eric Chow [mailto:[EMAIL PROTECTED] Sent: Monday, August 09, 2004 3:53 PM To: [EMAIL PROTECTED] Subject: Relaod struts-config.xml Hello, In Tiles, it can be reloaded the tiles-config.xml by using its reload action, is there any same action for reloading the struts-config.xml ? Eric == If you know what you are doing, it is not called RESEARCH! == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Uploading Multiple Files
Steven, You should check the archives of this list. There were discussions in the last 3 weeks (or sooner) about it. I recall that thread covered uploading multiple files using indexed field names, that you can only upload one file per upload tag (just not supported in the Jakarta Commons Upload classes), and various ways of using MultiPartRequestHandlers to figure out which uploads are/were files. All that on top of the documentation and struts-upload.war EXAMPLE application. :) Just make sure you set the max upload limit in your configure files (web.xml?). Regards, David -Original Message- From: Steven Leija [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 12:17 AM To: Struts Users Mailing List Subject: Uploading Multiple Files Hey All, I have a need to be able to upload multiple files in a single form. Does anyone have a recommendation for this approach? Thanks in advance! Steven - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]