Re: Displaying
bean:write name=person property=personinfo.lastName/ this assumes you have getter and setters in your beans see more in http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean /package-summary.html#package_description Nico. how to i display my bean using the tags included in struts if my bean is like this: code public class Person{ PersonInfoBase personinfo; ContactInfoBase contactinfo; } public class PersonInfoBase{ getLastName(); getBirthdate(); } public class ContactInfoBase{ getAddress(); getZip(); } /code How do i display like address or lastname is i put the class person in the session.attribute: code Person person = new Person(); request.setAttribute(person,person) /code Can someshow show me how wil the jsp looks like. thanks a lot in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
logic:empty and logicnotEmpty with a Collection (again)
Hi, I found some behaviour of the logic:notEmpty tag which I think is inconsistent. Reading the documentation, I think it should call a collection's isEmpty() method. It works as expected with a bean of type List, but it doesn't work with a Map. Testcase: If emptyList was built with List emptyList = new ArrayList(); the following fragment correctly states only emptyList empty: logic:empty name=emptyListemptyList empty/logic:emptybr logic:notEmpty name=emptyListemptyList not empty/logic:notEmptybr But if I change from emtpyList to Map emptyMap = new HashMap(); and test it with logic:empty name=emptyMapemptyMap empty/logic:emptybr logic:notEmpty name=emptyMapemptyMap not empty/logic:notEmptybr I get emptyMap not empty nonemptyMap not empty instead of just emptyMap empty. Both (mutually exclusive) statements seem to evaluate to true. So, is this a misunderstanding from my side or a bug in the implementation? TIA Steffen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Pointing to resources within the struts app client side.
The browser should not be able to load any resource from /WEB-INF/ the servlet engine will protect this directory. -Original Message- From: Simon Kelly [mailto:[EMAIL PROTECTED]] Sent: 18 February, 2003 16:18 To: Struts Users Mailing List Subject: Pointing to resources within the struts app client side. Hi all, I'm trying to place an image with my web page that is stored as a resource within my struts web-app. I'm using xslt to create the output html, but can't work out how to point at the image correctly. I had put src=/WEB-INF/classes/resources/graphics/icon.bmp, but this will not display iether the image or the alt description. Anyone have a clue how I can do this? Cheers Simon Institut fuer Prozessdatenverarbeitung und Elektronik, Forschungszentrum Karlsruhe GmbH, Postfach 3640, D-76021 Karlsruhe, Germany. Tel: (+49)/7247 82-4042 E-mail : [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relating to the official business of Standard Bank Group Limited is proprietary to the company. It is confidential, legally privileged and protected by law. Standard Bank does not own and endorse any other content. Views and opinions are those of the sender unless clearly stated as being that of Standard Bank. The person addressed in the e-mail is the sole authorised recipient. Please notify the sender immediately if it has unintentionally reached you and do not read, disclose or use the content in any way. Standard Bank can not assure that the integrity of this communication has been maintained nor that it is free of errors, virus, interception or interference. __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] RE: microsoft .doc struts
Thanks hue, This shall be the route we will take i think, i had a play around with rtf, and cutting and pasting the images sections into different documents, and eveything worked fine. As you suggest though i need some kind of way to do this on the fly? will have to look into this one. Regular expressions make sense thanks, would this not be asier to do with a velocity template in java? , i have never implemented one i am just guessing? geeting a good idea of what i am going to do thoughthanks for the help. Regards Andy On Tue, 2003-02-18 at 18:36, Hue Holleran wrote: Hi Andy, The (MS) reference was because this was using the regular expression syntax used by Microsoft's VBScript RegEx object and I'm not sure if this is the correct format for java regular expressions. I think jakarta-oro is a reg ex library that is included with struts - but sorry I have no experience with this - although someone on this group almost certainly will - so might be worth a separate post - but the example will serve as a good start point. It basically means: \[- string to match begins with [ ([ is escaped because it's a delimiter) \S- match any non-whitespace [ - (delimiter) ^\[ - stop if you encounter another [ (to trap error with unclosed [] blocks) ] - (delimiter) * - match any character \]- ends with ] (] is escaped because it's a delimiter) Images would be a different problem - if you look at an RTF file then it is quite straightforward to extract the image from the rtf - but each image would need to be converted in this way or find some way of doing this on-the-fly - but I'm not aware of any tool to do this! If you have a limited number of images, e.g. logos etc. then it would be possible to insert the converted one of these at the appropriate point. Images begin with something like: {\*\shppict{\pict{\ ... }} with loads of hex digits in-between. If you have loads of images stored as say gifs or jpgs then you will need to find some way of doing this on-the-fly to rtf format. Hope the above helps a bit more. H. -Original Message- From: Andy Richards [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 15:53 To: 'Struts Users Mailing List' Cc: [EMAIL PROTECTED] Subject: Re: [OT] RE: microsoft .doc struts Hi hue, sounds great, i understand that you replace dynamic data into the template where where ever you have a [oTb*.field]. but what is (MS) reg ex,,,? some kind of regular expression api? if so i will have to do some more research as i am yet to understand regular expressions, and how to use them. (there is a jakarta api i think though). Also does this method work with images?, if so i think this is the route i will have to take. Regards Andy On Tue, 2003-02-18 at 15:36, Hue Holleran wrote: Hi Andy, I've looked through the thread and can't see specifically what you're trying to do but we had exactly the same problem and was solved using RTF, thus: (this was for submission of documents to a UK government body that needed to be in MS Word .DOC format - they were able to open these documents with no problem in Word: edit, print, save etc.). We used RTF for the document - generated manually in MS Word and exported to a .RTF - and used placeholders to hold active data that was to be inserted into the template of format [oTbl.Field] (allowable in RTF - and replaced these using (MS) reg ex of format \[\S[^\[]*\]). This then gave us an RTF format document which was then saved with the extension .DOC - which MS Word opens with no problem at all. This was in fact sent to the browser by adding a header content-disposition of type attachment; filename=WORD.DOC and also specifying the ContentType of application/rtf. Saving this document saves the document in Word .DOC although it is really an RTF. Not sure it's what you're after but after battling trying to open MS Word on the server - which needs administrator privileges for the user running the web app (scary) or using vbscript/javascript in the browser (requires the site to be added to IE Trusted Sites) - not ideal. The solution outlined, using RTF is not dependent on the browser used and the above solution is being used to generate around 200-300 (probably more) MS Word .DOC files a week which are emailed directly to the UK government body. Let me know if this is an option for you - and if you need any more info but BTW the above was implemented in MS ASP so I can only send you some ASP/VBScript code if that will help. H. -Original Message- From: Andy Richards [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 14:12 To: [EMAIL PROTECTED] Subject: microsoft .doc struts Hi, I have read with interest from the struts archives where a user posted the following question to do with producing microsoft .doc files for
RE: how can I unprotect my registration page?
That was it! See I was protected *.do so when I tried to unprotect register.do I got the error. Oddly enough if I unprotect /register.do it works. Very strange. I guess you either need a slash or a star (/something.do or *.do). Thanks for the help, Michael It sounds like it is saying that 'something.exe' is not a valid url-pattern. Try '/something.exe' (or whatever the right url-pattern is for this resource) instead. -Max - Original Message - From: Mike Mattox [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, February 18, 2003 7:55 AM Subject: how can I unprotect my registration page? I'm using Struts Tiles, and so far the security constraint is working. But I can't figure out how to unprotect the registration action. So far I have: security-constraint web-resource-collection web-resource-nameAll DO/web-resource-name url-patternsomething.exe/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint security-constraint web-resource-collection web-resource-nameAll DO/web-resource-name url-pattern*.do/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint role-name*/role-name /auth-constraint /security-constraint Which gives me an exception: Caused by: java.lang.IllegalArgumentException: url-pattern something.exe invalide d'après les contraintes de sécurité (security constraint) at org.apache.catalina.core.StandardContext.addConstraint(StandardCon text.java: 1356) Which in english says invalid according to security constraints. Any ideas what I am doing wrong? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts with M$ Word Docs
Thanks david, however poi dosnt from what i can see, or has very little support for manipulating .doc documents. Also i wish to put this into a production enviroment which i am not sure that POI is ready to do. The excel support looks good though for anyone who needs to do so. regards Andy On Tue, 2003-02-18 at 17:22, David Holtzhouser wrote: I saw your post on the Struts list...would the following be benefical to you: http://www.onjava.com/pub/a/onjava/2003/01/22/poi.html http://jakarta.apache.org/poi/index.html Good luck, Dave Holtzhouser __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multiple resource files with multiple modules
Greetings, To Access bean:message key=errors.database.foreign.key bundle=GLOBAL/order-tools/ struts config message resource for module /order-tools message-resources parameter=application null=false / message-resources parameter=global null=false key=GLOBAL / My question is there a easier way to access the message resource , using this syntax The page designer would have to be aware of the where to look for the sub-application in the web.xml and also be aware to look for the appropriate resource bundle key to find out the key of the message One solution that I can think of is to check and see if there is request prefix value. That way the page designer would not have know about the sub-module Thank you, -S
Re: Displaying
Hi I have a doubt regarding test the bean variable with in the array i give u the example For example i have array with name matchValue and a string name surveyMatchType in a bean file and i want ot compare and the value in the surveyMatchType give as the default value in the http page. Plz help me . This is the code i has been trying --- logic:iterate id=element name=searchValue property=matchValue indexId=index p c:choose c:when test=${element eq searchValue.surveyMatchType} option value= %=searchValue.getMatchIndex(index.intValue())% selected c:out value=${element}//option /c:when c:otherwise option value= %=searchValue.getMatchIndex(index.intValue())% c:out value=${element}//option /c:otherwise /c:choose /p /logic:iterate or select property=surveyJoinFour size=1 logic:iterate id=element name=searchValue property=conditionsValue indexId=index p logic:equal name=searchValue property=surveyJoinFour value=${element} option value= %=searchValue.getConditionsIndex(index.intValue())% selected c:out value=${element}//option /logic:equal logic:notEqual name=searchValue property=surveyJoinFour value=${element} option value= %=searchValue.getConditionsIndex(index.intValue())% c:out value=${element}//option /logic:notEqual /p /logic:iterate /select Waiting for u best reply Thanks in advance Regards Shashi - Original Message - From: Nicolas De Loof [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 1:31 PM Subject: Re: Displaying bean:write name=person property=personinfo.lastName/ this assumes you have getter and setters in your beans see more in http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean /package-summary.html#package_description Nico. how to i display my bean using the tags included in struts if my bean is like this: code public class Person{ PersonInfoBase personinfo; ContactInfoBase contactinfo; } public class PersonInfoBase{ getLastName(); getBirthdate(); } public class ContactInfoBase{ getAddress(); getZip(); } /code How do i display like address or lastname is i put the class person in the session.attribute: code Person person = new Person(); request.setAttribute(person,person) /code Can someshow show me how wil the jsp looks like. thanks a lot in advance. - 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] RE: microsoft .doc struts
Hi Andy, Found this link that I had a little while back - not sure if in itself it's particularly useful but explains neatly how RTF formats images and has some potentially useful links, particularly irfanView that allows conversion to WMF - which seems to be the format used in RTF: http://www-106.ibm.com/developerworks/xml/library/x-tiprtfg.html Best of luck, H. -Original Message- From: Andy Richards [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 08:46 To: Hue Holleran Cc: 'Struts Users Mailing List' Subject: RE: [OT] RE: microsoft .doc struts Thanks hue, This shall be the route we will take i think, i had a play around with rtf, and cutting and pasting the images sections into different documents, and eveything worked fine. As you suggest though i need some kind of way to do this on the fly? will have to look into this one. Regular expressions make sense thanks, would this not be asier to do with a velocity template in java? , i have never implemented one i am just guessing? geeting a good idea of what i am going to do thoughthanks for the help. Regards Andy On Tue, 2003-02-18 at 18:36, Hue Holleran wrote: Hi Andy, The (MS) reference was because this was using the regular expression syntax used by Microsoft's VBScript RegEx object and I'm not sure if this is the correct format for java regular expressions. I think jakarta-oro is a reg ex library that is included with struts - but sorry I have no experience with this - although someone on this group almost certainly will - so might be worth a separate post - but the example will serve as a good start point. It basically means: \[- string to match begins with [ ([ is escaped because it's a delimiter) \S- match any non-whitespace [ - (delimiter) ^\[ - stop if you encounter another [ (to trap error with unclosed [] blocks) ] - (delimiter) * - match any character \]- ends with ] (] is escaped because it's a delimiter) Images would be a different problem - if you look at an RTF file then it is quite straightforward to extract the image from the rtf - but each image would need to be converted in this way or find some way of doing this on-the-fly - but I'm not aware of any tool to do this! If you have a limited number of images, e.g. logos etc. then it would be possible to insert the converted one of these at the appropriate point. Images begin with something like: {\*\shppict{\pict{\ ... }} with loads of hex digits in-between. If you have loads of images stored as say gifs or jpgs then you will need to find some way of doing this on-the-fly to rtf format. Hope the above helps a bit more. H. -Original Message- From: Andy Richards [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 15:53 To: 'Struts Users Mailing List' Cc: [EMAIL PROTECTED] Subject: Re: [OT] RE: microsoft .doc struts Hi hue, sounds great, i understand that you replace dynamic data into the template where where ever you have a [oTb*.field]. but what is (MS) reg ex,,,? some kind of regular expression api? if so i will have to do some more research as i am yet to understand regular expressions, and how to use them. (there is a jakarta api i think though). Also does this method work with images?, if so i think this is the route i will have to take. Regards Andy On Tue, 2003-02-18 at 15:36, Hue Holleran wrote: Hi Andy, I've looked through the thread and can't see specifically what you're trying to do but we had exactly the same problem and was solved using RTF, thus: (this was for submission of documents to a UK government body that needed to be in MS Word .DOC format - they were able to open these documents with no problem in Word: edit, print, save etc.). We used RTF for the document - generated manually in MS Word and exported to a .RTF - and used placeholders to hold active data that was to be inserted into the template of format [oTbl.Field] (allowable in RTF - and replaced these using (MS) reg ex of format \[\S[^\[]*\]). This then gave us an RTF format document which was then saved with the extension .DOC - which MS Word opens with no problem at all. This was in fact sent to the browser by adding a header content-disposition of type attachment; filename=WORD.DOC and also specifying the ContentType of application/rtf. Saving this document saves the document in Word .DOC although it is really an RTF. Not sure it's what you're after but after battling trying to open MS Word on the server - which needs administrator privileges for the user running the web app (scary) or using vbscript/javascript in the browser (requires the site to be added to IE Trusted Sites) - not ideal. The solution outlined, using RTF is not dependent on the browser used and the above solution is being used to generate around 200-300 (probably more) MS Word .DOC files a week which are emailed
RE: Custom tags with Struts
Hi Tom, Thanks for the tip. I used the tag as follows: bean:define id=pricevar name=fbname property=price/ formatChecker:check value='%=pricevar%'/ Rajesh -Original Message- From: Tom Ziemer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 9:58 PM To: Struts Users Mailing List Subject: Re: Custom tags with Struts Hi, I've had a similar problem - and there really doen not seem to be any good solution. You might try it with a scriptlet - something like % String price = your object here.getPrice(); % then you can call your custom tag with: formatChecker:check value='%=price%'/ That's certainly not nice but it'll work. Hope that helps, Tom Rajesh P wrote: Hello Everyone, I had created a Custom tag for formatting number to decimal places based on some business rules. The tag looks like this: formatChecker:check value= / In the value attribute I need to send data from my form bean. I tried as follows: formatChecker:check value='bean:write name=fbname value=price/'/ I tried with single quotes and double quotes, but the custom tag does not evaluate the struts bean tag but takes the value as bean:write name=fbname value=price/ Please, can anyone tell me how i can proceed with this. Thanks in advance, Rajesh - 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]
Struts extras for xslt - html
Hi all, I'm having a bit of a problem accessing anything in directories on the same level as WEB-INF/. I am using xslt instead of the jsp to give the html to the client side, with my own XSLServlet to amalgamate the xslt with the xml. I have been looking through the jsp tutorials, and I have a copy of Programming Jakarta Struts (Which is taking a bit of a hammering this week) to work out how to access the images in the graphics/ directory on the same tier as WEB-INF. I have tried (and failed) with all of the following src=../graphics/icon.bmp src=..\graphics\icon.bmp scr=graphics/icon.bmp src=/graphics/icon.bmp the last two give the following severe error 19-Feb-2003 10:20:33 org.apache.struts.action.RequestProcessor process INFO: Processing a 'GET' for path '/graphics/FZKIcon.gif' 19-Feb-2003 10:20:33 org.apache.struts.action.RequestProcessor processMapping SEVERE: Invalid path /graphics/FZKIcon.gif was requested (Notice in the SEVERE line that the leading / is there for both cases) in jsp (from Programming JS) the lines used are either src=graphics/icon.bmp or html:img srcKey=graphics.icon .. / with graphics.icon set as graphics/icon.bmp My main question is, are there any tag libraries of xslt within struts to handle html/xhtml outputting? Secondly, why would the leading / in the image path be placed there and cause the problems? Kind regards, Simon Institut fuer Prozessdatenverarbeitung und Elektronik, Forschungszentrum Karlsruhe GmbH, Postfach 3640, D-76021 Karlsruhe, Germany. Tel: (+49)/7247 82-4042 E-mail : [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Scroll
hello anybody? Can anyone show me how to implement a Scroll in my page. Assuming i have 20 or more result returned from my bean i want to display the first 5 only and let the user scroll either forward or backward. Can someone show me or give me a working sample. thanks a lot everyone! -richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Mutliform validation using a DynaValidatorForm
Hi, Has anyone attempted to use the 'page' property of a field, with a DynaValidatorForm? It seems to me that there is a bug around doing this? Thanks Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying
I have this error: 'No getter method for property personalInfo.name of bean person' help anyone? i have my PersonalInfo class and it has a get and set method for name. public void setName(String name){ this.name = name; } public String getName(){ return name; } - Original Message - From: Nicolas De Loof [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 4:01 PM Subject: Re: Displaying bean:write name=person property=personinfo.lastName/ this assumes you have getter and setters in your beans see more in http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean /package-summary.html#package_description Nico. how to i display my bean using the tags included in struts if my bean is like this: code public class Person{ PersonInfoBase personinfo; ContactInfoBase contactinfo; } public class PersonInfoBase{ getLastName(); getBirthdate(); } public class ContactInfoBase{ getAddress(); getZip(); } /code How do i display like address or lastname is i put the class person in the session.attribute: code Person person = new Person(); request.setAttribute(person,person) /code Can someshow show me how wil the jsp looks like. thanks a lot in advance. - 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: One ActionForm for multiple JSPs
BlankI don't know of an example but its pretty easy to do. Just define one ActionForm bean and create all the properties in the wizard in it. Make it sessions scoped. And assign/retrieve the properties as you would do with a normal form-bean. In struts-config.xml refer to the same actionForm bean in all the actions that are part of the wizard. Regards, Affan - Original Message - From: Chetan Sahasrabudhe To: Struts Users Mailing List Sent: Wednesday, February 19, 2003 12:09 PM Subject: One ActionForm for multiple JSPs Hi, when going through struts documentation, I came across a statement saying extract from struts documentation chapter 2 Building Model Components. Section 2.3 ActionForm Bean. You should note that a form, in the sense discussed here, does not necessarily correspond to a single JSP page in the user interface. It is common to many applications to have a form (From the user's presepective) that extends over multiple pages. Think, for example, of the wizard style user interface that is commonly used when installing new applications. Struts encorages you to define a single ActionForm bean that contains properties for all the fields, no matter which page the field is actuallly displayed on. My current requirments are exactly as mentioned in above para. I have to develop a wizard kind of GUI for setting up some data in our application. Can anybody point me to the example for the same, or point me to the document where I can use single ActionForm bean for mulitple JSPs. Regards Chetan ___ | | The trouble with being punctual | is that nobody's there to appreciate it. | | |___ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Displaying
here's part of the code: . Person person = new Person(); PersonalInfo personalInfo = new PersonalInfo(); if ( taskId != null ) { System.err.println(--- Writing personc class : + taskId); personalInfo.setName(Richard); person.personalInfo = personalInfo; request.setAttribute(person, person); } ... -richard I have this error: 'No getter method for property personalInfo.name of bean person' help anyone? - Original Message - From: Nicolas De Loof [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 4:01 PM Subject: Re: Displaying bean:write name=person property=personinfo.lastName/ this assumes you have getter and setters in your beans see more in http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean /package-summary.html#package_description Nico. how to i display my bean using the tags included in struts if my bean is like this: code public class Person{ PersonInfoBase personinfo; ContactInfoBase contactinfo; } public class PersonInfoBase{ getLastName(); getBirthdate(); } public class ContactInfoBase{ getAddress(); getZip(); } /code How do i display like address or lastname is i put the class person in the session.attribute: code Person person = new Person(); request.setAttribute(person,person) /code Can someshow show me how wil the jsp looks like. thanks a lot in advance. - 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: Displaying
Does your Person class have a getter for personalInfo property ? PersonalInfo getPersonalInfo() { return this.personalInfo; } Nico. I have this error: 'No getter method for property personalInfo.name of bean person' help anyone? i have my PersonalInfo class and it has a get and set method for name. public void setName(String name){ this.name = name; } public String getName(){ return name; } - Original Message - From: Nicolas De Loof [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 4:01 PM Subject: Re: Displaying bean:write name=person property=personinfo.lastName/ this assumes you have getter and setters in your beans see more in http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean /package-summary.html#package_description Nico. how to i display my bean using the tags included in struts if my bean is like this: code public class Person{ PersonInfoBase personinfo; ContactInfoBase contactinfo; } public class PersonInfoBase{ getLastName(); getBirthdate(); } public class ContactInfoBase{ getAddress(); getZip(); } /code How do i display like address or lastname is i put the class person in the session.attribute: code Person person = new Person(); request.setAttribute(person,person) /code Can someshow show me how wil the jsp looks like. thanks a lot in advance. - 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: Use of Bean Default Value in Struts
Use the value attribute of the html:select and assign it the required value. But value attribute does not take the property of the form bean. It takes the value explicitly specified. e.g hml:select value=A If you specify hml:select value=val then it will search for the string val in the options list. Affan - Original Message - From: shashi [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 12:08 PM Subject: Use of Bean Default Value in Struts Hi In my form in the select i want a default bean value will be selected. Ex: public class A extends ActionForm{ private String val=A; public void setVal(String val){ this.val=val; } public String getVal(){ return val; } In Jsp I want this A value comes as a default value in select. help me Regards Shashi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying a collection as comma separated values
I want to display in my HTML page a collection of Strings, and I want to display a comma between each word and a final dot. I use nested:iterate: nested:iterate property=bar nested:write property=label, /nested:iterate It works fine except for the final dot. My question is: in a nested:iterate, how can I know that I am at the end of the iteration? ---cut here--- This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Scroll
Look at the Pager tag at Struts Layout: http://struts.applications-servers.com or the same in Ed Hill's Dispaly tag library (http://edhill.its.uiowa.edu/display-0.8/). Both places have running examples I think. Affan - Original Message - From: Richard Raquepo [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 2:49 PM Subject: Scroll hello anybody? Can anyone show me how to implement a Scroll in my page. Assuming i have 20 or more result returned from my bean i want to display the first 5 only and let the user scroll either forward or backward. Can someone show me or give me a working sample. thanks a lot everyone! -richard - 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: Displaying
ok. thanks. i seem to forgot that... sorry... thanks a lot again... - Original Message - From: Nicolas De Loof [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 6:29 PM Subject: Re: Displaying Does your Person class have a getter for personalInfo property ? PersonalInfo getPersonalInfo() { return this.personalInfo; } Nico. I have this error: 'No getter method for property personalInfo.name of bean person' help anyone? i have my PersonalInfo class and it has a get and set method for name. public void setName(String name){ this.name = name; } public String getName(){ return name; } - Original Message - From: Nicolas De Loof [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 4:01 PM Subject: Re: Displaying bean:write name=person property=personinfo.lastName/ this assumes you have getter and setters in your beans see more in http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/bean /package-summary.html#package_description Nico. how to i display my bean using the tags included in struts if my bean is like this: code public class Person{ PersonInfoBase personinfo; ContactInfoBase contactinfo; } public class PersonInfoBase{ getLastName(); getBirthdate(); } public class ContactInfoBase{ getAddress(); getZip(); } /code How do i display like address or lastname is i put the class person in the session.attribute: code Person person = new Person(); request.setAttribute(person,person) /code Can someshow show me how wil the jsp looks like. thanks a lot in advance. - 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: business logic question
Ted, Thanks for the explanation, worked like a champ...I am on my way to exorcising the business logic demons out of my DispatchAction classes! Dan McGowan Excellent question! The Scaffold solution is to use a ProcessResult object that encapsulates the typical things that the Model might want to send back to the Controller/View. So far, it can transfer data, a numeric code, messages, a dispatch instruction, along with a name and a scope. If the ProcessAction sees that the ProcessResult contains messages, it converts those to ActionMessages. If it sees it contains data, it expose that data under the given name and scope. And so forth. ProcessAction uses a very simple message format. It's just a list where the first entry is the template key and everything else is replacement parameters. Easy to build, but you can only send back one message. Now that we have a Message object in the Commons, I'm migrating a new version of ProcessResult/ProcessAction to use the Commons Messaging. But, the basic design pattern remains the same. HTH, Ted. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles - multiple tiles submit
Hi, For this kind of design you can have one tile declaring the form and inserting two sub- tiles populating it. There is an example in tiles-documentation.war, under tutorial/invoice. Hope this help, Cedric Jack Zakarian wrote: Hi, I have a tiles layout that has a header and detail tile - i.e. an invoice screen with header and detail records. I split the screen up Into two sections so that it would stay below the 64K limit. When I submit the form only the header portion populates the actionFrom. but not the details. On the actionForm I have all String properties. The header properties as just String and the detail properties are String[]. Does each tile need its own html:form tag with the save action? How can I submit the form and have it populate both the header and detail actionForm fields from the two tiles. Thanks, Jack - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Using javascript with html:link
Hi I want to generate a popupwindow when a user clicks on a html:link I tried the onclick property. The problem is to get mapping to the action in the javascript or the other way around Link html:link page=/setReceiverAction.do onclick= paramName=adds paramId=id paramProperty=accountpartnerid nbsp;/html:link Script winpops=window.open(url,,width=300,height=200,) Anyone got any tips.. Regards _ Skaffa fler messengerkontakter - Vinn 10.000 i resecheckar! http://messenger.msn.se/promo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Tiles and ControllerUrl
Hi, I don't see what is wrong in your code. Maybe you can try to use execute(...) instead of perform(...) which is deprecated. You can also check if your method is properly called, and so if attribute are really set (add a println in your method). If you still have problems, you can send me directly a a jar or zip file with a simple example reproducing the problem. Cedric Zaraza / Corridor of Cells wrote: Hi, I an trying to build a site using Tiles Struts (first time newbie) and it seems I am unable to get the Tiles controller to override at run-time the attribute values (e.g. page title) I'm using Struts 1.0.2 and tilesForStruts1.0.jar. My tile-defs.xml looks like: tiles-definitions definition name=corridorTemplate path=/templates/template.jsp put name=page.title value=Extreme/dark music webzine/ put name=content.title value=Corridor of Cells/ put name=content.body value=/ put name=leftbar value=/templates/leftbar.jsp/ put name=rightbar value=/templates/rightbar.jsp/ put name=footer value=/templates/footer.jsp/ /definition !-- main page -- definition name=whatsnewTemplate extends=corridorTemplate controllerUrl=/whatsnewController.do put name=page.title value=TEST/ put name=content.title value=TEST/ put name=content.body value=TEST/ /definition /tiles-definitions The /whatsnewController.do controller action is defined in struts-config.xml as: action path=/whatsnewController type=com.corridorofcells.action.WhatsNewController/action and the actual com.corridorofcells.action.WhatsNewController class's perform() looks like: public final class WhatsNewController extends TilesAction { public ActionForward perform( ComponentContext context, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { context.putAttribute(page.title, Extreme/dark music webzine); context.putAttribute(content.title,What's New); context.putAttribute(content.body, Hey, what's new); return null; } } However, at run-time, the values of page.title and content.title are never overriden (in the template.jsp I fetch them using tiles:getAsString name=page.title etc). They're always left to the base value I defined in whatsNewTemplate, i.e. the value TEST. They never seem to get updated at run-time with the overriden values I put in the WhatsNewController class. I've wasted 2 days on this and about to give up and just do down-and-dirty JSP instead of clean and smooth Tiles...the docs say this should work, but in my case such a basic example just doesn't work. Help! What am I doing wrong here? Thanks in advance for help, Jacek - 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: Using javascript with html:link
2003. február 19. 12:47 dátummal Carl-Jakob Rundberg ezt írtad: Hi I want to generate a popupwindow when a user clicks on a html:link I tried the onclick property. The problem is to get mapping to the action in the javascript or the other way around If you just want to open a new window, try the target attribute. Or if you want to call a jsp function, you don't have to use the html:link tag. Just write a normal html anchor. Hth, Tib - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tile definition with a role attribute.
Hi, When you declare a new definition with a name that already exist, the old definition is replaced by the new one. So, you always got the latest definition. To do what you want, you should use different names, and insert each definition (all declared with different roles) in the page. Cedric [EMAIL PROTECTED] wrote: I am trying to have a different tile definition for different roles. I have the three following lines in my tiles-defs.xml file: ... definition name=AideAccueilDef path=/aide/accueil.html/ definition name=AideAccueilDef role=BX_REQUERANT path=/aide/accueil_req.html/ definition name=AideAccueilDef role=BX_AGENCE path=/aide/accueil_age.html/ ... Whatever role I have, I always end-up with the last one. Does anyone know what I am doing wrong? Or do you have other way to forward to different page based on the role? Thank you. Stephan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
passing html:select selected value to html:link
Hi, I have a following listbox in one of my jsps: html:select property=system size=5 html:options collection=systems property=name labelProperty=name/ /html:select Following this I have two html:links one to edit a system and another one to delete. I would like to pass the selected value from the list as part of the link, for example: a href=editSystem.act?system=.. Does anybody know how to do this, how do I actually access the selected value of the list? Cheers. Anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tiles, Modules, and Multiple Definition Files
Hi, All your explanations are absolutly right. Can I use them for a future faq ;-) ? The extends mechanism across modules will be improve in the next release. It has not been done in the current release due to the lack of time. Cedric Derek Richardson wrote: Since I heard nothing from the list, I did my own testing and am donating my findings to the archive: 4) Tiles works with modules. It has two modes: non-module-aware and module-aware: a) non-module-aware: all modules use the same tiles definition files, which are the ones specified in the struts-config for the default module, if there is a default module, or else following some other rule (I think it is first module listed in web.xml, but don't quote me without research to confirm). The tiles plugin must be present in each of the modules' struts-config. b) module-aware: each module has one or more tiles definition files which it uses. A module cannot see definitions in a tiles definition files used by other modules unless it uses that file itself. A module can see all the definition files configured for it and a definition in file B can extend a definition in file A if both are configured for the module in question. The one or more definition files used by a module are listed in the module's struts-config.xml file in the tile plugin section as comma-separated values for the property definitions-config. Struts 1.1 has no concept of supermodule/submodule relationships, so there is no way to inherit from other modules, not even from the default module. All definitions for a given module share a namespace. If both definition files A and B are referenced for the same module and both contain a definition for foo, the last file listed in struts-config wins. Derek Richardson -Original Message- From: Derek Richardson Sent: Friday, February 14, 2003 7:52 PM To: Struts Users Mailing List Subject: Tiles, Modules, and Multiple Definition Files I am using 1.1b3. I have a default module and several explicit modules (say A and B). The default module and the explicit modules all use tiles. I would like to access the default module's definitions in the explicit modules. So this is what I want: Module Accessable Definitions Default Default ADefault, A BDefault, B Furthermore, I would like the definitions for A and B to be able to extend the definitions for Default. From reading the archives, I understand that struts modules have no heirarchical structure. So there's no way to say that default is the supermodule and A and B are submodules and have the inheritance imply visibility. Thus the cleanest way of implementing what I want is not possible. The next cleanest is to declare multiple tiles definition files in the TilesPlugin in the struts-config of each module. As I understand it, this will make the definitions from all and only the declared files available within the module they are declared (assuming moduleAware=true). Which achieves my accessibility goals. My real question is: how are the namespaces handled with multiple tiles definition files? Are they all read and dumped into the same space, as if they had been in one file? Or is there some sort of partitioning? Can definitions from one tiles definition file extends definitions from another, assuming they are both loaded in the Plugin? What if there is a naming conflict - how is that resolved? The worst solution would be to have to cut-n-paste the default definitions into the subapp definition files. From what I've read, I don't think this is necessary. I have done some reading on this issue, but there does not seem to be a comprehensive treament of the issue in any one place. Not only would I appreciate knowing more about the details of this topic, but I think it would be a useful addition to the archives. Thanks, Derek Richardson - 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: tiles insert question...
Hi, In the early jsp specs, it is explicitly said that it is not possible to perform a flush inside a tag implementing BodyTag. Tiles perfrom a flush, and iterate is implemented as BodyTag. So this wasn't work. This should work in latest jsp spec, but I think that iterate should implement another tag type. To be checked. Personally I always use a java loop in a scriptlet to be backward compatible. I hope to stop this bad habit asap. Cedric ajTreece wrote: I'm trying to set up some tiles portals that are defined via a HashMap from a DB query. I thought I had it figured out, but it's not cooperating. The iteration works... I've tested it without the tiles code. When I insert the tiles code in the jsp below I get the following output: Can't insert page '/shared/layout/greyBorderBox.jsp' : Illegal to flush within a custom tag Am I doing something wrong -or- am I trying to do something that is not possible with tiles? Thanks, ajTreece %@ taglib uri=/WEB-INF/tlds/struts-tiles.tld prefix=tiles % %@ taglib uri=/WEB-INF/tlds/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/tlds/struts-logic.tld prefix=logic % H1I'm here!!!/H1 logic:iterate id=map name=portalMap scope=request bean:define id=key name=map type=java.util.HashMap property=value/ tiles:insert definition=grey.box.layout tiles:put name=headerclass direct=true value=sw-boxtitle/ tiles:put name=bodyclass direct=true value=sw-boxcell/ tiles:put name=title direct=true bean:write name=key property=header / /tiles:put tiles:put name=body1align direct=true bean:write name=key property=body1align / /tiles:put tiles:put name=body1 bean:write name=key property=body1 / /tiles:put /tiles:insert /logic:iterate H1I'm there!!!/H1 - 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]
question about logging
Hi, how can I configure struts in oder to print log messages into file but not on console ? Vlad. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts extras for xslt - html
At 09:25 19/02/03, Simon Kelly [EMAIL PROTECTED] wrote: I'm having a bit of a problem accessing anything in directories on the same level as WEB-INF/. I believe this is banned by the servlet engine (Tomcat?) - otherwise you might have website users downloading your jar files, and config files, and whatnot. Does it really have to be there? If it does then create a new servlet which reads and passes these on as files - but only after providing proper security checks. Goodluck Alex Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP http://www.OWAL.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How stable is struts 1.1 beta 3
Hi , We already developed a J2EE product . Now we think of implementing the struts framework for better navigation , exception framework . Any sugesstions on - how stable is this release of struts 1.1 beta 3 . Are there any major known issues in this ? Regards, Jagan. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fw: TilesAction and Controller
If you use a class directly, you should better implement the controller interface. Cedric BaTien Duong wrote: Question: Just check to make sure that the controllerClass (NOT controllerURL) used in tiles:insert tag can extends TilesAction (and NOT implements Controller)? - Original Message - From: BaTien Duong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, February 16, 2003 3:53 PM Subject: Re: TilesAction and Controller Using TilesAction as a controller, I can pass the generated error to the input page via standard Struts process: if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput(); } Question: How can I achieve the same thing with Tiles Controller? (assuming that I can have currentURL and RequestURL as Tiles attributes in the request scope). Cedric and/or someone may save me time to navigate from ServletContext passed into the Controller perform(...) method. Thanks - 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: TilesAction and Controller
BaTien Duong wrote: I found the following in tilesAdvancedFeatures: If you use a class name as controller, it should extend one of the following base classes or interfaces: org.apache.struts.action.Action (wrapper org.apache.struts.action.StrutsActionControllerWrapper is used) If you provide a Struts Action subclass, it will be wrapped with the appropriate class, and Struts' perform method will be called, but the mapping and form attributes will be null. Does this means that to pass the error via mapping I must use controlerUrl in tiles:insert tag ? Where is org.apache.struts.action.StrutsActionControllerWrapper? I cannot find it in src of struts 1.1-b3. It appears that StrutsActionControllerWrapper is now called ActionController. If you use a Struts action as Tiles controller CLASS, the struts parameters aren't initialized, so you can't use it. I think you can't pass error via mapping in this way. But, if you use a struts action URL as controller, the action is called throw the struts mechanism, and properly initialized. You can extends the o.a.s.tiles.actions.TilesAction class and overload execute( ComponentContext ...) to get the context. Cedric Thanks - Original Message - From: BaTien Duong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 17, 2003 10:22 AM Subject: Fw: TilesAction and Controller Question: Just check to make sure that the controllerClass (NOT controllerUrl) used in tiles:insert tag can extends TilesAction (and NOT implements Controller)? Using TilesAction as a controller, I can pass the generated error to the input page via standard Struts process: if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput(); } Question: How can I achieve the same thing with Tiles Controller? (assuming that I can have currentURL and RequestURL as Tiles attributes in the request scope). Cedric and/or someone may save me time to navigate from ServletContext passed into the Controller perform(...) method. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts extras for xslt - html
Alex, I have the structure set up as; katrin/ (Main project dir in webapps) then katrin/graphics katrin/WEB-INF Did you mean that I need the graphics in the WEB-INF dir or where it currently is? Cheers and thanks for the answer, Simon - Original Message - From: Alex McLintock [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 2:27 PM Subject: Re: Struts extras for xslt - html At 09:25 19/02/03, Simon Kelly [EMAIL PROTECTED] wrote: I'm having a bit of a problem accessing anything in directories on the same level as WEB-INF/. I believe this is banned by the servlet engine (Tomcat?) - otherwise you might have website users downloading your jar files, and config files, and whatnot. Does it really have to be there? If it does then create a new servlet which reads and passes these on as files - but only after providing proper security checks. Goodluck Alex Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, JSP http://www.OWAL.co.uk/ - 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] Dynamic values for put tag?
Duane Morin wrote: Hi all, I'm new to the list, so apologies if I say something silly. Last night I found myself needing to take a bunch of query parameters from an incoming request and map them to tiles:put parameters, like this: % Enumeration e = request.getParameterNames(); for (;e.hasMoreElements;) { String name = (String)e.nextElement(); % tiles:put name=%= name % value=%= request.getParameter(name) %/ % } % (Let's assume for the moment that this is not a glaring security hole -- it is for an intranet app and the number of hostile incoming requests should be neglible.) This doesn't work with tiles as-is because the TLD has rtexpr=false for the name attribute of the put tag. Is there a particular reason for this? When I changed it to true, this worked fine. But now I'm wondering if I may have opened up another bug someplace else. The reason is that the eventuallity to feed the attributes in a jsp loop like you propose haven't been considered ;-). Thanks! I can go into more detail about why I needed to do this, but this is my first post to the group and I decided that an autobiography wasn't necessary right at this moment. ;) Btw, this is with struts 1.1b3. Duane - 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: Problems with Tiles and ControllerUrl
Cedric Dumoulin wrote: Hi, I don't see what is wrong in your code. Maybe you can try to use execute(...) instead of perform(...) which is deprecated. You can also check if your method is properly called, and so if attribute are really set (add a println in your method). If you still have problems, you can send me directly a a jar or zip file with a simple example reproducing the problem. Hm that would make sense. I tried adding a println(), but it didn't output anything to the screenI thought maybe that was normail in the sense Tiles maybe overrides any previous output before the template is actually created. I kow perform() is deprecated (Eclipse shows that loud and clear), but I am using Struts 1.0.2...isn't perform() the proper function to call in that particular version? Also, I tried calling the same class using ControllerClass instead of ControllerUrl and Tomcat would always crap out with an exception like unable to create controller class. I will try the execute() option and let you know, thanks. Jacek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: about tiles context
Hello David. You are absolutely correct, I have as the application base Artimus from the Struts in Action book by Ted Husted which was made with Struts 1.1b2. I grabbed the application struts-blank from struts 1.1b3 and substituted the directory WEB-INF/lib, and now it works! But I had another question -- I have an Action associated with a Tile. The Action executes correctly and extends the TilesAction but the parameters don't appear in the context of the Tile ... Any suggestions? The code for the execute method is as follows: public ActionForward execute( ComponentContext context, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DateFormat df = DateFormat.getDateInstance (DateFormat.SHORT, getLocale(request)); context.putAttribute(date, df.format(new Date())); //request.setAttribute(date, df.format(new Date())); context.putAttribute(try, tryContext); if (log.isInfoEnabled()) { log.info(ferran date: + df.format(new Date())); log.info(ferran prova: + (String)context.getAttribute(prova)); } return null; } Thanks again for your help, Ferran David Graham [EMAIL PROTECTED] escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What version are you using? Tiles used to store it under CompContext but now stores it under org.apache.struts.taglib.CompContext. You're most likely using an earlier version and looking at the recent source. David From: Ferran Parra [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: about tiles context Date: Tue, 18 Feb 2003 18:17:00 +0100 I have a question -- why is the context, which is different for every Tile, in the Request under the key CompContext instead of the key org.apache.struts.taglib.CompContext, as it is in the source files, according to the constants file ComponentConstants.java? Thanks in advance for any help, Ferran Parra Departament de Noves Tecnologies MUBIMEDIA S.L. -- [EMAIL PROTECTED] Mallorca, 275, 1r 2a 08008 BARCELONA T. (+34) 93 215 21 91 F. (+34) 93 215 41 21 _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with Tiles and ControllerUrl
Zaraza wrote: Cedric Dumoulin wrote: Hi, I don't see what is wrong in your code. Maybe you can try to use execute(...) instead of perform(...) which is deprecated. You can also check if your method is properly called, and so if attribute are really set (add a println in your method). If you still have problems, you can send me directly a a jar or zip file with a simple example reproducing the problem. Hm that would make sense. I tried adding a println(), but it didn't output anything to the screenI thought maybe that was normail in the sense Tiles maybe overrides any previous output before the template is actually created. This is not normal. It means that your action is not called, or simply your method is not called. Check carrefully the signature of your method and compare it to the requested one. I kow perform() is deprecated (Eclipse shows that loud and clear), but I am using Struts 1.0.2...isn't perform() the proper function to call in that particular version? Yes, you are right. Also, I tried calling the same class using ControllerClass instead of ControllerUrl and Tomcat would always crap out with an exception like unable to create controller class. I will try the execute() option and let you know, thanks. Jacek - 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]
I need access to the configuration as Struts sees it.
I have a problem which arose when I merged several webapplications into a single ROOT.war, namely that I get the dreaded javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection when I deploy the EAR file containing the above WAR to JBoss 3.0.6. My problem is that this code works fine when developing with Resin directly in the source code, so I cannot replicate this outside JBoss. Both struts-config.xml and web.xml validate. I have now spent some time with the Eclipse debugger to see if I could get answers to the following questions: * Is the file read at all? * Where can I push a button to make Struts dumps its configuration? * Is the /find-recipients-for-donor correctly configured with the 1.1b3 struts (it was created for 1.0.2). referenced by the following snippet in search/enter-donor-data.jsp (which before the merge was in a seperate WAR, named /enter-donor-data.jsp): titleOrgan search/title html:form action=/find-recipients-for-donor table bborder=0trtd valign=top ... I would appreciate pointers - my next step would be to get a build-environment for Struts established, and modify code. I would rather not go there :) Thanks in advance. web.xml (just the start): === !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class 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 load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- The Usual Welcome File List -- welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list !-- Struts Tag Library Descriptors -- taglib taglib-uri/tags/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/tags/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib !-- taglib taglib-uri/tags/struts-logic/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib -- taglib taglib-uri/tags/struts-nested/taglib-uri taglib-location/WEB-INF/struts-nested.tld/taglib-location /taglib taglib taglib-uri/tags/struts-tiles/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib !-- JDBC DataSources (java:comp/env/jdbc) -- !-- taglib taglib-uri/display/taglib-uri taglib-location/WEB-INF/lib/display.jar/taglib-location /taglib -- taglib taglib-urihttp://jakarta.apache.org/taglibs/display/taglib-uri taglib-location/WEB-INF/lib/display.jar/taglib-location /taglib taglib taglib-urihttp://jakarta.apache.org/taglibs/datetime-1.0/taglib-uri taglib-location/WEB-INF/datetime.tld/taglib-location /taglib resource-ref descriptionThe default DS/description res-ref-namejdbc/DefaultDS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref struts-config.xml: (complete) = ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd; !-- This is a blank Struts configuration file with an example welcome action/page and other commented sample elements. Tiles and the Struts Validator are configured using the factory defaults and are ready-to-use. NOTE: If you have a generator tool to create the corresponding Java classes for you, you could include the details in the form-bean declarations. Otherwise, you would only define the form-bean element itself, with the corresponding name and type attributes, as shown here. -- struts-config !-- Data Source Configuration -- !-- data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=Example Data Source Configuration/ set-property property=driverClass value=org.postgresql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=mypassword/ set-property property=url value=jdbc:postgresql://localhost/mydatabase/ set-property property=user
RE: question about logging
Struts itself uses commons logging. So you can simply include the necessary jars from commons logging and say, log4j/jdk1.4 in conjunction with the respective properties files in your classpath to control how the messages are output. You can learn a lot more about it at http://jakarta.apache.org/log4j/docs/index.html. Of course, you can use the same technique to control and configure log messages generated by your application. Sri -Original Message- From: Vladislav Kamensky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 8:00 AM To: [EMAIL PROTECTED] Subject: question about logging Hi, how can I configure struts in oder to print log messages into file but not on console ? Vlad. - 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 stable is struts 1.1 beta 3
We would like to know the answer to this question as well. We are just in the design phase of a new project and are trying to decide between 1.0.2 and 1.1-b3. I would prefer to go with 1.1-b3 since it appears from the project plan on the Struts web site that it is intended to be the release candidate. I am also hoping that there will be a 1.1 release prior to our going into production in early summer. Is that a realistic expectation? Is anybody using 1.1 in production? Our management team gets shaky knees when you mention things like building a product on beta software and would most likely just say no. Cheers, Chris -Original Message- From: Jagannayakam [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 7:23 AM To: Struts-User Mailing List Subject: How stable is struts 1.1 beta 3 Hi , We already developed a J2EE product . Now we think of implementing the struts framework for better navigation , exception framework . Any sugesstions on - how stable is this release of struts 1.1 beta 3 . Are there any major known issues in this ? Regards, Jagan. - 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]
Use of Struts DataSource
Hi Please give me guidlines regarding use of struts datasource. Regards Shashi
RE: How stable is struts 1.1 beta 3
i have been working with 1.1.3 since its release and haven't had any critical issues with it. personally, it is a definite improvement over 1.0.2 and i would go ahead and work with it. -Original Message- From: Stillwell, Chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 9:30 AM To: 'Struts Users Mailing List' Subject: RE: How stable is struts 1.1 beta 3 We would like to know the answer to this question as well. We are just in the design phase of a new project and are trying to decide between 1.0.2 and 1.1-b3. I would prefer to go with 1.1-b3 since it appears from the project plan on the Struts web site that it is intended to be the release candidate. I am also hoping that there will be a 1.1 release prior to our going into production in early summer. Is that a realistic expectation? Is anybody using 1.1 in production? Our management team gets shaky knees when you mention things like building a product on beta software and would most likely just say no. Cheers, Chris -Original Message- From: Jagannayakam [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 7:23 AM To: Struts-User Mailing List Subject: How stable is struts 1.1 beta 3 Hi , We already developed a J2EE product . Now we think of implementing the struts framework for better navigation , exception framework . Any sugesstions on - how stable is this release of struts 1.1 beta 3 . Are there any major known issues in this ? Regards, Jagan. - 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: How stable is struts 1.1 beta 3
I'm using it in production. Also JDeveloper 9i ships with Struts 1.1b2. From reviewing the struts-dev list it appears that 1.1-b3 will be the release candidate. -Original Message- From: Stillwell, Chris [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 9:30 AM To: 'Struts Users Mailing List' Subject: RE: How stable is struts 1.1 beta 3 We would like to know the answer to this question as well. We are just in the design phase of a new project and are trying to decide between 1.0.2 and 1.1-b3. I would prefer to go with 1.1-b3 since it appears from the project plan on the Struts web site that it is intended to be the release candidate. I am also hoping that there will be a 1.1 release prior to our going into production in early summer. Is that a realistic expectation? Is anybody using 1.1 in production? Our management team gets shaky knees when you mention things like building a product on beta software and would most likely just say no. Cheers, Chris -Original Message- From: Jagannayakam [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 7:23 AM To: Struts-User Mailing List Subject: How stable is struts 1.1 beta 3 Hi , We already developed a J2EE product . Now we think of implementing the struts framework for better navigation , exception framework . Any sugesstions on - how stable is this release of struts 1.1 beta 3 . Are there any major known issues in this ? Regards, Jagan. - 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: Proper place/tier for retrieving DDLB Values
Joshua, There are many ways to accomplish your goal. To answer your question, the DAO is typically the object that encapsulates the persistance and query logic and therefore would perform the query using the key passed in from the domain object. As far as returning results, you have a couple options: - Return a collection of DataTransportObjects (DTO) where each DTO represents a record in the result set. - Return a collection of DynaBeans (http://jakarta.apache.org/commons/beanutils/api/index.html) whose creation can be facilitated by RowSetDynaClass (http://jakarta.apache.org/commons/beanutils/api/index.html) - Return a CachedRowSet http://developer.java.sun.com/developer/Books/JDBCTutorial/chapter5.html - I think Craig is working on a way to make RowSetDynaClass detachable. That is, so you can use it AFTER closing and releasing the ResultSet but I'm not sure if its ready for primetime yet. You should be able to use any of the Struts, Struts-EL, or JSTL tags to iterate over and render the contents of the returned results. HTH, robert -Original Message- From: White, Joshua A (CASD, IT) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 3:40 PM To: Struts Users Mailing List Subject: Proper place/tier for retrieving DDLB Values This is what I have done thus far: 1 Developed domain objects. 2 Developed persistence tier Problem: Where should the code which takes a key from a domain object (for example orderTypeId) and looks it up in a database to get the corresponding values? This type of logic doesn't really fit in the domain object tier. Is this done by DAO only? Assuming that all I need is a name/value pair, what type of object/collection should this DAO return? How/where should I then convert these values into an object/collection of objects the struts html:select tags can use? -Joshua This communication, including attachments, is for the exclusive use of addressee and may contain proprietary, confidential or privileged information. If you are not the intended recipient, any use, copying, disclosure, dissemination or distribution is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return email and delete this communication and destroy all copies. - 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]
TilesAction
Hello David Graham. You are absolutely correct, I have as the application base Artimus from the Struts in Action book by Ted Husted which was made with Struts 1.1b2. I grabbed the application struts-blank from struts 1.1b3 and substituted the directory WEB-INF/lib, and now it works! But I had another question -- I have an Action associated with a Tile. The Action executes correctly and extends the TilesAction but the parameters don't appear in the context of the Tile ... Any suggestions? The code for the execute method is as follows: public ActionForward execute( ComponentContext context, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DateFormat df = DateFormat.getDateInstance (DateFormat.SHORT, getLocale(request)); context.putAttribute(date, df.format(new Date())); //request.setAttribute(date, df.format(new Date())); context.putAttribute(try, tryContext); if (log.isInfoEnabled()) { log.info(ferran date: + df.format(new Date())); log.info(ferran prova: + (String)context.getAttribute(prova)); } return null; } Thanks again for your help, Ferran Parra Departament de Noves Tecnologies MUBIMEDIA S.L. -- [EMAIL PROTECTED] Mallorca, 275, 1r 2a 08008 BARCELONA T. (+34) 93 215 21 91 F. (+34) 93 215 41 21
RE: question about logging
I have been trying to configure my Struts 1.1 application to use a custom logger that wraps log4j. I implemented a Logger class that implements the commons Log interface. I created a commons-logging.properties file and placed it in the WEB-INF/classes directory. It contains the properties: org.apache.commons.logging.Log=com.myaap.Logger org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFac toryImpl I still only get the commons SimpleLog. I am deploying my application to tomcat 3.3.1. What have I missed or not understand? Regards, Chris -Original Message- From: Sri Sankaran [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 8:20 AM To: Struts Users Mailing List Subject: RE: question about logging Struts itself uses commons logging. So you can simply include the necessary jars from commons logging and say, log4j/jdk1.4 in conjunction with the respective properties files in your classpath to control how the messages are output. You can learn a lot more about it at http://jakarta.apache.org/log4j/docs/index.html. Of course, you can use the same technique to control and configure log messages generated by your application. Sri - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Sell me on tiles
The major selling point of tiles is that you can encapsulate, and reuse, page layouts, much as you can reuse layout managers in classic UI frameworks such as Struts. Beyond that, tiles have many other features that will save you a great deal of time and effort, such as extending an existing tile to create a new one. david Southard, Don wrote: We are starting a fairly new project using struts. We are at a point where we need to make a decision on using tiles or not using tiles. On one hand it's not too hard to implement (one developer already has it working with our project). On the other hand we haven't seen any added functionality that would really make us want to go with this feature. All that said can someone give me some brief points on why we should use tiles? -- L. Don Southard 303 218 4823 x4823 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: about tiles context
I don't use TilesAction so I can't really help you there. Why are you using that instead of subclassing the normal Struts Action? Have you looked into using Tiles Controllers to setup data for the tile? http://blogs.browsermedia.com/patrick/index.do?date=20030211#130200 David From: Ferran Parra [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: about tiles context Date: Wed, 19 Feb 2003 14:44:55 +0100 Hello David. You are absolutely correct, I have as the application base Artimus from the Struts in Action book by Ted Husted which was made with Struts 1.1b2. I grabbed the application struts-blank from struts 1.1b3 and substituted the directory WEB-INF/lib, and now it works! But I had another question -- I have an Action associated with a Tile. The Action executes correctly and extends the TilesAction but the parameters don't appear in the context of the Tile ... Any suggestions? The code for the execute method is as follows: public ActionForward execute( ComponentContext context, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { DateFormat df = DateFormat.getDateInstance (DateFormat.SHORT, getLocale(request)); context.putAttribute(date, df.format(new Date())); //request.setAttribute(date, df.format(new Date())); context.putAttribute(try, tryContext); if (log.isInfoEnabled()) { log.info(ferran date: + df.format(new Date())); log.info(ferran prova: + (String)context.getAttribute(prova)); } return null; } Thanks again for your help, Ferran David Graham [EMAIL PROTECTED] escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... What version are you using? Tiles used to store it under CompContext but now stores it under org.apache.struts.taglib.CompContext. You're most likely using an earlier version and looking at the recent source. David From: Ferran Parra [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: about tiles context Date: Tue, 18 Feb 2003 18:17:00 +0100 I have a question -- why is the context, which is different for every Tile, in the Request under the key CompContext instead of the key org.apache.struts.taglib.CompContext, as it is in the source files, according to the constants file ComponentConstants.java? Thanks in advance for any help, Ferran Parra Departament de Noves Tecnologies MUBIMEDIA S.L. -- [EMAIL PROTECTED] Mallorca, 275, 1r 2a 08008 BARCELONA T. (+34) 93 215 21 91 F. (+34) 93 215 41 21 _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Displaying a collection as comma separated values
nested:iterate property=someCollection indexId=index logic:notEqual property=index value=0,/logic:notEqual /nested:iterate . This should allow you to display commas between each word and then a dot. Sri -Original Message- From: ROSSEL Olivier [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 5:31 AM To: '[EMAIL PROTECTED]' Subject: Displaying a collection as comma separated values I want to display in my HTML page a collection of Strings, and I want to display a comma between each word and a final dot. I use nested:iterate: nested:iterate property=bar nested:write property=label, /nested:iterate It works fine except for the final dot. My question is: in a nested:iterate, how can I know that I am at the end of the iteration? ---cut here--- This e-mail is intended only for the above addressee. It may contain privileged information. If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. If you have received it in error please delete it and immediately notify the sender. Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises. - 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: Application Flow with Transaction Tokens?
I just checked the book. His approach is to just throw a servlet exception when a sensitive form is resubmitted. I believe what Greg wants is a way to display the results just as if the second submition did not occur. -Original Message- From: DUBCHAK, JOHN (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 3:54 PM To: 'Struts Users Mailing List' Subject: RE: Application Flow with Transaction Tokens? David Geary presented something similar to this in his Advanced JavaServer Pages book. It was implemented on top of his custom Model-2 implementation but in truth could be easily adapted for use within your own environment. I don't have the book here with me at work, otherwise I would provide greater detail and a page reference. HTH, John -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 2:45 PM To: [EMAIL PROTECTED] Subject: Re: Application Flow with Transaction Tokens? Greg Hess writes: I would like to ignore the fact that the double submit happened and just display the proper receipt. Should I forward the user to a transaction already processed page they will loose their proper receipt and never visually receive the receipt as I also send it by e-mail. I don't really have any practical advice, but I did want to mention that I've always wondered about the best way to resolve this sort of thing. So far my own double-submit cases have not involved a long-running process, and have been easy to resolve with an message page. If you come up with a solution for the long-processing scenario that you like, be sure to let us know. I'd like to see a how-to regarding this in documentation area. It's definately a thorny problem. -Ted. -- Ted Husted, Struts in Action http://husted.com/struts/book.html - 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: Sell me on tiles
I appreciate you've had lots of replies already - but tiles was the killer feature for us in selecting struts. Please don't misunderstand that struts isn't great anyway - we love it - but the addition of tiles has made developing complex websites a breeze. There is a very outdated first-cut of one of our production sites at: http://www.mortgagesurgery.com/ ... the full production version will be released very soon. This was developed entirely using tiles and would have taken much, much longer without tiles. It's using tiles everywhere - mainly using definitions from tiles-defs.xml. The main menu is a header/body/footer tile with a niceBoxGreen tile inserted that has a further body content - and each menu bar option is a tile - so the hover/onclick code was only written once and then used by inserting 6 tiles with different parameters. The tabbed-frame on the first option was also created using tiles - this would have been a nightmare without tiles - trust me this was first developed in ASP and ASP.NET until I discarded both and looked for something better - and it now uses the very wonderful struts. Also see: http://www.openaction.co.uk/jserv/ ... ok it's just a pretty naff holding page but tiles allowed this to be created in 1 hour. It has a tiles header/body/footer outer definition. A further niceBoxBlue is inserted in the bodyContent that gives the Coming Soon! box and this has a titleString property for the header and a further bodyContent that contains the page with the text. This wouldn't even be possible to do without really inelegant code and jsp includes. I'm not saying these are great examples of what tiles can do - Cedric has some superb portal and other configurable options that really show the power of tiles. My personal view is (and I'm sure someone will disagree!) - with tiles available and so well-integrated into struts - you'd be really missing-out by not using it - even for the simplest of sites. There are loads of examples on tiles - I found Wellie Chao's article (referenced in tiles resources) at the IBM site really helped me learn tiles initially and also has a great justification for using tiles: http://www-106.ibm.com/developerworks/java/library/j-strutstiles.html?loc=j Hue. -Original Message- From: Southard, Don [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 16:34 To: Struts User Group (E-mail) Subject: Sell me on tiles We are starting a fairly new project using struts. We are at a point where we need to make a decision on using tiles or not using tiles. On one hand it's not too hard to implement (one developer already has it working with our project). On the other hand we haven't seen any added functionality that would really make us want to go with this feature. All that said can someone give me some brief points on why we should use tiles? -- L. Don Southard 303 218 4823 x4823 - 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: TilesAction and Controller
Thanks Cedric and this great developer community. BaTien - Original Message - From: Cedric Dumoulin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 6:25 AM Subject: Re: TilesAction and Controller BaTien Duong wrote: I found the following in tilesAdvancedFeatures: If you use a class name as controller, it should extend one of the following base classes or interfaces: org.apache.struts.action.Action (wrapper org.apache.struts.action.StrutsActionControllerWrapper is used) If you provide a Struts Action subclass, it will be wrapped with the appropriate class, and Struts' perform method will be called, but the mapping and form attributes will be null. Does this means that to pass the error via mapping I must use controlerUrl in tiles:insert tag ? Where is org.apache.struts.action.StrutsActionControllerWrapper? I cannot find it in src of struts 1.1-b3. It appears that StrutsActionControllerWrapper is now called ActionController. If you use a Struts action as Tiles controller CLASS, the struts parameters aren't initialized, so you can't use it. I think you can't pass error via mapping in this way. But, if you use a struts action URL as controller, the action is called throw the struts mechanism, and properly initialized. You can extends the o.a.s.tiles.actions.TilesAction class and overload execute( ComponentContext ...) to get the context. Cedric Thanks - Original Message - From: BaTien Duong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 17, 2003 10:22 AM Subject: Fw: TilesAction and Controller Question: Just check to make sure that the controllerClass (NOT controllerUrl) used in tiles:insert tag can extends TilesAction (and NOT implements Controller)? Using TilesAction as a controller, I can pass the generated error to the input page via standard Struts process: if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput(); } Question: How can I achieve the same thing with Tiles Controller? (assuming that I can have currentURL and RequestURL as Tiles attributes in the request scope). Cedric and/or someone may save me time to navigate from ServletContext passed into the Controller perform(...) method. Thanks - 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: TilesAction and Controller
For Struts 1.1b3 and the soon to be released Struts 1.1 RC1, do you recommend using TilesAction over the Controller interface (http://tinyurl.com/62px) for tiles-specific controllers? I just wrote about using the Controller interface for a Wrox Chapter last night, and I'd hate to be out of date ;-) Thanks, Matt -Original Message- From: BaTien Duong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 8:25 AM To: Struts Users Mailing List Subject: Re: TilesAction and Controller Thanks Cedric and this great developer community. BaTien - Original Message - From: Cedric Dumoulin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 6:25 AM Subject: Re: TilesAction and Controller BaTien Duong wrote: I found the following in tilesAdvancedFeatures: If you use a class name as controller, it should extend one of the following base classes or interfaces: org.apache.struts.action.Action (wrapper org.apache.struts.action.StrutsActionControllerWrapper is used) If you provide a Struts Action subclass, it will be wrapped with the appropriate class, and Struts' perform method will be called, but the mapping and form attributes will be null. Does this means that to pass the error via mapping I must use controlerUrl in tiles:insert tag ? Where is org.apache.struts.action.StrutsActionControllerWrapper? I cannot find it in src of struts 1.1-b3. It appears that StrutsActionControllerWrapper is now called ActionController. If you use a Struts action as Tiles controller CLASS, the struts parameters aren't initialized, so you can't use it. I think you can't pass error via mapping in this way. But, if you use a struts action URL as controller, the action is called throw the struts mechanism, and properly initialized. You can extends the o.a.s.tiles.actions.TilesAction class and overload execute( ComponentContext ...) to get the context. Cedric Thanks - Original Message - From: BaTien Duong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 17, 2003 10:22 AM Subject: Fw: TilesAction and Controller Question: Just check to make sure that the controllerClass (NOT controllerUrl) used in tiles:insert tag can extends TilesAction (and NOT implements Controller)? Using TilesAction as a controller, I can pass the generated error to the input page via standard Struts process: if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput(); } Question: How can I achieve the same thing with Tiles Controller? (assuming that I can have currentURL and RequestURL as Tiles attributes in the request scope). Cedric and/or someone may save me time to navigate from ServletContext passed into the Controller perform(...) method. Thanks - 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]
PropertyEditor
Hi, I have used a html:textarea to get some informations and so I have a String with several lines. When I put that String in a bean:write the presentation is different. I have seen in the Struts help that if there is a PropertyEditor configured for the property value's class, the getAsText() method will be called. Otherwise, the usual toString() conversions will be applied. The problem is I do not know how to configure that PropertyEditor, is someone can help me please ? I hope I was clear. Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Sell me on tiles
I appreciate you've had lots of replies already - but tiles was the killer feature for us in selecting struts. Please don't misunderstand that struts isn't great anyway - we love it - but the addition of tiles has made developing complex websites a breeze. There is a very outdated first-cut of one of our production sites at: http://www.mortgagesurgery.com/ ... the full production version will be released very soon. Aiii! My eyes! Seriously, good job. We're glad that Struts could be helpful. Amazing what a well designed framework will do for your enthusiasm in getting the job done. My personal view is (and I'm sure someone will disagree!) - with tiles available and so well-integrated into struts - you'd be really missing-out by not using it - even for the simplest of sites. I sure don't disagree. I'm doing a site for my wife -- a college prof -- in my spare time. It's a very simple site, maybe 10 - 12 pages total, but I'm using tiles for it because it makes life so much easier. Without it I would have an amalgamation of includes, and life would generally be much more difficult. Tiles or death! -= J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JOX Parser Conflicts with Struts Application
Hi, everybody, I was wondering if any1 has used the JOX parser from www.wutka.com/jox with a struts application, and if there were any conflicts. I am trying to call the JOX from a bean and in my browser getting an 500-exception, the debug shows that a Jasper Exception is thrown, which does not tell me much since thats the generic JSP engine (Tomcat) exception. My thinking is that it conflicts in some way with the way the beans are loaded with struts(not sure if that makes any sence, been using struts for a total of one week so far :)). I was going to use the digester to parse my xml and populate beans, but my understanding is that it uses xPath and i am not sure if i would like to implement it because of its slowdown...BTW, i am open to any suggestion on other ways to parse xml using SAX, so please feel free to give ideas. Thanks, Alex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: return (mapping.getInputForward()); - not working
John, -- On Tue, 18 Feb 2003 19:56:43 John Espey wrote: Pani, Can you copy your action mapping configuration (if your input is an action can you copy that one too? Here it is: actionpath=/reportGen type=com.g1.interactive.webapp.ReportGenAction name=ReportGenerateForm scope=session input=reportDoc.jsp // i tried removing .jsp too forward name=successpath=/reportResultDoc.jsp/ forward name=failurepath=/reportDoc.jsp/ /action forward failure is something which i added later so that i can avoid using return (mapping.getInputForward()); now, 'am using return (mapping.getActionForward(failure); it seem to work. but, just wondering is the later one is the right way to do? or the first one? Thanks, -Pani. -Original Message- From: Becky Norum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 7:37 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: return (mapping.getInputForward()); - not working Pani, You have to specify the forward name parameter, if you haven't. For example, if in struts-config.xml your forward is: forward name=success path=/home.jsp / you have to use the following in your Action class: return (mapping.getActionForward(success); Best of luck, Becky -- Becky Norum [EMAIL PROTECTED] On Tue, 2003-02-18 at 19:23, Pani Ramasami wrote: Hi: The below line: return (mapping.getInputForward()); // (in the ActionClass) is not taking me back to the form specified in the input attribute of stuts-config.xml Iam using html:errors/ in my jsp to display the action errors (if any). Any advise wud be greatly appreciated. -Pani. _ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plusref=lmtplus - 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] _ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plusref=lmtplus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic:empty and logicnotEmpty with a Collection (again)
That doesn't seem right. What version are you using? I recently finished cactus tests on the logic tags, and I test exactly what you've described without failures. In fact, I just tried this in a test.jsp: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % % java.util.Map emptyMap = new java.util.HashMap(); pageContext.setAttribute(emptyMap, emptyMap); % logic:empty name=emptyMapemptyMap empty/logic:emptybr logic:notEmpty name=emptyMapemptyMap not empty/logic:notEmptybr works fine. You probably forgot to add the taglib declaration: %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % If you did not do this, then you will see exactly what you've described. -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 3:11 AM To: [EMAIL PROTECTED] Subject: logic:empty and logicnotEmpty with a Collection (again) Hi, I found some behaviour of the logic:notEmpty tag which I think is inconsistent. Reading the documentation, I think it should call a collection's isEmpty() method. It works as expected with a bean of type List, but it doesn't work with a Map. Testcase: If emptyList was built with List emptyList = new ArrayList(); the following fragment correctly states only emptyList empty: logic:empty name=emptyListemptyList empty/logic:emptybr logic:notEmpty name=emptyListemptyList not empty/logic:notEmptybr But if I change from emtpyList to Map emptyMap = new HashMap(); and test it with logic:empty name=emptyMapemptyMap empty/logic:emptybr logic:notEmpty name=emptyMapemptyMap not empty/logic:notEmptybr I get emptyMap not empty nonemptyMap not empty instead of just emptyMap empty. Both (mutually exclusive) statements seem to evaluate to true. So, is this a misunderstanding from my side or a bug in the implementation? TIA Steffen - 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: JOX Parser Conflicts with Struts Application
Nevermind, problem solved :) But i still would like to hear about some xml techniques, please -Original Message- From: Alex Reznik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 10:51 AM To: 'Struts Users Mailing List' Subject: JOX Parser Conflicts with Struts Application Hi, everybody, I was wondering if any1 has used the JOX parser from www.wutka.com/jox with a struts application, and if there were any conflicts. I am trying to call the JOX from a bean and in my browser getting an 500-exception, the debug shows that a Jasper Exception is thrown, which does not tell me much since thats the generic JSP engine (Tomcat) exception. My thinking is that it conflicts in some way with the way the beans are loaded with struts(not sure if that makes any sence, been using struts for a total of one week so far :)). I was going to use the digester to parse my xml and populate beans, but my understanding is that it uses xPath and i am not sure if i would like to implement it because of its slowdown...BTW, i am open to any suggestion on other ways to parse xml using SAX, so please feel free to give ideas. Thanks, Alex - 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: logic:empty and logicnotEmpty with a Collection (again)
Oops, hold that thought. I didn't read my results correctly. You're right, my test.jsp showed both (which is wrong). I'll take a closer look at this. -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] On Behalf Of James Mitchell Sent: Wednesday, February 19, 2003 10:56 AM To: 'Struts Users Mailing List' Subject: RE: logic:empty and logicnotEmpty with a Collection (again) That doesn't seem right. What version are you using? I recently finished cactus tests on the logic tags, and I test exactly what you've described without failures. In fact, I just tried this in a test.jsp: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % % java.util.Map emptyMap = new java.util.HashMap(); pageContext.setAttribute(emptyMap, emptyMap); % logic:empty name=emptyMapemptyMap empty/logic:emptybr logic:notEmpty name=emptyMapemptyMap not empty/logic:notEmptybr works fine. You probably forgot to add the taglib declaration: %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % If you did not do this, then you will see exactly what you've described. -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 3:11 AM To: [EMAIL PROTECTED] Subject: logic:empty and logicnotEmpty with a Collection (again) Hi, I found some behaviour of the logic:notEmpty tag which I think is inconsistent. Reading the documentation, I think it should call a collection's isEmpty() method. It works as expected with a bean of type List, but it doesn't work with a Map. Testcase: If emptyList was built with List emptyList = new ArrayList(); the following fragment correctly states only emptyList empty: logic:empty name=emptyListemptyList empty/logic:emptybr logic:notEmpty name=emptyListemptyList not empty/logic:notEmptybr But if I change from emtpyList to Map emptyMap = new HashMap(); and test it with logic:empty name=emptyMapemptyMap empty/logic:emptybr logic:notEmpty name=emptyMapemptyMap not empty/logic:notEmptybr I get emptyMap not empty nonemptyMap not empty instead of just emptyMap empty. Both (mutually exclusive) statements seem to evaluate to true. So, is this a misunderstanding from my side or a bug in the implementation? TIA Steffen - 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]
Why do we need the input property of action in the struts-config.xml file
Looking at the struts-config.xml from the struts-example app: !-- Save user registration -- actionpath=/saveRegistration type=org.apache.struts.webapp.example.SaveRegistrationAction name=registrationForm scope=request input=registration/ I'm confused about the input parameter. Why do we need to specify the input? Doesn't the Action know which page the user came from? The reason I ask is because this ties the Action to a specific page, which prevents reuse. Let's say I have an action that I want to be used by multiple JSP's, and inside the action if there's an error it should return to the previous page. Is there an easy way to use the same action twice? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Application Flow with Transaction Tokens?
Hi All, I have implemented a solution that I like to handle a TimeConsumingRequest(TCR). I have build a Thread that performs the TCR. This thread also provides methods to retrieve the status of the process and the result bean of the process. //Returns true while the TCR is processing false when done public boolean isProcessing(); //Returns true when processing is completed public boolean isComplete() //When the TCR is done I need the result information to display public Result getResult(); My action builds the thread and launches it. I then bind the thread to the session and I forward my user to the result page. Requests that come in to my action that contain invalid tokens are just directed to the result.jsp. This way my user is not stuck on their input form while waiting for the result which is sure to cause a second submit and is not user friendly. My result.jsp checks to see if the thread is still processing if so it displays a please wait prompt and sets the pages header to refresh in Xsec else it gets the Thread.Result and displays to the user. This solution involves a scriplet that performs response.setHeader(Refresh, 10). I dislike scriplets so I am building a custom tag to handle my TCR. It will look like this: !--What to display while the transaction is processing name: name of the Thread bound to the session property: method that returns a boolean value indicatingstate pollingInterval:The refresh interval set in the pages headermax:Max number of polls. If isProcessing returns true tag sets response.setHeader(Refresh, 10); and a counter in the session for the max count to avoid endless polling. -- tcr:isProcessing name=transactionWorker property=isProcessing pollingInterval=10 max=3 Please wait, your request is being processed. /tcr:isProcessing !-- What to display when the trasaction is complete -- tcr:isComplete name=transactionWorker property=isComplete bean:write name=transactionWorker property=result.authCode scope=session/ /tcr:isComplete What do you all think about this? Greg -Original Message- From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 9:58 AM To: Struts Users Mailing List Subject: RE: Application Flow with Transaction Tokens? I just checked the book. His approach is to just throw a servlet exception when a sensitive form is resubmitted. I believe what Greg wants is a way to display the results just as if the second submition did not occur. -Original Message- From: DUBCHAK, JOHN (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 3:54 PM To: 'Struts Users Mailing List' Subject: RE: Application Flow with Transaction Tokens? David Geary presented something similar to this in his Advanced JavaServer Pages book. It was implemented on top of his custom Model-2 implementation but in truth could be easily adapted for use within your own environment. I don't have the book here with me at work, otherwise I would provide greater detail and a page reference. HTH, John -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 2:45 PM To: [EMAIL PROTECTED] Subject: Re: Application Flow with Transaction Tokens? Greg Hess writes: I would like to ignore the fact that the double submit happened and just display the proper receipt. Should I forward the user to a transaction already processed page they will loose their proper receipt and never visually receive the receipt as I also send it by e-mail. I don't really have any practical advice, but I did want to mention that I've always wondered about the best way to resolve this sort of thing. So far my own double-submit cases have not involved a long-running process, and have been easy to resolve with an message page. If you come up with a solution for the long-processing scenario that you like, be sure to let us know. I'd like to see a how-to regarding this in documentation area. It's definately a thorny problem. -Ted. -- Ted Husted, Struts in Action http://husted.com/struts/book.html - 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: Mutliform validation using a DynaValidatorForm
DynaValidatorActionForm and DynaValidatorForm don't work for multipage forms. The page attr is not being set for dynamic forms. http://issues.apache.org/bugzilla/show_bug.cgi?id=16337 The patch is pretty easy, but this got marked for 1.2. The patch I use locally is: public class MyForm extends DynaValidatorForm { public void set(String s, Object o) { if ( s.equals(page) ){ if ( o != null ){ String val = o.toString(); if ( val != null ( val.length() 0 )) { try { super.setPage( Integer.parseInt(val) ); } catch (NumberFormatException e) { // Oh well. super.setPage(0); } } else { super.setPage(0); } } } super.set(s, o); } public void setPage(int i) { set(page, +i); } } -Original Message- From: Brian Blignaut [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 3:57 AM To: [EMAIL PROTECTED] Subject: Mutliform validation using a DynaValidatorForm Hi, Has anyone attempted to use the 'page' property of a field, with a DynaValidatorForm? It seems to me that there is a bug around doing this? Thanks Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: logic:empty and logicnotEmpty with a Collection (again)
Ok. Scratch that, I was correct the first time. Here's my test.jsp: % java.util.Map emptyMap = new java.util.HashMap(); pageContext.setAttribute(emptyMap, emptyMap); % logic:empty name=emptyMapThe map is empty./logic:emptybr logic:notEmpty name=emptyMapThe map is not empty./logic:notEmptybr Sorry for the confusing posts, I stopped drinking coffee a few weeks ago, and things just haven't been the same. -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 11:02 AM To: 'Struts Users Mailing List' Subject: RE: logic:empty and logicnotEmpty with a Collection (again) Oops, hold that thought. I didn't read my results correctly. You're right, my test.jsp showed both (which is wrong). I'll take a closer look at this. -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: James Mitchell [mailto:[EMAIL PROTECTED]] On Behalf Of James Mitchell Sent: Wednesday, February 19, 2003 10:56 AM To: 'Struts Users Mailing List' Subject: RE: logic:empty and logicnotEmpty with a Collection (again) That doesn't seem right. What version are you using? I recently finished cactus tests on the logic tags, and I test exactly what you've described without failures. In fact, I just tried this in a test.jsp: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % % java.util.Map emptyMap = new java.util.HashMap(); pageContext.setAttribute(emptyMap, emptyMap); % logic:empty name=emptyMapemptyMap empty/logic:emptybr logic:notEmpty name=emptyMapemptyMap not empty/logic:notEmptybr works fine. You probably forgot to add the taglib declaration: %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % If you did not do this, then you will see exactly what you've described. -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 3:11 AM To: [EMAIL PROTECTED] Subject: logic:empty and logicnotEmpty with a Collection (again) Hi, I found some behaviour of the logic:notEmpty tag which I think is inconsistent. Reading the documentation, I think it should call a collection's isEmpty() method. It works as expected with a bean of type List, but it doesn't work with a Map. Testcase: If emptyList was built with List emptyList = new ArrayList(); the following fragment correctly states only emptyList empty: logic:empty name=emptyListemptyList empty/logic:emptybr logic:notEmpty name=emptyListemptyList not empty/logic:notEmptybr But if I change from emtpyList to Map emptyMap = new HashMap(); and test it with logic:empty name=emptyMapemptyMap empty/logic:emptybr logic:notEmpty name=emptyMapemptyMap not empty/logic:notEmptybr I get emptyMap not empty nonemptyMap not empty instead of just emptyMap empty. Both (mutually exclusive) statements seem to evaluate to true. So, is this a misunderstanding from my side or a bug in the implementation? TIA Steffen - 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: One ActionForm for multiple JSP
There is a bug in multipage DynaValidatorForm usage http://www.mail-archive.com/struts-user@jakarta.apache.org/msg55576.html -- Steve Stair [EMAIL PROTECTED] (512) 463-7991 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Mutliform validation using a DynaValidatorForm
There is indeed a bug in multipage DynaValidatorForm usage http://www.mail-archive.com/struts-user@jakarta.apache.org/msg55576.html -- Steve Stair [EMAIL PROTECTED] (512) 463-7991 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Sell me on tiles
Choice of colours was the customer's - they picked colours they felt would be eye-catching (damaging) (!) You should all feel great as struts developers - although this will not be surprising to the initiated - to know you've completely usurped Microsoft ASP and the shiny new Microsoft ASP.NET as the chosen development framework. Not a decision that was taken lightly - functioning versions were built in both ASP and ASP.NET (and in vanilla JSP and initially PHP). Decision was based on struts reducing the development time AND maintenance overhead this would entail in the future. Struts was a CLEAR winner. Once this site is in full production use in a few weeks time there will also be a section added on the website about the technology used and acknowledging the use of the struts framework. A separate section will also be referenced on the development website giving the technical justification for why struts was chosen as the framework. H. -Original Message- From: James Childers [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 15:41 To: Struts Users Mailing List Subject: RE: Sell me on tiles I appreciate you've had lots of replies already - but tiles was the killer feature for us in selecting struts. Please don't misunderstand that struts isn't great anyway - we love it - but the addition of tiles has made developing complex websites a breeze. There is a very outdated first-cut of one of our production sites at: http://www.mortgagesurgery.com/ ... the full production version will be released very soon. Aiii! My eyes! Seriously, good job. We're glad that Struts could be helpful. Amazing what a well designed framework will do for your enthusiasm in getting the job done. My personal view is (and I'm sure someone will disagree!) - with tiles available and so well-integrated into struts - you'd be really missing-out by not using it - even for the simplest of sites. I sure don't disagree. I'm doing a site for my wife -- a college prof -- in my spare time. It's a very simple site, maybe 10 - 12 pages total, but I'm using tiles for it because it makes life so much easier. Without it I would have an amalgamation of includes, and life would generally be much more difficult. Tiles or death! -= J - 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] RE: Sell me on tiles
I can't get the site to display at all, and i've tried both IE and Mozilla. -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 10:20 AM To: 'Struts Users Mailing List' Subject: [OT] RE: Sell me on tiles Choice of colours was the customer's - they picked colours they felt would be eye-catching (damaging) (!) You should all feel great as struts developers - although this will not be surprising to the initiated - to know you've completely usurped Microsoft ASP and the shiny new Microsoft ASP.NET as the chosen development framework. Not a decision that was taken lightly - functioning versions were built in both ASP and ASP.NET (and in vanilla JSP and initially PHP). Decision was based on struts reducing the development time AND maintenance overhead this would entail in the future. Struts was a CLEAR winner. Once this site is in full production use in a few weeks time there will also be a section added on the website about the technology used and acknowledging the use of the struts framework. A separate section will also be referenced on the development website giving the technical justification for why struts was chosen as the framework. H. -Original Message- From: James Childers [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 15:41 To: Struts Users Mailing List Subject: RE: Sell me on tiles I appreciate you've had lots of replies already - but tiles was the killer feature for us in selecting struts. Please don't misunderstand that struts isn't great anyway - we love it - but the addition of tiles has made developing complex websites a breeze. There is a very outdated first-cut of one of our production sites at: http://www.mortgagesurgery.com/ ... the full production version will be released very soon. Aiii! My eyes! Seriously, good job. We're glad that Struts could be helpful. Amazing what a well designed framework will do for your enthusiasm in getting the job done. My personal view is (and I'm sure someone will disagree!) - with tiles available and so well-integrated into struts - you'd be really missing-out by not using it - even for the simplest of sites. I sure don't disagree. I'm doing a site for my wife -- a college prof -- in my spare time. It's a very simple site, maybe 10 - 12 pages total, but I'm using tiles for it because it makes life so much easier. Without it I would have an amalgamation of includes, and life would generally be much more difficult. Tiles or death! -= J - 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 stable is struts 1.1 beta 3
Jagannayakam wrote: Hi , We already developed a J2EE product . Now we think of implementing the struts framework for better navigation , exception framework . Any sugesstions on - how stable is this release of struts 1.1 beta 3 . Are there any major known issues in this ? 1) Search Buzilla http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=NEWbug_status=ASSIGNEDbug_status=REOPENEDchfieldto=Nowproduct=Strutsversion=1.1+Beta+1version=1.1+Beta+2version=1.1+Beta+3version=Nightly+Buildcmdtype=doit 2) A general note on stability, we have been using struts in released products since 1.0 beta 2. We have applications out in the field using struts 1.1b1, and 1.1b2. Generally the bugs we hit are in the lesser used features such as: --this is fictitious --, problems with modules used in conjunction with nested tags accessing multiple resource files. 3) With that said Test your application, especially at the boundry conditions. With the version of jars you will deploy with, and on a system as close to the deployed one as possable. -Rob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why do we need the input property of action in the struts-config.xmlfile
Is that because your action is started by saveRegistration.do and the validation is done by registration.jsp? You don't have the '.jsp' in the input. What happens then? Does the action actually know which form triggered it? the (in your case) SaveRegistrationAction program is started after registrationForm program. This is all handled by the Controller. But how does the Controller tell the saveRegistrationAction that it was triggered by registration.jsp? If you don't know either, maybe that's the answer. Bert Catsburg Mike Mattox wrote: Looking at the struts-config.xml from the struts-example app: !-- Save user registration -- actionpath=/saveRegistration type=org.apache.struts.webapp.example.SaveRegistrationAction name=registrationForm scope=request input=registration/ I'm confused about the input parameter. Why do we need to specify the input? Doesn't the Action know which page the user came from? The reason I ask is because this ties the Action to a specific page, which prevents reuse. Let's say I have an action that I want to be used by multiple JSP's, and inside the action if there's an error it should return to the previous page. Is there an easy way to use the same action twice? Thanks, Michael - 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: TilesAction and Controller
Hi, If you don't need the struts properties, use a Controller class and controllerClass. If you need the struts preprocessing or the struts properties in your controller, use a TilesAction and controllerUrl. A TilesAction is a regular Struts action which can be called through the servlet mechanism, and so can be catch and preprocessed by Struts. In addition, a TilesAction should be declare in the struts config file, and called throw its URL. Cedric Raible, Matt wrote: For Struts 1.1b3 and the soon to be released Struts 1.1 RC1, do you recommend using TilesAction over the Controller interface (http://tinyurl.com/62px) for tiles-specific controllers? I just wrote about using the Controller interface for a Wrox Chapter last night, and I'd hate to be out of date ;-) Thanks, Matt -Original Message- From: BaTien Duong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 8:25 AM To: Struts Users Mailing List Subject: Re: TilesAction and Controller Thanks Cedric and this great developer community. BaTien - Original Message - From: Cedric Dumoulin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 6:25 AM Subject: Re: TilesAction and Controller BaTien Duong wrote: I found the following in tilesAdvancedFeatures: If you use a class name as controller, it should extend one of the following base classes or interfaces: org.apache.struts.action.Action (wrapper org.apache.struts.action.StrutsActionControllerWrapper is used) If you provide a Struts Action subclass, it will be wrapped with the appropriate class, and Struts' perform method will be called, but the mapping and form attributes will be null. Does this means that to pass the error via mapping I must use controlerUrl in tiles:insert tag ? Where is org.apache.struts.action.StrutsActionControllerWrapper? I cannot find it in src of struts 1.1-b3. It appears that StrutsActionControllerWrapper is now called ActionController. If you use a Struts action as Tiles controller CLASS, the struts parameters aren't initialized, so you can't use it. I think you can't pass error via mapping in this way. But, if you use a struts action URL as controller, the action is called throw the struts mechanism, and properly initialized. You can extends the o.a.s.tiles.actions.TilesAction class and overload execute( ComponentContext ...) to get the context. Cedric Thanks - Original Message - From: BaTien Duong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 17, 2003 10:22 AM Subject: Fw: TilesAction and Controller Question: Just check to make sure that the controllerClass (NOT controllerUrl) used in tiles:insert tag can extends TilesAction (and NOT implements Controller)? Using TilesAction as a controller, I can pass the generated error to the input page via standard Struts process: if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput(); } Question: How can I achieve the same thing with Tiles Controller? (assuming that I can have currentURL and RequestURL as Tiles attributes in the request scope). Cedric and/or someone may save me time to navigate from ServletContext passed into the Controller perform(...) method. Thanks - 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]
DB Connection pool (how)?
Hi, Please excuse my ignorance, but does struts have a libraries that implement a connection pool and if so, how does one configure and use this pool? Are there any examples? Any help will be greatly appreciated! Thanks in advance! __ Post your free ad now! http://personals.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: indexed html-el and c:forEach
David M. Karr wrote: Brian == Brian Moseley [EMAIL PROTECTED] writes: Brian any chance that we can get support in struts-el for indexed html tags nested Brian within c:forEach, a much more flexible and useful iterator? Brian at the moment, BaseHandlerTag.prepareIndex is hardcoded to look for a parent Brian IterateTag. i'm not sure if that could be cleanly overridden to look for a Brian parent that implements the jstl loop tag interface. Actually, code was added to that class on 1/5/2003 by James Turner to deal with indexed tags inside a c:forEach. I never tested it myself, however. ah, and that was one revision after 1.1b3, which i'm using. good to know, thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why do we need the input property of action in the struts-config.xml file
You can reuse the Action by defining it with a different path attribute. The input is just for the Action on one path, not every path you use that action on. David From: Mike Mattox [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Why do we need the input property of action in the struts-config.xml file Date: Wed, 19 Feb 2003 17:05:36 +0100 Looking at the struts-config.xml from the struts-example app: !-- Save user registration -- actionpath=/saveRegistration type=org.apache.struts.webapp.example.SaveRegistrationAction name=registrationForm scope=request input=registration/ I'm confused about the input parameter. Why do we need to specify the input? Doesn't the Action know which page the user came from? The reason I ask is because this ties the Action to a specific page, which prevents reuse. Let's say I have an action that I want to be used by multiple JSP's, and inside the action if there's an error it should return to the previous page. Is there an easy way to use the same action twice? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DB Connection pool (how)?
http://jakarta.apache.org/struts/userGuide/configuration.html#data-source_config David From: Swish [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: DB Connection pool (how)? Date: Wed, 19 Feb 2003 11:32:15 -0500 (EST) Hi, Please excuse my ignorance, but does struts have a libraries that implement a connection pool and if so, how does one configure and use this pool? Are there any examples? Any help will be greatly appreciated! Thanks in advance! __ Post your free ad now! http://personals.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DB Connection pool (how)?
http://jakarta.apache.org/struts/faqs/database.html -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: Swish [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 11:32 AM To: Struts Users Mailing List Subject: DB Connection pool (how)? Hi, Please excuse my ignorance, but does struts have a libraries that implement a connection pool and if so, how does one configure and use this pool? Are there any examples? Any help will be greatly appreciated! Thanks in advance! __ Post your free ad now! http://personals.yahoo.ca - 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: Why do we need the input property of action in the struts-config.xml file
Sounds like a good approach, but wouldn't it be easier if action's input was automatically set? Is this not possible? Thanks, Michael -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: mercredi 19 février 2003 17:37 To: [EMAIL PROTECTED] Subject: Re: Why do we need the input property of action in the struts-config.xml file You can reuse the Action by defining it with a different path attribute. The input is just for the Action on one path, not every path you use that action on. David From: Mike Mattox [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Why do we need the input property of action in the struts-config.xml file Date: Wed, 19 Feb 2003 17:05:36 +0100 Looking at the struts-config.xml from the struts-example app: !-- Save user registration -- actionpath=/saveRegistration type=org.apache.struts.webapp.example.SaveRegistrationAction name=registrationForm scope=request input=registration/ I'm confused about the input parameter. Why do we need to specify the input? Doesn't the Action know which page the user came from? The reason I ask is because this ties the Action to a specific page, which prevents reuse. Let's say I have an action that I want to be used by multiple JSP's, and inside the action if there's an error it should return to the previous page. Is there an easy way to use the same action twice? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
passing html:select selected value to html:link
Hi, I emailed this question earlier in the morning, but had no response, it's very urgent does anybody know how to do the following: I have a following listbox in one of my jsps: html:select property=system size=5 html:options collection=systems property=name labelProperty=name/ /html:select Following this I have two html:links one to edit a system and another one to delete. I would like to pass the selected value from the list as part of the link, for example: a href=editSystem.act?system=.. Does anybody know how to do this, how do I actually access the selected value of the list? Cheers. Anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: TilesAction and Controller
Initially I thought we can use Controller interface to save an extra specification in config.xml and to be more flexible in our design of class structure. We use TilesAction as the main 1 controller 1 action and in nested pages where there is a need of 1 controller - multiple views. We change all of our controllers to TilesAction. It seems to be confirmed by Cedric comment. Let me know if I miss something. BaTien - Original Message - From: Raible, Matt [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 8:30 AM Subject: RE: TilesAction and Controller For Struts 1.1b3 and the soon to be released Struts 1.1 RC1, do you recommend using TilesAction over the Controller interface (http://tinyurl.com/62px) for tiles-specific controllers? I just wrote about using the Controller interface for a Wrox Chapter last night, and I'd hate to be out of date ;-) Thanks, Matt -Original Message- From: BaTien Duong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 8:25 AM To: Struts Users Mailing List Subject: Re: TilesAction and Controller Thanks Cedric and this great developer community. BaTien - Original Message - From: Cedric Dumoulin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 6:25 AM Subject: Re: TilesAction and Controller BaTien Duong wrote: I found the following in tilesAdvancedFeatures: If you use a class name as controller, it should extend one of the following base classes or interfaces: org.apache.struts.action.Action (wrapper org.apache.struts.action.StrutsActionControllerWrapper is used) If you provide a Struts Action subclass, it will be wrapped with the appropriate class, and Struts' perform method will be called, but the mapping and form attributes will be null. Does this means that to pass the error via mapping I must use controlerUrl in tiles:insert tag ? Where is org.apache.struts.action.StrutsActionControllerWrapper? I cannot find it in src of struts 1.1-b3. It appears that StrutsActionControllerWrapper is now called ActionController. If you use a Struts action as Tiles controller CLASS, the struts parameters aren't initialized, so you can't use it. I think you can't pass error via mapping in this way. But, if you use a struts action URL as controller, the action is called throw the struts mechanism, and properly initialized. You can extends the o.a.s.tiles.actions.TilesAction class and overload execute( ComponentContext ...) to get the context. Cedric Thanks - Original Message - From: BaTien Duong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 17, 2003 10:22 AM Subject: Fw: TilesAction and Controller Question: Just check to make sure that the controllerClass (NOT controllerUrl) used in tiles:insert tag can extends TilesAction (and NOT implements Controller)? Using TilesAction as a controller, I can pass the generated error to the input page via standard Struts process: if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput(); } Question: How can I achieve the same thing with Tiles Controller? (assuming that I can have currentURL and RequestURL as Tiles attributes in the request scope). Cedric and/or someone may save me time to navigate from ServletContext passed into the Controller perform(...) method. Thanks - 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: Why do we need the input property of action in the struts-config.xml file
How would it know what it's input resource is? Keep in mind that you can list a tiles definition in the input attribute so it's not as easy as checking a url. David From: Michael Mattox [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: Why do we need the input property of action in the struts-config.xml file Date: Wed, 19 Feb 2003 17:41:52 +0100 Sounds like a good approach, but wouldn't it be easier if action's input was automatically set? Is this not possible? Thanks, Michael -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: mercredi 19 février 2003 17:37 To: [EMAIL PROTECTED] Subject: Re: Why do we need the input property of action in the struts-config.xml file You can reuse the Action by defining it with a different path attribute. The input is just for the Action on one path, not every path you use that action on. David From: Mike Mattox [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Why do we need the input property of action in the struts-config.xml file Date: Wed, 19 Feb 2003 17:05:36 +0100 Looking at the struts-config.xml from the struts-example app: !-- Save user registration -- actionpath=/saveRegistration type=org.apache.struts.webapp.example.SaveRegistrationAction name=registrationForm scope=request input=registration/ I'm confused about the input parameter. Why do we need to specify the input? Doesn't the Action know which page the user came from? The reason I ask is because this ties the Action to a specific page, which prevents reuse. Let's say I have an action that I want to be used by multiple JSP's, and inside the action if there's an error it should return to the previous page. Is there an easy way to use the same action twice? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - 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] _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
deprecated constant
In version 1.1b3 Action.DATA_SOURCE_KEY is deprecated. Can anyone tell me real quick what replaces this? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Why do we need the input property of action in the struts-config.xml file
It's possible. However as the DTD says, the input is: Module-relative path of the action or other resource to which control should be returned if a validation error is encountered. And not (necessarily) where you came from. Sri -Original Message- From: Michael Mattox [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 11:42 AM To: Struts Users Mailing List Subject: RE: Why do we need the input property of action in the struts-config.xml file Sounds like a good approach, but wouldn't it be easier if action's input was automatically set? Is this not possible? Thanks, Michael -Original Message- From: David Graham [mailto:[EMAIL PROTECTED]] Sent: mercredi 19 février 2003 17:37 To: [EMAIL PROTECTED] Subject: Re: Why do we need the input property of action in the struts-config.xml file You can reuse the Action by defining it with a different path attribute. The input is just for the Action on one path, not every path you use that action on. David From: Mike Mattox [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Why do we need the input property of action in the struts-config.xml file Date: Wed, 19 Feb 2003 17:05:36 +0100 Looking at the struts-config.xml from the struts-example app: !-- Save user registration -- actionpath=/saveRegistration type=org.apache.struts.webapp.example.SaveRegistrationAction name=registrationForm scope=request input=registration/ I'm confused about the input parameter. Why do we need to specify the input? Doesn't the Action know which page the user came from? The reason I ask is because this ties the Action to a specific page, which prevents reuse. Let's say I have an action that I want to be used by multiple JSP's, and inside the action if there's an error it should return to the previous page. Is there an easy way to use the same action twice? Thanks, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - 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: How stable is struts 1.1 beta 3
To add to your last point. This is one aspect where Test Driven Development really champions. If you run your test suite against your product with any stable release, then validating stability should be as simple as re-running your tests after upgrading. The more I work with Cactus, the more I love it, and I'm sure once I dive into StrutsTestCase, it will become my new best friend as well. -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: Robert Leland [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 11:24 AM To: Struts Users Mailing List Subject: Re: How stable is struts 1.1 beta 3 Jagannayakam wrote: Hi , We already developed a J2EE product . Now we think of implementing the struts framework for better navigation , exception framework . Any sugesstions on - how stable is this release of struts 1.1 beta 3 . Are there any major known issues in this ? 1) Search Buzilla http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=NEWb ug_status=ASSIGNEDbug_status=REOPENEDchfieldto=Nowproduct=Strutsver sion=1.1+Beta+1version=1.1+Beta+2version=1.1+Beta+3version=Nightly+Bu ildcmdtype=doit 2) A general note on stability, we have been using struts in released products since 1.0 beta 2. We have applications out in the field using struts 1.1b1, and 1.1b2. Generally the bugs we hit are in the lesser used features such as: --this is fictitious --, problems with modules used in conjunction with nested tags accessing multiple resource files. 3) With that said Test your application, especially at the boundry conditions. With the version of jars you will deploy with, and on a system as close to the deployed one as possable. -Rob - 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: deprecated constant
Michael wrote: In version 1.1b3 Action.DATA_SOURCE_KEY is deprecated. Can anyone tell me real quick what replaces this? http://jakarta.apache.org/struts/api/org/apache/struts/action/Action.html -- Wendy Smoak
RE: return (mapping.getInputForward()); - not working
I prefer the getInput method when doing validation, although under most circumstances the RequestProcessor will do that for you. If you are doing input validation in the action class, then you should probably use the getInput method. If not, you need the input forward to work anyways if validation fails (which it doesn't appear that you are validating for this mapping) when the RequestProcessor does its thing. Did you try doing input=/reportDoc.jsp? I suspect that it should work given that the failure forward uses the / (and you've said it works). -Original Message- From: Pani Ramasami [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 9:55 AM To: Struts Users Mailing List Subject: RE: return (mapping.getInputForward()); - not working John, -- On Tue, 18 Feb 2003 19:56:43 John Espey wrote: Pani, Can you copy your action mapping configuration (if your input is an action can you copy that one too? Here it is: actionpath=/reportGen type=com.g1.interactive.webapp.ReportGenAction name=ReportGenerateForm scope=session input=reportDoc.jsp // i tried removing .jsp too forward name=successpath=/reportResultDoc.jsp/ forward name=failurepath=/reportDoc.jsp/ /action forward failure is something which i added later so that i can avoid using return (mapping.getInputForward()); now, 'am using return (mapping.getActionForward(failure); it seem to work. but, just wondering is the later one is the right way to do? or the first one? Thanks, -Pani. -Original Message- From: Becky Norum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 7:37 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: return (mapping.getInputForward()); - not working Pani, You have to specify the forward name parameter, if you haven't. For example, if in struts-config.xml your forward is: forward name=success path=/home.jsp / you have to use the following in your Action class: return (mapping.getActionForward(success); Best of luck, Becky -- Becky Norum [EMAIL PROTECTED] On Tue, 2003-02-18 at 19:23, Pani Ramasami wrote: Hi: The below line: return (mapping.getInputForward()); // (in the ActionClass) is not taking me back to the form specified in the input attribute of stuts-config.xml Iam using html:errors/ in my jsp to display the action errors (if any). Any advise wud be greatly appreciated. -Pani. _ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plusref=lmtplus - 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] _ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plusref=lmtplus - 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: TilesAction and Controller
For others... nice write up on this in http://blogs.browsermedia.com/patrick/index.do?date=20030211 .V BaTien Duong wrote: Initially I thought we can use Controller interface to save an extra specification in config.xml and to be more flexible in our design of class structure. We use TilesAction as the main 1 controller 1 action and in nested pages where there is a need of 1 controller - multiple views. We change all of our controllers to TilesAction. It seems to be confirmed by Cedric comment. Let me know if I miss something. BaTien - Original Message - From: Raible, Matt [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 8:30 AM Subject: RE: TilesAction and Controller For Struts 1.1b3 and the soon to be released Struts 1.1 RC1, do you recommend using TilesAction over the Controller interface (http://tinyurl.com/62px) for tiles-specific controllers? I just wrote about using the Controller interface for a Wrox Chapter last night, and I'd hate to be out of date ;-) Thanks, Matt -Original Message- From: BaTien Duong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 8:25 AM To: Struts Users Mailing List Subject: Re: TilesAction and Controller Thanks Cedric and this great developer community. BaTien - Original Message - From: Cedric Dumoulin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 6:25 AM Subject: Re: TilesAction and Controller BaTien Duong wrote: I found the following in tilesAdvancedFeatures: If you use a class name as controller, it should extend one of the following base classes or interfaces: org.apache.struts.action.Action (wrapper org.apache.struts.action.StrutsActionControllerWrapper is used) If you provide a Struts Action subclass, it will be wrapped with the appropriate class, and Struts' perform method will be called, but the mapping and form attributes will be null. Does this means that to pass the error via mapping I must use controlerUrl in tiles:insert tag ? Where is org.apache.struts.action.StrutsActionControllerWrapper? I cannot find it in src of struts 1.1-b3. It appears that StrutsActionControllerWrapper is now called ActionController. If you use a Struts action as Tiles controller CLASS, the struts parameters aren't initialized, so you can't use it. I think you can't pass error via mapping in this way. But, if you use a struts action URL as controller, the action is called throw the struts mechanism, and properly initialized. You can extends the o.a.s.tiles.actions.TilesAction class and overload execute( ComponentContext ...) to get the context. Cedric Thanks - Original Message - From: BaTien Duong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 17, 2003 10:22 AM Subject: Fw: TilesAction and Controller Question: Just check to make sure that the controllerClass (NOT controllerUrl) used in tiles:insert tag can extends TilesAction (and NOT implements Controller)? Using TilesAction as a controller, I can pass the generated error to the input page via standard Struts process: if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput(); } Question: How can I achieve the same thing with Tiles Controller? (assuming that I can have currentURL and RequestURL as Tiles attributes in the request scope). Cedric and/or someone may save me time to navigate from ServletContext passed into the Controller perform(...) method. Thanks - 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: DB Connection pool (how)?
Hello, FYI, I use MSSQL server and opta2000.jar from http://www.inetsoftware.de/English/produkte/JDBC_Overview/default.htm Following are my parameters in struts-config.xml file data-sources data-source set-property property=description value=test sample datasource/ set-property property=autoCommit value=false/ set-property property=driverClass value=com.inet.tds.TdsDriver/ set-property property=maxCount value=4/ set-property property=password value=guest/ set-property property=url value=jdbc:inetdae7:localhost:1433?database=test/ set-property property=user value=guest/ /data-source /data-sources [EMAIL PROTECTED] wrote: Hi, Please excuse my ignorance, but does struts have a libraries that implement a connection pool and if so, how does one configure and use this pool? Are there any examples? Any help will be greatly appreciated! Thanks in advance! __ Post your free ad now! http://personals.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: passing html:select selected value to html:link
I have a following listbox in one of my jsps: html:select property=system size=5 html:options collection=systems property=name labelProperty=name/ /html:select Following this I have two html:links one to edit a system and another one to delete. I would like to pass the selected value from the list as part of the link, for example: a href=editSystem.act?system=.. Does anybody know how to do this, how do I actually access the selected value of the list? You can't really get at the value of the selection on the client side without using JavaScript. Is that an option? Why do those links have to be links? Why not make them radio buttons (edit/delete) and then submit the whole form including the choice from the select list and the choice of edit/delete? Have you looked at LookupDispatchAction? I have one action that handles create/update/delete of a record in a database. -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management
[Q] Iterating over a collections.Bag works, but..?
Hello, hoping for some help on this: The nested:iteration on a Bag seems to work fine, and it iterates ok, but I am having trouble accessing the contents of the Bag (SortedBag or TreeBag etc) from the code, please help :) nested:form action=engtest.do logic:notEmpty name=_engineer property=products_SortedBag nested:iterate property=products_SortedBag indexId=i id=unused %=i% html:text property='%=products_SortedBag[+i+]%' / /nested:iterate /logic:notEmpty nested:submit property=submitValueSubmit Changes/nested:submit /nested:form Returns: java.lang.IllegalArgumentException: Non-indexed property for 'products_SortedBag[0]' And if I try, html:text property='%=products_SortedBag(+i+)%' / it returns: java.lang.IllegalArgumentException: Non-mapped property for 'products_SortedBag(0)' Using nested:text gives the same output as well. So how can I access the contents?? Thanks! Rand Williams Hewlett-Packard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: DB Connection pool (how)?
Thanks!! Wow, struts is an awesome framework! --- James Mitchell [EMAIL PROTECTED] wrote: http://jakarta.apache.org/struts/faqs/database.html -- James Mitchell Software Engineer/Struts Evangelist http://www.open-tools.org/ The man who does not read good books has no advantage over the man who cannot read them. - Mark Twain (1835-1910) -Original Message- From: Swish [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 11:32 AM To: Struts Users Mailing List Subject: DB Connection pool (how)? Hi, Please excuse my ignorance, but does struts have a libraries that implement a connection pool and if so, how does one configure and use this pool? Are there any examples? Any help will be greatly appreciated! Thanks in advance! __ Post your free ad now! http://personals.yahoo.ca - 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] __ Post your free ad now! http://personals.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: TilesAction and Controller
Good to know - thanks! Matt -Original Message- From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 9:23 AM To: Struts Users Mailing List Subject: Re: TilesAction and Controller Hi, If you don't need the struts properties, use a Controller class and controllerClass. If you need the struts preprocessing or the struts properties in your controller, use a TilesAction and controllerUrl. A TilesAction is a regular Struts action which can be called through the servlet mechanism, and so can be catch and preprocessed by Struts. In addition, a TilesAction should be declare in the struts config file, and called throw its URL. Cedric Raible, Matt wrote: For Struts 1.1b3 and the soon to be released Struts 1.1 RC1, do you recommend using TilesAction over the Controller interface (http://tinyurl.com/62px) for tiles-specific controllers? I just wrote about using the Controller interface for a Wrox Chapter last night, and I'd hate to be out of date ;-) Thanks, Matt -Original Message- From: BaTien Duong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 8:25 AM To: Struts Users Mailing List Subject: Re: TilesAction and Controller Thanks Cedric and this great developer community. BaTien - Original Message - From: Cedric Dumoulin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, February 19, 2003 6:25 AM Subject: Re: TilesAction and Controller BaTien Duong wrote: I found the following in tilesAdvancedFeatures: If you use a class name as controller, it should extend one of the following base classes or interfaces: org.apache.struts.action.Action (wrapper org.apache.struts.action.StrutsActionControllerWrapper is used) If you provide a Struts Action subclass, it will be wrapped with the appropriate class, and Struts' perform method will be called, but the mapping and form attributes will be null. Does this means that to pass the error via mapping I must use controlerUrl in tiles:insert tag ? Where is org.apache.struts.action.StrutsActionControllerWrapper? I cannot find it in src of struts 1.1-b3. It appears that StrutsActionControllerWrapper is now called ActionController. If you use a Struts action as Tiles controller CLASS, the struts parameters aren't initialized, so you can't use it. I think you can't pass error via mapping in this way. But, if you use a struts action URL as controller, the action is called throw the struts mechanism, and properly initialized. You can extends the o.a.s.tiles.actions.TilesAction class and overload execute( ComponentContext ...) to get the context. Cedric Thanks - Original Message - From: BaTien Duong [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, February 17, 2003 10:22 AM Subject: Fw: TilesAction and Controller Question: Just check to make sure that the controllerClass (NOT controllerUrl) used in tiles:insert tag can extends TilesAction (and NOT implements Controller)? Using TilesAction as a controller, I can pass the generated error to the input page via standard Struts process: if (!errors.empty()) { saveErrors(request, errors); return (new ActionForward(mapping.getInput(); } Question: How can I achieve the same thing with Tiles Controller? (assuming that I can have currentURL and RequestURL as Tiles attributes in the request scope). Cedric and/or someone may save me time to navigate from ServletContext passed into the Controller perform(...) method. Thanks --- -- 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: return (mapping.getInputForward()); - not working
John, Yes. I prefer to do one validation in ActionClass and if the validation fails, 'am constructing ActionErros. Then, 'am saving it and using the input forward. I even tried using the / as I do for failure forward. But it doesnt seem to work. Thats the reason, why I have to make a failure forward and have an extra line in struts-config.xml to direct the page back to the data entry page. Though it works, I wonder is this the right way to do that? Or, why is input forward doesnt work? Iam happy that atelast I have a work around. But, in one of the screens I have the same problem where I let request processor to take care of the flow by defining my validations in ActionForm's validate method. It didnt seem to work. This is the action mapping for the other screen where requestprocessor fails to make an input forward when my ActionForm's validate method returns an ActionError. actionpath=/changePrm type=com.g1.interactive.webapp.ChangePrmAction name=ChangePrmForm scope=session input=changePrmDocument.jsp // i tried with / too /action Iam sure(by seeing the logs) ChangePrmForm is returning the ActionErrors object. But, the control(which ReqProc. should do) is NOT going back my input page. Instead, it takes me to a blank page. I have html:errors in my input page and also have the right entry in my application resources file. Any advise. Thanks, -Pani. -- On Wed, 19 Feb 2003 10:58:42 John Espey wrote: I prefer the getInput method when doing validation, although under most circumstances the RequestProcessor will do that for you. If you are doing input validation in the action class, then you should probably use the getInput method. If not, you need the input forward to work anyways if validation fails (which it doesn't appear that you are validating for this mapping) when the RequestProcessor does its thing. Did you try doing input=/reportDoc.jsp? I suspect that it should work given that the failure forward uses the / (and you've said it works). -Original Message- From: Pani Ramasami [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 9:55 AM To: Struts Users Mailing List Subject: RE: return (mapping.getInputForward()); - not working John, -- On Tue, 18 Feb 2003 19:56:43 John Espey wrote: Pani, Can you copy your action mapping configuration (if your input is an action can you copy that one too? Here it is: actionpath=/reportGen type=com.g1.interactive.webapp.ReportGenAction name=ReportGenerateForm scope=session input=reportDoc.jsp // i tried removing .jsp too forward name=successpath=/reportResultDoc.jsp/ forward name=failurepath=/reportDoc.jsp/ /action forward failure is something which i added later so that i can avoid using return (mapping.getInputForward()); now, 'am using return (mapping.getActionForward(failure); it seem to work. but, just wondering is the later one is the right way to do? or the first one? Thanks, -Pani. -Original Message- From: Becky Norum [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 7:37 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: return (mapping.getInputForward()); - not working Pani, You have to specify the forward name parameter, if you haven't. For example, if in struts-config.xml your forward is: forward name=success path=/home.jsp / you have to use the following in your Action class: return (mapping.getActionForward(success); Best of luck, Becky -- Becky Norum [EMAIL PROTECTED] On Tue, 2003-02-18 at 19:23, Pani Ramasami wrote: Hi: The below line: return (mapping.getInputForward()); // (in the ActionClass) is not taking me back to the form specified in the input attribute of stuts-config.xml Iam using html:errors/ in my jsp to display the action errors (if any). Any advise wud be greatly appreciated. -Pani. _ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year. http://login.mail.lycos.com/brandPage.shtml?pageId=plusref=lmtplus - 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] _ Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
Who can tell me how to get off this mailing list
I have followed the instructions on the Apache site and I keep getting barraged with notes from this list serve. I have sent notes to [EMAIL PROTECTED] I have tried all variations I can think of but to no avail! My inbox is continually overrun with notes from [EMAIL PROTECTED] I am getting quite frustrated. If any of you know the magic combination of steps to unsubscribe, please help me. Joel Goldberg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [OT] RE: Sell me on tiles
Sorry to all who can't access - I've had a few emails! The site is actually hosted on a high port number that some firewalls/corporate proxies will not connect to. Once in production it will be on good ol' port 80. Also the mods for Opera have not been done yet - so Opera may display a bit strangely but again will be fine in production. IE and Moz are fine if you can connect! H. -Original Message- From: Chappell, Simon P [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 16:22 To: Struts Users Mailing List Subject: RE: [OT] RE: Sell me on tiles I can't get the site to display at all, and i've tried both IE and Mozilla. -Original Message- From: Hue Holleran [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 10:20 AM To: 'Struts Users Mailing List' Subject: [OT] RE: Sell me on tiles Choice of colours was the customer's - they picked colours they felt would be eye-catching (damaging) (!) You should all feel great as struts developers - although this will not be surprising to the initiated - to know you've completely usurped Microsoft ASP and the shiny new Microsoft ASP.NET as the chosen development framework. Not a decision that was taken lightly - functioning versions were built in both ASP and ASP.NET (and in vanilla JSP and initially PHP). Decision was based on struts reducing the development time AND maintenance overhead this would entail in the future. Struts was a CLEAR winner. Once this site is in full production use in a few weeks time there will also be a section added on the website about the technology used and acknowledging the use of the struts framework. A separate section will also be referenced on the development website giving the technical justification for why struts was chosen as the framework. H. -Original Message- From: James Childers [mailto:[EMAIL PROTECTED]] Sent: 19 February 2003 15:41 To: Struts Users Mailing List Subject: RE: Sell me on tiles I appreciate you've had lots of replies already - but tiles was the killer feature for us in selecting struts. Please don't misunderstand that struts isn't great anyway - we love it - but the addition of tiles has made developing complex websites a breeze. There is a very outdated first-cut of one of our production sites at: http://www.mortgagesurgery.com/ ... the full production version will be released very soon. Aiii! My eyes! Seriously, good job. We're glad that Struts could be helpful. Amazing what a well designed framework will do for your enthusiasm in getting the job done. My personal view is (and I'm sure someone will disagree!) - with tiles available and so well-integrated into struts - you'd be really missing-out by not using it - even for the simplest of sites. I sure don't disagree. I'm doing a site for my wife -- a college prof -- in my spare time. It's a very simple site, maybe 10 - 12 pages total, but I'm using tiles for it because it makes life so much easier. Without it I would have an amalgamation of includes, and life would generally be much more difficult. Tiles or death! -= J - 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]
handling form errors in Actions, returning to form, prepopulating them without re-POSTING
Hello, We are starting to use Struts and are wondering how Struts users handle scenarios such as this one: 1. /ShowForm action gets called, mapped to ShowFormAction. ShowFormAction pulls a list of countries from the DB (for ex.), stick that list in the HTTP request, and 'forwards' to 'ok', which is a JSP with a form that consists of blank form fields and a pull-down with countries that it gets from the HTTP req. 2. A user fills the form, but forgets a required field before he submits the form by POSTing to /SubmitForm action. 3. /SubmitForm is mapped to SubmitFormAction which detects a missing required field. Is puts error messages in an instance of ActionErrors. It now needs to forward to something other than 'ok'. What we want to happen at this point is: A. Get the user back the input form B. Display the error message C. Make sure that all possible fields are pre-populated with data that the user already entered D. The pull-down in the form has that same list of countries E. The user is not prompted with 'Do you want to re-POST' dialog How can this be done? In our Struts config we have: !-- gets a list of countries from DB, puts them in Request, forwards to 'ok' -- action path= /ShowForm type= net.wgen.ampng.action.ShowFormAction scope= request forward name= ok path=/WEB-INF/v/form-ok.jsp/ forward name= failure path=/WEB-INF/v/form-not.jsp/ /action !-- gets form data and processes it -- action path= /SubmitForm type= net.wgen.ampng.action.SubmitFormAction scope= request validate= true name= myForm input= /WEB-INF/v/form.jsp forward name= ok path=/WEB-INF/v/ok.jsp/ forward name= failure path=/WEB-INF/v/form.jsp/ /action What is the best way to handle this and achieve A, B, C, D, and E that I mentioned above? If SubmitFormAction encounters an error (e.g. a missing required field), what should it forward to? The original JSP in 'input' attribute? The JSP mapped to 'failure' (the same JSP with the original form)? Should it forward/chain to another Action that redirects back to the original form? (but that would lose the form data + error messages in the Request, wouldn't it?) Something else? Does the JSP with the form need to contain the logic for pulling errors + form data from the request, if it exists? This seems like a situation that would be very common and I feel that Struts has some elegant way for handling this. Thank you, Otis Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] RE: Who can tell me how to get off this mailing list
reread the bottom of this message . . . have you tried [EMAIL PROTECTED]? -- Voytek Jarnot Quidquid latine dictum sit, altum viditur. -Original Message- From: Goldberg, Joel S [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 11:34 AM To: [EMAIL PROTECTED] Subject: Who can tell me how to get off this mailing list I have followed the instructions on the Apache site and I keep getting barraged with notes from this list serve. I have sent notes to [EMAIL PROTECTED] I have tried all variations I can think of but to no avail! My inbox is continually overrun with notes from [EMAIL PROTECTED] I am getting quite frustrated. If any of you know the magic combination of steps to unsubscribe, please help me. Joel Goldberg - 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: Who can tell me how to get off this mailing list
Read the footer a little more carefully: To unsubscribe, e-mail: [EMAIL PROTECTED] not [EMAIL PROTECTED] -Original Message- From: Goldberg, Joel S [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 19, 2003 12:34 PM To: [EMAIL PROTECTED] Subject: Who can tell me how to get off this mailing list I have followed the instructions on the Apache site and I keep getting barraged with notes from this list serve. I have sent notes to [EMAIL PROTECTED] I have tried all variations I can think of but to no avail! My inbox is continually overrun with notes from [EMAIL PROTECTED] I am getting quite frustrated. If any of you know the magic combination of steps to unsubscribe, please help me. Joel Goldberg - 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]