how to handle refresh button ?
hi, I am adding a blank row in my jsp page by pressing the button and submitting to the same page. The problem is that when user presses the referesh button, It should not add a row. Is there any standard way of handling this problem ? TIA Ashwani Kalra This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: how to handle refresh button ?
Hi, what does happen when the refresh button is pressed? You can test anyway if the user has pressed submit or refresh button. And you can add an if-expression which adds a row only if submit button is pressed. Manuel An Struts (E-mail) Kalra, Ashwani [EMAIL PROTECTED] [EMAIL PROTECTED]Kopie 08.12.2003 07:56 Thema how to handle refresh button ? Bitte antworten an Struts Users Mailing List [EMAIL PROTECTED] org hi, I am adding a blank row in my jsp page by pressing the button and submitting to the same page. The problem is that when user presses the referesh button, It should not add a row. Is there any standard way of handling this problem ? TIA Ashwani Kalra This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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]
html:form tag
I am converting a html form to .jsp page. Html file contains following form code. form name=frmName tag. This form name is getting used by few javascript functions. At present I have this line in .jsp page for form tag. html:form action=action1.do Which attribute in the html:form tag represents the name attribute of form tag? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Antwort: how to handle refresh button ?
Hi, I am talking about the refresh button of the browser. When user presses it, How I figure out that this is different request. I can always use some hidden field etc to detect this. Any other direct way ? -Original Message- From: Manuel Lenz [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:58 PM To: Struts Users Mailing List Subject: Antwort: how to handle refresh button ? Hi, what does happen when the refresh button is pressed? You can test anyway if the user has pressed submit or refresh button. And you can add an if-expression which adds a row only if submit button is pressed. Manuel An Struts (E-mail) Kalra, Ashwani [EMAIL PROTECTED] [EMAIL PROTECTED] Kopie 08.12.2003 07:56 Thema how to handle refresh button ? Bitte antworten an Struts Users Mailing List [EMAIL PROTECTED] org hi, I am adding a blank row in my jsp page by pressing the button and submitting to the same page. The problem is that when user presses the referesh button, It should not add a row. Is there any standard way of handling this problem ? TIA Ashwani Kalra This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: html:form tag
Yes, u r rite. Thanks kadir for prompt reply. -Original Message- From: Kathiresan Murugesan [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 2:06 PM To: Viral_Thakkar Subject: RE: html:form tag Hi You can use the name attribute value you given in your form bean mapping in your struts-config.xml. That will be the name of your form. kadir -Original Message- From: Viral_Thakkar To: Struts Users Mailing List Sent: 12/8/2003 1:53 PM Subject: html:form tag I am converting a html form to .jsp page. Html file contains following form code. form name=frmName tag. This form name is getting used by few javascript functions. At present I have this line in .jsp page for form tag. html:form action=action1.do Which attribute in the html:form tag represents the name attribute of form tag? - 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]
AW: Pass A String From Servlet And Write Out Its Value in JSP
bean:write name=c/ -Ursprungliche Nachricht- Von: Caroline Jen [mailto:[EMAIL PROTECTED] Gesendet: Montag, 8. Dezember 2003 03:37 An: [EMAIL PROTECTED] Betreff: Pass A String From Servlet And Write Out Its Value in JSP My servlet has a String called 'category'. I want to pass the String to a JSP. Therefore, I have the code shown below in the servlet: session.setAttribute( c, category ); OR request.setAttribute( c, category ); And, I do the following in my JSP: % String keyValue = (String)session.getAttribute( c ); % OR % String keyValue = (String)request.getAttribute( c ); % How do I write out keyValue in my JSP in Struts? __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.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]
html:text with pattern
Hi all, is there any extension to html:text which accept pattern as in jstl formatNumber, i.e can handle percentage conversion? So if the actual property value is 0.45, then the generated html input tag will display 45 and vice versa? Or do i have to manually convert the values? TIA, bdr. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to handle refresh button ?
Hello! I think you should use redirect attribute of your action mapping. you should read the thread begun by : From: Antony Paul [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Monday, December 01, 2003 1:28 PM Subject: forward vs redirect ? - Hope it helps. Caroline hi, I am adding a blank row in my jsp page by pressing the button and submitting to the same page. The problem is that when user presses the referesh button, It should not add a row. Is there any standard way of handling this problem ? TIA Ashwani Kalra - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
downloading of files
Is there any struts support to download the files? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: downloading of files
what exactly you want to do? please be more spesific. F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 11:33 AM Subject: downloading of files Is there any struts support to download the files? - 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: downloading of files
I assume that your Action prompts the user (the guy using the browser) to save the file ? Viral_Thakkar wrote: Is there any struts support to download the files? - 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: how to handle refresh button ?
hi Caroline, Redirect has problem that request parameters will be lost. But I think I give it a try.. Thanks Ashwani Kalra http://www.geocities.com/ashwani_kalra -Original Message- From: Caroline Lauferon [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 2:59 PM To: Struts Users Mailing List Subject: Re: how to handle refresh button ? Hello! I think you should use redirect attribute of your action mapping. you should read the thread begun by : From: Antony Paul [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Monday, December 01, 2003 1:28 PM Subject: forward vs redirect ? - Hope it helps. Caroline hi, I am adding a blank row in my jsp page by pressing the button and submitting to the same page. The problem is that when user presses the referesh button, It should not add a row. Is there any standard way of handling this problem ? TIA Ashwani Kalra - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Very Troubled in Finding Ways to Pass a Variable to a Class
How does your FindEditorData class get called? It is the responsibility of the caller to tell this class who the user is. I assume that there is an Action mixed in here since the call is made in response to an HTML form being submitted. Have your Action figure out who the user is (request.getRemoteUser()) and then pass that information along to your FindEditorData class. Don't trust a hidden field to tell you who the user is. You will get hacked. -Max - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Saturday, December 06, 2003 4:02 PM Subject: RE: Very Troubled in Finding Ways to Pass a Variable to a Class It is wonderful to know that there are some ActionForm methods that holds true in the scaffold.ProcessAction's execute() method. It gives the hope that my problem could be resolved. Via a submit button in my JSP, I try to pass two variables; username and keyName, to my Java class (FindEditorData.java) with the type=org.apache.struts.scaffold.ProcessAction, and this Java class has this method: public Object execute() throws Exception { ... } 1. if I use the hidden field technique (see below) inside the JSP html:form tag: % String username = request.getRemoteUser();% html:hidden property=username value=%=username%/ html:hidden property=keyName value=journal_category/ How do I retrieve the value of username and keyName in the Java class? Probably due to my lack of knowledge of the ActionForm, I got compilation error cannot resolve symbol: request or cannot resolve symbol: session because FindEditorData.java does not extend HttpServlet and FindEditorData.java does not extend Action. 2. if I want to get 'username' in the Java class instead of passing the 'username' as a hidden field from a submit button in my JSP, how do I do it? String username = request.getRemoteUser(); gives me a compilation error cannot resolve symbol: request. The action mapping in my struts-config.xml looks like: action roles=editor path=/find/Category type=org.apache.struts.scaffold.ProcessAction parameter=org.apache.artimus.article.FindEditorData name=articleForm scope=request validate=false forward name=success path=.article.Result/ /action -Caroline --- Joe Hertz [EMAIL PROTECTED] wrote: Actually, you haven't illustrated it. You've just stated it. In the ActionForm there are methods like validate() that accept as parameters an ActionMapping and an httpServletRequest, and from the httpServletRequest you can call getSession(). Same holds true in the Action class' execute() method. So what is the problem with your class? Why can't you utilize it from one of these places that you do have access to these things? What exactly is stopping you here? Once you tell us, then you will have illustrated the problem. -J -Original Message- From: Caroline Jen [mailto:[EMAIL PROTECTED] Sent: Saturday, December 06, 2003 1:47 PM To: Struts Users Mailing List Subject: Re: Very Troubled in Finding Ways to Pass a Variable to a Class I know how to pass a hidden field. The problem is how to retrieve it in my Java class. I have illustrated that my Java class does not extend HttpServlet or Action. This Java class has a mapping in the struts-config.xml file: type=org.apache.struts.scaffold.ProcessAction parameter=org.XYZ.article.FindEditorData name=articleForm -Caroline --- Timo [EMAIL PROTECTED] wrote: Caroline, The best way I use it to pass parameters to the action class is via a hidden attribute in the form, in your case the articleForm you can define the hidden attribute using input type=hidden name=hiddenField value=%=request.getRemoteUser();%/ Good luck. - Original Message - From: Caroline Jen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 05, 2003 8:17 PM Subject: Very Troubled in Finding Ways to Pass a Variable to a Class I have a class FindEditorData.java. I want to pass a vairable 'username' to this class for some processing. This class is invoked from a JSP: html:form action=/find/Category html:submitView Articles/html:submit and the value of the 'username' is obtained this way: String username = request.getRemoteUser(); Due to my limited knowledge in Struts, I cannot figure out what to do. Let me explain the problem: 1. This class has this method: public Object execute() throws Exception { ... } I do not make this class extends HttpServlet or extends Action. I cannot nest a method inside a doGet/doPost or the
RE: Setting browser download dialogue box captions and suggesting file names
To make a JSP respond as a CSV download I start the JSP like this: % response.setContentType(text/csv); response.setHeader(Content-Disposition, attachment; filename=some-data.csv); % For Word, you probably need this: % response.setContentType(application/msword); response.setHeader(Content-Disposition, attachment; filename=my-document.doc); % Peter Hilton LogicaCMG Kralingseweg 241-249 Postbus 8566 3009AN Rotterdam The Netherlands www.logicacmg.com All opinions expressed are solely those of the author and not of LogicaCMG -Original Message- From: Mike Parfitt [mailto:[EMAIL PROTECTED] Sent: 01 December 2003 11:42 To: [EMAIL PROTECTED] Subject: Setting browser download dialogue box captions and suggesting file names [...] When a user clicks on one, a request is made to the server passing in the ID of the chosen file (Microsoft Word) to be downloaded. [...] The file is then downloaded to the user's browser (Internet Explorer - V5) but I cannot find how to influence the caption/contents of the various dialogue boxes [...] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to handle refresh button ?
send a random number, seed by date, that's like - (?random=10002373); F. - Original Message - From: Kalra, Ashwani [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 11:45 AM Subject: RE: how to handle refresh button ? hi Caroline, Redirect has problem that request parameters will be lost. But I think I give it a try.. Thanks Ashwani Kalra http://www.geocities.com/ashwani_kalra -Original Message- From: Caroline Lauferon [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 2:59 PM To: Struts Users Mailing List Subject: Re: how to handle refresh button ? Hello! I think you should use redirect attribute of your action mapping. you should read the thread begun by : From: Antony Paul [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Monday, December 01, 2003 1:28 PM Subject: forward vs redirect ? - Hope it helps. Caroline hi, I am adding a blank row in my jsp page by pressing the button and submitting to the same page. The problem is that when user presses the referesh button, It should not add a row. Is there any standard way of handling this problem ? TIA Ashwani Kalra - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - 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: downloading of files
I have a screen which provides support to upload and download the files. To upload the files, I am using the struts example. Now, I need to know how to implement the download/display details functionality. Regards, Viral -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:14 PM To: Struts Users Mailing List Subject: Re: downloading of files I assume that your Action prompts the user (the guy using the browser) to save the file ? Viral_Thakkar wrote: Is there any struts support to download the files? - 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: downloading of files
Hmm, how about a page which provides a link or button(form) to the action which then starts the download ? Of course some variable can be submitted with the form to indicate to the Action which file should be sent to the browser. As for sending the content to the browser, you can just write the content to the response body (assuming that you have set the content type correctly) . Viral_Thakkar wrote: I have a screen which provides support to upload and download the files. To upload the files, I am using the struts example. Now, I need to know how to implement the download/display details functionality. Regards, Viral -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:14 PM To: Struts Users Mailing List Subject: Re: downloading of files I assume that your Action prompts the user (the guy using the browser) to save the file ? Viral_Thakkar wrote: Is there any struts support to download the files? - 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: downloading of files
Define a download accessor class (that you'll write using servlet functionality) in the web.xml file that manages the file when requested. F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:00 PM Subject: RE: downloading of files I have a screen which provides support to upload and download the files. To upload the files, I am using the struts example. Now, I need to know how to implement the download/display details functionality. Regards, Viral -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:14 PM To: Struts Users Mailing List Subject: Re: downloading of files I assume that your Action prompts the user (the guy using the browser) to save the file ? Viral_Thakkar wrote: Is there any struts support to download the files? - 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]
ActionForm and password fields.
Hi, How to tell struts that I dont want to display the password if validation fails ? What about other form elements ? rgds Antony Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm and password fields.
Assuming you're using struts validator, this goes in your ActionForm class: public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = super.validate(mapping, request); if (errors != null) { setPassword(null); } return errors; } - Original Message - From: Antony Paul [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Monday, December 08, 2003 4:44 AM Subject: ActionForm and password fields. Hi, How to tell struts that I dont want to display the password if validation fails ? What about other form elements ? rgds Antony Paul. - 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: ActionForm and password fields.
Thanks for reply. So for all the fields that I dont want to display set that to null. What if it is DynaActionForm. I dont use validator because I am porting an application to Struts of which 20% is completed and we have written JavaScript for it. rgds. Antony Paul. - Original Message - From: David Chelimsky [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 4:18 PM Subject: Re: ActionForm and password fields. Assuming you're using struts validator, this goes in your ActionForm class: public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = super.validate(mapping, request); if (errors != null) { setPassword(null); } return errors; } - Original Message - From: Antony Paul [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Monday, December 08, 2003 4:44 AM Subject: ActionForm and password fields. Hi, How to tell struts that I dont want to display the password if validation fails ? What about other form elements ? rgds Antony Paul. - 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]
No getProperties() on ActionErrors?
Hi all, I have the following problem: I want to access ActionError objects using the EL language in a JSP page like this (for a reason I don't want to work with the html:error taglib): c:forEach items=${requestScope}['org.apache.struts.action.ERROR'].properties var=error divc:out value=${error}//div /c:forEach My guess is that this doesn't work because the ActionErrors class has a properties() method and not a getProperties() method. Does anyone know a way to iterate over the ActionError objects in the ActionError object using the EL language? Thanks and regards, Jeroen Breedveld - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tiles, Definition inheritence
Hi I'm quite new to Tiles and I've got the following problem: I've defined the following default definition: definition name=.mainLayout path=/layout/classicLayout.jsp put name=title value=Berechtigung WEB with Tiles / put name=header value=/top_menu.jsp / put name=menu value=/toc.jsp / put name=footer value=/footer.jsp / put name=body value=/welcome.jsp / /definition The classicLayout.jsp hasn't been changed (Struts examples). Additionally, I've defined the following Definition: definition name=.showOrgEinheit extends=.mainLayout put name=input value=/getOrgEinheit.jsp / put name=result value=/showOrgEinheit.jsp / put name=body value=/layout/bodyTwoColumns.jsp / /definition The bodyTwoColumns looks like this: %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % table border=0 width=100% cellspacing=5 tr td width=50% align=left tiles:insert attribute='input'/ /td td width=50% align=left tiles:insert attribute='result' / /td /tr /table My struts action forwards to the definition .showOrgEinheit but I get the following error: [ServletException in:/layout/bodyTwoColumns.jsp] Error - Tag Insert : No value found for attribute 'input'.' Can anybody help me, please? Thank you a lot. Cheers Oliver *** BITTE BEACHTEN *** Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet möglicherweise vertrauliche oder gesetzlich geschützte Daten oder Informationen. Zum Empfang derselben ist (sind) ausschliesslich die genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter Ausschluss jeder Reproduktion zu zerstören und die absendende Person umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
designing simple scheduler
Hello, I am using struts/beans in my application. I want a scheduler kind of thing that after regular interval of time should check the db and send mails. I want some suggestions regarding running it on red hat linux and way to go for this. Cheers, Raman Garg
Re: designing simple scheduler
With a layered MVC application you can re-use beans outside of Struts. Have cron call beans application. I do. .V Raman wrote: Hello, I am using struts/beans in my application. I want a scheduler kind of thing that after regular interval of time should check the db and send mails. I want some suggestions regarding running it on red hat linux and way to go for this. Cheers, Raman Garg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with Struts-Validation : datePattern and JavaScript
I want to know if someone has updated the javascript code for the date validation in the validate-rules.xml ? Because the datePattern option, doesn't work correctly, only datePatternStrict will be validated. I have searched the user mailing list, for this problem, but have not found any solution. Thanx Rouven - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: downloading of files
Should I write the action class for the download functionality or servlet code required? -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:45 PM To: Struts Users Mailing List Subject: Re: downloading of files Define a download accessor class (that you'll write using servlet functionality) in the web.xml file that manages the file when requested. F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:00 PM Subject: RE: downloading of files I have a screen which provides support to upload and download the files. To upload the files, I am using the struts example. Now, I need to know how to implement the download/display details functionality. Regards, Viral -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:14 PM To: Struts Users Mailing List Subject: Re: downloading of files I assume that your Action prompts the user (the guy using the browser) to save the file ? Viral_Thakkar wrote: Is there any struts support to download the files? - 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: downloading of files
well, if you want to authenticate users to download the files, your software should handle the direct file requests (for example http://localhost/download/x.gif), because the direck file requests does not call action servlet in a standart struts designed web.xml file. With a servlet you can manage the direct requests, URLs like the example above. Let me give you the web.xml part to give you the idea servlet servlet-nameDownloadAccessor/servlet-name display-nameDownloadAccessor/display-name servlet-classcom.mypackage.DownloadAccessor/servlet-class load-on-startup10/load-on-startup /servlet servlet-mapping servlet-nameDownloadAccessor/servlet-name url-pattern/downloads/*/url-pattern /servlet-mapping F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:55 PM Subject: RE: downloading of files Should I write the action class for the download functionality or servlet code required? -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:45 PM To: Struts Users Mailing List Subject: Re: downloading of files Define a download accessor class (that you'll write using servlet functionality) in the web.xml file that manages the file when requested. F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:00 PM Subject: RE: downloading of files I have a screen which provides support to upload and download the files. To upload the files, I am using the struts example. Now, I need to know how to implement the download/display details functionality. Regards, Viral -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:14 PM To: Struts Users Mailing List Subject: Re: downloading of files I assume that your Action prompts the user (the guy using the browser) to save the file ? Viral_Thakkar wrote: Is there any struts support to download the files? - 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: designing simple scheduler
Hi, search the mail archive. This thread was discussed about one or two weeks ago. Regards, Markus Hello, I am using struts/beans in my application. I want a scheduler kind of thing that after regular interval of time should check the db and send mails. I want some suggestions regarding running it on red hat linux and way to go for this. Cheers, Raman Garg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: downloading of files
Can u please look at http://www.mail-archive.com/[EMAIL PROTECTED]/msg15750.html and tell me what code need to go in the download action class? -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 5:39 PM To: Struts Users Mailing List Subject: Re: downloading of files well, if you want to authenticate users to download the files, your software should handle the direct file requests (for example http://localhost/download/x.gif), because the direck file requests does not call action servlet in a standart struts designed web.xml file. With a servlet you can manage the direct requests, URLs like the example above. Let me give you the web.xml part to give you the idea servlet servlet-nameDownloadAccessor/servlet-name display-nameDownloadAccessor/display-name servlet-classcom.mypackage.DownloadAccessor/servlet-class load-on-startup10/load-on-startup /servlet servlet-mapping servlet-nameDownloadAccessor/servlet-name url-pattern/downloads/*/url-pattern /servlet-mapping F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:55 PM Subject: RE: downloading of files Should I write the action class for the download functionality or servlet code required? -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:45 PM To: Struts Users Mailing List Subject: Re: downloading of files Define a download accessor class (that you'll write using servlet functionality) in the web.xml file that manages the file when requested. F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:00 PM Subject: RE: downloading of files I have a screen which provides support to upload and download the files. To upload the files, I am using the struts example. Now, I need to know how to implement the download/display details functionality. Regards, Viral -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:14 PM To: Struts Users Mailing List Subject: Re: downloading of files I assume that your Action prompts the user (the guy using the browser) to save the file ? Viral_Thakkar wrote: Is there any struts support to download the files? - 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: downloading of files
Viral, I'm talking about the servlet, not struts action, mine is an alternative for you, and the thread you send is about the actions, use it if you want... F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 08, 2003 2:17 PM Subject: RE: downloading of files Can u please look at http://www.mail-archive.com/[EMAIL PROTECTED]/msg15750.html and tell me what code need to go in the download action class? -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 5:39 PM To: Struts Users Mailing List Subject: Re: downloading of files well, if you want to authenticate users to download the files, your software should handle the direct file requests (for example http://localhost/download/x.gif), because the direck file requests does not call action servlet in a standart struts designed web.xml file. With a servlet you can manage the direct requests, URLs like the example above. Let me give you the web.xml part to give you the idea servlet servlet-nameDownloadAccessor/servlet-name display-nameDownloadAccessor/display-name servlet-classcom.mypackage.DownloadAccessor/servlet-class load-on-startup10/load-on-startup /servlet servlet-mapping servlet-nameDownloadAccessor/servlet-name url-pattern/downloads/*/url-pattern /servlet-mapping F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:55 PM Subject: RE: downloading of files Should I write the action class for the download functionality or servlet code required? -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:45 PM To: Struts Users Mailing List Subject: Re: downloading of files Define a download accessor class (that you'll write using servlet functionality) in the web.xml file that manages the file when requested. F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:00 PM Subject: RE: downloading of files I have a screen which provides support to upload and download the files. To upload the files, I am using the struts example. Now, I need to know how to implement the download/display details functionality. Regards, Viral -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:14 PM To: Struts Users Mailing List Subject: Re: downloading of files I assume that your Action prompts the user (the guy using the browser) to save the file ? Viral_Thakkar wrote: Is there any struts support to download the files? - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to submit form using html:link tag
Hi, Can anyone of you help me with this..i have a hyperlink in my JSP on clicking which i want to submit an action form with some request parameters along with the form.Clicking the hyperlink in the JSPshouldideally perform the following task which is done by this _javascript_ below: function x ( arg1) { document.ActionFormName.action = "" + arg1;document.ActionFormName.submit(); } I have tried using the html:link href="" /html:link, html:link page="" /html:link, but though the action is being called, the Action Form is not being submitted to the action class.I am not quite sure whether html:link forward="" /html:linkwill help as i don't know how to use it in the present scenario. Thanks in advance for any suggestion to the above. Nisith ** Message from InterScan E-Mail VirusWall NT ** ** No virus found in attached file noname.htm ** No virus found in attached file noname.htm NO VIRUS FOUND: SERVER GENERATED MESSAGE * End of message *** DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how to submit form using html:link tag
html:link ... onclick=x(arg); .../ Tim Lucia -Original Message- From: Nisith Dash [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 7:28 AM To: Struts Users Mailing List Subject: how to submit form using html:link tag Hi, Can anyone of you help me with this..i have a hyperlink in my JSP on clicking which i want to submit an action form with some request parameters along with the form.Clicking the hyperlink in the JSP should ideally perform the following task which is done by this javascript below: function x ( arg1) { document.ActionFormName.action = ../../someAction.do?method=subMethodNamenewSearch=truekey= + arg1; document.ActionFormName.submit(); } I have tried using the html:link href= /html:link, html:link page= /html:link, but though the action is being called, the Action Form is not being submitted to the action class. I am not quite sure whether html:link forward= /html:link will help as i don't know how to use it in the present scenario. Thanks in advance for any suggestion to the above. Nisith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to submit form using html:link tag
in case html:link is specified , you have to give either a forward, or a href or a page attribute. onclick will not work here..the error is: Cannot create rewrite URL: java.net.MalformedURLException: You must specify exactly one of forward, href, how can i specify the forward attribute so that my purpose is achieved. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, December 08, 2003 6:13 PM Subject: RE: how to submit form using html:link tag html:link ... onclick=x(arg); .../ Tim Lucia -Original Message- From: Nisith Dash [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 7:28 AM To: Struts Users Mailing List Subject: how to submit form using html:link tag Hi, Can anyone of you help me with this..i have a hyperlink in my JSP on clicking which i want to submit an action form with some request parameters along with the form.Clicking the hyperlink in the JSP should ideally perform the following task which is done by this javascript below: function x ( arg1) { document.ActionFormName.action = ../../someAction.do?method=subMethodNamenewSearch=truekey= + arg1; document.ActionFormName.submit(); } I have tried using the html:link href= /html:link, html:link page= /html:link, but though the action is being called, the Action Form is not being submitted to the action class. I am not quite sure whether html:link forward= /html:link will help as i don't know how to use it in the present scenario. Thanks in advance for any suggestion to the above. Nisith - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services on any subject matter. Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services shall be understood as neither given nor endorsed by Tata Consultancy Services or any affiliate of Tata Consultancy Services. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE : how to submit form using html:link tag
If you don't want to use Javascript to submit your form, I think you can use a submit button with a special CSS (on IE). The submit button will then looks like an hyperlink. Bye -- Franck Lefebure - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts and Commons Chain
This is very interesting I think. .V Hookom, Jacob wrote: I was looking at chain's implementation, instead of executing the commands with the visitor pattern, wouldn't a more powerful/flexible method be to implement it using a filter pattern? See: http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter. html Sample Chain: CommandServletStart CommandExceptionHandler CommandStoreState CommandExceptionThrower -- CommandStart.execute(Context ctx, Chain chain) throws Exception { ServletContext srvCtx = (ServletContext) ctx; String usrId = srvCtx.getRequestScope().getParameter(id)); String newName = srvCtx.getRequestScope().getParameter(name)); // get user and save state User user = SomeService.getUser(usrId); String oldName = user.getName(); // set new state and execute try { user.setName(newName); ctx.setAttribute(user, user); chain.executeNext(ctx); } catch (Exception e) { // on error, rollback change user.setName(oldName); throw e; } } -- CommandExceptionHandler.execute(Context ctx, Chain chain) throws Exception { try { chain.executeNext(ctx); } catch (SQLException e) { chain.executeNext(ctx); } // let unhandled exceptions go up } CommandExceptionThrower.execute(Context ctx, Chain chain) throws Exception { throw new SQLException(); } With this, you would not have to change your inheritance to add behavior (going from a command to a filter). The given command would already know best on how to handle itself and since it calls the next item in the chain, we can also wrap the context to take care of situations where we want to have listener type behavior. The chain could also allow for runtime manipulation by the commands, to insert additional commands to handle errors. chain.insert(SomeCommand).insert(AnotherCommand).executeNext(ctx); Jacob Hookom Senior Programmer/Analyst McKesson Medical-Surgical Golden Valley, MN - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Link-to-action?
Dennis, thank you very much for the prompt reply. I had a brief look at the example application but upon googling for a link tag in struts I found the following http://husted.com/struts/resources/linkParam.htm (source code included) This seems to be exactly what I need (had no time to try using it yet). I hope this will be useful to all that face similar problems. All the best, Theo - Original Message - From: Dennis Hunziker [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Sunday, December 07, 2003 9:04 AM Subject: RE: Link-to-action? Hi In our current project we are using an adapted version of the LinkXTag class provided with the struts example application. Check out this class and I hope it is what you need. Kind regards Dennis Hunziker -Original Message- From: Theodosios Paschalidis [mailto:[EMAIL PROTECTED] Sent: Sonntag, 7. Dezember 2003 00:10 To: [EMAIL PROTECTED] Subject: Link-to-action? Hi all, I am a new struts user utilizing it for my uni project. I have reached a point that I do not know how to handle the struts way and am really stuck! I spent a lot time on this and I would be grateful for any further info! I am dynamically producing some search results. I will be turning them into links and I want to pass a parameter. Is it possible that a user clicking on a link can trigger an action? eg having something like a href=DisplayItem.do?ItemId=223 Using JSPs would be easy to do invoking the appropriate method directly the above way. Using servlets I could just do String itemId=request.getParameter(Itemid). Since an ActionClass is a servlet could I achieve the same using the Form as a transfer object for the ID property? If this cannot be done using the struts sequence (Form-Action) then maybe it will be easier forwarding to a JSP? Doing that though will require me using a scriptlet to retrieve the object of interest :( Any better way? (because my Items are nested I am trying to do it through an Action) In a nutshell: 1) I display a collection 2) I want to somehow select the item that the user clicked, for detailed description Any help will be really appreciated! Thank you for your time, Theo - 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]
getting the form name
Hello, I'm trying to subclass the TextTag.java. I need to get the form name assiciated with this input field. How can I retrieve this? As I understand it right, the form field gets the name of the form from the associated actionmapping. But how can I get the form tag, the text tag is nested in? Regards, Arne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm and password fields.
Sorry, I have no experience w/ DynaActionForms. Someone else is going to have to field this one - anybody? - Original Message - From: Antony Paul [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 5:00 AM Subject: Re: ActionForm and password fields. Thanks for reply. So for all the fields that I dont want to display set that to null. What if it is DynaActionForm. I dont use validator because I am porting an application to Struts of which 20% is completed and we have written JavaScript for it. rgds. Antony Paul. - Original Message - From: David Chelimsky [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 4:18 PM Subject: Re: ActionForm and password fields. Assuming you're using struts validator, this goes in your ActionForm class: public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = super.validate(mapping, request); if (errors != null) { setPassword(null); } return errors; } - Original Message - From: Antony Paul [EMAIL PROTECTED] To: struts [EMAIL PROTECTED] Sent: Monday, December 08, 2003 4:44 AM Subject: ActionForm and password fields. Hi, How to tell struts that I dont want to display the password if validation fails ? What about other form elements ? rgds Antony Paul. - 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: getting the form name
You could do this: FormTag htmlForm = (FormTag) TagSupport.findAncestorWithClass(this, FormTag.class); String actionFormName = htmlForm.getBeanName(); -Original Message- From: Arne Brutschy [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 7:42 AM To: Struts Users Mailing List Subject: getting the form name Hello, I'm trying to subclass the TextTag.java. I need to get the form name assiciated with this input field. How can I retrieve this? As I understand it right, the form field gets the name of the form from the associated actionmapping. But how can I get the form tag, the text tag is nested in? Regards, Arne - 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: how to submit form using html:link tag
This works for me: html:link href=# onclick=document.courseForm.submit();Done/html:link Put whatever javascript you want in the onclick handler. Tim Lucia -Original Message- From: Nisith Dash [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 7:51 AM To: Struts Users Mailing List Subject: Re: how to submit form using html:link tag in case html:link is specified , you have to give either a forward, or a href or a page attribute. onclick will not work here..the error is: Cannot create rewrite URL: java.net.MalformedURLException: You must specify exactly one of forward, href, how can i specify the forward attribute so that my purpose is achieved. - Original Message - From: Tim Lucia [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, December 08, 2003 6:13 PM Subject: RE: how to submit form using html:link tag html:link ... onclick=x(arg); .../ Tim Lucia -Original Message- From: Nisith Dash [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 7:28 AM To: Struts Users Mailing List Subject: how to submit form using html:link tag Hi, Can anyone of you help me with this..i have a hyperlink in my JSP on clicking which i want to submit an action form with some request parameters along with the form.Clicking the hyperlink in the JSP should ideally perform the following task which is done by this javascript below: function x ( arg1) { document.ActionFormName.action = ../../someAction.do?method=subMethodNamenewSearch=truekey= + arg1; document.ActionFormName.submit(); } I have tried using the html:link href= /html:link, html:link page= /html:link, but though the action is being called, the Action Form is not being submitted to the action class. I am not quite sure whether html:link forward= /html:link will help as i don't know how to use it in the present scenario. Thanks in advance for any suggestion to the above. Nisith - 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: Tiles, Definition inheritence
Only the template definition called can 'see' the Tiles context and access the attributes. In your case the classicLayout.jsp can use the input and result attributes. If the bodyTwoColumns.jsp is to be your layout then changing classicLayout.jsp to have the two columns format would be the best solution. You could also pass the attributes from the template to the input jsps but that becomes difficult to extend or change because you have explicit variables you are creating in your template jsp for other jsps to use. Cal www.calandva.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Oliver Wulff Sent: Monday, December 08, 2003 6:16 AM To: [EMAIL PROTECTED] Subject: Tiles, Definition inheritence Hi I'm quite new to Tiles and I've got the following problem: I've defined the following default definition: definition name=.mainLayout path=/layout/classicLayout.jsp put name=title value=Berechtigung WEB with Tiles / put name=header value=/top_menu.jsp / put name=menu value=/toc.jsp / put name=footer value=/footer.jsp / put name=body value=/welcome.jsp / /definition The classicLayout.jsp hasn't been changed (Struts examples). Additionally, I've defined the following Definition: definition name=.showOrgEinheit extends=.mainLayout put name=input value=/getOrgEinheit.jsp / put name=result value=/showOrgEinheit.jsp / put name=body value=/layout/bodyTwoColumns.jsp / /definition The bodyTwoColumns looks like this: %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % table border=0 width=100% cellspacing=5 tr td width=50% align=left tiles:insert attribute='input'/ /td td width=50% align=left tiles:insert attribute='result' / /td /tr /table My struts action forwards to the definition .showOrgEinheit but I get the following error: [ServletException in:/layout/bodyTwoColumns.jsp] Error - Tag Insert : No value found for attribute 'input'.' Can anybody help me, please? Thank you a lot. Cheers Oliver *** BITTE BEACHTEN *** Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet möglicherweise vertrauliche oder gesetzlich geschützte Daten oder Informationen. Zum Empfang derselben ist (sind) ausschliesslich die genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter Ausschluss jeder Reproduktion zu zerstören und die absendende Person umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe. - 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: designing simple scheduler
Vic, can you please explain a bit more how do you reuse your beans ? (and have cron job call yor application - you know the idea of separating layers, how is your architecture like now ?) (we would need something similar...) Thanks, M. -Original Message- From: Vic Cekvenich [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 6:29 AM To: [EMAIL PROTECTED] Subject: Re: designing simple scheduler With a layered MVC application you can re-use beans outside of Struts. Have cron call beans application. I do. .V Raman wrote: Hello, I am using struts/beans in my application. I want a scheduler kind of thing that after regular interval of time should check the db and send mails. I want some suggestions regarding running it on red hat linux and way to go for this. Cheers, Raman Garg - 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: getting the form name
Jarnot Kari Contr HQ SSG/STN wrote: You could do this: FormTag htmlForm = (FormTag) TagSupport.findAncestorWithClass(this, FormTag.class); String actionFormName = htmlForm.getBeanName(); Hey, that was excactly what I needed! Thanks alot, Arne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Antwort: RE: Tiles, Definition inheritence
Wouldn't it make sense that the inserted tiles has access to the tiles context either? I think, my requirement is quite common. I think that the main layout of a web application won't change but the body tile contains sometimes one tile or is splitted in an upper- and lower-part or a left- and a right-part. It's a little bit unhandy to copy the classicLayout.jsp to another layout jsp and add the input- and result-part. Therefore, layout code is duplicated. Does my requirement contradict the design of tiles? ** Oliver Wulff Zürich Versicherungs-Gesellschaft IA4, CoC Middleware Postfach, 8085 Zürich Telefon: +41- 1 628 58 07 Fax: +41 - 1 623 58 07 E-Mail: mailto:[EMAIL PROTECTED] List Mailbox [EMAIL PROTECTED]An: Struts Users Mailing List [EMAIL PROTECTED] om Kopie: Thema:RE: Tiles, Definition inheritence 08.12.2003 15:10 Bitte antworten an Struts Users Mailing List Only the template definition called can 'see' the Tiles context and access the attributes. In your case the classicLayout.jsp can use the input and result attributes. If the bodyTwoColumns.jsp is to be your layout then changing classicLayout.jsp to have the two columns format would be the best solution. You could also pass the attributes from the template to the input jsps but that becomes difficult to extend or change because you have explicit variables you are creating in your template jsp for other jsps to use. Cal www.calandva.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Oliver Wulff Sent: Monday, December 08, 2003 6:16 AM To: [EMAIL PROTECTED] Subject: Tiles, Definition inheritence Hi I'm quite new to Tiles and I've got the following problem: I've defined the following default definition: definition name=.mainLayout path=/layout/classicLayout.jsp put name=title value=Berechtigung WEB with Tiles / put name=header value=/top_menu.jsp / put name=menu value=/toc.jsp / put name=footer value=/footer.jsp / put name=body value=/welcome.jsp / /definition The classicLayout.jsp hasn't been changed (Struts examples). Additionally, I've defined the following Definition: definition name=.showOrgEinheit extends=.mainLayout put name=input value=/getOrgEinheit.jsp / put name=result value=/showOrgEinheit.jsp / put name=body value=/layout/bodyTwoColumns.jsp / /definition The bodyTwoColumns looks like this: %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % table border=0 width=100% cellspacing=5 tr td width=50% align=left tiles:insert attribute='input'/ /td td width=50% align=left tiles:insert attribute='result' / /td /tr /table My struts action forwards to the definition .showOrgEinheit but I get the following error: [ServletException in:/layout/bodyTwoColumns.jsp] Error - Tag Insert : No value found for attribute 'input'.' Can anybody help me, please? Thank you a lot. Cheers Oliver *** BITTE BEACHTEN *** Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet möglicherweise vertrauliche oder gesetzlich geschützte Daten oder Informationen. Zum Empfang derselben ist (sind) ausschliesslich die genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter Ausschluss jeder Reproduktion zu zerstören und die absendende Person umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe. - 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] *** BITTE BEACHTEN *** Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet möglicherweise vertrauliche oder gesetzlich geschützte Daten oder Informationen. Zum Empfang derselben ist (sind) ausschliesslich die genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter Ausschluss jeder Reproduktion zu zerstören und die absendende Person umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.
RE: how to Remove the cached JSP's?
Thanks. I deleted java n class from 'WORK' directory, but still keep getting same/similar error: in the manu.jsp, I changed app.menu.profile to app.menu.po, but still show the value of app.menu.profile. item titleapp.menu.po/title item titleapp.menu.po.browse/title linkPoBrowse.do/link /item /item In application.properties, I have following: app.menu.po=PO app.menu.po.browse=Po browse app.menu.profile=Profile app.menu.profile.mbs=Default Region I am using IBM WebSphere Studio Application Developer. Please give me more help, thanks. --- Agashivala, Vishal [EMAIL PROTECTED] wrote: Remove the .java and .class file for that JSP from %Tomcat_home%\work\Standalone\localhost\%virtualdirectory% Although path depends upon the version of tomcat..you wont find exact path as shown above but try to remove java n class from 'WORK' directory under your tomcat installation. Regards, Vishal Agashivala Atos Origin India O: +91-22-5691 3870 -Original Message- From: shivanjali [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 4:45 AM To: 'Struts Users Mailing List' Subject: RE: how to Remove the cached JSP's? What is cached JSP's? Please let me know. thanks -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 1:49 PM To: Struts Users Mailing List Subject: how to Remove the cached JSP's? Hi, I am using Tile, and getting the error javax.servlet.ServletException: org/apache/jsp/Registration_jsp (wrong name: org/apache/jsp/registration_jsp) I found one solution in one web site, said: Remove the cached JSP's and restart. But how to Remove the cached JSP's? please help, thank you very much. __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to Remove the cached JSP's?
in that case you should Stop Websphere and then Start Websphere most appservers and webservers will load JSPs on startup and will the program will retain jsps after precompiling into memory unless configured NOT to do so.. Bouncing the server ALWAYS works -Martin - Original Message - From: Julia Weaver [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 9:53 AM Subject: RE: how to Remove the cached JSP's? Thanks. I deleted java n class from 'WORK' directory, but still keep getting same/similar error: in the manu.jsp, I changed app.menu.profile to app.menu.po, but still show the value of app.menu.profile. item titleapp.menu.po/title item titleapp.menu.po.browse/title linkPoBrowse.do/link /item /item In application.properties, I have following: app.menu.po=PO app.menu.po.browse=Po browse app.menu.profile=Profile app.menu.profile.mbs=Default Region I am using IBM WebSphere Studio Application Developer. Please give me more help, thanks. --- Agashivala, Vishal [EMAIL PROTECTED] wrote: Remove the .java and .class file for that JSP from %Tomcat_home%\work\Standalone\localhost\%virtualdirectory% Although path depends upon the version of tomcat..you wont find exact path as shown above but try to remove java n class from 'WORK' directory under your tomcat installation. Regards, Vishal Agashivala Atos Origin India O: +91-22-5691 3870 -Original Message- From: shivanjali [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 4:45 AM To: 'Struts Users Mailing List' Subject: RE: how to Remove the cached JSP's? What is cached JSP's? Please let me know. thanks -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 1:49 PM To: Struts Users Mailing List Subject: how to Remove the cached JSP's? Hi, I am using Tile, and getting the error javax.servlet.ServletException: org/apache/jsp/Registration_jsp (wrong name: org/apache/jsp/registration_jsp) I found one solution in one web site, said: Remove the cached JSP's and restart. But how to Remove the cached JSP's? please help, thank you very much. __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.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]
RE: designing simple scheduler
how to reuse beans? You should be making your beans without any thought of the web whatsoever. THEN your Actions can calls your beans. This way, the Actions are clients of your API. By having an API containing business logic (instead of business logic in your actions), you promote reuse. An additional benefit of this type of bean design is that you can test it automatedly (JUnit!) without having Tomcat or servlet container running. The Action, in this case, is the glue connecting all your business logic (beans). Replace the glue with another type of glue and you can reuse your business components anywhere. -Original Message- From: Voinea, Marina [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 9:19 AM To: 'Struts Users Mailing List' Subject: RE: designing simple scheduler Vic, can you please explain a bit more how do you reuse your beans ? (and have cron job call yor application - you know the idea of separating layers, how is your architecture like now ?) (we would need something similar...) Thanks, M. -Original Message- From: Vic Cekvenich [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 6:29 AM To: [EMAIL PROTECTED] Subject: Re: designing simple scheduler With a layered MVC application you can re-use beans outside of Struts. Have cron call beans application. I do. .V Raman wrote: Hello, I am using struts/beans in my application. I want a scheduler kind of thing that after regular interval of time should check the db and send mails. I want some suggestions regarding running it on red hat linux and way to go for this. Cheers, Raman Garg - 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: Setting browser download dialogue box captions and suggesting file names
Hi Peter, Apart from the file name, the only difference between your suggestion and what I am doing is that :- 1) your Java code is in a JSP, while mine is in an Action form 2) you are using text/csv as the content type, while mine is application/msword Perhaps by having my code in an Action form, something within Struts/Tomcat etc. decides that it isn't appropriate to allow me to set the Content-Disposition and Content-Description response headers (as I am processing a request from the user) and is ignoring them. So when the OutputStream is flushed later on, the browser just gets a stream of data without those headers. As soon as I can, I had better test whether using a JSP allows me to influence the browser captions and suggest the file name when downloading Word documents. Regards. Mike -Original Message- From: Peter Hilton [mailto:[EMAIL PROTECTED] Sent: 08 December 2003 09:51 To: 'Struts Users Mailing List' Subject: RE: Setting browser download dialogue box captions and suggesting file names To make a JSP respond as a CSV download I start the JSP like this: % response.setContentType(text/csv); response.setHeader(Content-Disposition, attachment; filename=some-data.csv); % For Word, you probably need this: % response.setContentType(application/msword); response.setHeader(Content-Disposition, attachment; filename=my-document.doc); % Peter Hilton LogicaCMG Kralingseweg 241-249 Postbus 8566 3009AN Rotterdam The Netherlands www.logicacmg.com All opinions expressed are solely those of the author and not of LogicaCMG -Original Message- From: Mike Parfitt [mailto:[EMAIL PROTECTED] Sent: 01 December 2003 11:42 To: [EMAIL PROTECTED] Subject: Setting browser download dialogue box captions and suggesting file names [...] When a user clicks on one, a request is made to the server passing in the ID of the chosen file (Microsoft Word) to be downloaded. [...] The file is then downloaded to the user's browser (Internet Explorer - V5) but I cannot find how to influence the caption/contents of the various dialogue boxes [...] Mike Parfitt Developer JMH Demica Ltd Crowne House, 56-58 Southwark Street London SE1 1UN Direct: +44 (0) 20 7450 2539 Switchboard: +44 (0) 20 7450 2500 Fax: +44 (0) 20 7407 5825 Web: http://www.jmhdemica.com This document should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. JMH Demica accepts no liability for the consequences for any person acting, or refraining from acting, on such information prior to the receipt by those persons of subsequent written confirmation (by letter or fax). If you have received this email message in error, please notify the sender immediately by telephone. Please also delete the message from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this email message is prohibited. The contents of this email message do not necessarily reflect the opinions of JMH Demica. Citadel is the registered trademark of JMH Demica. Copyright JMH Demica all rights reserved. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to Remove the cached JSP's?
Thanks. I did Stop Websphere, restart my computer, and then Start Websphere again. But still not work. Maybe I should change something in configuration. Could you please give me further instruction how to change in configuration? or something wrong in the tile definition? definition name=mainLayout path=/basic/myLayout.jsp put name=title value=My First Definition Page / put name=header value=/common/Header.jsp / put name=footer value=/common/footer.jsp / put name=menu value=/basic/menu.jsp / put name=body value=test.jsp / /definition --- Martin Gainty [EMAIL PROTECTED] wrote: in that case you should Stop Websphere and then Start Websphere most appservers and webservers will load JSPs on startup and will the program will retain jsps after precompiling into memory unless configured NOT to do so.. Bouncing the server ALWAYS works -Martin - Original Message - From: Julia Weaver [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 9:53 AM Subject: RE: how to Remove the cached JSP's? Thanks. I deleted java n class from 'WORK' directory, but still keep getting same/similar error: in the manu.jsp, I changed app.menu.profile to app.menu.po, but still show the value of app.menu.profile. item titleapp.menu.po/title item titleapp.menu.po.browse/title linkPoBrowse.do/link /item /item In application.properties, I have following: app.menu.po=PO app.menu.po.browse=Po browse app.menu.profile=Profile app.menu.profile.mbs=Default Region I am using IBM WebSphere Studio Application Developer. Please give me more help, thanks. --- Agashivala, Vishal [EMAIL PROTECTED] wrote: Remove the .java and .class file for that JSP from %Tomcat_home%\work\Standalone\localhost\%virtualdirectory% Although path depends upon the version of tomcat..you wont find exact path as shown above but try to remove java n class from 'WORK' directory under your tomcat installation. Regards, Vishal Agashivala Atos Origin India O: +91-22-5691 3870 -Original Message- From: shivanjali [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 4:45 AM To: 'Struts Users Mailing List' Subject: RE: how to Remove the cached JSP's? What is cached JSP's? Please let me know. thanks -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 1:49 PM To: Struts Users Mailing List Subject: how to Remove the cached JSP's? Hi, I am using Tile, and getting the error javax.servlet.ServletException: org/apache/jsp/Registration_jsp (wrong name: org/apache/jsp/registration_jsp) I found one solution in one web site, said: Remove the cached JSP's and restart. But how to Remove the cached JSP's? please help, thank you very much. __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.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] __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] Athentication filter doesn't filter actions
Ralf Rapude wrote: I've checked it out before I post the solution and it works fine here. (Tomcat 4.1.27). AB ideas. BTW, I'm using Tomcat 5 and 2.4 servlets.. So maybe it is a problem of using Tomcat 5 (isn't it still beta?). Maybe you should download a stable version for another attempt. Finally, I found the solution. I was really stupid - I included a general allow for all *.do URIs in my authFilter (for debug reasons) and I forgot it... Argl.. Your mapping is now working properly. Thanks, Arne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles, Definition inheritence
This is (IMHO) a classic issue with tiles. The Tiles meaning of 'inheritance' isn't quite the same as in Java or other OO concepts. Tiles inherit values from their parents, and can override those values. However, adding new values is not supported. The only way [that I've found, anway] that you can support the addition of new properties is to use the tiles importAttribute tag (see http://jakarta.apache.org/struts/userGuide/struts-tiles.html#importAttribute ) in the main layout JSP, i.e. /layout/classicLayout.jsp, to pass the values into a scope where they can be found by other tags such as bean:write and use the values that way. David Hibbs, ACS Staff Programmer / Analyst American National Insurance Company -Original Message- From: Oliver Wulff [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 5:16 AM To: [EMAIL PROTECTED] Subject: Tiles, Definition inheritence Hi I'm quite new to Tiles and I've got the following problem: I've defined the following default definition: definition name=.mainLayout path=/layout/classicLayout.jsp put name=title value=Berechtigung WEB with Tiles / put name=header value=/top_menu.jsp / put name=menu value=/toc.jsp / put name=footer value=/footer.jsp / put name=body value=/welcome.jsp / /definition The classicLayout.jsp hasn't been changed (Struts examples). Additionally, I've defined the following Definition: definition name=.showOrgEinheit extends=.mainLayout put name=input value=/getOrgEinheit.jsp / put name=result value=/showOrgEinheit.jsp / put name=body value=/layout/bodyTwoColumns.jsp / /definition The bodyTwoColumns looks like this: %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % table border=0 width=100% cellspacing=5 tr td width=50% align=left tiles:insert attribute='input'/ /td td width=50% align=left tiles:insert attribute='result' / /td /tr /table My struts action forwards to the definition .showOrgEinheit but I get the following error: [ServletException in:/layout/bodyTwoColumns.jsp] Error - Tag Insert : No value found for attribute 'input'.' Can anybody help me, please? Thank you a lot. Cheers Oliver *** BITTE BEACHTEN *** Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet möglicherweise vertrauliche oder gesetzlich geschützte Daten oder Informationen. Zum Empfang derselben ist (sind) ausschliesslich die genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter Ausschluss jeder Reproduktion zu zerstören und die absendende Person umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: designing simple scheduler
Turansky, Mark wrote: how to reuse beans? You should be making your beans without any thought of the web whatsoever. THEN your Actions can calls your beans. This way, the Actions are clients of your API. By having an API containing business logic (instead of business logic in your actions), you promote reuse. An additional benefit of this type of bean design is that you can test it automatedly (JUnit!) without having Tomcat or servlet container running. The Action, in this case, is the glue connecting all your business logic (beans). Replace the glue with another type of glue and you can reuse your business components anywhere. +1 You should be making your beans without any thought of the web whatsoever An additional benefit of this type of bean design is that you can test it +1 And to underline the obvios Struts is MVC implementation. The benefit of MVC is MVC layers. Then you can call your application (Yes, you can write console applications in Java, and re-use your Mail beans ) like this in bsh: while true do $JAVA_HOME/bin/java -classpath $CLASSPATH com.async.run sleep 100 done Else... you did not do MVC Struts... oops. hth, .V -Original Message- From: Voinea, Marina [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 9:19 AM To: 'Struts Users Mailing List' Subject: RE: designing simple scheduler Vic, can you please explain a bit more how do you reuse your beans ? (and have cron job call yor application - you know the idea of separating layers, how is your architecture like now ?) (we would need something similar...) Thanks, M. -Original Message- From: Vic Cekvenich [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 6:29 AM To: [EMAIL PROTECTED] Subject: Re: designing simple scheduler With a layered MVC application you can re-use beans outside of Struts. Have cron call beans application. I do. .V Raman wrote: Hello, I am using struts/beans in my application. I want a scheduler kind of thing that after regular interval of time should check the db and send mails. I want some suggestions regarding running it on red hat linux and way to go for this. Cheers, Raman Garg - 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]
about using DynaActionForm in SQL Maps framework with Struts...
I would use two things: a Data Transfer Object(DTO) and BeanUtils.copyProperties(). I would use a DTO because I do not want to pass a view component like ActionForm directly to a model component like your baseDAO. The DTO might look something like this: public class Author { String lastName; } Then I would use BeanUtils.copyProperties() to copy data from the ActionForm to the DTO. The signature for insertAuthor would then be: public void insertAuthor(Author author) throws DaoException --- 1) Using an ActionForm: Create your ActionForm that you call AuthorForm. Then in your Action's execute(...), you could do this: AuthorForm authorForm = (AuthorForm) form; Author author = new Author(); BeanUtils.copyProperties(author, authorForm); try { baseDAO.insertAuthor(author); } catch(Exception ex) { ex.printStackTrace(); } In struts-config.xml, you would have: form-bean name=authorForm type=org.apache.struts.action.ActionForm form-property name=lastName type=java.lang.String/ /form-bean 2) Using a DynaActionForm: Almost the same thing, but do not create a separate AuthorForm. DynaActionForm authorForm = (DynaActionForm) form; Author author = new Author(); BeanUtils.copyProperties(author, authorForm); try { baseDAO.insertAuthor(author); } catch(Exception ex) { ex.printStackTrace(); } In struts-config.xml, you would have: form-bean name=authorForm type=org.apache.struts.action.DynaActionForm form-property name=lastName type=java.lang.String/ /form-bean -Original Message- From: Ricky [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:44 AM To: Struts Users Mailing List Subject: about using DynaActionForm in SQL Maps framework with Struts... hi, there, has anybody tried to use SQL Maps framework with struts? i am now using the struts with SQL Maps framework, all is convenient. i have tried to use ActionForm instead of create a new javaBean passed to SQL Map parameter. just like this: AuthorForm authorForm = (AuthorForm) form; try { baseDAO.insertAuthor(authorForm); } catch(Exception ex) { ex.printStackTrace(); } now, i have a query about using DynaActionForm in it... assume that i am using DynaActionForm and config in struts-config.xml, What should i do to pass the dynaformBean to SQL Map parameter? some code like these, but it threw some exception... DynaActionForm authorForm = (DynaActionForm) form; try { baseDAO.insertAuthor(authorForm); } catch(Exception ex) { ex.printStackTrace(); } and in my BaseDAO.java : public void insertAuthor(DynaActionForm author) throws DaoException { try { javaDIYDaoManager.startTransaction(); authorDao.insertAuthor(author); javaDIYDaoManager.commitTransaction(); } catch (DaoException e) { try { javaDIYDaoManager.rollbackTransaction(); } catch (Exception e2) { /* ignore */} throw ( (DaoException) e.fillInStackTrace()); } } it threw some exception: Error executing 'insertAuthor' in 'com/dao/sql/Author.xml'. Check the Parameter Map (or inline parameters). Check the 'author_name' property. Cause: com.ibatis.common.beans.BeansException: There is no READABLE property named 'author_name' in class 'org.apache.struts.action.DynaActionForm' com.ibatis.common.beans.BeansException: There is no READABLE property named 'author_name' in class 'org.apache.struts.action.DynaActionForm' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: designing simple scheduler
yes, calling APP layer API (beans) from the UI is OK. I was thinking if it is possible the other way around : to somehow inform the UI that soemthing happened on the backend and it has to display a message accordingly. (kind of polling from UI to back end). The APP layer bean triggering an event in UI application. Coud this be done? -Original Message- From: Turansky, Mark [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 9:57 AM To: Struts Users Mailing List Subject: RE: designing simple scheduler how to reuse beans? You should be making your beans without any thought of the web whatsoever. THEN your Actions can calls your beans. This way, the Actions are clients of your API. By having an API containing business logic (instead of business logic in your actions), you promote reuse. An additional benefit of this type of bean design is that you can test it automatedly (JUnit!) without having Tomcat or servlet container running. The Action, in this case, is the glue connecting all your business logic (beans). Replace the glue with another type of glue and you can reuse your business components anywhere. -Original Message- From: Voinea, Marina [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 9:19 AM To: 'Struts Users Mailing List' Subject: RE: designing simple scheduler Vic, can you please explain a bit more how do you reuse your beans ? (and have cron job call yor application - you know the idea of separating layers, how is your architecture like now ?) (we would need something similar...) Thanks, M. -Original Message- From: Vic Cekvenich [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 6:29 AM To: [EMAIL PROTECTED] Subject: Re: designing simple scheduler With a layered MVC application you can re-use beans outside of Struts. Have cron call beans application. I do. .V Raman wrote: Hello, I am using struts/beans in my application. I want a scheduler kind of thing that after regular interval of time should check the db and send mails. I want some suggestions regarding running it on red hat linux and way to go for this. Cheers, Raman Garg - 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: designing simple scheduler
No, no that is not what we are saying. Just call the beans from your UI. In this case your UI is console. Same bean that you allready tested. Struts is the fastest way to develop that I know (15 years of IT for me) So your console app check the JavaMail and saves it or send it from db. Same beans and DB struts uses. So any mail shows up online. Batch/async is bread and butter of DP. Online is just the icing. .V Voinea, Marina wrote: yes, calling APP layer API (beans) from the UI is OK. I was thinking if it is possible the other way around : to somehow inform the UI that soemthing happened on the backend and it has to display a message accordingly. (kind of polling from UI to back end). The APP layer bean triggering an event in UI application. Coud this be done? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to Remove the cached JSP's?
for caching properties on IBM http server: http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/040502.html Specifically look at httpd.conf in the IBM Http Server: AfpaEnable AfpaCache on AfpaLogFile c:/Program Files/IBM HTTP Server/logs/afpalog V-ECLF AfpaDynaCacheMax 10 The above settings enable the Cache Accelerator and limit the dynamic cache size to 10 Meg. If you use these directive to increase the cache size, do not make the cache so large that all physical memory is consumed. You can determine how much memory is available, when all the applications are running, by using the Windows Task Manager. Assign no more than 50% of available physical memory to the dynamic cache. Specifying too large a cache not only decreases the performance of other applications, but also puts you at risk for completely running out of memory. The default configuration does not include the AfpaDynaCacheMax directive where the cache size is automatically calculated as 1/8 of physical memory. for configuraing cahcing thru WebSphere console try and configure the dynacache.xml http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/0606001601.html usually there is a websphere admin that can help you with this..be mindful the greater anount of storage allocated the greater the capacity that the program will cache let me know.. Martin - Original Message - From: Julia Weaver [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:10 AM Subject: Re: how to Remove the cached JSP's? Thanks. I did Stop Websphere, restart my computer, and then Start Websphere again. But still not work. Maybe I should change something in configuration. Could you please give me further instruction how to change in configuration? or something wrong in the tile definition? definition name=mainLayout path=/basic/myLayout.jsp put name=title value=My First Definition Page / put name=header value=/common/Header.jsp / put name=footer value=/common/footer.jsp / put name=menu value=/basic/menu.jsp / put name=body value=test.jsp / /definition --- Martin Gainty [EMAIL PROTECTED] wrote: in that case you should Stop Websphere and then Start Websphere most appservers and webservers will load JSPs on startup and will the program will retain jsps after precompiling into memory unless configured NOT to do so.. Bouncing the server ALWAYS works -Martin - Original Message - From: Julia Weaver [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 9:53 AM Subject: RE: how to Remove the cached JSP's? Thanks. I deleted java n class from 'WORK' directory, but still keep getting same/similar error: in the manu.jsp, I changed app.menu.profile to app.menu.po, but still show the value of app.menu.profile. item titleapp.menu.po/title item titleapp.menu.po.browse/title linkPoBrowse.do/link /item /item In application.properties, I have following: app.menu.po=PO app.menu.po.browse=Po browse app.menu.profile=Profile app.menu.profile.mbs=Default Region I am using IBM WebSphere Studio Application Developer. Please give me more help, thanks. --- Agashivala, Vishal [EMAIL PROTECTED] wrote: Remove the .java and .class file for that JSP from %Tomcat_home%\work\Standalone\localhost\%virtualdirectory% Although path depends upon the version of tomcat..you wont find exact path as shown above but try to remove java n class from 'WORK' directory under your tomcat installation. Regards, Vishal Agashivala Atos Origin India O: +91-22-5691 3870 -Original Message- From: shivanjali [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 4:45 AM To: 'Struts Users Mailing List' Subject: RE: how to Remove the cached JSP's? What is cached JSP's? Please let me know. thanks -Original Message- From: Julia Weaver [mailto:[EMAIL PROTECTED] Sent: Sunday, December 07, 2003 1:49 PM To: Struts Users Mailing List Subject: how to Remove the cached JSP's? Hi, I am using Tile, and getting the error javax.servlet.ServletException: org/apache/jsp/Registration_jsp (wrong name: org/apache/jsp/registration_jsp) I found one solution in one web site, said: Remove the cached JSP's and restart. But how to Remove the cached JSP's? please help, thank you very much. __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: designing simple scheduler
Online is just the icing. Right! The business logic of the application should be UI agnostic. The logic shouldn't know if it was invoked from a console application, a Swing gui app, or a web (Struts!) application. The business logic is (or should be) the same. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic Cekvenich Sent: Monday, December 08, 2003 10:29 AM To: [EMAIL PROTECTED] Subject: Re: designing simple scheduler No, no that is not what we are saying. Just call the beans from your UI. In this case your UI is console. Same bean that you allready tested. Struts is the fastest way to develop that I know (15 years of IT for me) So your console app check the JavaMail and saves it or send it from db. Same beans and DB struts uses. So any mail shows up online. Batch/async is bread and butter of DP. Online is just the icing. .V Voinea, Marina wrote: yes, calling APP layer API (beans) from the UI is OK. I was thinking if it is possible the other way around : to somehow inform the UI that soemthing happened on the backend and it has to display a message accordingly. (kind of polling from UI to back end). The APP layer bean triggering an event in UI application. Coud this be done? - 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: designing simple scheduler
This probably goes without saying, but in addition to being UI agnostic, your business logic should also be datastore agnostic. To be truly abstract, it should be as easy to move your backend from RDBMS to LDAP or XML as it is to move the UI from Web to GUI to Console. Ian Turansky, Mark [EMAIL PROTECTED]To: Struts Users Mailing List [EMAIL PROTECTED] rm.com cc: Subject: RE: designing simple scheduler 12/08/2003 11:05 AM Please respond to Struts Users Mailing List Online is just the icing. Right! The business logic of the application should be UI agnostic. The logic shouldn't know if it was invoked from a console application, a Swing gui app, or a web (Struts!) application. The business logic is (or should be) the same. -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Vic Cekvenich Sent: Monday, December 08, 2003 10:29 AM To: [EMAIL PROTECTED] Subject: Re: designing simple scheduler No, no that is not what we are saying. Just call the beans from your UI. In this case your UI is console. Same bean that you allready tested. Struts is the fastest way to develop that I know (15 years of IT for me) So your console app check the JavaMail and saves it or send it from db. Same beans and DB struts uses. So any mail shows up online. Batch/async is bread and butter of DP. Online is just the icing. .V Voinea, Marina wrote: yes, calling APP layer API (beans) from the UI is OK. I was thinking if it is possible the other way around : to somehow inform the UI that soemthing happened on the backend and it has to display a message accordingly. (kind of polling from UI to back end). The APP layer bean triggering an event in UI application. Coud this be done? - 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] This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Looking for a Taglib
Hi List, I have several pages that need to show users a list of available options in one listbox, an add remove button a list box that shows the options they've already selected. This fairly common in UI's I've seen this on a few web pages something like this... Available States Selected States +++--+ | Alabama|| Connecticut | | Alaska | +-+ | Maine| | Arizona| | Add | | | | Arkansas | +-+ | | | California || | | Colorado | +-+ | | | Delaware | |Remove | | | | Florida| +-+ | | +++--+ I've looked on Google, SourceForge Jakarta for a taglib that would do something like this, without success. Obviously the html taglib will help with the buttons listboxes, but there's a lot of javascript needed to support this kind of widget it would be a lot easier to manage if there was a taglib that could generate it. Does anyone know of a taglib that could help with this and/or another source finding taglibs? Thanks in advance. Linda :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts User Roles
Where can I find Struts Roles documentation? Tiago Henrique C. R. Alves - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pass A String From Servlet And Write Out Its Value in JSP
The easiest way to do this isn't with a Struts tag, per se, but with a JSTL tag, I think - just use the JSTL 1.0 (or 1.1) tag library like so: % taglib uri=http://java.sun.com/jstl/core; prefix=c % c:out value=${c}/ That *should* work for either a session-scoped variable or a request-scoped variable. If you need to print out a value from a scriptlet (which is where keyValue is being defined) - you should store that value in pageContext, like so: % pageContext.setAttribute(keyValue, keyValue); // first parameter can be anything you want to name it % c:out value=${keyValue}/ That should be it! Caroline Jen wrote: My servlet has a String called 'category'. I want to pass the String to a JSP. Therefore, I have the code shown below in the servlet: session.setAttribute( c, category ); OR request.setAttribute( c, category ); And, I do the following in my JSP: % String keyValue = (String)session.getAttribute( c ); % OR % String keyValue = (String)request.getAttribute( c ); % How do I write out keyValue in my JSP in Struts? __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Select options tag
I have 20-25 combo-boxes in a single page.Each combo-box contains number of values and corresponding description. If I use a collection to populate all the options in all the combo-box,I have to define 20 javabeans and then keep them in scope. Is there any other easier way to do it using Struts Regards VasudevRao Gupta -Original Message- From: Tiago Henrique Costa Rodrigues Alves [mailto:[EMAIL PROTECTED] Sent: 08 December 2003 23:36 To: Struts Users Mailing List (E-mail) Subject: Struts User Roles Where can I find Struts Roles documentation? Tiago Henrique C. R. Alves - 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]
Re: Using A DynaActionForm To Populate A Collection In The Object It Represents
Okay, given that this should work, please let me provide an example of a situation I am having great difficulty with: I am working in a Java 1.4.2 (Tomcat 4.1.29), Struts 1.1 environment using JSTL 1.1. I am attempting to take any changes a user makes to the values on the form, and review them when submitted. I am specifically having trouble retrieving values from the three fields automatically created from an arrayList (generated by using JSTL, a DynaActionForm, and a forEach loop). Below are code fragments detailing the issue: The entry in the struts-config.xml looks like this: form-bean name=detailForm type=org.apache.struts.action.DynaActionForm form-property name=tank type=java.util.ArrayList/ /form-bean The .jsp looks like this: c:forEach var=tank items=${detailForm.map.tank} html:text indexed=True name=tank property=tankTotalInventory size=10 / c:forEach var=thruput items='${tank.thruputs}' html:text indexed=True name=thruput property=thruputTotalInventory size=10 / /c:forEach /c:forEach The source of the resulting .jsp looks like this: input type=text name=tank[0].tankTotalInventory size=10 value=100 input type=text name=thruput[0].thruputTotalInventory size=10 value=200 input type=text name=thruput[1].thruputTotalInventory size=10 value=300 input type=text name=thruput[2].thruputTotalInventory size=10 value=400 I then make changes to the values of the tankTotalInventory field and all three of the thruputTotalInventory fields and submit the form. I have a breakpoint in the action that the form posts to in order to review the contents of the DynaActionForm. I am capturing any changes made to the tankTotalInventory field, but the arrayList-derived fields (thruput[0].thruputTotalInventory, thruput[1].thruputTotalInventory, and thruput[2].thruputTotalInventory) remain unchanged. Any help provided would be greatly appreciated!
html:errors Tag Deprecated?
I read somewhere that the html:errors tag is going to be deprecated and that html:messages should be used instead. What's the correct syntax for using it to display errors? Any code examples appreciated. Thanks, John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: .do's come back as 404 file not found
All ritey... Time to bring up my good ol eclipse debugger.. It would be verrryyy nice if others can tell me about SUCH experiences with struts.. And what they tried to resolve.. It would help me out in debugging this.. Thanks for the responses guys.. Paul Dhaliwal -Original Message- From: ajay brar [mailto:[EMAIL PROTECTED] Sent: Saturday, December 06, 2003 1:29 AM To: [EMAIL PROTECTED] Subject: RE: .do's come back as 404 file not found hi! i had the same problem with my tomcat, and this happened only on my online account and not on my home pc. The app worked fine earlier and then suddenly stopped working for all the .do actions. And then again sometimes it would work fine. However i could never find the problem. so post up if you do find the problem. Ajay From: Dhaliwal, Pritpal (HQP) [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Subject: RE: .do's come back as 404 file not found Date: Fri, 5 Dec 2003 14:15:24 -0800 Hello Joe, Its maps to *.do Remember that same conf worked like a charm two days ago :) Same conf is also working in another setting. TIA, Paul -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 11:46 AM To: 'Struts Users Mailing List' Subject: RE: .do's come back as 404 file not found What's the url pattern for your action servlet defined in web.xml? -Original Message- From: Dhaliwal, Pritpal (HQP) [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 1:48 PM To: Struts Users Mailing List Subject: .do's come back as 404 file not found Hello Everyone, I am using: Struts and Resin 2.1.11 All of sudden my index.do, or any other .do is not being recognized by resin anymore. It was working fine two days ago, all of sudden I am getting 404s In the logs I see that its picking up the correct struts-config.xml and it is that ActionServlet runs its init function.. So has anyone seen it before, is it generally app server problem or I could have messed something up in struts also? TIA, Paul Dhaliwal - 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] _ Hot chart ringtones and polyphonics. Go to http://ninemsn.com.au/mobilemania/default.asp - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] IE problem. stumped
How much javascript is there?? Funny things happen when there is lots of javscript involved.. Esp when you are messing around with spans, their visibility being changed with js and all.. I generally stay away from javascript, unless really needed.. Paul Dhaliwal -Original Message- From: Prabhat Kumar (IT) [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 12:02 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: [OT] IE problem. stumped I just ran the validator as was suggested by Jarnot... The HTML validates fine. What happens is sometimes, a heading from the middle of the page for some reason shifts to the top. And it is very random. Text beside a check-box doesn't show... and then when that region is highlighted it magically shows up. -Original Message- From: Joe Hertz [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 2:47 PM To: 'Struts Users Mailing List' Subject: RE: [OT] IE problem. stumped IE 5.X and 6.0 are very different beasts. 6.0 in some ways is *less* compliant with the specs then 5.2. -Original Message- From: Jarnot Voytek Contr AU HQ/SC [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 1:59 PM To: 'Struts Users Mailing List' Subject: RE: [OT] IE problem. stumped -Original Message- From: Prabhat Kumar (IT) [mailto:[EMAIL PROTECTED] Sent: Friday, December 05, 2003 12:57 PM To: [EMAIL PROTECTED] Subject: [OT] IE problem. stumped I'm wondering if anyone has come across this. We have this struts application that is about to be deployed and it works fine, shows all the HTML pages as expected in IE 6.0. As part of our final tests, we began testing the application on IE 5.01 SP1. This is where the application gets all messed up. Text gets displayed all over the page very randomly. We used HTML tables to layout pages and format content. Thoughts? Two thoughts, try this: http://validator.w3.org/ and do this sort of testing earlier in your lifecycle... -- Voytek Jarnot Quantum materiae materietur marmota monax si marmota monax materiam possit materiari? - 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: downloading of files
I have a compression servlet demo available from my site (www.christianbollmeyer.de) which should basically do everything you're asking for. Used this to track down someone's problem with gzip and different browser clients, so it's a hack more or less. The code from the doGet() method goes to the Action's execute() one. -- Chris. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:17 PM Subject: RE: downloading of files Can u please look at http://www.mail-archive.com/[EMAIL PROTECTED]/msg15750.html and tell me what code need to go in the download action class? -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 5:39 PM To: Struts Users Mailing List Subject: Re: downloading of files well, if you want to authenticate users to download the files, your software should handle the direct file requests (for example http://localhost/download/x.gif), because the direck file requests does not call action servlet in a standart struts designed web.xml file. With a servlet you can manage the direct requests, URLs like the example above. Let me give you the web.xml part to give you the idea servlet servlet-nameDownloadAccessor/servlet-name display-nameDownloadAccessor/display-name servlet-classcom.mypackage.DownloadAccessor/servlet-class load-on-startup10/load-on-startup /servlet servlet-mapping servlet-nameDownloadAccessor/servlet-name url-pattern/downloads/*/url-pattern /servlet-mapping F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:55 PM Subject: RE: downloading of files Should I write the action class for the download functionality or servlet code required? -Original Message- From: Firat TIRYAKI [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:45 PM To: Struts Users Mailing List Subject: Re: downloading of files Define a download accessor class (that you'll write using servlet functionality) in the web.xml file that manages the file when requested. F. - Original Message - From: Viral_Thakkar [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:00 PM Subject: RE: downloading of files I have a screen which provides support to upload and download the files. To upload the files, I am using the struts example. Now, I need to know how to implement the download/display details functionality. Regards, Viral -Original Message- From: Kwok Peng Tuck [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:14 PM To: Struts Users Mailing List Subject: Re: downloading of files I assume that your Action prompts the user (the guy using the browser) to save the file ? Viral_Thakkar wrote: Is there any struts support to download the files? - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm and password fields.
You could use the redisplay attribute: html:password property=password redisplay=false / Jerome Antony Paul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, How to tell struts that I dont want to display the password if validation fails ? What about other form elements ? rgds Antony Paul. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: [OT] Looking for a Taglib
You will need just JavaScript for this kind of job... You should take a look at: JavaScript DOM It is quite simple to do this... You will see Tiago Henrique C. R. Alves Analista de Sistemas Politec - CSS Tel: 3038-6952 -Mensagem original- De: Linda Coleman [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 8 de dezembro de 2003 14:07 Para: [EMAIL PROTECTED] Assunto: [OT] Looking for a Taglib Hi List, I have several pages that need to show users a list of available options in one listbox, an add remove button a list box that shows the options they've already selected. This fairly common in UI's I've seen this on a few web pages something like this... Available States Selected States +++--+ | Alabama|| Connecticut | | Alaska | +-+ | Maine| | Arizona| | Add | | | | Arkansas | +-+ | | | California || | | Colorado | +-+ | | | Delaware | |Remove | | | | Florida| +-+ | | +++--+ I've looked on Google, SourceForge Jakarta for a taglib that would do something like this, without success. Obviously the html taglib will help with the buttons listboxes, but there's a lot of javascript needed to support this kind of widget it would be a lot easier to manage if there was a taglib that could generate it. Does anyone know of a taglib that could help with this and/or another source finding taglibs? Thanks in advance. Linda :) - 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: How to detect that session has expired ?
Ashish Kulkarni wrote: HI if u are using servelt 2.3 , then u can use servelt filter, in this filter u can have logic to check session before each request so u dont need to add any code in jsp or action class If he's using Servlet 2.3, then he can also use the ServletContextListener in conjunction, where is where the logic for whether the session has been restarted could likely belong. Kirk Wylie M7 Corporation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Antwort: RE: Tiles, Definition inheritence
BDY.RTF Description: RTF file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Form with a Form
Hi, Can we define a form within a form...if so can you guide me . Actually in my jsp I wanted to perform two different action with respect to button pressed.so If I define global form I can only submit the global action defined in that form but I wanted to submit different action with respect to different button clicked so in that case I'm going for two different formplz set me if I'm wrong.. possible pls provide me how can I achieve the same. Tnx in advance, Ramadoss - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Looking for a Taglib
BDY.RTF Description: RTF file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using A DynaActionForm To Populate A Collection In The Object It Represents
Not sure if it's a typo, but JSTL 1.1 is for JSP 2.0 (e.g. Tomcat 5). For Tomcat 4, you'll want JSTL 1.0. Ignoring JSTL, what happens with the nested taglib: %@ taglib prefix=nested uri=http://jakarta.apache.org/struts/tags-nested; % ... html:form ... nested:iterate property=tank nested:text property=tankTotalInventory size=10/ nested:iterate property=thruputs html:text property=thruputTotalInventory size=10/ /nested:iterate /nested:iterate /html:form You should see a difference in the rendered HTML... Quoting Jame Lathren [EMAIL PROTECTED]: Okay, given that this should work, please let me provide an example of a situation I am having great difficulty with: I am working in a Java 1.4.2 (Tomcat 4.1.29), Struts 1.1 environment using JSTL 1.1. I am attempting to take any changes a user makes to the values on the form, and review them when submitted. I am specifically having trouble retrieving values from the three fields automatically created from an arrayList (generated by using JSTL, a DynaActionForm, and a forEach loop). Below are code fragments detailing the issue: The entry in the struts-config.xml looks like this: form-bean name=detailForm type=org.apache.struts.action.DynaActionForm form-property name=tank type=java.util.ArrayList/ /form-bean The .jsp looks like this: c:forEach var=tank items=${detailForm.map.tank} html:text indexed=True name=tank property=tankTotalInventory size=10 / c:forEach var=thruput items='${tank.thruputs}' html:text indexed=True name=thruput property=thruputTotalInventory size=10 / /c:forEach /c:forEach The source of the resulting .jsp looks like this: input type=text name=tank[0].tankTotalInventory size=10 value=100 input type=text name=thruput[0].thruputTotalInventory size=10 value=200 input type=text name=thruput[1].thruputTotalInventory size=10 value=300 input type=text name=thruput[2].thruputTotalInventory size=10 value=400 I then make changes to the values of the tankTotalInventory field and all three of the thruputTotalInventory fields and submit the form. I have a breakpoint in the action that the form posts to in order to review the contents of the DynaActionForm. I am capturing any changes made to the tankTotalInventory field, but the arrayList-derived fields (thruput[0].thruputTotalInventory, thruput[1].thruputTotalInventory, and thruput[2].thruputTotalInventory) remain unchanged. Any help provided would be greatly appreciated! -- 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: Using A DynaActionForm To Populate A Collection In The Object It Represents
JSTL 1.1 was a typo - I am using JSTL 1.0. Thanks.
Re: RES: [OT] Looking for a Taglib
Hi Tiago and Linda, JavaScript is really the best option to this task in my opinion. I suggest taking a look at http://javascript.internet.com in section Form. Lots of nice scripts! Including one script that does what Linda wants. Hope my tip was useful. Regards, Daniel Silva. --- Tiago Henrique Costa Rodrigues Alves [EMAIL PROTECTED] wrote: You will need just JavaScript for this kind of job... You should take a look at: JavaScript DOM It is quite simple to do this... You will see Tiago Henrique C. R. Alves Analista de Sistemas Politec - CSS Tel: 3038-6952 -Mensagem original- De: Linda Coleman [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 8 de dezembro de 2003 14:07 Para: [EMAIL PROTECTED] Assunto: [OT] Looking for a Taglib Hi List, I have several pages that need to show users a list of available options in one listbox, an add remove button a list box that shows the options they've already selected. This fairly common in UI's I've seen this on a few web pages something like this... Available States Selected States +++--+ | Alabama|| Connecticut | | Alaska | +-+ | Maine| | Arizona| | Add | | | | Arkansas | +-+ | | | California || | | Colorado | +-+ | | | Delaware | |Remove | | | | Florida| +-+ | | +++--+ I've looked on Google, SourceForge Jakarta for a taglib that would do something like this, without success. Obviously the html taglib will help with the buttons listboxes, but there's a lot of javascript needed to support this kind of widget it would be a lot easier to manage if there was a taglib that could generate it. Does anyone know of a taglib that could help with this and/or another source finding taglibs? Thanks in advance. Linda :) - 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!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form with a Form
I have a suggestion. You can add a HIDDEN field, write a java script on click of multiple buttons Like ADD, DELETE, EDIT, RENAME buttons. What the java script will do is update HIDDEN variable and submit. I have not come across form within a form in HTML. Regards Ajay Kalidindi -Original Message- From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: Form with a Form Hi, Can we define a form within a form...if so can you guide me . Actually in my jsp I wanted to perform two different action with respect to button pressed.so If I define global form I can only submit the global action defined in that form but I wanted to submit different action with respect to different button clicked so in that case I'm going for two different formplz set me if I'm wrong.. possible pls provide me how can I achieve the same. Tnx in advance, Ramadoss - 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: [OT] Looking for a Taglib
It's pretty early in the game for me so I'm open to any suggestion. :) On some pages I have more than one of these list box choosers (for lack of a better name). I suppose as long as I pass the two list boxes buttons, that would work. I was thinking is would be nice if I could just treat the whole thing as one big component. Say pass the available and selected collections to a taglib let it do most of the work. Even using the html taglib, there's quite a bit of configuration do to set the labels, listboxes, collections, button, etc. Oh well, I guess I'll leave it and if it become a big problem later I can roll my own. :) Thanks for the idea!! L:) [EMAIL PROTECTED] wrote: As far as I know, there are not any JavaScript-backed tag libraries (I am pretty sure that any standard tag library won't provide the dynamic features that you are looking for without having to do a page refresh). Have you considered dumping all your JavaScript to a .js file, importing it into your webpage, and associating it with the buttons? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:07 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [OT] Looking for a Taglib Hi List, I have several pages that need to show users a list of available options in one listbox, an add remove button a list box that shows the options they've already selected. This fairly common in UI's I've seen this on a few web pages something like this... Available States Selected States +++--+ | Alabama|| Connecticut | | Alaska | +-+ | Maine| | Arizona| | Add | | | | Arkansas | +-+ | | | California || | | Colorado | +-+ | | | Delaware | |Remove | | | | Florida| +-+ | | +++--+ I've looked on Google, SourceForge Jakarta for a taglib that would do something like this, without success. Obviously the html taglib will help with the buttons listboxes, but there's a lot of javascript needed to support this kind of widget it would be a lot easier to manage if there was a taglib that could generate it. Does anyone know of a taglib that could help with this and/or another source finding taglibs? Thanks in advance. Linda :) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form with a Form
You are right Ajay...I agree with that...but I want to do it without using Javascript and hidden variable using Struts -Original Message- From: Ajay Kalidindi [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:40 PM To: Struts Users Mailing List Subject: RE: Form with a Form I have a suggestion. You can add a HIDDEN field, write a java script on click of multiple buttons Like ADD, DELETE, EDIT, RENAME buttons. What the java script will do is update HIDDEN variable and submit. I have not come across form within a form in HTML. Regards Ajay Kalidindi -Original Message- From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: Form with a Form Hi, Can we define a form within a form...if so can you guide me . Actually in my jsp I wanted to perform two different action with respect to button pressed.so If I define global form I can only submit the global action defined in that form but I wanted to submit different action with respect to different button clicked so in that case I'm going for two different formplz set me if I'm wrong.. possible pls provide me how can I achieve the same. Tnx in advance, Ramadoss - 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: [OT] Looking for a Taglib
BDY.RTF Description: RTF file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts User Roles
Struts users Servlets Role for it's tags, etc. This snipet is from WEB.XMl (and not Struts.xml): security-constraint web-resource-collection web-resource-nameSecure/web-resource-name url-pattern/do/loginPg/*/url-pattern url-pattern/do/newsBlgCmntAddPg/*/url-pattern url-pattern/do/userChngPg/*/url-pattern /web-resource-collection auth-constraint role-nameVALID/role-name role-nameENHANCED/role-name role-nameGUEST/role-name role-nameEXPIRED/role-name role-nameADMIN/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/sLogin/login.jsp/form-login-page form-error-page/sLogin/loginBad.jsp/form-error-page /form-login-config /login-config Here is a link on more WEB.XML (that works on any J2EE container -such as Tomcat): http://e-docs.bea.com/wls/docs70/webapp/web_xml.html .V Tiago Henrique Costa Rodrigues Alves wrote: Where can I find Struts Roles documentation? Tiago Henrique C. R. Alves - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
iterate over a list of tiles
Dear all, I would like to have a tile which contains a sequence of other tiles, the definition of which comes from a putList. Put into context, the right hand bar of all pages is a sequence of 'snippets' which are different for each page. I'd like to create a putlist for each page and place it in the tiles.xml file and then have a single template tile to insert them. Any ideas? Thanks, Paul Global Equity Derivatives Technology Deutsche Bank [/] Office +44 (0)20 754 55458 Mobile +44 (0)7736 299483 Fax +44 (0)20 7547 2752 -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tiles, Definition inheritence
The issue that keeps coming up is the ability for jsps other than the page= (template) jsp to have access to the attributes. John provided a good technique using a second definition. As to the definitions and the template's ability to access attributes - you can add attributes to extended definitions and then extend them. I have an example app using that technique on my site: http://www.calandva.com/holmansite/do/blog/blogging?date=20030711#094831 In this app I access the Tiles Context in an action and in a tag to modify the attributes on the fly. In the advanced pdf Cedric provides an example of creating the number of columns in the body of a template on the fly. definition name=home.pagedef page=/template.jsp controllerUrl=/do/renderCrumb put name=title value=home.title / put name=headervalue=/web/includes/header.jsp / put name=index value=/web/pages/home/HomeIndex.jsp / put name=content value=/web/pages/home/HomeContent.jsp / put name=footervalue=/web/includes/footer.jsp / put name=styleSheetvalue=web/styles/Grey_StyleSheet.css / put name=keywords value=home.keywords/ put name=crumbsvalue=/web/includes/crumb.jsp/ put name=crumbtitle1 value=Home/ put name=crumblink1value=do/AutoForward?forward=home.pagedef/ put name=pagename value=home/ /definition definition name=level2.pagedef extends=home.pagedef put name=title value=level2.title / put name=indexvalue=/web/pages/level2/Level2Index.jsp / put name=content value=/web/pages/level2/Level2Content.jsp / put name=keywords value=level2.keywords/ put name=crumbtitle2value=Level 2/ put name=crumblink2value=do/AutoForward?forward=level2.pagedef/ put name=pagenamevalue=level2/ /definition definition name=level3.pagedef extends=level2.pagedef put name=title value=level3.title / put name=indexvalue=/web/pages/level3/Level3Index.jsp / put name=contentvalue=/web/pages/level3/Level3Content.jsp / put name=crumbtitle3 value=Level 3/ put name=crumblink3 value=do/AutoForward?forward=level3.pagedef/ put name=pagename value=level3/ /definition When the level3.pagedef is used the template.jsp has access to all three levels of crumbtitle values. Some attributes are overridden and others are added as the definitions are extended. Any attribute you add in the extended path is available to the extended template. Let me know if I am off base. Cal www.calandva.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Hibbs, David Sent: Monday, December 08, 2003 10:12 AM To: 'Oliver Wulff'; [EMAIL PROTECTED] Subject: RE: Tiles, Definition inheritence This is (IMHO) a classic issue with tiles. The Tiles meaning of 'inheritance' isn't quite the same as in Java or other OO concepts. Tiles inherit values from their parents, and can override those values. However, adding new values is not supported. The only way [that I've found, anway] that you can support the addition of new properties is to use the tiles importAttribute tag (see http://jakarta.apache.org/struts/userGuide/struts-tiles.html#importAttribute ) in the main layout JSP, i.e. /layout/classicLayout.jsp, to pass the values into a scope where they can be found by other tags such as bean:write and use the values that way. David Hibbs, ACS Staff Programmer / Analyst American National Insurance Company -Original Message- From: Oliver Wulff [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 5:16 AM To: [EMAIL PROTECTED] Subject: Tiles, Definition inheritence Hi I'm quite new to Tiles and I've got the following problem: I've defined the following default definition: definition name=.mainLayout path=/layout/classicLayout.jsp put name=title value=Berechtigung WEB with Tiles / put name=header value=/top_menu.jsp / put name=menu value=/toc.jsp / put name=footer value=/footer.jsp / put name=body value=/welcome.jsp / /definition The classicLayout.jsp hasn't been changed (Struts examples). Additionally, I've defined the following Definition: definition name=.showOrgEinheit extends=.mainLayout put name=input value=/getOrgEinheit.jsp / put name=result value=/showOrgEinheit.jsp / put name=body value=/layout/bodyTwoColumns.jsp / /definition The bodyTwoColumns looks like this: %@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles % table border=0 width=100% cellspacing=5 tr td width=50% align=left tiles:insert attribute='input'/ /td td width=50% align=left tiles:insert attribute='result' / /td /tr /table My struts
RES: [OT] Looking for a Taglib
the java script function that you are looking for is something like this... function addItemToListBox(itemIndex, srcListBox, destListBox){ //srcListBox and destListBox are objects // You will use JavaScript DOM HERE //Its something like this: destListBox.add(srcListBox.item(itemIndex)) } function removeItemFromListBox(itemIndex, srcListBox, destListBox){ //srcListBox and destListBox are objects // You will use JavaScript DOM HERE //Its something like this: destListBox.remove(srcListBox.item(itemIndex)) } You will call your javascript function on button click like this: onclick=addItemToListBox(document.all.srcListBox.selectedIndex, document.all.srcListBox, document.all.destListBox) It´s something like I describe above, the method names are not correct its just to help your google research... Tiago Henrique C. R. Alves Analista de Sistemas Politec - CSS Tel: 3038-6952 -Mensagem original- De: Linda Coleman [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 8 de dezembro de 2003 15:50 Para: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Assunto: RE: [OT] Looking for a Taglib It's pretty early in the game for me so I'm open to any suggestion. :) On some pages I have more than one of these list box choosers (for lack of a better name). I suppose as long as I pass the two list boxes buttons, that would work. I was thinking is would be nice if I could just treat the whole thing as one big component. Say pass the available and selected collections to a taglib let it do most of the work. Even using the html taglib, there's quite a bit of configuration do to set the labels, listboxes, collections, button, etc. Oh well, I guess I'll leave it and if it become a big problem later I can roll my own. :) Thanks for the idea!! L:) [EMAIL PROTECTED] wrote: As far as I know, there are not any JavaScript-backed tag libraries (I am pretty sure that any standard tag library won't provide the dynamic features that you are looking for without having to do a page refresh). Have you considered dumping all your JavaScript to a .js file, importing it into your webpage, and associating it with the buttons? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:07 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [OT] Looking for a Taglib Hi List, I have several pages that need to show users a list of available options in one listbox, an add remove button a list box that shows the options they've already selected. This fairly common in UI's I've seen this on a few web pages something like this... Available States Selected States +++--+ | Alabama|| Connecticut | | Alaska | +-+ | Maine| | Arizona| | Add | | | | Arkansas | +-+ | | | California || | | Colorado | +-+ | | | Delaware | |Remove | | | | Florida| +-+ | | +++--+ I've looked on Google, SourceForge Jakarta for a taglib that would do something like this, without success. Obviously the html taglib will help with the buttons listboxes, but there's a lot of javascript needed to support this kind of widget it would be a lot easier to manage if there was a taglib that could generate it. Does anyone know of a taglib that could help with this and/or another source finding taglibs? Thanks in advance. Linda :) - 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]
RES: Struts User Roles
Thanks, I will take a better look... Tiago Henrique C. R. Alves Analista de Sistemas Politec - CSS Tel: 3038-6952 -Mensagem original- De: Vic Cekvenich [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 8 de dezembro de 2003 15:57 Para: [EMAIL PROTECTED] Assunto: Re: Struts User Roles Struts users Servlets Role for it's tags, etc. This snipet is from WEB.XMl (and not Struts.xml): security-constraint web-resource-collection web-resource-nameSecure/web-resource-name url-pattern/do/loginPg/*/url-pattern url-pattern/do/newsBlgCmntAddPg/*/url-pattern url-pattern/do/userChngPg/*/url-pattern /web-resource-collection auth-constraint role-nameVALID/role-name role-nameENHANCED/role-name role-nameGUEST/role-name role-nameEXPIRED/role-name role-nameADMIN/role-name /auth-constraint user-data-constraint transport-guaranteeNONE/transport-guarantee /user-data-constraint /security-constraint login-config auth-methodFORM/auth-method form-login-config form-login-page/sLogin/login.jsp/form-login-page form-error-page/sLogin/loginBad.jsp/form-error-page /form-login-config /login-config Here is a link on more WEB.XML (that works on any J2EE container -such as Tomcat): http://e-docs.bea.com/wls/docs70/webapp/web_xml.html .V Tiago Henrique Costa Rodrigues Alves wrote: Where can I find Struts Roles documentation? Tiago Henrique C. R. Alves - 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: [OT] Looking for a Taglib
You're right, the existing taglib doesn't address the javascript issue. Maybe configuration was the wrong word. I'm really talking about defining all the components that are part of composite chooser. Even with taglibs in the jsp, you need a label for each list box, each list box, a collection for each list box and 2 (or 4 if you want an Add All /Remove All) buttons. While adding all these elements and defining the parameters isn't horrible, it does take work that is repeated for each chooser widget. While the instance would be different across pages, each chooser needs to have these elements. Imagine... chooser:available label=Available States collection=states/ (automatically creates a list box) chooser:addAllButton/ (onClick automatically set, label optional...) chooser:addButton/ chooser:removeButton/ chooser:removeAllButton/ chooser:selected label=Selected State(s) collection=selectedStates/ chooser:javascript/ (similar to the html:javascript/ tag for the validator...) or better yet... chooser:import jsFile=chooser.js/ chooser:set availableLabel=Available States availableCollection=states selectedLabel=Selected State(s) selectedCollection=selectedStates addAll=true removeAll=true / L:) [EMAIL PROTECTED] wrote: You can pass the available and selected collections to an html:optionsCollection tag and it will render the boxes fine, however this does not solve your JavaScript problem. There is not really a lot of configuration to do, just place a data bean in a scope and point the html:optionsCollection tag to the bean. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 11:50 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [OT] Looking for a Taglib It's pretty early in the game for me so I'm open to any suggestion. :) On some pages I have more than one of these list box choosers (for lack of a better name). I suppose as long as I pass the two list boxes buttons, that would work. I was thinking is would be nice if I could just treat the whole thing as one big component. Say pass the available and selected collections to a taglib let it do most of the work. Even using the html taglib, there's quite a bit of configuration do to set the labels, listboxes, collections, button, etc. Oh well, I guess I'll leave it and if it become a big problem later I can roll my own. :) Thanks for the idea!! L:) [EMAIL PROTECTED] wrote: As far as I know, there are not any JavaScript-backed tag libraries (I am pretty sure that any standard tag library won't provide the dynamic features that you are looking for without having to do a page refresh). Have you considered dumping all your JavaScript to a .js file, importing it into your webpage, and associating it with the buttons? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:07 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [OT] Looking for a Taglib Hi List, I have several pages that need to show users a list of available options in one listbox, an add remove button a list box that shows the options they've already selected. This fairly common in UI's I've seen this on a few web pages something like this... Available States Selected States +++--+ | Alabama|| Connecticut | | Alaska | +-+ | Maine| | Arizona| | Add | | | | Arkansas | +-+ | | | California || | | Colorado | +-+ | | | Delaware | |Remove | | | | Florida| +-+ | | +++--+ I've looked on Google, SourceForge Jakarta for a taglib that would do something like this, without success. Obviously the html taglib will help with the buttons listboxes, but there's a lot of javascript needed to support this kind of widget it would be a lot easier to manage if there was a taglib that could generate it. Does anyone know of a taglib that could help with this and/or another source finding taglibs? Thanks in advance. Linda :)
RE: Tiles, Definition inheritence
BDY.RTF Description: RTF file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RES: [OT] Looking for a Taglib
Yes thanks for the help! There are actually a few that help! L:) Daniel H. F. e Silva wrote: Hi Tiago and Linda, JavaScript is really the best option to this task in my opinion. I suggest taking a look at http://javascript.internet.com in section Form. Lots of nice scripts! Including one script that does what Linda wants. Hope my tip was useful. Regards, Daniel Silva. --- Tiago Henrique Costa Rodrigues Alves [EMAIL PROTECTED] wrote: You will need just JavaScript for this kind of job... You should take a look at: JavaScript DOM It is quite simple to do this... You will see Tiago Henrique C. R. Alves Analista de Sistemas Politec - CSS Tel: 3038-6952 -Mensagem original- De: Linda Coleman [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 8 de dezembro de 2003 14:07 Para: [EMAIL PROTECTED] Assunto: [OT] Looking for a Taglib Hi List, I have several pages that need to show users a list of available options in one listbox, an add remove button a list box that shows the options they've already selected. This fairly common in UI's I've seen this on a few web pages something like this... Available States Selected States +++--+ | Alabama|| Connecticut | | Alaska | +-+ | Maine| | Arizona| | Add | | | | Arkansas | +-+ | | | California || | | Colorado | +-+ | | | Delaware | |Remove | | | | Florida| +-+ | | +++--+ I've looked on Google, SourceForge Jakarta for a taglib that would do something like this, without success. Obviously the html taglib will help with the buttons listboxes, but there's a lot of javascript needed to support this kind of widget it would be a lot easier to manage if there was a taglib that could generate it. Does anyone know of a taglib that could help with this and/or another source finding taglibs? Thanks in advance. Linda :) - 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!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form with a Form
Hi, If at all I can use JavaScript in Struts...pls guide me how can I implement the same Tnx in Advace, -Ramadoss -Original Message- From: Ajay Kalidindi [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:40 PM To: Struts Users Mailing List Subject: RE: Form with a Form I have a suggestion. You can add a HIDDEN field, write a java script on click of multiple buttons Like ADD, DELETE, EDIT, RENAME buttons. What the java script will do is update HIDDEN variable and submit. I have not come across form within a form in HTML. Regards Ajay Kalidindi -Original Message- From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: Form with a Form Hi, Can we define a form within a form...if so can you guide me . Actually in my jsp I wanted to perform two different action with respect to button pressed.so If I define global form I can only submit the global action defined in that form but I wanted to submit different action with respect to different button clicked so in that case I'm going for two different formplz set me if I'm wrong.. possible pls provide me how can I achieve the same. Tnx in advance, Ramadoss - 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: Tomcat 4.1.29 Struts
Hi David, Thanks for your mail. Actually I don't still know what is causing the problem. Now based on your mail, I've tried with both the following DTDs: http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd;struts-conf ig_1_1.dtd http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd;struts-conf ig_1_0.dtd The result is same: org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE Actually when I reload the webapp, I get the following error in my log: 2003-12-08 11:26:07 StandardWrapper[/strutsShop:default]: Loading container servlet default 2003-12-08 11:26:08 StandardWrapper[/strutsShop:action]: Marking servlet action as unavailable 2003-12-08 11:26:08 StandardContext[/strutsShop]: Servlet /strutsShop threw load() exception javax.servlet.UnavailableException: Parsing error processing resource path at org.apache.struts.action.ActionServlet.handleConfigException(ActionServl et.java:1035) at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServl et.java:1014) at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja va:955) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:935) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3422) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3623 ) at org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConfi g.java:614) at org.apache.catalina.startup.HostConfig.run(HostConfig.java:854) at java.lang.Thread.run(Thread.java:536) I'm attaching web.xml and struts_config.xml below: ---struts-config.xml - ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config /struts-config --web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app SYSTEM http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-value/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-fileindex.jsp/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list !-- Struts Tag Library Descriptor -- taglib taglib-uri /WEB-INF/struts-bean.tld /taglib-uri taglib-location /WEB-INF/struts-bean.tld /taglib-location /taglib taglib taglib-uri /WEB-INF/struts-html.tld /taglib-uri taglib-location /WEB-INF/struts-html.tld /taglib-location /taglib taglib taglib-uri /WEB-INF/struts-logic.tld /taglib-uri taglib-location /WEB-INF/struts-logic.tld /taglib-location /taglib taglib taglib-uri /WEB-INF/struts-template.tld /taglib-uri taglib-location /WEB-INF/struts-template.tld /taglib-location /taglib /web-app Thanks for your help. Regards Mukund -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Saturday, December 06, 2003 2:39 PM To: Struts Users Mailing List Subject: RE: Tomcat 4.1.29 Struts Mukund, What was your Tomcat 4.1.29 problem? Was the wrong DTD part of the problem? Regards, David -Original Message- From: Mukund Ramadoss [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003 7:06 PM To: 'Struts Users Mailing List' Subject: Tomcat 4.1.29 Struts Is anyone working with Struts on Tomcat 4.1.29? If yes, can you provide me some inputs on the installation. I'm getting org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE, when executing bean:message key=index.title/ in the jsp. Thanks Mukund -Original Message- From: Mukund Ramadoss [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2003
RES: Form with a Form
You can use javascript with struts like any other static HTML page... just add your java script body: script language=JavaScript src=file.js/script and you can call your insite your HTML STRUTS TAGS like this: html:button property= name= value= onclick=js_fuction_here / replace onclick for onchange , onmouseover take a look at the HTML TAG SPECIFICATION in struts documentation... Tiago Henrique C. R. Alves -Mensagem original- De: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 8 de dezembro de 2003 16:27 Para: Struts Users Mailing List Assunto: RE: Form with a Form Hi, If at all I can use JavaScript in Struts...pls guide me how can I implement the same Tnx in Advace, -Ramadoss -Original Message- From: Ajay Kalidindi [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:40 PM To: Struts Users Mailing List Subject: RE: Form with a Form I have a suggestion. You can add a HIDDEN field, write a java script on click of multiple buttons Like ADD, DELETE, EDIT, RENAME buttons. What the java script will do is update HIDDEN variable and submit. I have not come across form within a form in HTML. Regards Ajay Kalidindi -Original Message- From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: Form with a Form Hi, Can we define a form within a form...if so can you guide me . Actually in my jsp I wanted to perform two different action with respect to button pressed.so If I define global form I can only submit the global action defined in that form but I wanted to submit different action with respect to different button clicked so in that case I'm going for two different formplz set me if I'm wrong.. possible pls provide me how can I achieve the same. Tnx in advance, Ramadoss - 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: [OT] Looking for a Taglib
BDY.RTF Description: RTF file - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] Looking for a Taglib
I really like the tiles idea. I'll give that a try. I wasn't really excited about the idea of rolling my own tag lib--which was why I was asking for input! ;} Thanks for your ideas suggestions. It's always good to get a variety of viewpoints. One of the joys of the list!! Thanks!!! L:) [EMAIL PROTECTED] wrote: You can replace chooser:available with a html:options or html:optionsCollection tag. They pretty much require the same parameters as you require, the same goes for using html:image instead of the chooser button tags. You will find that this is a LOT easier and more customizeable than rolling your own. Why go create a custom tag when you don't have to? I am just someone who is against customization instead of standardization. What if you need to change how your form is layed out? This can be done within the JSP instead of rewriting the tag library which makes maintenance about a million times easier. Also, if you use Tiles, you can package these together into a tile and reused over and over. This is your best choice, I think. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:24 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [OT] Looking for a Taglib You're right, the existing taglib doesn't address the javascript issue. Maybe configuration was the wrong word. I'm really talking about defining all the components that are part of composite chooser. Even with taglibs in the jsp, you need a label for each list box, each list box, a collection for each list box and 2 (or 4 if you want an Add All /Remove All) buttons. While adding all these elements and defining the parameters isn't horrible, it does take work that is repeated for each chooser widget. While the instance would be different across pages, each chooser needs to have these elements. Imagine... chooser:available label=Available States collection=states/ (automatically creates a list box) chooser:addAllButton/ (onClick automatically set, label optional...) chooser:addButton/ chooser:removeButton/ chooser:removeAllButton/ chooser:selected label=Selected State(s) collection=selectedStates/ chooser:javascript/ (similar to the html:javascript/ tag for the validator...) or better yet... chooser:import jsFile=chooser.js/ chooser:set availableLabel=Available States availableCollection=states selectedLabel=Selected State(s) selectedCollection=selectedStates addAll=true removeAll=true / L:) [EMAIL PROTECTED] wrote: You can pass the available and selected collections to an html:optionsCollection tag and it will render the boxes fine, however this does not solve your JavaScript problem. There is not really a lot of configuration to do, just place a data bean in a scope and point the html:optionsCollection tag to the bean. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 11:50 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [OT] Looking for a Taglib It's pretty early in the game for me so I'm open to any suggestion. :) On some pages I have more than one of these list box choosers (for lack of a better name). I suppose as long as I pass the two list boxes buttons, that would work. I was thinking is would be nice if I could just treat the whole thing as one big component. Say pass the available and selected collections to a taglib let it do most of the work. Even using the html taglib, there's quite a bit of configuration do to set the labels, listboxes, collections, button, etc. Oh well, I guess I'll leave it and if it become a big problem later I can roll my own. :) Thanks for the idea!! L:) [EMAIL PROTECTED] wrote: As far as I know, there are not any JavaScript-backed tag libraries (I am pretty sure that any standard tag library won't provide the dynamic features that you are looking for without having to do a page refresh). Have you considered dumping all your JavaScript to a .js file, importing it into your webpage, and associating it with the buttons? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:07 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [OT] Looking for a Taglib Hi List, I have several pages that need to show users a list of available options in one listbox, an add remove button a list box that shows the options they've already selected. This fairly common in UI's I've seen this on a few web pages something like this... Available States Selected States +++--+ | Alabama|| Connecticut | | Alaska | +-+ | Maine| | Arizona| | Add | | | | Arkansas | +-+ | | | California || | | Colorado | +-+ | | | Delaware
RE: Form with a Form
This sounds like a DispatchAction problem. If you use DispatchAction, (look the API for more info) then in your jsp: html:hidden property=method value=display/ html:button property=edit_button onclick=form.method.value='edit' Edit /html:button html:button property=update_button onclick=form.method.value='update' Update /html:button Hi, If at all I can use JavaScript in Struts...pls guide me how can I implement the same Tnx in Advace, -Ramadoss -Original Message- From: Ajay Kalidindi [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:40 PM To: Struts Users Mailing List Subject: RE: Form with a Form I have a suggestion. You can add a HIDDEN field, write a java script on click of multiple buttons Like ADD, DELETE, EDIT, RENAME buttons. What the java script will do is update HIDDEN variable and submit. I have not come across form within a form in HTML. Regards Ajay Kalidindi -Original Message- From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: Form with a Form Hi, Can we define a form within a form...if so can you guide me . Actually in my jsp I wanted to perform two different action with respect to button pressed.so If I define global form I can only submit the global action defined in that form but I wanted to submit different action with respect to different button clicked so in that case I'm going for two different formplz set me if I'm wrong.. possible pls provide me how can I achieve the same. Tnx in advance, Ramadoss - 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] -- Khalid K. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form with a Form
Ramadoss, The HTML spec prevents you from nesting forms. You can have multiple forms on a page but not one within another. You should be able to accomplish your goal with hidden fields and JavaScript as Ajay has prescribed. You can then handle it with a DispatchAction Regards, Richard --- Ramadoss Chinnakuzhandai [EMAIL PROTECTED] wrote: You are right Ajay...I agree with that...but I want to do it without using Javascript and hidden variable using Struts -Original Message- From: Ajay Kalidindi [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:40 PM To: Struts Users Mailing List Subject: RE: Form with a Form I have a suggestion. You can add a HIDDEN field, write a java script on click of multiple buttons Like ADD, DELETE, EDIT, RENAME buttons. What the java script will do is update HIDDEN variable and submit. I have not come across form within a form in HTML. Regards Ajay Kalidindi -Original Message- From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: Form with a Form Hi, Can we define a form within a form...if so can you guide me . Actually in my jsp I wanted to perform two different action with respect to button pressed.so If I define global form I can only submit the global action defined in that form but I wanted to submit different action with respect to different button clicked so in that case I'm going for two different formplz set me if I'm wrong.. possible pls provide me how can I achieve the same. Tnx in advance, Ramadoss - 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] __ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form with a Form
-Original Message- From: Khalid K. [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 3:08 PM To: Struts Users Mailing List Subject: RE: Form with a Form This sounds like a DispatchAction problem. If you use DispatchAction, (look the API for more info) then in your jsp: html:hidden property=method value=display/ html:button property=edit_button onclick=form.method.value='edit' Edit /html:button html:button property=update_button onclick=form.method.value='update' Update /html:button Hi, If at all I can use JavaScript in Struts...pls guide me how can I implement the same Tnx in Advace, -Ramadoss -Original Message- From: Ajay Kalidindi [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 1:40 PM To: Struts Users Mailing List Subject: RE: Form with a Form I have a suggestion. You can add a HIDDEN field, write a java script on click of multiple buttons Like ADD, DELETE, EDIT, RENAME buttons. What the java script will do is update HIDDEN variable and submit. I have not come across form within a form in HTML. Regards Ajay Kalidindi -Original Message- From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 10:17 AM To: [EMAIL PROTECTED] Subject: Form with a Form Hi, Can we define a form within a form...if so can you guide me . Actually in my jsp I wanted to perform two different action with respect to button pressed.so If I define global form I can only submit the global action defined in that form but I wanted to submit different action with respect to different button clicked so in that case I'm going for two different formplz set me if I'm wrong.. possible pls provide me how can I achieve the same. Tnx in advance, Ramadoss - 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] -- Khalid K. - 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: Tiles, Definition inheritence
Gotcha - actually no jsp has access but the template at any level - so even the jsps defined at the highest level in my case header.jsp do not have access. Tiles uses the Tiles Context - not the page (which would not work either), request, session, or application - so only the template has access to the attributes.. If I need to modify the layout or modify an attribute based on runtime factors I use the controllerURL to get a handle on the Tiles Context and modify it prior to the jsp getting the page - I also stuff a few common attributes into request scope at the same time so all the jsps can have access - to things like the definition being rendered. Cal www.calandva.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of [EMAIL PROTECTED] Sent: Monday, December 08, 2003 2:23 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Tiles, Definition inheritence I think the problem that Oliver was having (expressed through your example) was that the webpage defined by level3.pagedef.content (/web/pages/level3/Level3Content.jsp) could not access attributes defined in the same context (for example, level3.pagedef.index (/web/pages/level3/Level3Index.jsp). -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 12:11 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Tiles, Definition inheritence The issue that keeps coming up is the ability for jsps other than the page= (template) jsp to have access to the attributes. John provided a good technique using a second definition. As to the definitions and the template's ability to access attributes - you can add attributes to extended definitions and then extend them. I have an example app using that technique on my site: http://www.calandva.com/holmansite/do/blog/blogging?date=20030711#094831 In this app I access the Tiles Context in an action and in a tag to modify the attributes on the fly. In the advanced pdf Cedric provides an example of creating the number of columns in the body of a template on the fly. definition name=home.pagedef page=/template.jsp controllerUrl=/do/renderCrumb put name=title value=home.title / put name=header value=/web/includes/header.jsp / put name=index value=/web/pages/home/HomeIndex.jsp / put name=content value=/web/pages/home/HomeContent.jsp / put name=footer value=/web/includes/footer.jsp / put name=styleSheet value=web/styles/Grey_StyleSheet.css / put name=keywords value=home.keywords/ put name=crumbs value=/web/includes/crumb.jsp/ put name=crumbtitle1 value=Home/ put name=crumblink1 value=do/AutoForward?forward=home.pagedef/ put name=pagename value=home/ /definition definition name=level2.pagedef extends=home.pagedef put name=title value=level2.title / put name=index value=/web/pages/level2/Level2Index.jsp / put name=content value=/web/pages/level2/Level2Content.jsp / put name=keywords value=level2.keywords/ put name=crumbtitle2value=Level 2/ put name=crumblink2 value=do/AutoForward?forward=level2.pagedef/ put name=pagenamevalue=level2/ /definition definition name=level3.pagedef extends=level2.pagedef put name=title value=level3.title / put name=index value=/web/pages/level3/Level3Index.jsp / put name=content value=/web/pages/level3/Level3Content.jsp / put name=crumbtitle3 value=Level 3/ put name=crumblink3 value=do/AutoForward?forward=level3.pagedef/ put name=pagename value=level3/ /definition When the level3.pagedef is used the template.jsp has access to all three levels of crumbtitle values. Some attributes are overridden and others are added as the definitions are extended. Any attribute you add in the extended path is available to the extended template. Let me know if I am off base. Cal www.calandva.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hibbs, David Sent: Monday, December 08, 2003 10:12 AM To: 'Oliver Wulff'; [EMAIL PROTECTED] Subject: RE: Tiles, Definition inheritence This is (IMHO) a classic issue with tiles. The Tiles meaning of 'inheritance' isn't quite the same as in Java or other OO concepts. Tiles inherit values from their parents, and can override those values. However, adding new values is not supported. The only way [that I've found, anway] that you can support the addition of new properties is to use the tiles importAttribute tag (see http://jakarta.apache.org/struts/userGuide/struts-tiles.html#importAttri bute ) in the main layout JSP, i.e. /layout/classicLayout.jsp, to pass the values into a scope where they can be found by other tags such as bean:write and use the values that way. David Hibbs, ACS Staff Programmer /
RE: Tomcat 4.1.29 Struts
Mukund, Is this really your struts-config.xml? ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config /struts-config Where are your form-bean and action mapping definitions? The cause of your problem is that you don't have a message-resources entry. ie. message-resources parameter=org.apache.struts.webapp.validator.ApplicationResources/ I'd advise you to start from scratch with the ValidatorExample or the StrutsBlank examples Regards, Richard -Original Message- From: Mukund Ramadoss [mailto:[EMAIL PROTECTED] Sent: Monday, December 08, 2003 11:29 AM To: 'Struts Users Mailing List' Subject: RE: Tomcat 4.1.29 Struts Hi David, Thanks for your mail. Actually I don't still know what is causing the problem. Now based on your mail, I've tried with both the following DTDs: http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd;struts-conf ig_1_1.dtd http://jakarta.apache.org/struts/dtds/struts-config_1.0.dtd;struts-conf ig_1_0.dtd The result is same: org.apache.jasper.JasperException: Cannot find message resources under key org.apache.struts.action.MESSAGE Actually when I reload the webapp, I get the following error in my log: 2003-12-08 11:26:07 StandardWrapper[/strutsShop:default]: Loading container servlet default 2003-12-08 11:26:08 StandardWrapper[/strutsShop:action]: Marking servlet action as unavailable 2003-12-08 11:26:08 StandardContext[/strutsShop]: Servlet /strutsShop threw load() exception javax.servlet.UnavailableException: Parsing error processing resource path at org.apache.struts.action.ActionServlet.handleConfigException(ActionServl et.java:1035) at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServl et.java:1014) at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja va:955) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:935) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3422) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3623 ) at org.apache.catalina.startup.HostConfig.checkWebXmlLastModified(HostConfi g.java:614) at org.apache.catalina.startup.HostConfig.run(HostConfig.java:854) at java.lang.Thread.run(Thread.java:536) I'm attaching web.xml and struts_config.xml below: ---struts-config.xml - ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; struts-config /struts-config --web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app SYSTEM http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-value/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern/do/*/url-pattern /servlet-mapping servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping !-- The Welcome File List -- welcome-file-list welcome-fileindex.jsp/welcome-file welcome-fileindex.html/welcome-file /welcome-file-list !-- Struts Tag Library Descriptor -- taglib taglib-uri /WEB-INF/struts-bean.tld /taglib-uri taglib-location /WEB-INF/struts-bean.tld /taglib-location /taglib taglib taglib-uri /WEB-INF/struts-html.tld /taglib-uri taglib-location /WEB-INF/struts-html.tld /taglib-location /taglib taglib taglib-uri /WEB-INF/struts-logic.tld /taglib-uri taglib-location /WEB-INF/struts-logic.tld /taglib-location /taglib taglib taglib-uri /WEB-INF/struts-template.tld /taglib-uri taglib-location /WEB-INF/struts-template.tld /taglib-location /taglib /web-app Thanks for your help. Regards Mukund -Original Message- From: David Friedman [mailto:[EMAIL PROTECTED] Sent: Saturday, December 06, 2003 2:39 PM To: Struts Users
RE: iterate over a list of tiles
This is possible - on my site I have an option - the user can select a simple template or one with a portal look and feel. Down the right side of the page on the portal view are a series of tiles each of which stands on its own, in other words they are independent of the page being displayed. That is important since they could be on any page. In your case it sounds like you know where each of the tiles will be and maybe the action rendering the page can also provide any data for the portlets. The technique I use is a version (simpler) of the one Cedric describes in the advanced Tiles paper (http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf ). It has also remained unchanged for over a year so there may be a better way to do this. First the Tiles def sets up the template and the list. Then each of the portlets is defined - the controllerURL is an action that is fired prior to the tile being rendered so you can load up the What's New items into request scope. definition name=portal.body.pagedef path=/web/pages/portal/PortalBody.jsp put name=numCols value=1/ putList name=list0 add value=portal.whatsnew.pagedef/ add value=portal.newpictures.pagedef/ add value=portal.popularpictures.pagedef/ add value=portal.popularpages.pagedef/ /putList definition name=portal.whatsnew.pagedef controllerUrl=/do/portalWhatsNew path=/web/pages/portal/PortalWhatsNew.jsp/ definition name=portal.newpictures.pagedef controllerUrl=/do/portalNewPictures path=/web/pages/portal/PortalNewPictures.jsp/ definition name=portal.popularpictures.pagedef controllerUrl=/do/portalPopularPictures path=/web/pages/portal/PortalPopularPictures.jsp/ definition name=portal.popularpages.pagedef controllerUrl=/do/portalPopularPages path=/web/pages/portal/PortalPopularPages.jsp/ These examples include the capability to have a variable number of columns - since you only want one column you can eliminate the vboxLayout.jsp. The HTML is the PortalBody.jsp looks like this: table width=135 border=1 cellspacing=0 cellpadding=0 tr % int numCols = Integer.parseInt(numColsStr); ComponentContext context = ComponentContext.getContext( request ); for( int i=0; inumCols; i++ ) { java.util.List list=(java.util.List)context.getAttribute( list + i ); pageContext.setAttribute(list, list ); if(list==null) System.out.println( list is null for + i ); % td valign=top tiles:insert page=/web/pages/portal/vboxLayout.jsp flush=true tiles:put name=list beanName=list beanScope=page / /tiles:insert /td % } // end loop % /tr /table Then the vboxLayout.jsp looks like this: tiles:useAttribute id=list name=list classname=java.util.List / %-- Iterate over names. We don't use iterate tag because it doesn't allow insert (in JSP1.1) --% % Iterator i=list.iterator(); while( i.hasNext() ) { String name= (String)i.next(); % table width=135 border=1 cellspacing=0 cellpadding=0 trtd tiles:insert name=%=name% flush=true / /td/tr trtdhr//td/tr /table % } // end loop % PortalBody.jsp is the content for another template defining the header, footer, etc.. definition name=home.pagedef extends=layouts.pagedef put name=title value=home.title / put name=header value=/web/includes/header.jsp / put name=index value=/web/pages/home/HomeIndex.jsp / put name=content value=/web/pages/home/HomeContent.jsp / put name=footer value=/web/includes/footer.jsp / put name=styleSheet value=web/styles/Grey_StyleSheet.css / put name=rightIndex value=portal.body.pagedef/ /definition If your tiles on the right are different for each page then this is probably overkill - I like to make the portlets independent so they could appear on any page. Cal www.calandva.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Paul-J Woodward Sent: Monday, December 08, 2003 2:08 PM To: Struts Users Mailing List Subject: iterate over a list of tiles Dear all, I would like to have a tile which contains a sequence of other tiles, the definition of which comes from a putList. Put into context, the right hand bar of all pages is a sequence of 'snippets' which are different for each page. I'd like to create a putlist for each page and place it in the tiles.xml file and then have a single template tile to insert them. Any ideas? Thanks, Paul