回复:Re: how to Validate tabular input.
use vistor validator. you can see the sample app shipped with the struts full source download archives. 在2009-02-27,"Wes Wannemacher" 写道: On Thursday 26 February 2009 20:04:55 Greg Lindholm wrote: > I would really like to know the answer as well, how do you validate a list > of fields with annotations? > > let me tweak your example a bit so it will at least work (before > validation). > (See http://struts.apache.org/2.x/docs/tabular-inputs.html) > > > > > > public List getMytext() {return mytext;} > public void setMytext(List mytext) {this.mytext=mytext;} > private List mytext = new ArrayList(); > The XML and annotation-based validation doesn't really have support for list- based (or map-based) properties. With indexed properties, it's best to implement a 'validate' method on your action. Yes, it's a pain, but, before you file an improvement JIRA, I would suggest trying to come up with a patch. I know I, for one, have been patiently waiting on JSR-303 before I consider writing improvements to the validation framework. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
String manipulation
Hi I'm trying to validate that a filename has a .csv extension. I would like to use @FieldExpressionValidator on the field but I can't get the syntax right, and searching the docs I can't find much on String manipulation in OGNL. Could anyone help me out please? Thanks - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: String manipulation
Oh, got it @FieldExpressionValidator(expression="(accountFileFileName.endsWith('.cs v')", message="", key="validate.invalidFilename", fieldName="accountFileFileName") Forgot you could just call methods in OGNL :) -Richard -Original Message- From: Richard Gundersen [mailto:r.gunder...@salford.ac.uk] Sent: 27 February 2009 10:16 To: Struts Users Mailing List Subject: String manipulation Hi I'm trying to validate that a filename has a .csv extension. I would like to use @FieldExpressionValidator on the field but I can't get the syntax right, and searching the docs I can't find much on String manipulation in OGNL. Could anyone help me out please? Thanks - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: String manipulation
Hmmm, no that also prevents genuine csv files from being selected too. Also investigating the accept attribute on the s:file tag to see if that will help... Any help appreciated. -Original Message- From: Richard Gundersen [mailto:r.gunder...@salford.ac.uk] Sent: 27 February 2009 10:27 To: Struts Users Mailing List Subject: RE: String manipulation Oh, got it @FieldExpressionValidator(expression="(accountFileFileName.endsWith('.cs v')", message="", key="validate.invalidFilename", fieldName="accountFileFileName") Forgot you could just call methods in OGNL :) -Richard -Original Message- From: Richard Gundersen [mailto:r.gunder...@salford.ac.uk] Sent: 27 February 2009 10:16 To: Struts Users Mailing List Subject: String manipulation Hi I'm trying to validate that a filename has a .csv extension. I would like to use @FieldExpressionValidator on the field but I can't get the syntax right, and searching the docs I can't find much on String manipulation in OGNL. Could anyone help me out please? Thanks - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: String manipulation
Try adding this to your action static final Pattern pattern = Pattern.compile("^.+\\.((csv)|(xls))$", Pattern.CASE_INSENSITIVE); In your validateUpload method have something like Matcher matcher = pattern.matcher(fileName); if (!matcher.matches()) { addActionError("File type not allowed"); return; } Remove |(xls) if you dont want to allow xls files --- On Fri, 2/27/09, Richard Gundersen wrote: > From: Richard Gundersen > Subject: RE: String manipulation > To: "Struts Users Mailing List" > Date: Friday, February 27, 2009, 11:50 AM > Hmmm, no that also prevents genuine csv files from being > selected too. > > Also investigating the accept attribute on the s:file tag > to see if that > will help... > > Any help appreciated. > > -Original Message- > From: Richard Gundersen [mailto:r.gunder...@salford.ac.uk] > Sent: 27 February 2009 10:27 > To: Struts Users Mailing List > Subject: RE: String manipulation > > Oh, got it > > @FieldExpressionValidator(expression="(accountFileFileName.endsWith('.cs > v')", message="", > key="validate.invalidFilename", > fieldName="accountFileFileName") > > Forgot you could just call methods in OGNL :) > > -Richard > > -Original Message- > From: Richard Gundersen [mailto:r.gunder...@salford.ac.uk] > Sent: 27 February 2009 10:16 > To: Struts Users Mailing List > Subject: String manipulation > > Hi > > I'm trying to validate that a filename has a .csv > extension. I would > like to use @FieldExpressionValidator on the field but I > can't get the > syntax right, and searching the docs I can't find much > on String > manipulation in OGNL. > > Could anyone help me out please? > > Thanks > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: String manipulation
Thanks David. I've just got it working actually, I missed out a bracket in my original solution, so the syntax should be @FieldExpressionValidator(expression="(accountFileFileName.endsWith('.cs v'))", message="", key="validate.invalidFilename", fieldName="accountFileFileName") Silly mistake I know. If I run into any more problems with it though I'll use your suggestion - thanks -Original Message- From: David Harland [mailto:harlander3...@yahoo.com] Sent: 27 February 2009 11:04 To: Struts Users Mailing List Subject: RE: String manipulation Try adding this to your action static final Pattern pattern = Pattern.compile("^.+\\.((csv)|(xls))$", Pattern.CASE_INSENSITIVE); In your validateUpload method have something like Matcher matcher = pattern.matcher(fileName); if (!matcher.matches()) { addActionError("File type not allowed"); return; } Remove |(xls) if you dont want to allow xls files --- On Fri, 2/27/09, Richard Gundersen wrote: > From: Richard Gundersen > Subject: RE: String manipulation > To: "Struts Users Mailing List" > Date: Friday, February 27, 2009, 11:50 AM > Hmmm, no that also prevents genuine csv files from being > selected too. > > Also investigating the accept attribute on the s:file tag > to see if that > will help... > > Any help appreciated. > > -Original Message- > From: Richard Gundersen [mailto:r.gunder...@salford.ac.uk] > Sent: 27 February 2009 10:27 > To: Struts Users Mailing List > Subject: RE: String manipulation > > Oh, got it > > @FieldExpressionValidator(expression="(accountFileFileName.endsWith('.cs > v')", message="", > key="validate.invalidFilename", > fieldName="accountFileFileName") > > Forgot you could just call methods in OGNL :) > > -Richard > > -Original Message- > From: Richard Gundersen [mailto:r.gunder...@salford.ac.uk] > Sent: 27 February 2009 10:16 > To: Struts Users Mailing List > Subject: String manipulation > > Hi > > I'm trying to validate that a filename has a .csv > extension. I would > like to use @FieldExpressionValidator on the field but I > can't get the > syntax right, and searching the docs I can't find much > on String > manipulation in OGNL. > > Could anyone help me out please? > > Thanks > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Struts 2.1.6 - custom interceptor
Dear Greg Lindholm, Thanks so much. I could make it work with preresultlistener. Really Cool. Dear Lukasz Lenar, Thanks so much. So, I understand that the result has been created before it reaches the post invoke in interceptor. But, I still wonder with a question as to why this cannot happen simply? I mean, without a preresultlistener. Ok. My next question is as follows (in further to the same post invoke in interceptor): (I want to illustrate with a simple example) 1) I want to decorate a string property of action. 2) The interceptor will add for example, "$" before the value of property. 3*) I am against adding any method in action. No logic will go in action class. 4) My interceptor will pick up the action property, modify it in invoke() method, itself. 5) So, when I want to decorate, I add my interceptor in struts.xml for this action. 6) My interceptor needs to pick up a property from action and decorate it. (In post action invoke()) Please let me know. Thanks so much. Regards, Prasad -Original Message- From: Greg Lindholm [mailto:glindh...@yahoo.com] Sent: Monday, February 09, 2009 11:47 PM To: user@struts.apache.org Subject: Re: Struts 2.1.6 - custom interceptor Take a look at PreResultListener http://struts.apache.org/2.x/docs/preresultlistener.html Lukasz Lenart wrote: > > 2009/2/9 Prasad Mangina : >> Dear All, >> >> i have programmed a simple (custom) interceptor. >> >> placed logic in post action invocation. >> >> public String doIntercept(ActionInvocation invocation) throws Exception { >> >>Object action = invocation.getAction(); >> >>String ret = invocation.invoke(); >> >>if (action instanceof MyAware) { >> >>((MyAware) action).callme(); >> >>} >> >>return ret; >> >> } >> >> in Action's "callme()" method, I am setting action's var (this var >> has >> getter and setter). >> >> In my velocity vm file, I am accessing this action's var. >> >> $myvar >> >> By default, the action's property would be placed in valuestack and, >> could >> be accessed from velocity page. >> >> Hmmm, this is not showing up in the velocity page. >> >> If, this is in pre action invocation, $myvar 's value gets displayed . >> Only, >> when this goes into post action invocation, it is not showing up... >> >> Any clues? > > After you call invoke(), result (jsp, vm, etc) was already generated, > that because your call to callme() is not working > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Struts-2.1.6---custom-interceptor-tp21910825p21918703. html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
Hi, have you tried this. Thanks, Nuwan Hi Nuwan, I tried and i got it as you said to Can you please elaborate what exactly it conveys to browser and what was going wrong ? But still that doest resolve my issue These above Tag's are still not getting updated with localization and how will you differentiate spanish worked with out all these rules why? and the action fields after validation still giving me problem as key i will be getting in English Locale true Login name is required gets proper i18n but won't How can we make sure , will also work ? Thanks, Sajid -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22244146.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
http://struts.apache.org/2.x/docs/how-do-i-add-i18n-to-a-ui-tag-like-the-textfield-tag.html sajidbigler wrote: Hi, have you tried this. Thanks, Nuwan Hi Nuwan, I tried and i got it as you said to Can you please elaborate what exactly it conveys to browser and what was going wrong ? But still that doest resolve my issue These above Tag's are still not getting updated with localization and how will you differentiate spanish worked with out all these rules why? and the action fields after validation still giving me problem as key i will be getting in English Locale true Login name is required gets proper i18n but won't How can we make sure , will also work ? Thanks, Sajid - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Problem with file download.
I had the same problem that I used to get prompted for file save on IE6 but on IE7 the attachment was being displayed in a new pop up browser. and I did the following to resolve it: application/octet-stream Then make ur action class implement "ServletResponseAware" interface and add the following lines to your action method: setInputStream(new ByteArrayInputStream(attachment.getAttachment())); getServletResponse().setHeader("Content-Disposition", ("attachment; filename=\"" + attachment.getName() + "\"")); For some reason not known to me, using the above method, you get prompted to save the file in IE6/7 and firefox 2.x and 3.x. However, following the way described in Wiki documentation would result to the problem you are experiencing. --- On Thu, 2/26/09, Security Management wrote: > From: Security Management > Subject: RE: Problem with file download. > To: "'Struts Users Mailing List'" > Received: Thursday, February 26, 2009, 8:17 PM > Here's what I've used, note the contentDisposition. > > type="stream"> >name="contentType">image/jpg >name="inputName">imageStream >name="contentDisposition">attachment; > filename="image.jpg" >name="bufferSize">4096 > > > -Original Message- > From: jfputnam [mailto:johnfput...@comcast.net] > Sent: Thursday, February 26, 2009 2:49 PM > To: user@struts.apache.org > Subject: Problem with file download. > > > I have followed serveral examples but still have an issue > downloading a file > using an input stream. In IE7 when I try the download with > text/plain > context type, the text is rendered in the html page. When I > change the > contentType a file dialog folder pops up with open/open > folder/ cancel no > save button. > > There is also a popup window that says Internet Explorer > cannot download > extractAccounting.action from localhost. Internet Explorer > was not able to > open this Internet site. The requested site is either > unavailable or cannot > be found. Please try again later. > > On firefox there is no file save dialog, just the text > displayed. > > I want to be able to generate .csv files and have the user > be able to save > them on their pc. > > The struts.xml entry is. > > class="com.merrick.bestmatch.presentation.action.billing.AccountingLink" > method="extractAccounting"> > type="stream"> > document.pdf > inputStream > filename="document.pdf" > 1024 > > > > > The action class is: > > > public class AccountingLink extends BestMatchActionSupport > implements > PropertiesAware > { > > private InputStream inputStream; > > //-- > -- > public String extractAccounting() > { > > > String text = "Converting String to InputStream > Example"; > > try > { > inputStream = new > ByteArrayInputStream(text.getBytes("UTF-8")); > } > catch (UnsupportedEncodingException e) > { > e.printStackTrace(); > } > > > return SUCCESS; > > } > //-- > -- > public InputStream getInputStream() > { > return inputStream; > } > > } > > > Any help with figuring out what the problem is and a > solution is > appreciated. > > ---John Putnam > > -- > View this message in context: > http://www.nabble.com/Problem-with-file-download.-tp22232119p22232119.html > Sent from the Struts - User mailing list archive at > Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[s2] accesing params from s:include tag
I'm struggling with s:include + s:param in struts 2.0.14 The docs for the include tag http://struts.apache.org/2.0.14/docs/include.html states: "How To access parameters Parameters are passed as request parameters, so use the ${param.ParamName} notation to access them. Do not use the property tag to access parameters in included files. That's not very clear for me, (and for others, judging from old messages in the list). The parameters passed to an included jsp via struts2 tags can't be accesed using struts2 tags?? (it appears that the parameters are not added to the "parameters" collection in the actionContext) This should be really simple, please, can't someone give an example ? Say I have a page.jsp that includes a "fragment jsp" file via the following: 1 In the frag.jsp I want to do something as ... What would be the correct syntax? Hernán J. González - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [s2] accesing params from s:include tag
Haven't really tried, but I assume the parameter would be a String, so have you tried using 'eq' instead of '=='. Nils-H On Fri, Feb 27, 2009 at 3:06 PM, hernan gonzalez wrote: > I'm struggling with s:include + s:param in struts 2.0.14 > > The docs for the include tag > http://struts.apache.org/2.0.14/docs/include.html > states: > > "How To access parameters Parameters are passed as request > parameters, so use the ${param.ParamName} notation to access them. Do > not use the property tag to access parameters in included files. > > That's not very clear for me, (and for others, judging from old > messages in the list). > The parameters passed to an included jsp via struts2 tags can't be > accesed using struts2 tags?? > (it appears that the parameters are not added to the "parameters" > collection in the actionContext) > > This should be really simple, please, can't someone give an example ? > > Say I have a page.jsp that includes a "fragment jsp" file via the following: > > 1 > > In the frag.jsp I want to do something as > > ... > > What would be the correct syntax? > > Hernán J. González > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts performance metrics
Ok. Are you able to access the Value Stack directly using JSTL without using s:iterator ? Thanks, Mohan -- View this message in context: http://www.nabble.com/Struts-performance-metrics-tp22077072p22247775.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [s2] accesing params from s:include tag
I do not think you will be able to access the param value passed to s:include within struts tag [clearly an obvious shortcoming]. Your best bet is using jsp expression language as the parameter is put in request scope. I was not able to do it, despite trying a million different forms as well as suggestions by some folks in strust mailing list. --- On Fri, 2/27/09, Nils-Helge Garli Hegvik wrote: > From: Nils-Helge Garli Hegvik > Subject: Re: [s2] accesing params from s:include tag > To: "Struts Users Mailing List" > Received: Friday, February 27, 2009, 2:14 PM > Haven't really tried, but I assume the parameter would > be a String, so > have you tried using 'eq' instead of '=='. > > Nils-H > > On Fri, Feb 27, 2009 at 3:06 PM, hernan gonzalez > wrote: > > I'm struggling with s:include + s:param in struts > 2.0.14 > > > > The docs for the include tag > http://struts.apache.org/2.0.14/docs/include.html > > states: > > > > "How To access parameters Parameters are passed > as request > > parameters, so use the ${param.ParamName} notation to > access them. Do > > not use the property tag to access parameters in > included files. > > > > That's not very clear for me, (and for others, > judging from old > > messages in the list). > > The parameters passed to an included jsp via struts2 > tags can't be > > accesed using struts2 tags?? > > (it appears that the parameters are not added to the > "parameters" > > collection in the actionContext) > > > > This should be really simple, please, can't > someone give an example ? > > > > Say I have a page.jsp that includes a "fragment > jsp" file via the following: > > > > value="frag.jsp"> name="opt">1 > > > > In the frag.jsp I want to do something as > > > > ... > > > > > What would be the correct syntax? > > > > Hernán J. González > > > > > - > > To unsubscribe, e-mail: > user-unsubscr...@struts.apache.org > > For additional commands, e-mail: > user-h...@struts.apache.org > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: > user-h...@struts.apache.org __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: javax.servlet.jsp.JspException: Cannot find bean under name
Yes, I have a class where locationList is put in a RenderRequest object... ... log.info("Get Connection "); conn = ADFDAOUtil.getConnection(getDataSource(request)); dao = new CPCInventoryDAO(conn); ArrayList locList = dao.getLocations(mode); request.setAttribute("locationList", locList); ... Nils-Helge Garli Hegvik 02/26/2009 04:11 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: javax.servlet.jsp.JspException: Cannot find bean under name Have you put a collection named "locationList" in some scope? Nils-H On Thu, Feb 26, 2009 at 10:01 PM, wrote: > Hi, > > I am receiving this exception on my portlet what am I missing? > ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the > service methods of the servlet: SPSInventory Portlet > . Exception thrown : javax.servlet.ServletException: > javax.portlet.PortletException: javax.servlet.jsp.JspException: Cannot > find bean under name locationList >at > com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:361) >at > com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:82) > > > Here is the main body in index.jsp: > action="/searchInventory"> > > > >Location > "1" >styleId="location"> > "locationList" property="name" /> > > > >Client Id > ="1"> > "clientList" property="name" /> > > > >Stock Id > ="field1" >onfocus="field1.select()" onblur= > "setFocus()" /> > > > "Submit" /> > > > > > > > > > Here is part of my struts-config file: > > > "com.chase.adf.cpcinventory.forms.RequestFormBean"> > > > > > > > > > > > > scope="session" type= > "com.chase.adf.cpcinventory.actions.SearchInventoryAction"> > > > path="/failure.jsp"> > > "noResultsFound" path="/noResults.jsp"> > > "multipleResultsFound" path="/summaryResults.jsp"> > > > "session" type="com.chase.adf.cpcinventory.actions.GetSearchAction"> > > > > > > > > - > This communication is for informational purposes only. It is not > intended as an offer or solicitation for the purchase or sale of > any financial instrument or as an official confirmation of any > transaction. All market prices, data and other information are not > warranted as to completeness or accuracy and are subject to change > without notice. Any comments or statements made herein do not > necessarily reflect those of JPMorgan Chase & Co., its subsidiaries > and affiliates. > > This transmission may contain information that is privileged, > confidential, legally privileged, and/or exempt from disclosure > under applicable law. If you are not the intended recipient, you > are hereby notified that any disclosure, copying, distribution, or > use of the information contained herein (including any reliance > thereon) is STRICTLY PROHIBITED. Although this transmission and any > attachments are believed to be free of any virus or other defect > that might affect any computer system into which it is received and > opened, it is the responsibility of the recipient to ensure that it > is virus free and no responsibility is accepted by JPMorgan Chase & > Co., its subsidiaries and affiliates, as applicable, for any loss > or damage arising in any way from its use. If you received this > transmission in error, please immediately contact the sender and > destroy the material in its entirety, whether in electronic or hard > copy format. Thank you. > > Please refer to http://www.jpmorgan.com/pages/disclosures for > disclosures relating to UK legal entities. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional comm
[S2] Famoso Double conversion problem in S2 2.0.11.1!
Hi, I have again problem with Double conversion. I have a link in my page for double values: ... Set value ... In the form where refValue is entered I'm using my DoubleConverter conversion, and I checked with Firebug, refValue is set good, e.g., c_4550.0. But when I click to this link above, I get 45500.0. Famoso zero is added!! Then I tried to define conversion properties for a class who have refValue attribute to my custom DoubleConvereter, but in this case click on the link "Set value" doesn't do anything! It is like a dead link. I checked also with Firebug and it is e.g., c_4550. What is the problem here and how can I solve it ? -- Regards, M. -- View this message in context: http://www.nabble.com/-S2--Famoso-Double-conversion-problem-in-S2-2.0.11.1%21-tp22248310p22248310.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Action mapping issue while Integrating S2 and S1
Ok, I was able to run and test the Sample Application that comes with struts distribution named StrutsInAction. Now I tried to add a new component to test and see if I could atleast run and see if it works atleast here. I wrote it exactly the same as other elements in the sample application like new namespace chapterZero etc etc..ditto. But to my dismay this new component still does'nt work...? Everything (code and configuration) in chapterZero(the component I have added in this existing SampleApplication) is same as it is there for others (chapterTwo, chapterThree etc etc). So I am wondering 1. this is not the struts2-1 configuration issue since it is also not running with struts 2 only sample application. 2. There is nothing wrong with coding and configuration/jars issue as other components of Sample Application are working fine. Any insights on this??? newton.dave wrote: > > SanJ.SANJAY wrote: >> ?? > > Was there more? > > Dave > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Action-mapping-issue-while-Integrating-S2-and-S1-tp21982941p22248697.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [S2] Famoso Double conversion problem in S2 2.0.11.1!
When generated in jsp, this link looks like this: # Set value But when clicked nothing happes, it doesn't event came to conversion. -- M. Milan Milanovic wrote: > > Hi, > > I have again problem with Double conversion. I have a link in my page for > double values: > > > ... > > > > > targets="refValues">Set value > ... > > > In the form where refValue is entered I'm using my DoubleConverter > conversion, and I checked with Firebug, refValue is set good, e.g., > c_4550.0. But when I click to this link above, I get 45500.0. Famoso zero > is added!! > > Then I tried to define conversion properties for a class who have refValue > attribute to my custom DoubleConvereter, but in this case click on the > link "Set value" doesn't do anything! It is like a dead link. > I checked also with Firebug and it is e.g., c_4550. > > What is the problem here and how can I solve it ? > > -- > Regards, M. > -- View this message in context: http://www.nabble.com/-S2--Famoso-Double-conversion-problem-in-S2-2.0.11.1%21-tp22248310p22248834.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Preserving Action Messages during redirect action
Hi, I want to redirect to another action but preserve the action messages/errors from the previous action. Is there any standard way to achieve this functionality in Struts 2? Or do I have to write an Interceptor for this? I have a use case where the errors on a web screen needs to be shown on a different screen to which I want to redirect since that action reloads data from the database. Please let me know. Thanks in advance Anand - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Preserving Action Messages during redirect action
Please use a new thread for this issue. The problem addressed here is totally diffirent from yours. Sundararaman, Anand wrote: > > Hi, >I want to redirect to another action but preserve the action > messages/errors from the previous action. Is there any standard way to > achieve this functionality in Struts 2? Or do I have to write an > Interceptor for this? > > I have a use case where the errors on a web screen needs to be shown on a > different screen to which I want to redirect since that action reloads > data from the database. > > Please let me know. > > Thanks in advance > Anand > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Action-mapping-issue-while-Integrating-S2-and-S1-tp21982941p22249004.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Preserving Action Messages during redirect action
Glindholm solved this with an interceptor. http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2/ Best regards, Felipe On Fri, Feb 27, 2009 at 1:12 PM, Sundararaman, Anand wrote: > Hi, > I want to redirect to another action but preserve the action > messages/errors from the previous action. Is there any standard way to > achieve this functionality in Struts 2? Or do I have to write an Interceptor > for this? > > I have a use case where the errors on a web screen needs to be shown on a > different screen to which I want to redirect since that action reloads data > from the database. > > Please let me know. > > Thanks in advance > Anand > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [s2] accesing params from s:include tag
> I was not able to do it, despite trying a million different forms as well as > suggestions by some folks in strust mailing list. > I do not think you will be able to access the param value passed to s:include > within struts tag [clearly an obvious shortcoming]. Your best bet is using > jsp expression language as the parameter is put in request scope. > Indeed a shortcoming, and a frustrating one. Wouldn this be partially fixed if, when the s:include/s:param are evaluated, the params are also put into the "parameters" object in the ActionContext? Are there good reasons to not doing so ? BTW, although I much prefer Struts2 over Struts1, the fact that many developers -not gurus, but with some months of s2 experience- frequently need to try "million different forms" ( # % $ params parameters etc etc) till (in the best scenario) it happens to work, should tell something... Hernán J. González - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Preserving Action Messages during redirect action
Thanks Felipe, This was quick. I will incorporate the Interceptor and check it out. Thanks, Anand -Original Message- From: Felipe Fraga [mailto:felipefr...@gmail.com] Sent: Friday, February 27, 2009 10:17 AM To: Struts Users Mailing List Subject: Re: Preserving Action Messages during redirect action Glindholm solved this with an interceptor. http://glindholm.wordpress.com/2008/07/02/preserving-messages-across-a-redirect-in-struts-2/ Best regards, Felipe On Fri, Feb 27, 2009 at 1:12 PM, Sundararaman, Anand wrote: > Hi, > I want to redirect to another action but preserve the action > messages/errors from the previous action. Is there any standard way to > achieve this functionality in Struts 2? Or do I have to write an Interceptor > for this? > > I have a use case where the errors on a web screen needs to be shown on a > different screen to which I want to redirect since that action reloads data > from the database. > > Please let me know. > > Thanks in advance > Anand > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Form validation: how can khow in jsp that my action validation failed?
I need output special info in JSP if validation failed. How can I do it? ActionSupport has method hasActionErrors. I need smth like that for JSP. -- View this message in context: http://www.nabble.com/Form-validation%3A-how-can-khow-in-jsp-that-my-action-validation-failed--tp22250234p22250234.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts 2 question about validation and forwarding
Hi, If request validation fails, how can I forward the user to a different page than that from which they came? The scenario is that an external web site is going to invoke our site with something like "/ourForm.do?param1=xxx¶m2=" and if their parameters are not valid, we want to forward them to another page on our site. Thanks for your help, - Dave -- View this message in context: http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250708.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 question about validation and forwarding
Just have the result of the input() method return them to a different page under that condition. On Fri, Feb 27, 2009 at 12:41 PM, laredotornado wrote: > > Hi, > > If request validation fails, how can I forward the user to a different page > than that from which they came? The scenario is that an external web site > is going to invoke our site with something like > "/ourForm.do?param1=xxx¶m2=" and if their parameters are not valid, > we want to forward them to another page on our site. > > Thanks for your help, - Dave > > -- > View this message in context: > http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250708.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com
Re: Form validation: how can khow in jsp that my action validation failed?
Your jsp has access to your action, in the valuestack. So, you should be able to ask Beware: for validation errors, besides hasActionErrors() you might want to ask hasFieldErrors(). Or use hasErrors() , that includes both Hernán J. González http://hjg.com.ar/ On Fri, Feb 27, 2009 at 3:25 PM, boraldo wrote: > > I need output special info in JSP if validation failed. How can I do it? > ActionSupport has method hasActionErrors. I need smth like that for JSP. > -- > View this message in context: > http://www.nabble.com/Form-validation%3A-how-can-khow-in-jsp-that-my-action-validation-failed--tp22250234p22250234.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 question about validation and forwarding
But it seems like the "ActionErrors validate" method from my ActionForm class is called, fails, and my execute handler is not called. Is there a way in the struts-config.xml file that I can set up a foward upon validation failure? This is what my struts action is currently ... - Dave Jim Kiley wrote: > > Just have the result of the input() method return them to a different page > under that condition. > > On Fri, Feb 27, 2009 at 12:41 PM, laredotornado > wrote: > >> >> Hi, >> >> If request validation fails, how can I forward the user to a different >> page >> than that from which they came? The scenario is that an external web >> site >> is going to invoke our site with something like >> "/ourForm.do?param1=xxx¶m2=" and if their parameters are not >> valid, >> we want to forward them to another page on our site. >> >> Thanks for your help, - Dave >> >> -- >> View this message in context: >> http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250708.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > > -- > Jim Kiley > Technical Consultant | Summa > [p] 412.258.3346 [m] 412.445.1729 > http://www.summa-tech.com > > -- View this message in context: http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250852.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts generate code
Hi, Im searching for tools that allows to generate some struts resources, like validation and app resources. I was looking around and I found the xDoclet annotations for to generate struts code, but my database is really so big, not so easy going to all the POJOs for to do that. Any other way, please? I was trying also to find ways to generate the POJOs with xDoclet annotations because anyway hibernate contains max-lenght and no-null values... Thank you, Mileidys Gonzalez Prieto - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [s2] accesing params from s:include tag
You're right. I should have read the documentation more closely. It clearly states that no stack is created and you have to access the parameters through the regular servlet objects. If you believe this is a shortcoming, you could register a JIRA issue for it, unless there is one already. Nils-H On Fri, Feb 27, 2009 at 5:23 PM, hernan gonzalez wrote: >> I was not able to do it, despite trying a million different forms as well as >> suggestions by some folks in strust mailing list. >> I do not think you will be able to access the param value passed to >> s:include within struts tag [clearly an obvious shortcoming]. Your best bet >> is using jsp expression language as the parameter is put in request scope. >> > > Indeed a shortcoming, and a frustrating one. > Wouldn this be partially fixed if, when the s:include/s:param are > evaluated, the params are also put into the "parameters" object in the > ActionContext? Are there good reasons to not doing so ? > > > BTW, although I much prefer Struts2 over Struts1, the fact that many > developers -not gurus, but with some months of s2 experience- > frequently need to try "million different forms" ( # % $ params > parameters etc etc) till (in the best scenario) it happens to work, > should tell something... > > > Hernán J. González > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: javax.servlet.jsp.JspException: Cannot find bean under name
Does render anything? Nils-H On Fri, Feb 27, 2009 at 4:17 PM, wrote: > Yes, > > I have a class where locationList is put in a RenderRequest object... > > > ... > log.info("Get Connection "); > conn = ADFDAOUtil.getConnection(getDataSource(request)); > dao = new CPCInventoryDAO(conn); > ArrayList locList = dao.getLocations(mode); > request.setAttribute("locationList", locList); > ... > > > > > Nils-Helge Garli Hegvik > 02/26/2009 04:11 PM > Please respond to > "Struts Users Mailing List" > > > To > Struts Users Mailing List > cc > > Subject > Re: javax.servlet.jsp.JspException: Cannot find bean under name > > > > > > > Have you put a collection named "locationList" in some scope? > > Nils-H > > On Thu, Feb 26, 2009 at 10:01 PM, wrote: >> Hi, >> >> I am receiving this exception on my portlet what am I missing? >> ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the >> service methods of the servlet: SPSInventory Portlet >> . Exception thrown : javax.servlet.ServletException: >> javax.portlet.PortletException: javax.servlet.jsp.JspException: Cannot >> find bean under name locationList >> at >> > com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:361) >> at >> > com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:82) >> >> >> Here is the main body in index.jsp: >> > action="/searchInventory"> >> >> >> >> Location >> size= >> "1" >> styleId="location"> >> > "locationList" property="name" /> >> >> >> >> Client Id >> size >> ="1"> >> > "clientList" property="name" /> >> >> >> >> Stock Id >> styleId >> ="field1" >> onfocus="field1.select()" onblur= >> "setFocus()" /> >> >> >> > "Submit" /> >> >> >> >> >> >> >> >> >> Here is part of my struts-config file: >> >> >> > "com.chase.adf.cpcinventory.forms.RequestFormBean"> >> >> >> >> >> >> >> >> >> >> >> >> > scope="session" type= >> "com.chase.adf.cpcinventory.actions.SearchInventoryAction"> >> >> >> > path="/failure.jsp"> >> >> > "noResultsFound" path="/noResults.jsp"> >> >> > "multipleResultsFound" path="/summaryResults.jsp"> >> >> >> > "session" type="com.chase.adf.cpcinventory.actions.GetSearchAction"> >> >> >> >> >> >> >> >> - >> This communication is for informational purposes only. It is not >> intended as an offer or solicitation for the purchase or sale of >> any financial instrument or as an official confirmation of any >> transaction. All market prices, data and other information are not >> warranted as to completeness or accuracy and are subject to change >> without notice. Any comments or statements made herein do not >> necessarily reflect those of JPMorgan Chase & Co., its subsidiaries >> and affiliates. >> >> This transmission may contain information that is privileged, >> confidential, legally privileged, and/or exempt from disclosure >> under applicable law. If you are not the intended recipient, you >> are hereby notified that any disclosure, copying, distribution, or >> use of the information contained herein (including any reliance >> thereon) is STRICTLY PROHIBITED. Although this transmission and any >> attachments are believed to be free of any virus or other defect >> that might affect any computer system into which it is received and >> opened, it is the responsibility of the recipient to ensure that it >> is virus free and no responsibility is accepted by JPMorgan Chase & >> Co., its subsidiaries and affiliates, as applicable, for any loss >> or damage arising in any way from its use. If you received this >> transmission in error, please immediately contact the sender and >> destroy the material in its entirety, whether in electronic or hard >> copy
HttpServletResponse Transfer-Encoding header
Hi, 1) What's a great way to manipulate HttpServletResponse existing headers using struts2? I tried changing Transfer-Encoding to Chunked using an interceptor (AbstractInterceptor) before and after the "actionInvocation.invoke();". I also tried again as a PreResultListener. I verified everything is hooked up and running via System.out.putlines. However, neither approach always affected the Transfer-Encoding value. I can add new headers using HttpServletResponse.addHeader(), but Transfer-Encoding seems different. 2) I also need a way to remove content-length if I can guarantee Transfer-Encoding is set to Chunked. Can I just set it to 0 and that counts? I looked at : http://www.w3.org/Protocols/rfc2616/rfc2616.html and http://en.wikipedia.org/wiki/Chunked_transfer_encoding Thanks, Mike Finney
Re: Struts generate code
You can use Java APT: http://java.sun.com/j2se/1.5.0/docs/guide/apt/GettingStarted.html We use it for struts-annotations (internal tool to generate TLD files for tags): http://svn.apache.org/viewvc/struts/maven/trunk/struts-annotations/ musachy On Fri, Feb 27, 2009 at 12:59 PM, Mileidys Gonzalez Prieto wrote: > Hi, Im searching for tools that allows to generate some struts resources, > like validation and app resources. I was looking around and I found the > xDoclet annotations for to generate struts code, but my database is really > so big, not so easy going to all the POJOs for to do that. Any other way, > please? > I was trying also to find ways to generate the POJOs with xDoclet > annotations because anyway hibernate contains max-lenght and no-null > values... > > Thank you, > > Mileidys Gonzalez Prieto > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 question about validation and forwarding
Exactly. If validation fails, execute will not be called by design. Since all you want to do is forward, you shouldn't need to run your execute method. The forwarding will take place in your struts.xml file as previously suggested. If you need to execute code regardless of the validation, look into the prepare method. On 2/27/09, laredotornado wrote: > > But it seems like the "ActionErrors validate" method from my ActionForm > class > is called, fails, and my execute handler is not called. Is there a way in > the struts-config.xml file that I can set up a foward upon validation > failure? > > This is what my struts action is currently ... > >type="com.myco.regui.struts.accounts.AccountsAction" > scope="request" > name="REAccountLookUpBean" > validate="true"> > > > - Dave > > > Jim Kiley wrote: >> >> Just have the result of the input() method return them to a different page >> under that condition. >> >> On Fri, Feb 27, 2009 at 12:41 PM, laredotornado >> wrote: >> >>> >>> Hi, >>> >>> If request validation fails, how can I forward the user to a different >>> page >>> than that from which they came? The scenario is that an external web >>> site >>> is going to invoke our site with something like >>> "/ourForm.do?param1=xxx¶m2=" and if their parameters are not >>> valid, >>> we want to forward them to another page on our site. >>> >>> Thanks for your help, - Dave >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250708.html >>> Sent from the Struts - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >> >> >> -- >> Jim Kiley >> Technical Consultant | Summa >> [p] 412.258.3346 [m] 412.445.1729 >> http://www.summa-tech.com >> >> > > -- > View this message in context: > http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250852.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Sent from my mobile device - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[S2] json-plugin: includeProperties being ignored?
Hello All, I'm having trouble getting the json-plugin 0.32 to behave as I'd expected. The action is exposing a List of objects annotated as "@JSON(name="items")" in the action. I have my result configured as: true items.*\.name However the returned JSON has all of the properties for the objects in the list. Can someone please help me with what I'm doing wrong? Thanks! --john - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts performance metrics
The StrutsRequestWrapper should allow you to access the value stack from JSTL EL, so you could use to iterate over a value from the value stack. (*Chris*) On Fri, Feb 27, 2009 at 7:12 AM, Mohan Radhakrishnan < radhakrishnan.mo...@gmail.com> wrote: > > Ok. Are you able to access the Value Stack directly using JSTL without > using > s:iterator ? > > Thanks, > Mohan > > -- > View this message in context: > http://www.nabble.com/Struts-performance-metrics-tp22077072p22247775.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
[S2] Param tag with collection value
Hello, I would like to construct an action url with a collection-valued parameter, i.e.: http://host/context/search.action?names=NAME1&names=NAME2 Is there an easy way to do this? I was trying: where 'names' was a List, but this was not working. I also tried an iterator with the url tag, but that resulted in no parameters being set. Brian Relph -- CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
How to specify namespace for s:submit.
Hi, Probably this questions has been asked before, but could not find answer on the list. How do I specify namespace for tag ? I have two buttons in the from and both of them call different action from different name space. These are not AJAX actions I tries using and also tried to give just action="/namespace1/MyAction". Does not work. Is this technically possible ? Thanks Leena
Re: Action mapping issue while Integrating S2 and S1
SanJ.SANJAY wrote: Everything (code and configuration) in chapterZero(the component I have added in this existing SampleApplication) is same as it is there for others (chapterTwo, chapterThree etc etc). So I am wondering 1. this is not the struts2-1 configuration issue since it is also not running with struts 2 only sample application. 2. There is nothing wrong with coding and configuration/jars issue as other components of Sample Application are working fine. Any insights on this??? I'm not really sure how anybody could possible help with just "it doesn't work and everything is the same as the stuff that does". Like, when my "check engine" light comes on I know *something* is wrong, but I don't really know much *beyond* that. (Well, I mean, I do, because I have a code reader, but that's neither here nor there.) You're basically telling us your "check engine" light went on. If you called up an automobile repair shop and said that your "check engine" light went on and then hung up they wouldn't be able to fix it. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 question about validation and forwarding
laredotornado wrote: But it seems like the "ActionErrors validate" method from my ActionForm class is called, fails, and my execute handler is not called. Is there a way in the struts-config.xml file that I can set up a foward upon validation failure? This is what my struts action is currently ... That's Struts 1, not Struts 2. You may need to call validation manually (not a big deal) and return a different ActionForward on failure. FWIW, that's what I almost *always* did in S1: I had a base action class that went to input on a GET, validated on a POST, and could be set up to do various things on validation failure. YMMV. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Action mapping issue while Integrating S2 and S1
Ok, If you check this thread , the previous entries have all the history of code and configuration. I did'nt want to put the code in every reply and mess the thread. By the way I have found out the issue with atleast the Sample Application, JBOSS and Eclipse are messing with each other and most of the times build does'nt refelct the changes. newton.dave wrote: > > SanJ.SANJAY wrote: >> Everything (code and configuration) in chapterZero(the component I have >> added in this existing SampleApplication) is same as it is there for >> others >> (chapterTwo, chapterThree etc etc). >> >> So I am wondering >> 1. this is not the struts2-1 configuration issue since it is also not >> running with struts 2 only sample >> application. >> 2. There is nothing wrong with coding and configuration/jars issue as >> other >> components of >> Sample Application are working fine. >> >> Any insights on this??? > > I'm not really sure how anybody could possible help with just "it > doesn't work and everything is the same as the stuff that does". > > Like, when my "check engine" light comes on I know *something* is wrong, > but I don't really know much *beyond* that. (Well, I mean, I do, because > I have a code reader, but that's neither here nor there.) > > You're basically telling us your "check engine" light went on. If you > called up an automobile repair shop and said that your "check engine" > light went on and then hung up they wouldn't be able to fix it. > > Dave > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Action-mapping-issue-while-Integrating-S2-and-S1-tp21982941p22255676.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Action mapping issue while Integrating S2 and S1
SanJ.SANJAY wrote: Ok, If you check this thread , the previous entries have all the history of code and configuration. I did'nt want to put the code in every reply and mess the thread. By the way I have found out the issue with atleast the Sample Application, JBOSS and Eclipse are messing with each other and most of the times build does'nt refelct the changes. Sorry, I'm not going to dig through 33 messages and guess what your current code and configuration looks like. Perhaps somebody else has the time to do that, though :) Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Action mapping issue while Integrating S2 and S1
Thanks you for your precious time. If you can't read what the thread is about, how are you trying to give insights? newton.dave wrote: > > SanJ.SANJAY wrote: >> Ok, If you check this thread , the previous entries have all the history >> of >> code and configuration. I did'nt want to put the code in every reply and >> mess the thread. By the way I have found out the issue with atleast the >> Sample Application, JBOSS and Eclipse are messing with each other and >> most >> of the times build does'nt refelct the changes. > > Sorry, I'm not going to dig through 33 messages and guess what your > current code and configuration looks like. > > Perhaps somebody else has the time to do that, though :) > > Dave > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Action-mapping-issue-while-Integrating-S2-and-S1-tp21982941p22256690.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Action mapping issue while Integrating S2 and S1
SanJ.SANJAY wrote: Thanks you for your precious time. If you can't read what the thread is about, how are you trying to give insights? You're welcome. How can I try to give insights? I generally can't, because you don't provide enough information, even after being asked, repeatedly. Over the last two weeks and 33 messages you never said anything about SiA, chapterZero, chapterTwo, etc. until today: asking you for the *current* configuration, deployment, ec. information hardly seems out-of-line. You're obviously doing something wrong if you can't take a working application and add another "component" to it writing it "exactly the same as the other elements". The question is *what* are you doing wrong. I've never looked at the SiA code: I have no way of knowing how the other elements, or yours, are written, configured, or deployed. If you can't take the few minutes necessary to cut-and-paste the information into an email when explicitly asked then I don't know what else to tell you. Good luck, Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Action mapping issue while Integrating S2 and S1
I'm sorry if I've offended you in anyway. chapterOne, chapterTwo are in the StrutsInAction.war that comes with struts 2 distribution. As I said I finally was able to run new component in this Sample Application and the issue was Eclipse and Jboss. newton.dave wrote: > > SanJ.SANJAY wrote: >> Thanks you for your precious time. If you can't read what the thread is >> about, how are you trying to give insights? > > You're welcome. How can I try to give insights? I generally can't, > because you don't provide enough information, even after being asked, > repeatedly. > > Over the last two weeks and 33 messages you never said anything about > SiA, chapterZero, chapterTwo, etc. until today: asking you for the > *current* configuration, deployment, ec. information hardly seems > out-of-line. > > You're obviously doing something wrong if you can't take a working > application and add another "component" to it writing it "exactly the > same as the other elements". The question is *what* are you doing wrong. > > I've never looked at the SiA code: I have no way of knowing how the > other elements, or yours, are written, configured, or deployed. If you > can't take the few minutes necessary to cut-and-paste the information > into an email when explicitly asked then I don't know what else to tell > you. > > Good luck, > Dave > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Action-mapping-issue-while-Integrating-S2-and-S1-tp21982941p22257070.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Action mapping issue while Integrating S2 and S1
SanJ.SANJAY wrote: I'm sorry if I've offended you in anyway. Not offended, frustrated. chapterOne, chapterTwo are in the StrutsInAction.war that comes > with struts 2 distribution. I'm not aware that there's anything called StrutsInAction.war shipped with the Struts 2 distribution; must have missed that one somehow. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts performance metrics
Yes. It does. Thanks. Now I find a big difference in performance. So unless I use freemarker I should be able to mix JSTL and OGNL and get some benefit. Iteration over a very large collection and access Javabean properties. JSTL - 2557 ms OGNL - 4499 ms Mohan -- View this message in context: http://www.nabble.com/Struts-performance-metrics-tp22077072p22258767.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Please help to get Arabic i18n(internationalization) using struts2.1.6
i have changed to Still problem din't resolved. How about these too are not i18n only works fine More over i am able to see following warnings in console Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [templateDir] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [templateDir] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [theme] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [fieldErrors] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [fieldErrors] Feb 28, 2009 12:56:15 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger warn WARNING: Could not find property [fieldErrors] -- View this message in context: http://www.nabble.com/Please-help-to-get-Arabic-i18n%28internationalization%29-using-struts2.1.6-tp2312p22259630.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org