Re: OT Re: Struts 2 ABC book
On 9/7/07, Rick Reumann [EMAIL PROTECTED] wrote: On 9/7/07, Antonio Petrelli [EMAIL PROTECTED] wrote: 2007/9/7, Rick Reumann [EMAIL PROTECTED]: The issue is that SiteMesh, to act using the decorator pattern, decides to pull out the entire page contents and store it in a StringBuffer. Really? I am using Sitemesh (without Struts 2), is there a JIRA issue about it? I could have sworn I entered one over a year ago, but I don't see it out there. Actually I might have first asked about it on in SiteMesh forum just to first find out if it really was an issue and possibly did not get a response so I just left it. I did find the old post http://forums.opensymphony.com/thread.jspa?messageID=67125#67125
Re: OT Re: Struts 2 ABC book
2007/9/7, Rick Reumann [EMAIL PROTECTED]: On 9/7/07, Rick Reumann [EMAIL PROTECTED] wrote: On 9/7/07, Antonio Petrelli [EMAIL PROTECTED] wrote: 2007/9/7, Rick Reumann [EMAIL PROTECTED]: The issue is that SiteMesh, to act using the decorator pattern, decides to pull out the entire page contents and store it in a StringBuffer. Really? I am using Sitemesh (without Struts 2), is there a JIRA issue about it? I could have sworn I entered one over a year ago, but I don't see it out there. Actually I might have first asked about it on in SiteMesh forum just to first find out if it really was an issue and possibly did not get a response so I just left it. I did find the old post http://forums.opensymphony.com/thread.jspa?messageID=67125#67125 Thanks Rick! It is very interesting. Antonio
Re: OT Re: Struts 2 ABC book
On 9/7/07, Antonio Petrelli [EMAIL PROTECTED] wrote: 2007/9/7, Rick Reumann [EMAIL PROTECTED]: The issue is that SiteMesh, to act using the decorator pattern, decides to pull out the entire page contents and store it in a StringBuffer. Really? I am using Sitemesh (without Struts 2), is there a JIRA issue about it? I could have sworn I entered one over a year ago, but I don't see it out there. Actually I might have first asked about it on in SiteMesh forum just to first find out if it really was an issue and possibly did not get a response so I just left it. (I ended up going to tiles because of the issue.) Assuming the code base hasn't changed in over a year or so, you can duplicate the issue yourself... just take a page that you have being decorated by sitemesh and create a for loop and generate a ton of html table rows (often times tags often generate a ton of white space also which site mesh still has to buffer in its StringBuffer). -- Rick
Setting a value on a jsp
I have an html:form in my jsp...it contains radio buttons for a property on that form called settings. I want to be able to set the settings property on my form in the jsp so that the radio button will be checked...basically i want to pass in a form value but I can't do it in my action. I have to do it in the jsp. Thanks. Jennie This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this.
Re: OT Re: Struts 2 ABC book
2007/9/7, Rick Reumann [EMAIL PROTECTED]: The issue is that SiteMesh, to act using the decorator pattern, decides to pull out the entire page contents and store it in a StringBuffer. Really? I am using Sitemesh (without Struts 2), is there a JIRA issue about it? Antonio
OT Re: Struts 2 ABC book
Thanks Ted for this link. Just getting into Struts again after a long hiatus so I'm sure your starting book will really help. Quick sort of OT question for anyone. Reading the first chapter of Ted's Starting Struts 2 book it mentions SiteMesh integration.. I'm curious if people are still working with this and is active development still going on with it? I let the development team know of a serious issue with Site Mesh a long time ago but the community seemed pretty dead... The issue is that SiteMesh, to act using the decorator pattern, decides to pull out the entire page contents and store it in a StringBuffer. This can cause serious memory issues. I stumbled upon this when I actually was trying to use Site Mesh and had a large page to display that caused out of memory errors running Tomcat locally (since the amount of content that was trying to get stored in StringBuffer was too large for the amount of memory). Even if the pages aren't large, the way it decorates by using internal storage of the entire page content in a StringBuffer seems to be a big drawback to me. On 9/7/07, Ted Husted [EMAIL PROTECTED] wrote: See * http://struts.apache.org/index.html#Newbies The first full-length S2 books are due out in October and November. * http://www.jroller.com/TedHusted/entry/first_s2_books -Ted. On 9/7/07, Mirbek Nosinov [EMAIL PROTECTED] wrote: Can anybody recommend good Struts 2 ABC book? Thanks in advanced - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Rick
Re: hiding .action in url in struts 2
thanks. it works i tried just struts.action.extension= and it works 2007/9/7, Guillaume Carré [EMAIL PROTECTED]: 2007/9/7, Mirbek Nosinov [EMAIL PROTECTED]: How to hide .action extension in url for my actions for example if i have url for my action like http://localhost:8080/cms2/StartPage.action but i need like http://localhost:8080/cms2/StartPage you can modify the extension in struts.properties: struts.action.extension=do I don't think you can leave it blank, give it a try what you could do is using mod_rewrite if you use Apache as a frontend, or use the UrlRewriteFilter (http://tuckey.org/urlrewrite/) in your app. -- Guillaume Carré - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts-dojo-tags with Struts 2.0.9
If you compile the dojo plugin and drop it into the lib folder, it should work. musachy On 9/7/07, Genadii Ganebnyi [EMAIL PROTECTED] wrote: Is there any posibility to use struts-dojo-tags with Struts 2.0.9 or the only variant is to wait till 2.1 is released? -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
hiding .action in url in struts 2
How to hide .action extension in url for my actions for example if i have url for my action like http://localhost:8080/cms2/StartPage.action but i need like http://localhost:8080/cms2/StartPage How can i do it? Thanks in advanced
Re: dynamic forwarding from Action class to any url
Yes it is correct for Struts 1, but i use Struts 2 2007/9/7, Gundersen, Richard [EMAIL PROTECTED]: I do it this way (create a new ActionForward with the url you want in the Action method you are executing, and just return that instead of doing mapping.findForward... ActionForward forward = new ActionForward(url); return forward; Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -Original Message- From: Mirbek Nosinov [mailto:[EMAIL PROTECTED] Sent: Friday, September 07, 2007 1:06 PM To: user@struts.apache.org Subject: dynamic forwarding from Action class to any url Is it possible to dynamicaly forward to any page from Action class execute() function. For example i get next request: /MyAction.action?newPage=AnotherAction.action or /MyAction.action?newPage=/pages/myJsp.jsp or /MyAction.action?newPage=www.com and this newPage parameter can be any url (suppose we get it from user). And i want to forward or redirect to thin newPage url from my Action class execute() function. How can i do this. Thanks in advanced __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ *** Disclaimer *** This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. If you are not the intended addressee, you are prohibited from any disclosure, distribution or further copying or use of this communication or the information in it or taking any action in reliance on it. If you have received this communication in error please notify the Information Security Manager at [EMAIL PROTECTED] as soon as possible and delete the message from all places in your computer where it is stored. We utilise virus scanning software but we cannot guarantee the security of electronic communications and you are advised to check any attachments for viruses. We do not accept liability for any loss resulting from any corruption or alteration of data or importation of any virus as a result of receiving this electronic communication. Replies to this E-mail may be monitored for operational or business reasons. London Scottish Bank PLC is regulated by the Financial Services Authority. __ This email has been scanned by the MessageLabs Email Security System. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: dynamic forwarding from Action class to any url
I do it this way (create a new ActionForward with the url you want in the Action method you are executing, and just return that instead of doing mapping.findForward... ActionForward forward = new ActionForward(url); return forward; Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -Original Message- From: Mirbek Nosinov [mailto:[EMAIL PROTECTED] Sent: Friday, September 07, 2007 1:06 PM To: user@struts.apache.org Subject: dynamic forwarding from Action class to any url Is it possible to dynamicaly forward to any page from Action class execute() function. For example i get next request: /MyAction.action?newPage=AnotherAction.action or /MyAction.action?newPage=/pages/myJsp.jsp or /MyAction.action?newPage=www.com and this newPage parameter can be any url (suppose we get it from user). And i want to forward or redirect to thin newPage url from my Action class execute() function. How can i do this. Thanks in advanced __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ *** Disclaimer *** This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. If you are not the intended addressee, you are prohibited from any disclosure, distribution or further copying or use of this communication or the information in it or taking any action in reliance on it. If you have received this communication in error please notify the Information Security Manager at [EMAIL PROTECTED] as soon as possible and delete the message from all places in your computer where it is stored. We utilise virus scanning software but we cannot guarantee the security of electronic communications and you are advised to check any attachments for viruses. We do not accept liability for any loss resulting from any corruption or alteration of data or importation of any virus as a result of receiving this electronic communication. Replies to this E-mail may be monitored for operational or business reasons. London Scottish Bank PLC is regulated by the Financial Services Authority. __ This email has been scanned by the MessageLabs Email Security System. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
dynamic forwarding from Action class to any url
Is it possible to dynamicaly forward to any page from Action class execute() function. For example i get next request: /MyAction.action?newPage=AnotherAction.action or /MyAction.action?newPage=/pages/myJsp.jsp or /MyAction.action?newPage=www.com and this newPage parameter can be any url (suppose we get it from user). And i want to forward or redirect to thin newPage url from my Action class execute() function. How can i do this. Thanks in advanced
Requiredif validator
Hi all! I´m trying to validate two fields that depends on another field. What I was doing in S1 is (for field in): field property=in depends=requiredif msg name=validwhen key=ErrorMessages.applicationIdRepresent.sameReference/ arg position=0 key=ProcessorHTTPDetails.in/ msg name=mask key=ProcessorHTTPDetails.in.help/ var var-namefield[0]/var-name var-valueeditParams/var-value /var var var-namefieldTest[0]/var-name var-valueNOTNULL/var-value /var /field But now in S2, there is no requiredif validator :( Any idea about how can I do to get the same validation effect? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 ABC book
See * http://struts.apache.org/index.html#Newbies The first full-length S2 books are due out in October and November. * http://www.jroller.com/TedHusted/entry/first_s2_books -Ted. On 9/7/07, Mirbek Nosinov [EMAIL PROTECTED] wrote: Can anybody recommend good Struts 2 ABC book? Thanks in advanced - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2 ABC book
Can anybody recommend good Struts 2 ABC book? Thanks in advanced
Re: hiding .action in url in struts 2
2007/9/7, Mirbek Nosinov [EMAIL PROTECTED]: How to hide .action extension in url for my actions for example if i have url for my action like http://localhost:8080/cms2/StartPage.action but i need like http://localhost:8080/cms2/StartPage you can modify the extension in struts.properties: struts.action.extension=do I don't think you can leave it blank, give it a try what you could do is using mod_rewrite if you use Apache as a frontend, or use the UrlRewriteFilter (http://tuckey.org/urlrewrite/) in your app. -- Guillaume Carré - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Requiredif validator
Hi Pablo Try using validwhen instead - I think rewquiredif was deprecated. I changed all mine and you can achive the same thing although your logic might have to be turned around a bit. Here's an example: form name=completionForm extends=commonBankForm field property=registeredTitle depends=required arg key=completion.registered.title/ /field field property=titleNo depends=validwhen arg key=completion.title.no/ var var-nametest/var-name var-value( (registeredTitle == 'false') or ((registeredTitle == 'true') and (*this* != null)) )/var-value /var /field Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -Original Message- From: Pablo Vázquez Blázquez [mailto:[EMAIL PROTECTED] Sent: Friday, September 07, 2007 12:30 PM To: user@struts.apache.org Subject: Requiredif validator Hi all! I´m trying to validate two fields that depends on another field. What I was doing in S1 is (for field in): field property=in depends=requiredif msg name=validwhen key=ErrorMessages.applicationIdRepresent.sameReference/ arg position=0 key=ProcessorHTTPDetails.in/ msg name=mask key=ProcessorHTTPDetails.in.help/ var var-namefield[0]/var-name var-valueeditParams/var-value /var var var-namefieldTest[0]/var-name var-valueNOTNULL/var-value /var /field But now in S2, there is no requiredif validator :( Any idea about how can I do to get the same validation effect? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ *** Disclaimer *** This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. If you are not the intended addressee, you are prohibited from any disclosure, distribution or further copying or use of this communication or the information in it or taking any action in reliance on it. If you have received this communication in error please notify the Information Security Manager at [EMAIL PROTECTED] as soon as possible and delete the message from all places in your computer where it is stored. We utilise virus scanning software but we cannot guarantee the security of electronic communications and you are advised to check any attachments for viruses. We do not accept liability for any loss resulting from any corruption or alteration of data or importation of any virus as a result of receiving this electronic communication. Replies to this E-mail may be monitored for operational or business reasons. London Scottish Bank PLC is regulated by the Financial Services Authority. __ This email has been scanned by the MessageLabs Email Security System. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts2 is moving mainly to jsp ?
I don't understand the use case you are describing, but there has been no development discussions or decisions regarding reducing support for FreeMarker and Velocity. There are several FreeMarker and Velocity examples in the ShowCase, and resources like the CodeBehind Plugin, fully support FTL and VM alongside of JSP. Of course, to use FTL or VM, we still need to use the appropriate result types, but I believe the same is true of WebWork. -Ted. On 9/6/07, Leonidas Papadakis [EMAIL PROTECTED] wrote: Hi there, i used to have the following scenario in webwork . A file header.shtml and footer.shtml . The shtml was set as the default velocity extension. I used to be able to add the velocity servlet to web.xml (can not do now ...) so the file was parsed as velocity. Now : 1) direct access to velocity or freemarker files does not parse the files but displays them as text 2) can not have a jsp:include page=header.shtml / on my jsp result file. The header file is not parsed and i am getting wrong output. So i guess that i have to change everything to jsp, since even if i have a freemarker file jsp:include page=header.ftl / this will not be parsed I think there should be a way , so that i will not lose the freedom of webwork ... I appreciate your replies. Best Regards Leonidas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
pass parameters to action
Hello I have a link html:link page=/myAction.do paramId=map paramName=mapName/html:link and when a user clicks on it, it calls action myAction and passes parameters using HashMap. Those parameters are visible in the URL. Is there any way to pass parameters to the action other than through URL? Thank you
Re: Requiredif validator
Hi Richard, Looking at http://struts.apache.org/2.x/docs/validation.html I don´t see there was validwhen validator... Besides that, the example you gave me is for Struts 1, isn´t it? I need an Strut2 one. Thanks. Gundersen, Richard escribió: Hi Pablo Try using validwhen instead - I think rewquiredif was deprecated. I changed all mine and you can achive the same thing although your logic might have to be turned around a bit. Here's an example: form name=completionForm extends=commonBankForm field property=registeredTitle depends=required arg key=completion.registered.title/ /field field property=titleNo depends=validwhen arg key=completion.title.no/ var var-nametest/var-name var-value( (registeredTitle == 'false') or ((registeredTitle == 'true') and (*this* != null)) )/var-value /var /field Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -Original Message- From: Pablo Vázquez Blázquez [mailto:[EMAIL PROTECTED] Sent: Friday, September 07, 2007 12:30 PM To: user@struts.apache.org Subject: Requiredif validator Hi all! I´m trying to validate two fields that depends on another field. What I was doing in S1 is (for field in): field property=in depends=requiredif msg name=validwhen key=ErrorMessages.applicationIdRepresent.sameReference/ arg position=0 key=ProcessorHTTPDetails.in/ msg name=mask key=ProcessorHTTPDetails.in.help/ var var-namefield[0]/var-name var-valueeditParams/var-value /var var var-namefieldTest[0]/var-name var-valueNOTNULL/var-value /var /field But now in S2, there is no requiredif validator :( Any idea about how can I do to get the same validation effect? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ *** Disclaimer *** This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. If you are not the intended addressee, you are prohibited from any disclosure, distribution or further copying or use of this communication or the information in it or taking any action in reliance on it. If you have received this communication in error please notify the Information Security Manager at [EMAIL PROTECTED] as soon as possible and delete the message from all places in your computer where it is stored. We utilise virus scanning software but we cannot guarantee the security of electronic communications and you are advised to check any attachments for viruses. We do not accept liability for any loss resulting from any corruption or alteration of data or importation of any virus as a result of receiving this electronic communication. Replies to this E-mail may be monitored for operational or business reasons. London Scottish Bank PLC is regulated by the Financial Services Authority. __ This email has been scanned by the MessageLabs Email Security System. - 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: [S1] Using validWhen with floating point values
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Newton wrote: Custom validator :( I'll just implement it in my action. This is too custom to actually be re-usable. and smack whoever wanted decimal months on the back of the hand with a ruler. Yeah, really. Unfortunately, we're dealing with logic that needs to be applied to people that are very young, and so fractional months aren't really all that outrageous. It's either that or years + months + days, or just fractional years and let 'em use a calculator so find out what 7 months is in fractional years ;) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4YHd9CaO5/Lv0PARAqnhAJ9RmySnARNaR4EGvm4GF/OCPgmK6ACfd4ro IK9WgAGSe37snpjB3emhP+U= =dX8n -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamic forwarding from Action class to any url
This might work: result type=redirect${newPage}/result You might consider some sort of white list of internal resources that can be accessed to prevent misuse. Nils-H On 9/7/07, Mirbek Nosinov [EMAIL PROTECTED] wrote: Is it possible to dynamicaly forward to any page from Action class execute() function. For example i get next request: /MyAction.action?newPage=AnotherAction.action or /MyAction.action?newPage=/pages/myJsp.jsp or /MyAction.action?newPage=www.com and this newPage parameter can be any url (suppose we get it from user). And i want to forward or redirect to thin newPage url from my Action class execute() function. How can i do this. Thanks in advanced - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S1] Using validWhen with floating point values
Struts 1.4-SNAPSHOT has enhanced validwhen support for decimal point numbers. I haven't had anyone besides me test it, but you can be the first if you want to! I'd like to know if it works for you! On 9/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Newton wrote: Custom validator :( I'll just implement it in my action. This is too custom to actually be re-usable. and smack whoever wanted decimal months on the back of the hand with a ruler. Yeah, really. Unfortunately, we're dealing with logic that needs to be applied to people that are very young, and so fractional months aren't really all that outrageous. It's either that or years + months + days, or just fractional years and let 'em use a calculator so find out what 7 months is in fractional years ;) -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4YHd9CaO5/Lv0PARAqnhAJ9RmySnARNaR4EGvm4GF/OCPgmK6ACfd4ro IK9WgAGSe37snpjB3emhP+U= =dX8n -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pass parameters to action
I have a link html:link page=/myAction.do paramId=map paramName=mapName/html:link and when a user clicks on it, it calls action myAction and passes parameters using HashMap. Those parameters are visible in the URL. Is there any way to pass parameters to the action other than through URL? No, and it's not Strut's fault. If you want to hide the parameters, you need to use a form with method=post (Strut's default value for method). Using a Struts link tag yields an HTML a... tag, which always generates a GET request. And with a GET, all parameters are part of the URL and appear in the browser's address line. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
If you are using Struts2, I believe you can take advantage of the ParametersInterceptor for that. With that interceptor in place, you can access your parameters in the action by simply implementing getters and setters on the action. Read about it here http://www.infoq.com/articles/migrating-struts-2-part2 http://www.infoq.com/articles/migrating-struts-2-part2 or search the forums/google. Anna Simbirtsev wrote: Hello I have a link html:link page=/myAction.do paramId=map paramName=mapName/html:link and when a user clicks on it, it calls action myAction and passes parameters using HashMap. Those parameters are visible in the URL. Is there any way to pass parameters to the action other than through URL? Thank you -- View this message in context: http://www.nabble.com/pass-parameters-to-action-tf4402086.html#a12558801 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
On 9/7/07, Anna Simbirtsev [EMAIL PROTECTED] wrote: Hello I have a link html:link page=/myAction.do paramId=map paramName=mapName/html:link and when a user clicks on it, it calls action myAction and passes parameters using HashMap. Those parameters are visible in the URL. Is there any way to pass parameters to the action other than through URL? If you wanted you could populate a form on the page, possibly with just hidden values and then have your link submit that form. -- Rick
Re: [S1] Using validWhen with floating point values
Custom validator, and smack whoever wanted decimal months on the back of the hand with a ruler. --- Christopher Schultz [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, This is probably a question for the commons-validator list, but, hey, I'm already a member of this list and I'm sure someone knows the answer. I have a form that contains 4 fields: year and month for both min and max age. (So, I have min years, min months, max years, max months). I have a validWhen comparison that checks to see that the combination of years and months is actually smaller than the combination entered for max years and months (basically, to prevent you from entering 1y1m as the min and 0y1m as the max). Here is the test for minAgeYears (the other fields need no tests; this one covers them all) ( (*this* lt; maxAgeYears) or ( (*this* == maxAgeYears) and (minAgeMonths lt; maxAgeMonths) ) ) It works beautifully when the data entered are integers. I have recently been asked to allow decimals in the months fields, and it appears that validWhen gets confused when the data are (intended to be) decimals. The documentation for the validWhen validator (http://struts.apache.org/1.3.8/faqs/validator.html) says If both items to be compared are convertable to ints, a numeric comparison is done, otherwise a string comparison is done. I'm guessing I'm just out of luck using validWhen for this type of check. Any ideas? Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4WtF9CaO5/Lv0PARAlXJAJ4hPbSy8N65g/Pta9D0e6wJ/D3TlACeNLmv R9z1nkCsxY+fsDPdgW32uP0= =qyWc -END PGP SIGNATURE- - 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]
[S1] Using validWhen with floating point values
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All, This is probably a question for the commons-validator list, but, hey, I'm already a member of this list and I'm sure someone knows the answer. I have a form that contains 4 fields: year and month for both min and max age. (So, I have min years, min months, max years, max months). I have a validWhen comparison that checks to see that the combination of years and months is actually smaller than the combination entered for max years and months (basically, to prevent you from entering 1y1m as the min and 0y1m as the max). Here is the test for minAgeYears (the other fields need no tests; this one covers them all) ( (*this* lt; maxAgeYears) or ( (*this* == maxAgeYears) and (minAgeMonths lt; maxAgeMonths) ) ) It works beautifully when the data entered are integers. I have recently been asked to allow decimals in the months fields, and it appears that validWhen gets confused when the data are (intended to be) decimals. The documentation for the validWhen validator (http://struts.apache.org/1.3.8/faqs/validator.html) says If both items to be compared are convertable to ints, a numeric comparison is done, otherwise a string comparison is done. I'm guessing I'm just out of luck using validWhen for this type of check. Any ideas? Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4WtF9CaO5/Lv0PARAlXJAJ4hPbSy8N65g/Pta9D0e6wJ/D3TlACeNLmv R9z1nkCsxY+fsDPdgW32uP0= =qyWc -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: how do i get the ActionClass's Vector to my JSP page for display
You shouldn't need to do the request.getParameter bit anymore...the form will be available in your jsp by just referencing the exact form name (defined in your action mapping...the 'name' attribute). Is this where you are getting a class cast exception? (VectorString) xParser.xmlLableGen (Comm_vect); -Original Message- From: msg2ajay [mailto:[EMAIL PROTECTED] Sent: 07 September 2007 11:08 To: user@struts.apache.org Subject: RE: how do i get the ActionClass's Vector to my JSP page for display very much thankQ for reply, i am able to get values to my ActionClass but while retreiving it is showing inconvertable types error . Actually i have used type casting. But it is showing the error. Is there some thing to change my approch in converting Vector while getParameter(); thx Jennie Moeller wrote: Hi, Since you've put it on your form you can pull it off your form. So in your jsp you can do something like: This will look through all your items in the vector...its like a for loop (assuming you are using jstl tags) c:foreach var=I items=${form.lable_temp} Or in your case perhaps you just want to toString it in which case: c:out value=${form.lable_temp}/ (why not use a ListString instead? Less overhead) and also underscores in variable names are not java standard (although perhaps those are the standards at your company so ignore me!). If you aren't using jstl you could use bean:write or various other methods to write out the variables Jennie -Original Message- From: msg2ajay [mailto:[EMAIL PROTECTED] Sent: 07 September 2007 03:50 To: user@struts.apache.org Subject: how do i get the ActionClass's Vector to my JSP page for display hi, I am trying to get a ActionClass's vector object my forntEnd(jsp). I have tried to set to my form bean and get the values to my jsp. But it is showing error as . [code] [javac] /usr/java/SUNWappserver/domains/domain2/generated/jsp/j2ee-modules/ILI CT reasury/org/apache/jsp/banker_002dweb/jsp/XS/X32Iframe_jsp.java:212: incompatible types [javac] found : java.lang.String [javac] required: java.util.Vector [javac] labels_demo = request.getParameter(Lable_temp); ^ my actionClass is: (HERE MY VECTOR WILL BE POPULATED WITH SOME STRING VALUES) -- VectorString lableGenVect = new VectorString(); lableGenVect = (VectorString) xParser.xmlLableGen (Comm_vect); // i am using jdk1.5 form.setLable_temp (lableGenVect); my FormBean is: public VectorString getLable_temp(){ return lable_temp; } public void setLable_temp(VectorString lables){ this.lable_temp = lables; } my jsp page is: --- VectorString lables_demo = new VectorString(); lables_demo = request.getParameter(lable_temp); out.println(LABELS :+lables_demo); [/code] Is the approach is wrong or is there any other way to access Vector values to my jsp. thx in adv. Ajay. -- View this message in context: http://www.nabble.com/how-do-i-get-the-ActionClass%27s-Vector-to-my-JS P- page-for-display-tf4395762.html#a12535038 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/how-do-i-get-the-ActionClass%27s-Vector-to-my-JSP- page-for-display-tf4395762.html#a12552544 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this.
Shared list as component
Hi to all. I have a task to create several shared lists in app based on Struts2 as a reusing components. There are a lot of ways how to do this. But I wondering anyone gives me advice. Thanks in advance. Andrei Sauchanka, Software Engineer EPAM Systems Gomel office, Belarus (GMT+2) Office fax: +375 (23) 553-200 Mobile: +375 (29) 236-66-04, 124-42-68 E-mail: [EMAIL PROTECTED] WWW: http://www.epam.com http://www.epam.com/ CONFIDENTIALITY CAUTION AND DISCLAIMER This message is intended only for the use of the individual(s) or entity(ies) to which it is addressed and contains information that is legally privileged and confidential. If you are not the intended recipient, or the person responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. All unintended recipients are obliged to delete this message and destroy any printed copies.
RE: how do i get the ActionClass's Vector to my JSP page for display
very much thankQ for reply, i am able to get values to my ActionClass but while retreiving it is showing inconvertable types error . Actually i have used type casting. But it is showing the error. Is there some thing to change my approch in converting Vector while getParameter(); thx Jennie Moeller wrote: Hi, Since you've put it on your form you can pull it off your form. So in your jsp you can do something like: This will look through all your items in the vector...its like a for loop (assuming you are using jstl tags) c:foreach var=I items=${form.lable_temp} Or in your case perhaps you just want to toString it in which case: c:out value=${form.lable_temp}/ (why not use a ListString instead? Less overhead) and also underscores in variable names are not java standard (although perhaps those are the standards at your company so ignore me!). If you aren't using jstl you could use bean:write or various other methods to write out the variables Jennie -Original Message- From: msg2ajay [mailto:[EMAIL PROTECTED] Sent: 07 September 2007 03:50 To: user@struts.apache.org Subject: how do i get the ActionClass's Vector to my JSP page for display hi, I am trying to get a ActionClass's vector object my forntEnd(jsp). I have tried to set to my form bean and get the values to my jsp. But it is showing error as . [code] [javac] /usr/java/SUNWappserver/domains/domain2/generated/jsp/j2ee-modules/ILICT reasury/org/apache/jsp/banker_002dweb/jsp/XS/X32Iframe_jsp.java:212: incompatible types [javac] found : java.lang.String [javac] required: java.util.Vector [javac] labels_demo = request.getParameter(Lable_temp); ^ my actionClass is: (HERE MY VECTOR WILL BE POPULATED WITH SOME STRING VALUES) -- VectorString lableGenVect = new VectorString(); lableGenVect = (VectorString) xParser.xmlLableGen (Comm_vect); // i am using jdk1.5 form.setLable_temp (lableGenVect); my FormBean is: public VectorString getLable_temp(){ return lable_temp; } public void setLable_temp(VectorString lables){ this.lable_temp = lables; } my jsp page is: --- VectorString lables_demo = new VectorString(); lables_demo = request.getParameter(lable_temp); out.println(LABELS :+lables_demo); [/code] Is the approach is wrong or is there any other way to access Vector values to my jsp. thx in adv. Ajay. -- View this message in context: http://www.nabble.com/how-do-i-get-the-ActionClass%27s-Vector-to-my-JSP- page-for-display-tf4395762.html#a12535038 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/how-do-i-get-the-ActionClass%27s-Vector-to-my-JSP-page-for-display-tf4395762.html#a12552544 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 - incompatibility between JSTL xml taglibs and Struts 2 ?????
The Struts 2 tags can only go on pages where the request has passed through a Struts 2 filter. That error indicates the Dispatcher instance isn't on the correct ThreadLocal variable, and it should have been placed there by the Struts ServletFilter. Don On 9/7/07, Riccardo Mollame [EMAIL PROTECTED] wrote: Yes, struts taglibs are the problem. But if I make the opposite, i.e. excluding the x:tags, the code works as well, so I assume that Struts stuff is properly configured... I don't know what to think... Ric --- MK Tan [EMAIL PROTECTED] ha scritto: look like struts taglibs cause the NPE. unknown property name? On 9/7/07, Riccardo Mollame [EMAIL PROTECTED] wrote: Could any one explain why this piece of code works fine: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core% %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml% %@ taglib prefix=s uri=/struts-tags% c:import url=/WEB-INF/classes/PageList.xml var=pagelist scope=application / x:parse var=document doc=${pagelist}/ html head /head body br h1x:out select=$document/pages/[EMAIL PROTECTED]'P001']/title//h1 /body /html while this one: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core% %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml% %@ taglib prefix=s uri=/struts-tags% c:import url=/WEB-INF/classes/PageList.xml var=pagelist scope=application / x:parse var=document doc=${pagelist}/ html head /head body br center !-- BEGIN of new code -- s:form action=userauth s:textfield label=User Name key=username/ s:password label=Password key=password/ s:submit/ /s:form !-- END of new code -- /center /body /html gives the following error: -web-main: Servlet error java.lang.NullPointerException at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58) at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack( StrutsBodyTagSupport.java:52) at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag( ComponentTagSupport.java:49) at _jsps._Login._jspService(_Login.java:103) at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:724) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java :65) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter( FilterDispatcher.java:413) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher .java:623) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher .java:370) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler .java:871) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler .java:453) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler .java:221) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run( ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket( ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700( ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run( ServerSocketAcceptHandler.java:880) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor .java:303) at java.lang.Thread.run(Thread.java:595) I'm stuck. It has no
RE: how do i get the ActionClass's Vector to my JSP page for display
Hi, Since you've put it on your form you can pull it off your form. So in your jsp you can do something like: This will look through all your items in the vector...its like a for loop (assuming you are using jstl tags) c:foreach var=I items=${form.lable_temp} Or in your case perhaps you just want to toString it in which case: c:out value=${form.lable_temp}/ (why not use a ListString instead? Less overhead) and also underscores in variable names are not java standard (although perhaps those are the standards at your company so ignore me!). If you aren't using jstl you could use bean:write or various other methods to write out the variables Jennie -Original Message- From: msg2ajay [mailto:[EMAIL PROTECTED] Sent: 07 September 2007 03:50 To: user@struts.apache.org Subject: how do i get the ActionClass's Vector to my JSP page for display hi, I am trying to get a ActionClass's vector object my forntEnd(jsp). I have tried to set to my form bean and get the values to my jsp. But it is showing error as . [code] [javac] /usr/java/SUNWappserver/domains/domain2/generated/jsp/j2ee-modules/ILICT reasury/org/apache/jsp/banker_002dweb/jsp/XS/X32Iframe_jsp.java:212: incompatible types [javac] found : java.lang.String [javac] required: java.util.Vector [javac] labels_demo = request.getParameter(Lable_temp); ^ my actionClass is: (HERE MY VECTOR WILL BE POPULATED WITH SOME STRING VALUES) -- VectorString lableGenVect = new VectorString(); lableGenVect = (VectorString) xParser.xmlLableGen (Comm_vect); // i am using jdk1.5 form.setLable_temp (lableGenVect); my FormBean is: public VectorString getLable_temp(){ return lable_temp; } public void setLable_temp(VectorString lables){ this.lable_temp = lables; } my jsp page is: --- VectorString lables_demo = new VectorString(); lables_demo = request.getParameter(lable_temp); out.println(LABELS :+lables_demo); [/code] Is the approach is wrong or is there any other way to access Vector values to my jsp. thx in adv. Ajay. -- View this message in context: http://www.nabble.com/how-do-i-get-the-ActionClass%27s-Vector-to-my-JSP- page-for-display-tf4395762.html#a12535038 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated. If you have received it in error, please delete it from your system. Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately. Please note that the BBC monitors e-mails sent or received. Further communication will signify your consent to this. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts-dojo-tags with Struts 2.0.9
Is there any posibility to use struts-dojo-tags with Struts 2.0.9 or the only variant is to wait till 2.1 is released?
Re: Struts 2 - incompatibility between JSTL xml taglibs and Struts 2 ?????
Yes, struts taglibs are the problem. But if I make the opposite, i.e. excluding the x:tags, the code works as well, so I assume that Struts stuff is properly configured... I don't know what to think... Ric --- MK Tan [EMAIL PROTECTED] ha scritto: look like struts taglibs cause the NPE. unknown property name? On 9/7/07, Riccardo Mollame [EMAIL PROTECTED] wrote: Could any one explain why this piece of code works fine: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core% %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml% %@ taglib prefix=s uri=/struts-tags% c:import url=/WEB-INF/classes/PageList.xml var=pagelist scope=application / x:parse var=document doc=${pagelist}/ html head /head body br h1x:out select=$document/pages/[EMAIL PROTECTED]'P001']/title//h1 /body /html while this one: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core% %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml% %@ taglib prefix=s uri=/struts-tags% c:import url=/WEB-INF/classes/PageList.xml var=pagelist scope=application / x:parse var=document doc=${pagelist}/ html head /head body br center !-- BEGIN of new code -- s:form action=userauth s:textfield label=User Name key=username/ s:password label=Password key=password/ s:submit/ /s:form !-- END of new code -- /center /body /html gives the following error: -web-main: Servlet error java.lang.NullPointerException at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58) at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack( StrutsBodyTagSupport.java:52) at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag( ComponentTagSupport.java:49) at _jsps._Login._jspService(_Login.java:103) at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:724) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java :65) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter( FilterDispatcher.java:413) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher .java:623) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher .java:370) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler .java:871) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler .java:453) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler .java:221) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run( ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket( ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700( ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run( ServerSocketAcceptHandler.java:880) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor .java:303) at java.lang.Thread.run(Thread.java:595) I'm stuck. It has no explanation to me. Any help deeply appreciated. Thanks in advance. Ric ___ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ L'email della prossima generazione?
Re: dynamic forwarding from Action class to any url
Is it possible to dynamicaly forward to any page from Action class execute() Make your Action implement ServletResponseAware, then just use the response.sendRedirect() method to redirect to where you want to go. Then return null from your action to let Struts 2 know that you've handled things yourself. (*Chris*) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2 - incompatibility between JSTL xml taglibs and Struts 2 ?????
Could any one explain why this piece of code works fine: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core% %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml% %@ taglib prefix=s uri=/struts-tags% c:import url=/WEB-INF/classes/PageList.xml var=pagelist scope=application / x:parse var=document doc=${pagelist}/ html head /head body br h1x:out select=$document/pages/[EMAIL PROTECTED]'P001']/title//h1 /body /html while this one: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core% %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml% %@ taglib prefix=s uri=/struts-tags% c:import url=/WEB-INF/classes/PageList.xml var=pagelist scope=application / x:parse var=document doc=${pagelist}/ html head /head body br center !-- BEGIN of new code -- s:form action=userauth s:textfield label=User Name key=username/ s:password label=Password key=password/ s:submit/ /s:form !-- END of new code -- /center /body /html gives the following error: -web-main: Servlet error java.lang.NullPointerException at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58) at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52) at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49) at _jsps._Login._jspService(_Login.java:103) at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:724) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java :65) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher .java:623) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher .java:370) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler .java:871) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler .java:453) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler .java:221) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor .java:303) at java.lang.Thread.run(Thread.java:595) I'm stuck. It has no explanation to me. Any help deeply appreciated. Thanks in advance. Ric ___ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Interceptor's destroy() method
I'm having a problem with database connections when I undeploy my Tomcat application (see here: http://www.nabble.com/forum/ViewPost.jtp?post=12560350framed=y http://www.nabble.com/forum/ViewPost.jtp?post=12560350framed=y ) Because I implemented session management in an Interceptor, I thought about the destroy() method of an Interceptor. My question is: when is this method called? Isn't it called when the application is undeployed? -- View this message in context: http://www.nabble.com/Interceptor%27s-destroy%28%29-method-tf4402937.html#a12560417 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S1] Using validWhen with floating point values
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Paul, Paul Benedict wrote: Struts 1.4-SNAPSHOT has enhanced validwhen support for decimal point numbers. I haven't had anyone besides me test it, but you can be the first if you want to! I'd like to know if it works for you! Hmm... maybe. I'm trying to wrench this feature last-minute into a release that's already in testing. Upgrading to a snapshot build of a new version of Struts ain't gonna happen. Perhaps when I have some time, I can test it out in a segregated source tree. I'll let you know if I ever get around to it ;) Thanks, - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4YQQ9CaO5/Lv0PARAi3mAJ9bX9UVoW1H7/1uNwgZLDvXlkQ8TgCfbARD aN80YtulKa2dnxzTLYM2cF0= =IVi7 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 - incompatibility between JSTL xml taglibs and Struts 2 ?????
look like struts taglibs cause the NPE. unknown property name? On 9/7/07, Riccardo Mollame [EMAIL PROTECTED] wrote: Could any one explain why this piece of code works fine: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core% %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml% %@ taglib prefix=s uri=/struts-tags% c:import url=/WEB-INF/classes/PageList.xml var=pagelist scope=application / x:parse var=document doc=${pagelist}/ html head /head body br h1x:out select=$document/pages/[EMAIL PROTECTED]'P001']/title//h1 /body /html while this one: %@ taglib prefix=c uri=http://java.sun.com/jsp/jstl/core% %@ taglib prefix=x uri=http://java.sun.com/jsp/jstl/xml% %@ taglib prefix=s uri=/struts-tags% c:import url=/WEB-INF/classes/PageList.xml var=pagelist scope=application / x:parse var=document doc=${pagelist}/ html head /head body br center !-- BEGIN of new code -- s:form action=userauth s:textfield label=User Name key=username/ s:password label=Password key=password/ s:submit/ /s:form !-- END of new code -- /center /body /html gives the following error: -web-main: Servlet error java.lang.NullPointerException at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58) at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack( StrutsBodyTagSupport.java:52) at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag( ComponentTagSupport.java:49) at _jsps._Login._jspService(_Login.java:103) at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.3.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:724) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java :65) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter( FilterDispatcher.java:413) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher .java:623) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher .java:370) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler .java:871) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler .java:453) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler .java:221) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run( ServerSocketReadHandler.java:260) at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket( ServerSocketAcceptHandler.java:239) at oracle.oc4j.network.ServerSocketAcceptHandler.access$700( ServerSocketAcceptHandler.java:34) at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run( ServerSocketAcceptHandler.java:880) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor .java:303) at java.lang.Thread.run(Thread.java:595) I'm stuck. It has no explanation to me. Any help deeply appreciated. Thanks in advance. Ric ___ L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
On 9/7/07, Anna Simbirtsev [EMAIL PROTECTED] wrote: How do I do it? Create a form with only hidden parameters (you could use the s:form and s:hidden tags instead): form name=myform action=... method=POST input type=hidden name=myname value=myvalue/ /form Then in your link use: a href=javascript:document.myform.submit()Submit the form/a (*Chris*) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, Chris Pratt wrote: Create a form with only hidden parameters (you could use the s:form and s:hidden tags instead): form name=myform action=... method=POST input type=hidden name=myname value=myvalue/ /form Then in your link use: a href=javascript:document.myform.submit()Submit the form/a Oh, the humanity! Seriously, I hate seeing this kind of code. First of all, it requires javascript. Second, it merely converts a GET request into a POST request. Who really cares whether the URL is long or not? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4Zmw9CaO5/Lv0PARAr4EAKCFB9CJZccMxljz4IrhQ6nWCtPSVQCgtUC+ MHldLlFSB5zFJpvAFXu25eE= =7p8q -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
How do I do it? On 9/7/07, Rick Reumann [EMAIL PROTECTED] wrote: On 9/7/07, Anna Simbirtsev [EMAIL PROTECTED] wrote: Hello I have a link html:link page=/myAction.do paramId=map paramName=mapName/html:link and when a user clicks on it, it calls action myAction and passes parameters using HashMap. Those parameters are visible in the URL. Is there any way to pass parameters to the action other than through URL? If you wanted you could populate a form on the page, possibly with just hidden values and then have your link submit that form. -- Rick -- Anna Simbirtsev (416) 729-7331
[S2] dynamic validation.xml file iterating of form elements
Hi, Looking at the example of making a form using an indexed list in the following URL: http://struts.apache.org/2.0.9/docs/type-conversion.html Take for example a form with the following fields: s:iterator id=contacto value=referidos status=status tr td del s:hidden name=referidos[%{#status.index}].referidoId / /del s:fielderror s:param value=referidos[%{#status.index}].email //s:fielderror s:textfield name=referidos[%{#status.index}].email required=true tooltip=Ingrese el email / /td td s:fielderror s:paramreferidos[%{#status.index}].nombre/s:param/s:fielderror s:textfield name=referidos[%{#status.index}].nombre tooltip=Ingrese el nombre / /td td s:fielderror s:paramreferidos[%{#status.index}].apellido/s:param/s:fielderror s:textfield name=referidos[%{#status.index}].apellido tooltip=Ingrese el apellido / /td td s:submit value=Borrar onclick=this.form.action = 'invitar_delete.action?indexToDelete=%{#status.index}'; / /td /tr /s:iterator The question is HOW to write a validation.xml file for validating this form. I tried using a VisitorValidator, where I validate the bean fields, but I couldn't find yet a way to tell the validator to iterate the validator on ALL beans in the list. The following validator does not work (since the validator doesn't know the status variable of the iterator): validators field name=referidos[%{#status.index}] field-validator type=visitor messageReferido:/message /field-validator /field /validators The following works, but is NOT dynamic, since the indexes are fixed here: validators field name=referidos[0] field-validator type=visitor messageReferido:/message /field-validator /field field name=referidos[1] field-validator type=visitor messageReferido:/message /field-validator /field /validators What I need is some form of telling the validation framework that it must iterate on all elements of the list. Any ideas? It is solvable using only validation.xml files? or must I use the validate() method here? Regards, Gabriel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: pass parameters to action
a href=javascript:document.myform.submit()Submit the form/a Oh, the humanity! Seriously, I hate seeing this kind of code. First of all, it requires javascript. What's wrong with javascript? Second, it merely converts a GET request into a POST request. Who really cares whether the URL is long or not? OP did. That was the point of her original post. And it can be important if you're trying to control how your user steps through your application. -- Tim Slattery [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
On 9/7/07, Dave Newton [EMAIL PROTECTED] wrote: --- Christopher Schultz wrote: Who really cares whether the URL is long or not? People who have a URL longer than some browsers will accept? Also, it is sometimes considered a security risk to have certain information displayed in the URL bar for all to see. I don't make a practice of using this code myself unless it's absolutely necessary (which is rare), but someone on the list had a need for information I had available, so I provided it! (*Chris*) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts 2 ABC book
https://www.arctechsoftware.com/tutorial/tutorial.do?subcatId=4 -Original Message- From: Mirbek Nosinov [mailto:[EMAIL PROTECTED] Sent: Friday, September 07, 2007 6:52 AM To: user@struts.apache.org Subject: Struts 2 ABC book Can anybody recommend good Struts 2 ABC book? Thanks in advanced - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
Sometimes the get method is necessary though. If you set your parameters to hidden fields, then the url will be like myjob.action. If the visitor would copy and paste this url and send it via skype to a friend, then they will not get the same result This might be bad i.e. when viewing a product or getting results via a query ... Leon Chris Pratt wrote: On 9/7/07, Dave Newton [EMAIL PROTECTED] wrote: --- Christopher Schultz wrote: Who really cares whether the URL is long or not? People who have a URL longer than some browsers will accept? Also, it is sometimes considered a security risk to have certain information displayed in the URL bar for all to see. I don't make a practice of using this code myself unless it's absolutely necessary (which is rare), but someone on the list had a need for information I had available, so I provided it! (*Chris*) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
--- Christopher Schultz wrote: Who really cares whether the URL is long or not? People who have a URL longer than some browsers will accept? d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Change locale in Struts 2
Hello How to change locale in Struts 2? i am just trying to make multilanguage struts2 + tiles2 application and i have wasted a whole day in solving this problem. Thanks in advanced.
RE: pass parameters to action
There is nothing wrong with Javascript in general - when used judiciously. The problem with Javascript (in this particular situation) is that if Javascript is disabled or unavailable for any reason, the user will not be able to submit the request - this is a major accessibility no-no. IIRC the OP was interested not because the the URL was too long but to hide the information being sent - potentially a security issue - hence the POST suggestion initially. -Rod -Original Message- From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Sent: Friday, September 07, 2007 14:42 To: Struts Users Mailing List Subject: RE: pass parameters to action a href=javascript:document.myform.submit()Submit the form/a Oh, the humanity! Seriously, I hate seeing this kind of code. First of all, it requires javascript. What's wrong with javascript? Second, it merely converts a GET request into a POST request. Who really cares whether the URL is long or not? OP did. That was the point of her original post. And it can be important if you're trying to control how your user steps through your application. -- Tim Slattery [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: pass parameters to action
On 9/7/07, Rod Bollinger [EMAIL PROTECTED] wrote: The problem with Javascript (in this particular situation) is that if Javascript is disabled or unavailable for any reason, the user will not be able to submit the request - this is a major accessibility no-no. Rod: That is a valid point, so maybe changing the anchor tag to something like: a href=url with all parameters onclick=document.myform.submit(); return falseSubmit/a would serve both purposes. When JavaScript is available it would submit the form, when JavaScript is not available the regular GET request would be used. Leonidas: I wasn't saying this is the way all requests should be submitted, this would only be used when you wouldn't want someone to be able to bookmark (or email) a page, or when bookmarking the page isn't a major concern. (*Chris*) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
I have to use post for security reasons, and to be able to pass all of the information in the hidden fields(too long, some fields are upto 500 char). Thank you for your help. On 9/7/07, Rod Bollinger [EMAIL PROTECTED] wrote: There is nothing wrong with Javascript in general - when used judiciously. The problem with Javascript (in this particular situation) is that if Javascript is disabled or unavailable for any reason, the user will not be able to submit the request - this is a major accessibility no-no. IIRC the OP was interested not because the the URL was too long but to hide the information being sent - potentially a security issue - hence the POST suggestion initially. -Rod -Original Message- From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] Sent: Friday, September 07, 2007 14:42 To: Struts Users Mailing List Subject: RE: pass parameters to action a href=javascript:document.myform.submit()Submit the form/a Oh, the humanity! Seriously, I hate seeing this kind of code. First of all, it requires javascript. What's wrong with javascript? Second, it merely converts a GET request into a POST request. Who really cares whether the URL is long or not? OP did. That was the point of her original post. And it can be important if you're trying to control how your user steps through your application. -- Tim Slattery [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] -- Anna Simbirtsev (416) 729-7331
can not create - suggest page to faq
Greetings to all, i have signed in and tried to add a page under the faq. The system says that i do not have the privileges... Where do i have to place my suggestion ? Generally the faq can solve a lot of problems that appear recursively to all of us, so it is a good thing to support. Regards Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2 : application-wide values initialization.
Hi, In Struts 1, we were having an init servlet to load the application-wide properties like dropdown values (from property files) into application context and accessing these within JSP. Is there a better way of doing this in Struts 2, and do we require an initialization servlet at all ? . Thanks, Joseph
Re: Struts 2 : application-wide values initialization.
On 9/7/07, j alex [EMAIL PROTECTED] wrote: In Struts 1, we were having an init servlet to load the application-wide properties like dropdown values (from property files) into application context and accessing these within JSP. Is there a better way of doing this in Struts 2, and do we require an initialization servlet at all ? . Look at the javax.servlet.ServletContextListener. It works great.. (*Chris*) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Rod, Rod Bollinger wrote: There is nothing wrong with Javascript in general - when used judiciously. The problem with Javascript (in this particular situation) is that if Javascript is disabled or unavailable for any reason, the user will not be able to submit the request - this is a major accessibility no-no. While I totally agree, this goes far beyond accessibility. The reasons not to use javascript to drive anything are many, but mostly because browser support cannot be relied upon: maybe there's a bug (or feature... thanks MSIE) or the user has javascript turned off. The worst is when I had Adblock removing all of the advertising from Yahoo! mail. When they upgraded their service to compete (poorly, I might add) with gmail, everything stopped working. Since they had relied 100% on javascript, and Adblock was filtering-out the script inclusions, nothing worked. Boo! - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4cTt9CaO5/Lv0PARApiaAJ97vmqP/OsSo4nu4qEwBm7g+l3vfACfc46d 0HNWOe3xPhenWZCUUbi+ywU= =Tgvl -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
I do. On 9/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: Who really cares whether the URL is long or not? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4Zmw9CaO5/Lv0PARAr4EAKCFB9CJZccMxljz4IrhQ6nWCtPSVQCgtUC+ MHldLlFSB5zFJpvAFXu25eE= =7p8q -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- The Street Programmer http://streetprogrammer.com
Re: pass parameters to action
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, Chris Pratt wrote: On 9/7/07, Dave Newton [EMAIL PROTECTED] wrote: --- Christopher Schultz wrote: Who really cares whether the URL is long or not? People who have a URL longer than some browsers will accept? Also, it is sometimes considered a security risk to have certain information displayed in the URL bar for all to see. Anything you don't want the user to see and/or modify shouldn't be sent by the browser. If you need secure state-carrying information to go from the server back to the client and back to the server, then encrypt it. If you're going that far, compress it and encrypt it, and you'll have a smaller URL ;) Switching from GET to POST solves only one potential security issue: POST bodies are rarely written to log files while GETs almost always are. I don't make a practice of using this code myself unless it's absolutely necessary (which is rare), but someone on the list had a need for information I had available, so I provided it! I think your response would have been more useful had it contained the reasons why you don't normally use this type of code. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4cQN9CaO5/Lv0PARAuyXAKCFl5JLEDwm840k64mVSShPlK0qkwCeMktq mbLK1Im2wcqlcJxC2nWzF7U= =71RY -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
--- Vinny [EMAIL PROTECTED] wrote: I do. Not reddit; no upmods for short, content-free posts. Oh, wait. Curses. d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts 2 + tiles - add list in tiles definition
Mirbek Nosinov wrote: hi everybody I need you help so next is the problem i use struts 2.0.9 together with tiles 2.0.4 everything is ok, but when i have next definition for tiles definition name=.startPage extends=.layout1 put-attribute name=title value=Start Page / put-attribute name=body value=/pages/public/start.jsp / put-list-attribute name=items add-attribute value=12qw / add-attribute value=212qw / add-attribute value=132qw / /put-list-attribute /definition and then i try to use this list in my jsp page tiles:useAttribute name=items id=items classname=java.util.List/ and on this point i got the error: org.apache.tiles.TilesException: Error including path '/layouts/public- layout.jsp'. An exception occurred processing JSP page /layouts/public- layout.jsp at line 26 line 26 is the line with my tiles:useAttribute name=items id=items classname=java.util.List/ can anybody help me thanks in advance try putAttribute: definition name=.startPage extends=.layout1 putAttribute name=title value=Start Page / putAttribute name=body value=/pages/public/start.jsp / putListAttribute name=items addAttribute value=12qw / addAttribute value=212qw / addAttribute value=132qw / /putListAttribute /definition -- View this message in context: http://www.nabble.com/struts-2-%2B-tiles---add-list-in-tiles-definition-tf4382138.html#a12564639 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem in ObjectFactory.buildResult? OGNLExceptions can halt setting of valid properties
Hi, I am attempting to configure a Result implementation using the @Result class annotation. As part of this configuration I am sending in a parameters list which contains a single property. Here is my annotation and simple class file: @Result(name = success, value = , type = JSONResult.class, params = {enableSMD, true}) public class DealJsonAction extends ActionSupport { @SMDMethod public String getName(String client) { return testName; } } My problem is that the'enableSMD' property is not being set to true on the JSONResult. I have discovered this is happening because the ResultConfig object that is passed to ObjectFactory.buildResult() has a 'location' parameter in it. I am not sure where/why this location parameter is being stuck into the ResultConfig. Further, the buildResult() method calls OgnlUtil.setProperties and sets the 'throwPropertyExceptions' parameter to true. This is problematic. The JSONResult does not posses a field named 'location'. Therefore, the call to OgnlUtil.setProperties is throwing an exception when it attempts to set the location property. This exception causes the iteration over properties to stop (lines 71-77), and as a result the 'enableSMD' property is never set on the JSONResult. There is a large comment in ObjectFactory, lines 227 - 232, that comments on catching OGNL exceptions and logging them. The comment implies there is no issue catching these thrown exceptions and the code should be rethought in the future. In my case, however, the throwing of exceptions is subverting setting valid properties on the target object. I am relatively new to Struts 2, so perhaps I am simply overlooking a simple configuration step that might remove the 'location' parameter from the ResultConfig parameters map. Otherwise, it seems the handling of OGNL property setting needs some attention? Any help would be greatly appreciated. Thanks, Aaron Brown - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 : application-wide values initialization.
Hi Chris, How is the ServletContextListener suited for my purpose ? . Can you please elaborate a little more? . What i'm looking for is access to the properties files' values and flags read from DB, not able to relate how this is related to the listener. Thanks, Joseph On 9/7/07, Chris Pratt [EMAIL PROTECTED] wrote: On 9/7/07, j alex [EMAIL PROTECTED] wrote: In Struts 1, we were having an init servlet to load the application-wide properties like dropdown values (from property files) into application context and accessing these within JSP. Is there a better way of doing this in Struts 2, and do we require an initialization servlet at all ? . Look at the javax.servlet.ServletContextListener. It works great.. (*Chris*) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts 2 : application-wide values initialization.
On 9/7/07, j alex [EMAIL PROTECTED] wrote: How is the ServletContextListener suited for my purpose ? . Can you please elaborate a little more? . What i'm looking for is access to the properties files' values and flags read from DB, not able to relate how this is related to the listener. In Struts 1, we were having an init servlet to load the application-wide properties like dropdown values (from property files) into application context and accessing these within JSP. Is there a better way of doing this in Struts 2, and do we require an initialization servlet at all ? . The ServletContextListener is called when the ServletContext is starting up and shutting down. It's designed to let you do one time configuration and initialization. You have access to the ServletContext so that you can put things in the Application scope. Sorry, I thought that's what you were asking for. (*Chris*) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
application/xhtml+xml MIME Type?
How do I specify a contentType of application/xhtml+xml when I'm using freemarker templates? With .jspx files, I can do: jsp:directive.page contentType=application/xhtml+xml;charset=UTF-8/ With .jsp files, I can do: %@ page contentType=application/xhtml+xml;charset=ISO-8859-1 % Or better yet, is there any way to configure the Struts servlet with a global default MIME type for all freemarker/jsp templates? Or for the ultimate, could I set a MIME type of application/xhtml+xml for browsers that indicate that that they can accept that, and fallback to text/html for browsers that can't (IE). -- View this message in context: http://www.nabble.com/application-xhtml%2Bxml-MIME-Type--tf4404426.html#a12565294 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: pass parameters to action
Vinny- with method=GET I hear IE has a limit of 2k M-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Vinny [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, September 07, 2007 5:56 PM Subject: Re: pass parameters to action I do. On 9/7/07, Christopher Schultz [EMAIL PROTECTED] wrote: Who really cares whether the URL is long or not? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFG4Zmw9CaO5/Lv0PARAr4EAKCFB9CJZccMxljz4IrhQ6nWCtPSVQCgtUC+ MHldLlFSB5zFJpvAFXu25eE= =7p8q -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- The Street Programmer http://streetprogrammer.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bizarre validation issue
I am using Struts 2.06 and am seeing a bizarre issue - One of my Actions is validating fine - if the page is posted without required data/formats the page is returned with error messages and all the fields are still filled in. We'll refer to this as action 1. Another action (action 2) throws validation errors even if all the requirements are met, and the page is returned with the fields cleared. I went round and round trying to isolate the issue, and found something strange. I copied the validation XML from action 1 into action 2's file. I copied the JSP code from the input for action 1 to action 2, so now we have validation xml and JSP code that is identical. The action declarations in struts.xml are virtually identical (I changed the Contact results from contact.jsp to register.jsp for consistency.) action name=doregister class=com.mbg.actions.Register result name=inputregister.jsp/result result name=errorregister.jsp/result /action action name=contact class=com.mbg.actions.Contact result name=errorregister.jsp/result result name=inputregister.jsp/result /action When I call the doregister action from either the register.jsp or contact.jsp pages (which are identical), no problem - the validation occurs as expected and the page is returned with data filled in. When I call contact from either page, the validation fails (no matter what the input) and the fields are cleared out. Basically it likes the doregister action but doesn't like the contact action. Does anyone have a clue what's going on or where I should look? I'm at the end of my rope and am about to throw out the validation altogether. Thanks in advance. -- View this message in context: http://www.nabble.com/Bizarre-validation-issue-tf4404926.html#a12566796 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bizarre validation issue
--- tglenister wrote: When I call contact from either page, the validation fails (no matter what the input) and the fields are cleared out. Basically it likes the doregister action but doesn't like the contact action. Does anyone have a clue what's going on or where I should look? At the very least you should tell us the names of the validation files, where they're located, etc. as a starting point. I mean, I'd guess something's hokey with a file location, name, etc. without knowing more. It could be something in the action class, too. Do you have devMode turned on? Is there anything in the logs? d. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]