Re: error page
You could declare your error page inside an action mapping in the file struts-config.xml as follow actionpath=.. type=... name=... scope=request input=Your_error_page_here /action and it will forward to Your_error_page_here when encouter error Quan - Original Message - From: Stefan Faist [EMAIL PROTECTED] To: Struts [EMAIL PROTECTED] Sent: Friday, August 10, 2001 1:23 PM Subject: error page Hello all, I want call a error page when an error happend. In the xxAction it works fine, but how can I do this in the xxForm? There I cant't call an forward to call my error page. Can someone help me? Thanks in advanced STEFAN -- hmi-Informatik GmbH Zettachring 6 - D-70567 Stuttgart E-Mail: [EMAIL PROTECTED] http://www.hmi-informatik.de
Re: New To Struts
I think the directory WEB-INF is in every context (directory) in the directory applications, and there is always a default context (maybe \application\defaultwebapp_serverName\WEB-INF in weblogic) Quan - Original Message - From: Nitu Singh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, August 09, 2001 8:37 AM Subject: Re: New To Struts Thanks a lot, And I did visit the home page for struts(and that's where the problem started). Let me explain u the doubts which I had going thru the page: 1) All the downloads had 2-3 versions (for example, ANT, it had binary release, source realease and some RPM), which one I have to download, do I have to download all the 3? btw, if u can explain me the difference between source release and binary release, as I see them in almost all the downloads. 2) Do I really have to download the Servlet API ?If yes, why? as weblogic supports servlets and why again to have one more servlet API? 3) In many installations it says, I need to put some *distribution files* or some *jar files* in WEB-INF directory. I don't find any such directory in weblogic5.1. So what to do? These are only few of the things. The more I read, the more I get confused? If you could clear my above queries, I can go ahead and then may be I will come up more questions? Thanks a lot, Nitu. - Original Message - From: Martin Cooper [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 09, 2001 3:29 PM Subject: Re: New To Struts You must not have visited the Struts home page, which should have been your *first* resort. :-) http://jakarta.apache.org/struts/ There you will find: * A link to the Struts User Guide * A 'Resources' link, which will take you to a page listing several tutorials and articles on Struts. * An 'Installation' link, which will take you to a page detailing specific installation instructions for over a dozen different containers, including WebLogic 5.1. -- Martin Cooper - Original Message - From: Nitu Singh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 08, 2001 5:18 PM Subject: New To Struts Hi, I am new to struts and for past one week I am trying to find tutorials and materials regarding struts. The only thing I got is some tutorial in jspinsider.com. I understood the model of struts, but when putting it in to code, I am facing problem at very basic step. All I see in tutorials is they have explained how to use struts in tomcat server. But I am using weblogic5.1 server. I have did all the settings as per directed for tomcat. I understand there must some different way of deploying struts in weblogic server. Can anyone please guide me through as what I should do to run my basic application? What all installations do I need and where should be they placed? I am really vexed up looking for these things on net. This mailing list is my LAST REOSRT. Thanks and Regards, Nitu.
Re: Validation a form
But what is the specific error ? - Original Message - From: DUPRAT Alexandre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 11:31 PM Subject: RE: Validation a form I don't understand why it does not work. It crashes only when the validate method is called and must return an error. Is sqlQuery begins with select it works fine and i got to the result page. Do i need to write a jsp page in case of error? (i already have one where i forward to when an exception is called in my Action class) -Message d'origine- De: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Date: lundi 6 août 2001 18:35 À: '[EMAIL PROTECTED]' Objet: Re: Validation a form On Mon, 6 Aug 2001, DUPRAT Alexandre wrote: hi, How can i validate a form? I tried : public ActionErrors validate(ActionMapping mapping, HttpServletRequest req) { ActionErrors errors= new ActionErrors(); if(! getSqlQuery().startsWith(select)){ ActionError error = new ActionError(error.requete); errors.add(sqlQuery, error); } return errors; } it works when there is no error but not when i've one Is there somebody with an idea? The above code looks OK -- what about it doesn't work? Note that you *must* specify an input attribute on your Action, so that Struts knows where to send the user back to. Alexandre Duprat SOPRA. Direction France Sud. Bordeaux [EMAIL PROTECTED] Craig McClanahan ++ | Ce courrier ainsi que les fichiers joints sont confidentiels. | | Si vous avez recu ce courrier par erreur, veuillez en informer | | l'administrateur du systeme : [EMAIL PROTECTED] | | - | | Ce message confirme que le courrier a passe le controle| | antivirus du relais de messagerie Internet avec succes.| ++
Re: A small Favour
In particular, in order to remove yourself from struts mailing list, send an empty email to the following address [EMAIL PROTECTED] - Original Message - From: Rohit Dewangan [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 06, 2001 3:34 PM Subject: A small Favour Hi All, Could anybody help me to unsubscribe from your mailing list. I have tried atleast 3-4 times from http://jakarta.apache.org/struts but am still getting tons of mail. Thanks in advance. Regards Rohit -Original Message- From: Rodney Smith [mailto:[EMAIL PROTECTED]] Sent: Monday, August 06, 2001 4:30 PM To: [EMAIL PROTECTED] Subject: URL links ActionServlet Hallo, Firstly I would like to thank Ted Husted for all his help with me getting a better understanding of Struts, as I am a new to this area a lot of the information that I have found is great but not detailed enough to understand some of the process as what Ted has mentioned is perfect, thanks again Ted. OK the questions are still coming as follows. I am using Tomcate3.2.2 and runing of a localhost: In the example I am using I have the index.jsp page and in that I have two html links, one goes to get registered with the web application and the other is logon to the web application. If I click on logon this takes me to the logon.jsp page. When I client clicks on this as this is a .jsp this does not go to the actionservlet as that is not a .do action 'is that correct'? instead that just calls the viewer of logon.jsp??? or does this go direct to the JAVABEAN by passing the ActionServlet to get the logonform.java??? Now if the client clicks on the registation URL link on the index.jsp it comes back with a editregistration.do on the browser bar, in this case, as this is displaying the .do, does that mean that actually has been to the ActionServlet to JAVABEAN and comes back with the registration form display or does this just go to the viewer and retreives the registration.jsp form, with out going to the ActionServlet?? I understand that if the person sends a request 'A' to logon to the web application it needs to be a .do and needs to go to the ActionServlet 'B' I think that it goes the same with the registration as well. It is when they are asking for the forms to submit is where I don't know where they are stored or if they need to be retreived from the JSP viewer etc. Thanks for your time and I hope that can get another good response. Many thanks Ted and have a great day. Kind Regards Rodney Smith -- Sent through GMX FreeMail - http://www.gmx.net *Disclaimer* This mail and any accompanying documents contain confidential information intended for a specific individual and purpose. This information is private and protected by law. If you are not the intended recipient, you are hereby notified that any disclosure, copying or distribution, or the taking of any action based on the contents of this information, is strictly prohibited. Please let us know immediately if you have received this by mistake and appreciate if you could delete the original message.
Re: Question: Struts on Weblogic - Urgent please
Try putting it into the file web.xml in Web-inf directory Quan - Original Message - From: Upadhye, Sujit (GEAE, Foreign National) [EMAIL PROTECTED] To: Craig R. McClanahan [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 12:40 AM Subject: Question: Struts on Weblogic - Urgent please Hi, I am using Struts on Weblogic 5.1 with SP9. Initially I developed my app on Tomcat. Here, I am forwarding control to another action object. So, in my config.xml, I have: forward name=next path=/detcontrol.do redirect=true/ I start my app on Tomcat through URL: http://localhost/wls/cmweb/detrunselect.do. When I submit this page, the new URL I get is: http://localhost/wls/cmweb/detcontrol.do. This is the expected behavior. However, when I try to run the same on Weblogic, the second URL comes up as: http://localhost/cmweb/detcontrol.do. Please note that 'wls' get dropped from the URL. This causes the app to fail. Can some one tell me how can I still get the 'wls' while using 'redirect = true'? For my Tomcat, I have an entry in server.xml as: Context path=/wls/cmweb docBase=apps/cmweb debug=0 reloadable=true/Context I feel it is this entry that is adding 'wls' to the relative path. Where can I add this entry for the Weblogic. (Weblogic does not seem to have server.xml). Thanks in advance, Sujit
Re: how to create a submit button with my own image
The name of the form is in the file struts-config.xml. action path=... ... name=this_is_the_form_name_you_want /action Quan - Original Message - From: Long Zhao [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 5:21 AM Subject: how to create a submit button with my own image for a struts form, html:form action=/html:form, how to create a submit button with my own image? I have tried to use javascript to do onclick=javascript:window.document.form.submit(), but it did not work, because the struts form do not have a name for the form. Thanks Long __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: how to create a submit button with my own image
You may use this html:form ... input type=image src=your_image /html:form Quan - Original Message - From: Long Zhao [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 5:21 AM Subject: how to create a submit button with my own image for a struts form, html:form action=/html:form, how to create a submit button with my own image? I have tried to use javascript to do onclick=javascript:window.document.form.submit(), but it did not work, because the struts form do not have a name for the form. Thanks Long __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/
Re: Strut and EJB/J2EE
Hi Chuong, I think struts is only a framework used to build presentation layer - Original Message - From: Chuong Huynh [EMAIL PROTECTED] To: Strut user List (E-mail) [EMAIL PROTECTED] Sent: Wednesday, July 25, 2001 10:09 AM Subject: Strut and EJB/J2EE Hi all, Sorry for naive question. I'm new to Struts - just construct some simple examples by myself... It seems to me that applications that use Struts are web-centric. I wonder where EJB comes into play? And is it easy to migrate Struts apps to J2EE applications...? Is Struts (alone) suitable for large scale applications, without being a J2EE app? Thanks, - Chuong = HUYNH, N. CHUONG TMA Software Solutions, Vietnam Tel: (84-8) 990 3848 - Ext: 5272 Email: [EMAIL PROTECTED] =
Re: html:select/options
But how to keep the choice that user chose in the last time he submitted - Original Message - From: Joe Clark [EMAIL PROTECTED] Sent: Wednesday, July 18, 2001 11:12 PM Subject: RE: html:select/options Use the 'value' attribute to make the selection. For example assume you have a dropdown of countries and one entry is 'United States' the code below would select 'United States'. html:select property=country value=United States ... /html:select -Original Message- From: [EMAIL PROTECTED] at INTERNET [mailto:IMCEACCMAIL-struts-user+40jakarta+2Eapache+2Eorg+20at+20INTERNET @alltel.com] Sent: Wednesday, July 18, 2001 10:38 AM To: Clark, Joe; [EMAIL PROTECTED] at INTERNET Subject: html:select/options Is there a way to dictate which option in a collection is initially set as selected when the page is rendered? ex html:options collection=Roles property=name / For example, I have a collection of projects that are rendered by the html:options tag. I also have some java script which updates a project description box when the selection is changed. The problem is when the page is first rendered, the two don't always match up. I initialize the description box to the first item in the collection, but the select doesn't always choose the first item. Thanks D
Re: ActionErrors
You could activate directly the Action/perform (i.e. your_action.do instead of your_page.jsp), after that, the perform method will get information from your beans, put them into your action_form class, which extends from the class ActionForm of struts, and then forward to the JSP page (your_page.jsp) hope it helps Quan - Original Message - From: Langøren, Knut Harald [EMAIL PROTECTED] To: 'Struts-User (E-mail) [EMAIL PROTECTED] Sent: Friday, July 13, 2001 3:53 PM Subject: ActionErrors Hi. I'm not sure that I've done this the right way, but we'll all have to learn some day. We're using struts to help us in building a web-klient accessing a db through EJB on weblogic6.0. The jsp-pages I'm making has a lot of different information, which are coming from different enterprise beans. These beans are initiated in the Action/perform method. And here is the problem: If I generate an error in the validate method, the flow is directed to the page in the input attribute in the xml-file. This page is a jsp-page, and if you start a jsp-page directly, the perform method is not executed. The perform is only executed if you access the page through the .do. So when the system tries to show the jsp-page, the information from the different beans is not available, due to the perform method not beeing executed. How should I do this? Is it possible to initiate the enterprise beans in some other methods than the perform? Thanks -KHL
Re: Ant problem - build.xml file does not exist
Because Ant is intended for UNIX, You should download cygwin.com from jakarta.apache.org or elsewhere, install and run it instead of dos command prompt Quan - Original Message - From: kuma.cra [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 13, 2001 7:14 AM Subject: Re: Ant problem - build.xml file does not exist Hi Peter i hace cd to ant ie C:\cd ant C:\ant Thus i excute ant prompt and no respose whats so ever only response is when i prompt C:\ant\bin\ant.bat thus get can't find build file. Any ideas Cheers Chuck Peter Alfors wrote: how are you executing ant.bat? In your dos prompt, move to the ant/bin directory, then execute it. Pete Chuck Amadi wrote: Hi all i have just downloaded a exampl from netbeans of a sample build.xml Thus i have installed in the ant's dir at the same level as bin,doc,lib is this correct as when i run the ms- dos prompt C:C:\ant\bin\ant.bat -find I recieve a responce stating build.xml does not exist. Any Suggestions Chuck -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: Ant problem - build.xml file does not exist
Sorry! You can run it from Dos command prompt, but you have to set some following environment variables : JAVA_HOME=your java home (e.g. C:\jdk1.3) PATH=%PATH%;C:\jakarta-ant-1.3\bin ANT_HOME=your ant home (e.g. C:\jakarta-ant-1.3) After that, at the directory, which include the file build.xml, run ant Quan - Original Message - From: Pham Thanh Quan [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, July 13, 2001 9:41 AM Subject: Re: Ant problem - build.xml file does not exist Because Ant is intended for UNIX, You should download cygwin.com from jakarta.apache.org or elsewhere, install and run it instead of dos command prompt Quan - Original Message - From: kuma.cra [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 13, 2001 7:14 AM Subject: Re: Ant problem - build.xml file does not exist Hi Peter i hace cd to ant ie C:\cd ant C:\ant Thus i excute ant prompt and no respose whats so ever only response is when i prompt C:\ant\bin\ant.bat thus get can't find build file. Any ideas Cheers Chuck Peter Alfors wrote: how are you executing ant.bat? In your dos prompt, move to the ant/bin directory, then execute it. Pete Chuck Amadi wrote: Hi all i have just downloaded a exampl from netbeans of a sample build.xml Thus i have installed in the ant's dir at the same level as bin,doc,lib is this correct as when i run the ms- dos prompt C:C:\ant\bin\ant.bat -find I recieve a responce stating build.xml does not exist. Any Suggestions Chuck -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.
Re: changing languages
You simply remove the locale from session and struts will get the default locale, which is defined by every browser Quan - Original Message - From: Manuel Moons [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 11, 2001 9:03 PM Subject: changing languages Hello everybody, I have a small question. I have written a test application for my company that uses struts, just to see what it can do. I am using different ApplicationResource files. I have no problem changing between my different languages. I do this by setting the Locale object in my session scope. I have one problem though. When I change language and I want to change back to the original one. I have to make a double of my start up ApplicationResource file because he always needs the extra extensions in my file eg. ApplicationResource_en_US.properties ApplicationResource_nl_BE.properties Is there any way of changing back to my original resource file? _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Re: No Input Attribute...
In your struts-config.xml, try changing this : action path=/test/ServiceOrderAction type=com.xxx.web.ServiceOrderAction name=serviceOrderForm/ - Original Message - From: Helmut Rubasch [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 10, 2001 3:41 PM Subject: No Input Attribute... Hello! I already wrote small struts-applications and never had to fill in an input-Attribute in the struts-config.xml file. Now Struts complains, that the input-attribute is missing: 2001-07-10 01:37:31 - Ctx( /test): 500 R( /test+ /ServiceOrderAction.do + null) No input attribute for mapping path /ServiceOrderAction My struts-config.xml looks like this: ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config form-beans type=org.apache.struts.action.ActionFormBean form-bean name=serviceOrderForm type=com.xxx.web.ServiceOrderForm/ /form-beans global-forwards type=org.apache.struts.action.ActionForward forward name=ServiceOrders path=/service-orders.jsp/ /global-forwards action-mappings type=org.apache.struts.action.ActionMapping action path=/ServiceOrderAction type=com.xxx.web.ServiceOrderAction name=serviceOrderForm/ /action-mappings /struts-config What did I miss here? Thanks Helmut Rubasch
Re: validation
You still put the "ethncityArray" into request but you should put in your ActionForm class, before the function validate return, instead of in the method perform of your Action class Hope it helps Quan - Original Message - From: cahana To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 1:47 PM Subject: validation I have a jsp page that has input fields for personal information, so i made a PersonalInfoForm with all the setters and getters and a validate method. On this jsp i also have a drop down list that gets created by an array of beans: html:select name="personalInfoForm" property="ethnicity" html:option value=""/ html:options name="translateItem" collection="ethnicityArray" property="code" labelProperty="longdescr" //html:select I pass "ethncityArray", which is an array of TranslateItem beans, to this page via the request. The problem i have is that when the validate method is called when i hit submit and an error occurs, it goes back to the jsp but the jsp can no longer find "ethnicityArray". Subsequently an error is thrown. Does anyone know how i can fix this, aside from putting it in the session? cameron
Re: validation
I think you should get the"ethnicityArray" (maybe from DB) again in every request and put it into the request (this may happen in validate method before it returns). No need for getter and setter methods. - Original Message - From: cahana To: [EMAIL PROTECTED] Sent: Monday, July 09, 2001 11:46 AM Subject: Re: validation I tried putting the "ethnicityArray" into my ActionForm class, so i made a getter and setter for it. It shows up on the jsp form ok. When i hit submit and a validation error occurs, i think i lose the array because the ActionForm falls out of scope and a new one is created to show the errors that occurred. I have a setter method for "ethnicityArray", butthe array doesn't get passed inwith the request (on submit) because it's not associated with any input type fields. This may be a stupid question, but is there a way to pass this object as a hidden field? cameron - Original Message - From: Pham Thanh Quan To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 4:27 PM Subject: Re: validation You still put the "ethncityArray" into request but you should put in your ActionForm class, before the function validate return, instead of in the method perform of your Action class Hope it helps Quan - Original Message - From: cahana To: [EMAIL PROTECTED] Sent: Sunday, July 08, 2001 1:47 PM Subject: validation I have a jsp page that has input fields for personal information, so i made a PersonalInfoForm with all the setters and getters and a validate method. On this jsp i also have a drop down list that gets created by an array of beans: html:select name="personalInfoForm" property="ethnicity" html:option value=""/ html:options name="translateItem" collection="ethnicityArray" property="code" labelProperty="longdescr" //html:select I pass "ethncityArray", which is an array of TranslateItem beans, to this page via the request. The problem i have is that when the validate method is called when i hit submit and an error occurs, it goes back to the jsp but the jsp can no longer find "ethnicityArray". Subsequently an error is thrown. Does anyone know how i can fix this, aside from putting it in the session? cameron
Re: If no ActionForm associated with Action....ActionForm is null???
It's OK - Original Message - From: Jonathan Asbell To: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 7:23 PM Subject: If no ActionForm associated with ActionActionForm is null??? Hello. In places where there are no forms and thus did not configure an ActionForm for a particular Action,does the ActionForm object which is passed to the perform method have a "null" vlaue?
Re: Team development with struts
Hi Jorge, Please let me know is there any visual UI to use with CVS ? I currently use cygwin bash shell but I am very tired of its interface Thanks Quan - Original Message - From: jorisumu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 9:33 PM Subject: Re: Team development with struts Well you´re certainly right... those config files could be a mess if you don´t establish a good version control policy. We´ve been working with winCVS since we begun our projects, it has been quite good for the matter... The tool is just one thing, we usually distribute the job in different areas of development. So that way not many people actually touch the main config files including the famous struts-config.xml. But in your case it doesn´t look like a way. The idea is that you can let your people use CVS (graphic client or command line based) but let them never forget that every time you want to commit your changes to the file, you MUST do an update to it before. CVS will merge the version you create with the version in the repository and will announce you the conflicts. So the steps for succesful version control on a file are: 1) checkout/edit the file 2) make your changes 3) update 4) solve your conflicts locally 5) commit the file! Hope this could help you Bye Jorge Ivan Suarez Murillo Web Applications Engineer Commexnet. Medellin, Colombia - Mensaje original - De: Valeriy Zavidnoy [EMAIL PROTECTED] Fecha: Miércoles, Julio 4, 2001 4:03 pm Asunto: Team development with struts Our team is starting to use Struts, that means each developer needs to edit struts-config.xml and *.properties files. The issue we encountered is that several guys (12-15) want to edit these getting huge files at the same time. Of course, we are using currently source control by VSS, we thought about moving to CVS, but it won't completely let us avoid a headache. Can anyone give a suggestion how to solve this? Thanks. ___ Consigue tu e-mail gratuito TERRA.COM.CO Haz click en http://www1.terra.com.co/correo
Set html:option value with bean:write
Hi all, i want to set the value of html:option to the corresponding currency.id as in the following (broken) jsp segment html:select size=1 property=currency value=bean:write name='merchantForm' property='currency'/ logic:iterate id=currency name=currencyList html:option value=bean:write name='currency' property='id'/bean:write name='currency' property='id'/ /html:option /logic:iterate /html:select Please help ! Quan
Re: Set html:option value with bean:write
Hi Mark, I followed your instruction and use the following code but didn't succeed. html:select size=1 property=currency html:options collection=currencyList property=id//html:options /html:select I have the following error: /admin/CreateMerchant.jsp(138): Non-matching extension tags probably occurred due to an error in /admin/CreateMerchant.jsp line 138: html:options name=currency collection=currencyList property=id labelProperty=id//html:options If I use currency.id instead of currency in html:select, I have the same error. I think I should clarify my previous message. html:select size=1 property=currency value=bean:write name='merchantForm' property='currency'/ logic:iterate id=currency name=currencyList html:option value=bean:write name='currency' property='id'/bean:write name='currency' property='id'/ /html:option /logic:iterate /html:select In this JSP segment I want to have select options which are populated by the collection currencyList. This currencyList is actually an Enumeration, not a Collection but I think Enumeration is also supported by Struts. The default value for select is the value of property currency of merchantForm (which is a subclass of ActionForm). What should be done? Thanks in advance. Quan - Original Message - From: Geddes, Mark (ANTS) [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 02, 2001 3:05 PM Subject: RE: Set html:option value with bean:write Assuming your form is already associated with 'merchantForm' FormBean, and that 'currencyList' is a Collection, try: html:select property=currency html:options collection=currencyList property=id labelProperty=id/ /html:select Mark -Original Message- From: Pham Thanh Quan [mailto:[EMAIL PROTECTED]] Sent: 02 July 2001 09:04 To: [EMAIL PROTECTED] Subject: Set html:option value with bean:write Hi all, i want to set the value of html:option to the corresponding currency.id as in the following (broken) jsp segment html:select size=1 property=currency value=bean:write name='merchantForm' property='currency'/ logic:iterate id=currency name=currencyList html:option value=bean:write name='currency' property='id'/bean:write name='currency' property='id'/ /html:option /logic:iterate /html:select Please help ! Quan *** This email message contains confidential information for the above addressee only. If you are not the intended addressee you must not disclose or use the information in any manner whatsoever. Any opinion or views contained in this email message are those of the sender, do not represent those of the Company in any way and reliance should not be placed upon its contents. Unless otherwise stated this email message is not intended to be contractually binding. Where an Agreement exists between our respective companies and there is conflict between the contents of this email message and the Agreement then the terms of that Agreement shall prevail. Abbey National Treasury Services plc. Registered in England. Registered Office: Abbey House, Baker Street, London NW1 6XL. Company Registration No: 2338548. Regulated by the SFA ***
Re: Help with Resources !!
Whether there is the key index.title in your ApplicationResources file or not ? - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 11:17 AM Subject: Help with Resources !! Hello All - I am new to Struts and trying to run the Struts example applications. When I am starting Tomcat, everything loads fine (as found in the $TOMCAT_HOME/logs/servlet.log file). In fact the following gets logged in the file : 2001-07-02 08:38:46 - path=/struts-example :jsp: init 2001-07-02 08:38:46 - path=/struts-example :database: init 2001-07-02 08:38:46 - path=/struts-example :database: Initializing database servlet 2001-07-02 08:38:46 - path=/struts-example :database: Loading database from '/WEB-INF/database.xml' 2001-07-02 08:38:46 - path=/struts-example :action: init 2001-07-02 08:38:46 - path=/struts-example :action: Loading application resources from resource org.apache.struts.example.ApplicationResources 2001-07-02 08:38:46 - path=/struts-example :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-07-02 08:38:46 - path=/struts-example :action: Process servletName=action, urlPattern=*.do 2001-07-02 08:38:46 - path=/struts-example :action: Mapping for servlet 'action' = '*.do' But when I try to run the application in struts-example, I get the following error : javax.servlet.ServletException: Missing message for key index.title But the ApplicationResources file is in proper place, as given in the configuration files. Any help will be appreciated. Cheers. - Debasish __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: Form rendering problem
I think you don't have a form action class that is correlative with this form, so you can't use html:form. You should use form instead Quan - Original Message - From: Rod Schmidt To: [EMAIL PROTECTED] ; Rod Schmidt Sent: Thursday, June 28, 2001 1:38 PM Subject: Re: Form rendering problem I tried replacing the html:form tags with normal form tags (i.e. not using the struts form tags) and and just used /action.do for the action and everything works. I would really prefer to use the struts tags. Any ideas? Thanks, Rod Schmidt - Original Message - From: Rod Schmidt To: [EMAIL PROTECTED] Sent: Thursday, June 28, 2001 12:27 AM Subject: Form rendering problem I'm using www.webappcabaret.com as a hosting service to host my domain name. They map the domain name to my context somehow. Unfortunately their documentation says the following: -However if your context has a domain alias other than the mainserver name then you may not include your context name in URLssent to the browser. I believe this is causing me problems when my forms get submitted. None of them work because they always get rendered with my context in the url such as: form action="/mycontext/action" when I think it should be form action="action" Any suggestion as to what I can do or how to fix it? Or do I just have to avoid using the html:form tags? Thanks, Rod Schmidt
Need help!
Hi all, I have a problem, my code in a jsp page is as follow : %Vector v = new Vector(); //putsomething into the vectorhere pageContext.setAttribute("list", v, PageContext.PAGE_SCOPE); % html body logic:iterate id="element" name="list" bean:write name="element" property="element_attribute"/ /logic:iterate /body /html I would like to put the first partinto an action class and the last part into a jsp page but the problem is i can't get the variable pageContext from the action class. Should i use session to solve this problem ? (e.g.the action classwill put the vector into session and then, the jsp page will get the vector, or another way, the jsp page will put the page context into session and then the action class will get the page context). Please help ! Thanks and regards Quan