Re: Struts2 REST plugin problems
Did you try to specify struts.rest.namespace constant ? It will change what kind of actions are created base on the namespace. http://struts.apache.org/2.2.3/docs/rest-plugin.html#RESTPlugin-Settings Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ 2011/7/2 Aelbery Lee aelb...@gmail.com: Hi, all. I'm currently using struts 2.2.3. I want to mix normal action with restful action in the same web app. I searched and found here. In my struts.mxl: constant name=struts.devMode value=true / constant name=struts.convention.action.mapAllMatches value=true / constant name=struts.convention.default.parent.package value=rest-default / constant name=struts.convention.package.locators value=action / constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/ constant name=struts.mapper.prefixMapping value=/ws:rest,:struts/ constant name=struts.rest.namespace value=/ws/ package name=common namespace=/mvc extends=struts-default action name=* class=com.mycompany.CommonSupport result/WEB-INF/content/{1}.jsp/result /action /package If I removed the PrefixBasedActionMapper and prefixMapping two lines, /myapp/mymodule works fine with restful action. But now /myapp/mymodule raise exception method not found, execute(); And /myapp/ws/mymodule raise exception action not found, ws action. So I must make a mistake. Thanks for you help. -- View this message in context: http://struts.1045723.n5.nabble.com/Struts2-REST-plugin-problems-tp3492324p4544292.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: About StrutsTypeConverter
Take a look on EnumTypeConverter Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ 2011/7/2 Vincent Lin vincent.lin...@gmail.com: Hi! I have a questsion about StrutsTypeConverter. It has 2 methods to be implemented: public Object convertFromString(Map context, String[] values, Class toClass) and public String convertToString(Map context, Object o) . Why the second parameter in convertFromString String[] instead of String? Does it mean struts will pass a array of String to converter when there are multiple parameter with the same name in JSP? But in that case, how do we convert the object back to String[] when the JSP is being rendered? Best Regards, Vincent - 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: strange behavior of s:a tag with s:include tag inside
I don't know why it happens that way. I've changed a bit templates by moving some code from a-close.ftl to a.ftl and now it works as you've been expecting. But that change broken few tests and can be backward incompatible. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ 2011/7/1 Александр Высоков nod...@gmail.com: Do you mean s:url action=test2 var=ac/ s:include value=%{ac}/ ? Tried. Empty body of a tag. 2 июля 2011 г. 0:56 пользователь Dave Newton davelnew...@gmail.comнаписал: 2011/7/1 Александр Высоков nod...@gmail.com: Dave, if I expressed roughly, I am very sorry (my bad english is not good enough). Nope, you're doing great :) Try using a link to an action in the s:include tag instead of a plain JSP. For now you could just create a class-less action mapping that forwards to the JSP you're currently using. See if the behavior continues. Dave - 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: strange behavior of s:a tag with s:include tag inside
Hi Lukasz, could you share your patch through JIRA (there was an open ticket IIRC)? 2011/7/3 Łukasz Lenart lukasz.len...@googlemail.com I don't know why it happens that way. I've changed a bit templates by moving some code from a-close.ftl to a.ftl and now it works as you've been expecting. But that change broken few tests and can be backward incompatible. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ 2011/7/1 Александр Высоков nod...@gmail.com: Do you mean s:url action=test2 var=ac/ s:include value=%{ac}/ ? Tried. Empty body of a tag. 2 июля 2011 г. 0:56 пользователь Dave Newton davelnew...@gmail.com написал: 2011/7/1 Александр Высоков nod...@gmail.com: Dave, if I expressed roughly, I am very sorry (my bad english is not good enough). Nope, you're doing great :) Try using a link to an action in the s:include tag instead of a plain JSP. For now you could just create a class-less action mapping that forwards to the JSP you're currently using. See if the behavior continues. Dave - 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 -- Maurizio Cucchiara
Re: strange behavior of s:a tag with s:include tag inside
Done! https://issues.apache.org/jira/browse/WW-3659 2011/7/3 Maurizio Cucchiara maurizio.cucchi...@gmail.com: Hi Lukasz, could you share your patch through JIRA (there was an open ticket IIRC)? 2011/7/3 Łukasz Lenart lukasz.len...@googlemail.com I don't know why it happens that way. I've changed a bit templates by moving some code from a-close.ftl to a.ftl and now it works as you've been expecting. But that change broken few tests and can be backward incompatible. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ 2011/7/1 Александр Высоков nod...@gmail.com: Do you mean s:url action=test2 var=ac/ s:include value=%{ac}/ ? Tried. Empty body of a tag. 2 июля 2011 г. 0:56 пользователь Dave Newton davelnew...@gmail.comнаписал: 2011/7/1 Александр Высоков nod...@gmail.com: Dave, if I expressed roughly, I am very sorry (my bad english is not good enough). Nope, you're doing great :) Try using a link to an action in the s:include tag instead of a plain JSP. For now you could just create a class-less action mapping that forwards to the JSP you're currently using. See if the behavior continues. Dave - 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 -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
On applying action-validation.xml action is not executing.
When I am removing the validation xml file the action is executing properly and injecting the data in the database start sending mails, but when I am using action-validation.xml the action is not able to execute and probably what should be the reason for it? -- View this message in context: http://struts.1045723.n5.nabble.com/On-applying-action-validation-xml-action-is-not-executing-tp4548473p4548473.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: On applying action-validation.xml action is not executing.
Validation is failing? Bad validation file? Type conversion failure? You didn't really give us much to go on. Dave On Jul 3, 2011 8:18 PM, log2akshat akshat-...@iiitmk.ac.in wrote: When I am removing the validation xml file the action is executing properly and injecting the data in the database start sending mails, but when I am using action-validation.xml the action is not able to execute and probably what should be the reason for it? -- View this message in context: http://struts.1045723.n5.nabble.com/On-applying-action-validation-xml-action-is-not-executing-tp4548473p4548473.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: On applying action-validation.xml action is not executing.
No, validation is not failing as you can see the screenshot in my previous post in an another problem. The problem is that when I am including the validation xml file the form is validating and displaying the errors but on submitting the form the method of the action class is not executing and displaying only the blank page with header but on removing the validation file the action class is executing and injecting data in the database. -- View this message in context: http://struts.1045723.n5.nabble.com/On-applying-action-validation-xml-action-is-not-executing-tp4548473p4548510.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
Validation Problem
In my validation half of the validation is working fine but in the half form old error message is not clearing, and the new error message is showing in a new line. On clicking again the previous error messages are there and the new message is adding in a new row. I am attaching the Screenshot of the Error Messages. http://struts.1045723.n5.nabble.com/file/n4547986/Screenshot.png -- View this message in context: http://struts.1045723.n5.nabble.com/Validation-Problem-tp4547986p4547986.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: On applying action-validation.xml action is not executing.
I'm supposed to remember a previous post, for a different problem, realize they're related, on my cell phone? Right, okay, I'll let someone else jump through those hoops. Post complete questions, with code or config: why would you make it difficult for people to help you? It's difficult to guess what you're doing. Dave On Jul 3, 2011 8:47 PM, log2akshat akshat-...@iiitmk.ac.in wrote: No, validation is not failing as you can see the screenshot in my previous post in an another problem. The problem is that when I am including the validation xml file the form is validating and displaying the errors but on submitting the form the method of the action class is not executing and displaying only the blank page with header but on removing the validation file the action class is executing and injecting data in the database. -- View this message in context: http://struts.1045723.n5.nabble.com/On-applying-action-validation-xml-action-is-not-executing-tp4548473p4548510.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-user] Re: On applying action-validation.xml action is not executing.
? -Original Message- From: log2akshat [mailto:akshat-...@iiitmk.ac.in] Sent: Sunday, July 03, 2011 20:47 To: user@struts.apache.org Subject: [struts-user] Re: On applying action-validation.xml action is not executing. No, validation is not failing as you can see the screenshot Screenshot? in my previous post in an another problem. The problem is What post? that when I am including the validation xml file the form is validating and displaying the errors but on submitting the form the method of the action class is not executing and displaying only the blank page with header but on removing the validation file the action class is executing and injecting data in the database. -- View this message in context: http://struts.1045723.n5.nabble.com/On-applying-action-validat ion-xml-action-is-not-executing-tp4548473p4548510.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 -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: On applying action-validation.xml action is not executing.
Sorry for the confusion Actually, I have a form that needs to be validated and on successful validation it should populate the data in the database as well as able to send the mails to the mail IDs provided in the form. All the functionality is working fine as long as I am not validating my form but as soon as I start using the validation script through action-validation.xml file the form starts validating but on submission of the form it is not populating the database and sending the mails only it is redirecting to the success page where it is only showing the errors and I am not getting any errors also. Action name is : Submitappform The name of the action class is : SubmitAppFormAction Validation file name : SubmitAppFormAction-validation.xml My *struts.xml* file for this action: action name=Submitappform class=net.Candidate.application.action.SubmitAppFormAction method=add interceptor-ref name=paramsdojo\..*,^struts\..*/interceptor-ref interceptor-ref name=validationinput,back,cancel,browse/interceptor-ref interceptor-ref name=workflowinput,back,cancel,browse/interceptor-ref result name=input type=tilesOLAppForm/result result name=error type=tilesOLAppForm/result result name=success type=tilesAppFormSubmitSuccess/result /action My SubmitAppFormAction-validation.xml file is: ?xml version=1.0 encoding=UTF-8 ? lt;!DOCTYPE validators PUBLIC quot;-//OpenSymphony Group//XWork Validator 1.0.2//ENquot; quot;http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtdquot;gt; validators field name=appform.Name field-validator type=requiredstring true message key=validate_Name/ /field-validator /field field name=appform.Surname field-validator type=requiredstring true message key=validate_Surname/ /field-validator /field field name=appform.DOB field-validator type=requiredstring true message key=validate_DOB/ /field-validator /field field name=appform.Gender field-validator type=required true message key=validate_Gender/ /field-validator /field field name=appform.Nationality field-validator type=requiredstring true message key=validate_Nationality/ /field-validator /field field name=appform.CAddress field-validator type=requiredstring true message key=validate_CAddress/ /field-validator /field field name=appform.CPin field-validator type=requiredstring true message key=validate_CPin/ /field-validator /field field name=appform.CCity field-validator type=required true message key=validate_CCity/ /field-validator /field field name=appform.CState field-validator type=required true message key=validate_CState/ /field-validator /field field name=appform.Telephone field-validator type=requiredstring true message key=validate_Telephone/ /field-validator /field field name=appform.PAddress field-validator type=requiredstring true message key=validate_PAddress/ /field-validator /field field name=appform.PPin field-validator type=requiredstring true message key=validate_PPin/ /field-validator /field field name=appform.PCity field-validator type=required true message key=validate_PCity/ /field-validator /field field name=appform.PState field-validator type=required true message key=validate_PState/ /field-validator /field field name=appform.Category field-validator type=requiredstring true message key=validate_Category/ /field-validator /field field name=appform.Referee1Email field-validator type=requiredstring short-circuit=true true message key=validate_Referee1Email/ /field-validator field-validator type=email message key=validate_RefereeEmail/ /field-validator /field /validators My SubmitAppFormAction class: package net.Candidate.application.action; import java.io.*; import java.sql.*; import java.util.*; import javax.naming.*; import javax.mail.*; import javax.servlet.*; import javax.servlet.http.*; import javax.mail.internet.*; import com.sun.mail.smtp.*; import com.sun.mail.smtp.SMTPSSLTransport.*; import javax.activation.*; import com.opensymphony.xwork2.ActionSupport; import com.opensymphony.xwork2.ActionContext; import net.database.*; import net.Candidate.application.model.Apply; import net.Candidate.application.model.Appform; import
Re: Struts2 REST plugin problems
Yes. I had set struts.rest.namespace in the struts.xml to /ws. -- View this message in context: http://struts.1045723.n5.nabble.com/Struts2-REST-plugin-problems-tp3492324p4548572.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: About StrutsTypeConverter
I am confused that why the signature of convertFromString is public Object convertFromString(Map context, String[] values, Class toClass) instead of public Object convertFromString(Map context, String value, Class toClass). What's the point to pass a String array instead of a String argument into this method? Best Regards, Vincent Lin 2011/7/3 Łukasz Lenart lukasz.len...@googlemail.com: Take a look on EnumTypeConverter Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ 2011/7/2 Vincent Lin vincent.lin...@gmail.com: Hi! I have a questsion about StrutsTypeConverter. It has 2 methods to be implemented: public Object convertFromString(Map context, String[] values, Class toClass) and public String convertToString(Map context, Object o) . Why the second parameter in convertFromString String[] instead of String? Does it mean struts will pass a array of String to converter when there are multiple parameter with the same name in JSP? But in that case, how do we convert the object back to String[] when the JSP is being rendered? Best Regards, Vincent - 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