Re: Validate URL or email with internationalized domain name (IDN)
I found a solution and mad an example app. You can show it here: https://www.fentool.de/dwr/ The source and description are here: https://gitlab.com/gpaulab-public/struts-dwr-validate-example I hope it's useful Best wishes Guenter - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Validate URL or email with internationalized domain name (IDN)
In a second step Iried to use the DWR-method. The app example is simple. But using the class DWRValidator break: Dispatcher du = Dispatcher.getInstance(); The Dispatcher is NULL and I can't find the problem. Perhaps somebody has a solution? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Validate URL or email with internationalized domain name (IDN)
I think the class "org.apache.struts2.validators.DWRValidator" will not works so I try another way. I found a solution, maybe we can use it? I found a good example using dwr here: https://www.jitendrazaa.com/blog/java/jsp/step-by-step-dwr-application-simple-ajax-in-java/ What is to do: - for using client validation we need the theme "xhtml" or "css_xhtml" (not "simple") - and the form has to us validation, example "" - we need drw-1.1.1.jar and struts2-dwr-plugin-2.5.26.jar (that's standard) - I create a new class "IdnToAscii" with the method "getIdnToAscii" (I propose to use the class "org.apache.struts2.validators.DWRValidator" for this) import java.net.IDN; public class IdnToAscii { public IdnToAscii() {} public String getIdnToAscii(String psUrl) { if (psUrl == null) { psUrl = ""; } return IDN.toASCII(psUrl); } } - create or change in the WEB-INF-folder the file dwr.xml http://www.getahead.ltd.uk/dwr/dwr10.dtd";> - I use the "css_xhtml" theme - I change the file "resources/template/css_xhtml/form-validate.ftl" <#if parameters.validate!false == true> <#if parameters.onsubmit??> ${tag.addParameter('onsubmit', "${parameters.onsubmit}; return validateForm_${parameters.id?replace('[^a-zA-Z0-9_]', '_', 'r')}();")} <#else> ${tag.addParameter('onsubmit', "return validateForm_${parameters.id?replace('[^a-zA-Z0-9_]', '_', 'r')}();")} - I copy the file "resources/template/xhtml/form-close-validate.ftl" int the "css_xhtml" folder and change the url-validator: <#elseif validator.validatorType = "url"> if (continueValidation && fieldValue !== null && fieldValue.length > 0) { DWREngine.setAsync(false); IdnToAscii.getIdnToAscii(fieldValue, function(idnurl) { fieldValue = idnurl; }); alert("URL >" + fieldValue + "<"); if (continueValidation && fieldValue !== null && fieldValue.length > 0 && fieldValue.match(/${validator.urlRegex}/i) === null) { addError(field, error); errors = true; <#if validator.shortCircuit>continueValidation = false; } } That's all. It's important to use DWR in sync-mode. We only convert the field-value to IDN (using JAVA at the server) and after we check the changed value. We can use the same way by email-validation. And xhtml-theme is the same way, I think (I can't use it in my project, so I don't test it here). Hope it's useful. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Validate URL or email with internationalized domain name (IDN)
DWR valdiation looks fine. Is there any small example? If not, I will try it by myself and try to use it. After I would try to use URL- and EMail-Validation. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Validate URL or email with internationalized domain name (IDN)
I'm not sure. Perhaps a solution with Ajax is possible? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Validate URL or email with internationalized domain name (IDN)
OK, client validation is a problem, that's true. I don't use it, but yes, it's usefull. I found punycode for that: https://github.com/bestiejs/punycode.js It's MIT-licence, I'm not sure we can use it for standard. I'm not really good in javascript, but I can it to write my own decoder. The better way is to use a standard-decoder like ounycode, I think. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Validate URL or email with internationalized domain name (IDN)
In Germany we can use domaine-names like "münchen.de". The struts validators URLValidator and EmailIdnValidator can't handle such name with umlaut. The domaine is valide but not for the validator. Is it possible to change this behavior? I overwrite the classes and it works for me. But I think it's better to change the standard classes, Here my solution: import com.opensymphony.xwork2.validator.ValidationException; import com.opensymphony.xwork2.validator.validators.URLValidator; import java.net.IDN; import java.util.Objects; public class URLIdnValidator extends URLValidator { @Override public Object getFieldValue(String name, Object object) throws ValidationException { Object fieldValue = super.getFieldValue(name, object); if (fieldValue != null) { fieldValue = IDN.toASCII(Objects.toString(fieldValue, "")); // need Java 1.6 } return fieldValue; } } Thanks for your attention. Best wishes Günter - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Opting action method back into validation
It is an existing project that has hundreds of action classes and is currently configured by the struts rest plug-in to ignore the show method for validation. I know I can update the configuration to remove the exclusion, but many of these actions also have a validate() implementation which would begin to fire for the existing show(). I would have to go through and add the skip validation annotation on most of these. I was wondering if there was a way to configure the validation for a specific action class which would force the validation to run? For example, a @doValidation annotation on the method that overrides the exclusion in the config. Paul Zepernick Sent from my iPhone > On Dec 8, 2020, at 2:13 AM, Lukasz Lenart wrote: > > NOTICE: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > pon., 7 gru 2020 o 15:24 Paul Zepernick > napisał(a): > >> Is there any way to take a method that has been excluded from validation >> in the configuration and turn it back on for a single action? For example, >> I am using the REST plugin which excludes the show() method from the >> validation. 99% of the time I do not have any validation that I want to >> run, but I do have some edge cases where it would be helpful to have the >> validate() / validateShow() available for a particular action. >> > > Not sure if I understand, you can add your conditional validation logic > into "validateShow()", so in 99% this method will do nothing, but in 1% of > conditions it will perform the validation. > > > Regards > -- > Łukasz > + 48 606 323 122 > https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.lenart.org.pl%2F&data=04%7C01%7CPaul.Zepernick%40healthsmart.com%7C7a2e901f7b1a4606382d08d89b48b90a%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C637430083954665096%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3QNfekKTv9TaGv%2BvrsY0f%2Baf9CedsOALl5%2BVXb6qUAY%3D&reserved=0 Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Opting action method back into validation
Is there any way to take a method that has been excluded from validation in the configuration and turn it back on for a single action? For example, I am using the REST plugin which excludes the show() method from the validation. 99% of the time I do not have any validation that I want to run, but I do have some edge cases where it would be helpful to have the validate() / validateShow() available for a particular action. Paul R Zepernick | Sr Programmer Analyst HealthSmart paul.zepern...@healthsmart.com | www.HealthSmart.com<http://www.healthsmart.com/> [HS email footer]<http://www.healthsmart.com/> [if_square-linkedin_317725 (3)] <http://www.linkedin.com/company/healthsmart> [if_square-twitter_317723 (3)] <http://twitter.com/healthsmart> [if_square-facebook_317727 (2)] <http://www.facebook.com/healthsmart> Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
RE: NPE when running unit test with struts rest plugin
Thank you very much, this has resolved the issue! I have created a ticket in Jira. https://issues.apache.org/jira/browse/WW-5095 Paul R Zepernick | Sr Programmer Analyst HealthSmart paul.zepern...@healthsmart.com | www.HealthSmart.com -Original Message- From: Lukasz Lenart Sent: Saturday, November 7, 2020 8:51 AM To: Struts Users Mailing List Subject: Re: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. śr., 4 lis 2020 o 17:29 Paul Zepernick napisał(a): > I have posted an example project that reproduces the error in the > junit test > > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith > ub.com%2Fzepernick%2Fstruts25-rest-junit&data=04%7C01%7CPaul.Zeper > nick%40healthsmart.com%7C51b18c36edb9455e56dc08d8832422d3%7C2ce547c5e8 > 0a40628a56f25adceefb52%7C0%7C0%7C637403538520826158%7CUnknown%7CTWFpbG > Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0% > 3D%7C1000&sdata=R67dd6goXC0LKd7SiGGclmYcU0rsUDn1i53CyzjLmVw%3D& > ;reserved=0 I think I have found the problem, mapping is not set in getActionProxy(), you can fix it by overriding it like this: protected ActionProxy getActionProxy(String uri) { request.setRequestURI(uri); ActionMapping mapping = getActionMapping(request); String namespace = mapping.getNamespace(); String name = mapping.getName(); String method = mapping.getMethod(); Configuration config = configurationManager.getConfiguration(); ActionProxy proxy = config.getContainer().getInstance(ActionProxyFactory.class).createActionProxy( namespace, name, method, new HashMap(), true, false); initActionContext(proxy.getInvocation().getInvocationContext()); // this is normally done in onSetUp(), but we are using Struts internal // objects (proxy and action invocation) // so we have to hack around so it works ServletActionContext.setServletContext(servletContext); ServletActionContext.setRequest(request); ServletActionContext.setResponse(response); ServletActionContext.getContext().put(ServletActionContext.ACTION_MAPPING, mapping); return proxy; } Fee free to open a JIRA ticket and as I'm going to prepare yet another 2.5.x release I can address this issue Regards -- Łukasz + 48 606 323 122 + https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.l + enart.org.pl%2F&data=04%7C01%7CPaul.Zepernick%40healthsmart.com%7C + 51b18c36edb9455e56dc08d8832422d3%7C2ce547c5e80a40628a56f25adceefb52%7C + 0%7C0%7C637403538520826158%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA + iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jWn%2 + B4tFUL53LvuprGz8l6bNEMWrX8d1FMLqlR1m5tJI%3D&reserved=0 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
RE: NPE when running unit test with struts rest plugin
Lukasz, I have posted an example project that reproduces the error in the junit test https://github.com/zepernick/struts25-rest-junit Paul R Zepernick | Sr Programmer Analyst HealthSmart paul.zepern...@healthsmart.com | www.HealthSmart.com -Original Message- From: Paul Zepernick Sent: Tuesday, November 3, 2020 2:42 PM To: Struts Users Mailing List Subject: RE: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Sure, I will prepare an example on Github and let you know when it is available Paul R Zepernick | Sr Programmer Analyst HealthSmart Office: 517 582 6525 paul.zepern...@healthsmart.com | https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.healthsmart.com%2F&data=04%7C01%7CPaul.Zepernick%40healthsmart.com%7C346f28586cf44ead92a708d880308637%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C1%7C637400293195116068%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=6eei482P2I3rZ0Dv%2BjG2csKMbht701IYLAdKdIgT0fY%3D&reserved=0 -Original Message- From: Lukasz Lenart Sent: Tuesday, November 3, 2020 2:37 PM To: Struts Users Mailing List Subject: Re: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. wt., 3 lis 2020 o 13:24 Paul Zepernick napisał(a): > Yes, I am using the struts2-junit plugin and extending > StrutsSpringJUnit4TestCase from the plugin. Would you mind preparing a small example and put it on Github? Regards -- Łukasz + 48 606 323 122 + https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.l + enart.org.pl%2F&data=04%7C01%7CPaul.Zepernick%40healthsmart.com%7C + 346f28586cf44ead92a708d880308637%7C2ce547c5e80a40628a56f25adceefb52%7C + 0%7C1%7C637400293195116068%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA + iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=VFoI2 + p4yApykSgTPZOGXCNGN6KzDfzQiga2hyA8E0sE%3D&reserved=0 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: NPE when running unit test with struts rest plugin
Sure, I will prepare an example on Github and let you know when it is available Paul R Zepernick | Sr Programmer Analyst HealthSmart Office: 517 582 6525 paul.zepern...@healthsmart.com | www.HealthSmart.com -Original Message- From: Lukasz Lenart Sent: Tuesday, November 3, 2020 2:37 PM To: Struts Users Mailing List Subject: Re: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. wt., 3 lis 2020 o 13:24 Paul Zepernick napisał(a): > Yes, I am using the struts2-junit plugin and extending > StrutsSpringJUnit4TestCase from the plugin. Would you mind preparing a small example and put it on Github? Regards -- Łukasz + 48 606 323 122 https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.lenart.org.pl%2F&data=04%7C01%7CPaul.Zepernick%40healthsmart.com%7C9f1102882705449c0cb708d8802fd114%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C637400290150028866%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Lx9EpUy6swkqB65Qf84Zy1uaWQHCY6%2FzM%2Fp0%2Bu%2F35U8%3D&reserved=0 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: NPE when running unit test with struts rest plugin
Yes, I am using the struts2-junit plugin and extending StrutsSpringJUnit4TestCase from the plugin. Paul R Zepernick | Sr Programmer Analyst HealthSmart Office: 517 582 6525 paul.zepern...@healthsmart.com | www.HealthSmart.com -Original Message- From: Lukasz Lenart Sent: Tuesday, November 3, 2020 1:16 AM To: Struts Users Mailing List Subject: Re: NPE when running unit test with struts rest plugin NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. pon., 2 lis 2020 o 14:48 Paul Zepernick napisał(a): > Struts: 5.2.25 > > Plugins: struts2-rest, struts2-spring, struts2-convention junit 4 > > Did you try to use struts2-junit plugin and based your tests on StrutsJUnit4TestCase? https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstruts.apache.org%2Fplugins%2Fjunit%2F&data=04%7C01%7CPaul.Zepernick%40healthsmart.com%7Cea5207226d3940a0902a08d87fbfeefb%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C637399809618813651%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=MsGQZtBlw459VufXJY4dA%2BMaa8jW%2BEmH3i5uoXDv8GQ%3D&reserved=0 Regards -- Łukasz + 48 606 323 122 https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.lenart.org.pl%2F&data=04%7C01%7CPaul.Zepernick%40healthsmart.com%7Cea5207226d3940a0902a08d87fbfeefb%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C637399809618813651%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=UHMX7w%2BVMV%2BYXpHEgiwIEYDD8X4hGSVlr2O%2FJMwWlYA%3D&reserved=0 Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
NPE when running unit test with struts rest plugin
Struts: 5.2.25 Plugins: struts2-rest, struts2-spring, struts2-convention junit 4 The test below is currently failing in the RestWorkflowInterceptor 205 @Test public void testValidation() throws Exception { // the login uses the create() which expects the POST method request.setMethod("POST"); ActionProxy proxy = getActionProxy("/security/login"); Assert.assertNotNull(proxy); LoginAction action = (LoginAction)proxy.getAction(); Assert.assertNotNull(action); // THIS IS THE LINE THAT TRIGGERS THE FAILURE String result = proxy.execute(); Assert.assertTrue("expected some field errors", !action.getFieldErrors().isEmpty()); } Here is the line in the RestWorkflowInterceptor 203 that is returning a null and creates the NPE condition a couple lines down ActionMapping mapping = (ActionMapping) ActionContext.getContext().get(ServletActionContext.ACTION_MAPPING); I have verified that there are items in the context, but the struts.actionMapping key is missing. I am not sure if this is related, but I have to override getActionProxy() to overcome a different NPE issue @Override protected ActionProxy getActionProxy(String uri) { // the super.getActionProxy() already sets this, but does it at the end of the method. // the ActionProxy proxy = ... line is already expecting it to be present and produces a NPE ServletActionContext.setServletContext(servletContext); ServletActionContext.setRequest(request); ServletActionContext.setResponse(response); return super.getActionProxy(uri); } Is there something else that has to be mocked to correctly setup the ActionContext for the RestWorkflowInterceptor? Below is the entire test class for reference. The IWSStrutsSpringTestCase is extending StrutsSpringJUnit4TestCase, is providing the override of the getActionProxy, and is being annotated with @WebAppConfiguration @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = LoginActionSpringConfig.class) public class LoginActionTest extends IwsStrutsSpringTestCase { @Test public void getActionMapping() { ActionMapping mapping = getActionMapping("/security/login"); Assert.assertNotNull(mapping); Assert.assertEquals("/security", mapping.getNamespace()); Assert.assertEquals("login", mapping.getName()); } @Test public void testValidation() throws Exception { // the login uses the create() which expects the POST method request.setMethod("POST"); ActionProxy proxy = getActionProxy("/security/login"); Assert.assertNotNull(proxy); LoginAction action = (LoginAction)proxy.getAction(); Assert.assertNotNull(action); String result = proxy.execute(); Assert.assertTrue("expected some field errors", !action.getFieldErrors().isEmpty()); } } Paul R Zepernick | Sr Programmer Analyst HealthSmart paul.zepern...@healthsmart.com | www.HealthSmart.com<http://www.healthsmart.com/> [HS email footer]<http://www.healthsmart.com/> [if_square-linkedin_317725 (3)] <http://www.linkedin.com/company/healthsmart> [if_square-twitter_317723 (3)] <http://twitter.com/healthsmart> [if_square-facebook_317727 (2)] <http://www.facebook.com/healthsmart> Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
Re: Help with syntax struts 2
Assuming the intention is to exclude all those report ids, they should be && and not || Paul Sent from my iPhone > On Mar 8, 2019, at 7:34 PM, Dave Newton wrote: > > NOTICE: This email originated from outside of the organization. Do not click > links or open attachments unless you recognize the sender and know the > content is safe. > > What kind of help? > > On Fri, Mar 8, 2019 at 7:05 PM Deborah White > wrote: > >> Can someone help me with the syntax on this? >> >> >> >> CONFIDENTIALITY NOTICE: This communication with its contents may contain >> confidential and/or legally privileged information. It is solely for the >> use of the intended recipient(s). Unauthorized interception, review, use or >> disclosure is prohibited and may violate applicable laws including the >> Electronic Communications Privacy Act. If you are not the intended >> recipient, please contact the sender and destroy all copies of the >> communication. >> > -- > em: davelnew...@gmail.com > mo: 908-380-8699 > tw: @dave_newton > <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2Fdave_newton&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&sdata=f4zFxZ7GmehZevyLfwCN7TWaOi7gF0opcs8QsM2JIxo%3D&reserved=0> > li: dave-newton > <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fin%2Fdave-newton%2F&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&sdata=aKj1XOfoVCwWWfvWjJQ794zFKHIDz5e%2BzkTp0l2PVuI%3D&reserved=0> > gh: davelnewton > <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdavelnewton&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&sdata=lfhf7thvZ4DKXLn%2B86CEaBE5Kv3j29HXBBiDN49mzk4%3D&reserved=0> > so: Dave Newton > <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fstackoverflow.com%2Fusers%2F438992%2Fdave-newton&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&sdata=G6ZEm2rpkPd2cQIy%2FYk%2F2CHFAGGuMWv6n6oEcaFwD%2BM%3D&reserved=0> > bl[0]: Bucky Bits > <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuckybits.blogspot.com%2F&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&sdata=QW90IIzMh8Wkag%2F%2F0EdS%2F%2BedDeK4xAyO0he1XPqcuk4%3D&reserved=0> > bl[1]: Maker's End Blog > <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblog.makersend.com&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cbccd164b9e05413a344908d6a426f7a6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636876884606518227&sdata=Jlm7cU1Pt8HYI1bPwVQBgKeZt2nDro%2FAeed4XqBRrS8%3D&reserved=0> > sk: davelnewton_skype Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Struts2 Checkboxlist
Yes, setFoo is only called if the checkbox is checked. However, Struts 2 does have a checkbox interceptor: https://struts.apache.org/core-developers/checkbox-interceptor.html This interceptor defaults checkbox Boolean's to False if the box is not checked. This is part of the default interceptor stack. Paul -Original Message- From: Prasanth Pasala Sent: Monday, February 4, 2019 5:21 PM To: user@struts.apache.org Subject: Re: Struts2 Checkboxlist NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Is that how Struts2 is expected to work? Meaning setFoo would not be called if non of the Foo checkboxes are selected? I know that is how Struts1 worked. Thanks, Prasanth On 2/2/19 7:08 PM, Prasanth Pasala wrote: > Hi Yasser, > > When none of the checkboxes is selected the setFoo is not getting called. > > Thanks > Prasanth > > On February 2, 2019 8:02:07 AM CST, Yasser Zamani > wrote: >> Hi Prasanth, >> >> AFAIK this tag is like this: >> >> >> >> It calls getBar method of your action or finds bar in value stack to >> find out what to display. Same for baz to find out which to be >> selected. Then it calls yourAction.setFoo to post selected items. i.e. >> it is up to you what you do with it in setFoo method. Normally you >> should clear baz and fill it with them again to update selected items. >> >> Thanks for using Struts! >> >> Kind Regards. >> >>> -Original Message- >>> From: Prasanth >>> Sent: Saturday, February 2, 2019 1:08 AM >>> To: user@struts.apache.org >>> Subject: Struts2 Checkboxlist >>> >>> Hi, >>> >>> I am using a checkboxlist on a jsp page which corresponds to a >> ArrayList in the >>> form class, which is used to store form data from a multi page wizard. >> I am using >>> scope interceptor to store the form class in session so that the >>> data >> persists as >>> the user navigates the wizard. When the user selects some check >>> boxes >> it is >>> correctly populated in the form class but if the user navigates back >> in the wizard >>> and unchecks the check box (non of the check boxes selected) struts >> doesn't set >>> the ArrayList to empty. It will still contain the old selection. >>> What >> is the best way >>> to solve this issue? >>> >>> My Options: >>> 1. Should I use Preparable and set this ArrayList to empty? Since >>> this >> is a wizard >>> (multiple pages submitting to the same action) have to make sure it >>> is >> done only >>> when submitting the page that have these checkboxes. >>> 2. Create two separate ArrayLists, one to get values from Struts and >> another to >>> save the original selection and clear the first array list. Down >>> side >> is I need to >>> populate the list linked to the form when user navigates back to >>> that >> page. >>> Neither of them seem elegant. Is there a way to make struts set the >> ArrayList to >>> empty when user doesn't select any check box? >>> >>> Using Struts 2.3.35 >>> >>> Thanks, >>> Prasanth >> - >> To unsubscribe, e-m Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
RE: Java 11 support
I can confirm that this was the same error I was seeing when trying Java 11 using Struts 2.5.18. It is happening in the convention pluggin on the startup of the server when it scans for actions to configure Struts. It is not a compile issue, but happening at runtime. Paul -Original Message- From: Sebastian Götz Sent: Friday, January 18, 2019 3:30 AM To: user@struts.apache.org Subject: Re: Java 11 support NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. In the end: yes. Although we are building with ANT and IVY. But the compiler levels are specified as 11, yes. I do not know how to do it with maven. But it woul dbe relevant for the tests of the convention plugin to analyse some Struts2 action class with class version 55. Am 18.01.2019 um 09:13 schrieb Lukasz Lenart: > To clarify, you run your build on JDK11 and you defined source & > target in Maven pom as version 11, right? > > > Regards -- Mit freundlichen Grüßen Sebastian Götz iNFORM Technology GmbH Niederlassung Albstadt Berliner Straße 24 72458 Albstadt-Ebingen Tel: +49 7431 9816090 Fax: +49 7431 9816092 s.go...@inform-technology.de <mailto:s.go...@inform-technology.de> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.inform-technology.de%2F&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cc78b0160c9634fa0556f08d67d1f37a9%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C1%7C636833970376493460&sdata=N8iSyqBh0pmpCN2hMkS8DlPzT6oIilTAsJpWxvaxaew%3D&reserved=0 * Zentrale Stockach: Bodenseeallee 18 D-78333 Stockach Tel: +49 7771 9282 494 * Geschäftsführer: Dipl.-Ing. (FH) Heinz Roth | Handelsregister: HRB 715948, Amtsgericht Freiburg | USt-ID Nr.: DE312290945 Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
RE: Struts 2.5.x support above Java 8
Hi Yasser, This is great news! I look forward to the release and testing it. Thank you to you and the team for all your efforts! Paul -Original Message- From: Yasser Zamani On Behalf Of Yasser Zamani Sent: Monday, November 19, 2018 7:25 AM To: Struts Users Mailing List Subject: Re: Struts 2.5.x support above Java 8 NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. Hi Paul, I'm pleased to announce it seems we were able to add both java 9 and 11 supports into Struts 2.5.19. Could you please wait for its release and then tests the bits? It currently can pass all tests with all jdks (see [1]) but it's so great if you will be able to test it in production also. Regards. [1] https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftravis-ci.org%2Fapache%2Fstruts%2Fbuilds%2F456910100&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cd492860f926b44e597da08d64e1a0e7c%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0%7C636782271161049678&sdata=mPufOXGj8wL6epUrthCIgGlMzCTNENDlzbjEL4Yb4yA%3D&reserved=0 >-Original Message- >From: David Dillard >Sent: Monday, November 12, 2018 6:09 PM >To: Struts Users Mailing List >Subject: RE: [EXTERNAL] Re: Struts 2.5.x support above Java 8 > >True, however just because someone made the choice to use them (knowing >that they would be supported for six months each) and to continue using >them doesn’t mean Struts has to support those people. > > >-Original Message- >From: Dave Newton >Sent: Sunday, November 11, 2018 11:17 AM >To: Struts Users Mailing List >Subject: Re: [EXTERNAL] Re: Struts 2.5.x support above Java 8 > >Determining support is fraught, because people run on all sorts of >JVMs, including EOLed versions :/ > >On Sun, Nov 11, 2018 at 10:01 AM David Dillard > >wrote: > >> > We do plan support JDK 9 and JDK 11 as from Struts 2.6 (in >> > development), >> maybe we will be able to port those changes into 2.5.x branch but we >> will see. >> >> Really no point in supporting JDK 9 or 10 as they are now EOL. JDK >> 11 support would be great. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> > > >-- >em: davelnew...@gmail.com >mo: 908-380-8699 >tw: @dave_newton ><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitt >er.com%2Fdave_newton&data=02%7C01%7CPaul.Zepernick%40healthsmart.co >m%7Cd492860f926b44e597da08d64e1a0e7c%7C2ce547c5e80a40628a56f25adceefb52 >%7C0%7C0%7C636782271161049678&sdata=2sMjQCv78P%2F%2BYfVDJMGGwt4rD8x >y6Q4GLErRuG6jkBc%3D&reserved=0> >li: dave-newton ><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.l >inkedin.com%2Fin%2Fdave-newton%2F&data=02%7C01%7CPaul.Zepernick%40h >ealthsmart.com%7Cd492860f926b44e597da08d64e1a0e7c%7C2ce547c5e80a40628a5 >6f25adceefb52%7C0%7C0%7C636782271161049678&sdata=pMouKs9wK%2BCjyfmD >t1tFqhUWetjhyMBKUSdrHjAeh%2FY%3D&reserved=0> >gh: davelnewton ><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithu >b.com%2Fdavelnewton&data=02%7C01%7CPaul.Zepernick%40healthsmart.com >%7Cd492860f926b44e597da08d64e1a0e7c%7C2ce547c5e80a40628a56f25adceefb52% >7C0%7C0%7C636782271161049678&sdata=EQ3%2FtoUV1ciJxRNFCuB%2Bpeb%2BqE >cSP1To%2FCfMMsCyIL8%3D&reserved=0> >so: Dave Newton ><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fstacko >verflow.com%2Fusers%2F438992%2Fdave-newton&data=02%7C01%7CPaul.Zepe >rnick%40healthsmart.com%7Cd492860f926b44e597da08d64e1a0e7c%7C2ce547c5e8 >0a40628a56f25adceefb52%7C0%7C0%7C636782271161049678&sdata=IZK23s22U >qQuOVAVkhimfIifZiajoKgARulKMCbGPDI%3D&reserved=0> >bl: Bucky Bits ><https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuckyb >its.blogspot.com%2F&data=02%7C01%7CPaul.Zepernick%40healthsmart.com >%7Cd492860f926b44e597da08d64e1a0e7c%7C2ce547c5e80a40628a56f25adceefb52% >7C0%7C0%7C636782271161049678&sdata=duzp6N%2FgrjAv5xsV%2BsG6oxEM9uzg >7u5WJ3evk%2B9HcCY%3D&reserved=0> >sk: davelnewton_skype >B >KK >KKCB [ X ܚX KK[XZ[ > > \ \ ][ X ܚX P ]˘\X K ܙ B ܈Y][ۘ[ [X[ K[XZ[ > > \ \ Z[ ]˘\X K ܙ B - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Disclaimer: This communication and any files transmi
RE: Struts 2.5.x support above Java 8
I have taken another run at this with Java 11 ASM 7.0. I verified that I am really running asm 7.0 via the mvn dependency:tree. I am now getting the following stack trace ERROR DefaultClassFinder Unable to read class [com.hs.iws.actions.prizm.PrizmTemplatesAction$1] java.lang.UnsupportedOperationException: This feature requires ASM7 at org.objectweb.asm.ClassVisitor.visitNestHost(ClassVisitor.java:150) at org.objectweb.asm.ClassReader.accept(ClassReader.java:541) at org.objectweb.asm.ClassReader.accept(ClassReader.java:391) at org.apache.struts2.convention.DefaultClassFinder.readClassDef(DefaultClassFinder.java:462) I have traced the problem to the source in org.apache.struts2.convention.DefaultClassFinder public class InfoBuildingVisitor extends ClassVisitor { private Info info; private ClassFinder classFinder; public InfoBuildingVisitor(ClassFinder classFinder) { super(Opcodes.ASM5); // This is the issue raising the Exception this.classFinder = classFinder; } I have commented the line above causing the issue. I assume this would throw an exception in ASM using anything above 5. -Original Message- From: Lukasz Lenart Sent: Sunday, November 11, 2018 3:07 AM To: Struts Users Mailing List Subject: Re: Struts 2.5.x support above Java 8 NOTICE: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. sob., 10 lis 2018 o 01:39 Paul Zepernick napisał(a): > > Has anyone got Struts 2.5 to work for Java 11 or anything above Java 8? I > have a project that I was trying to migrate to Java 11 using 2.5.18. I have > it compiling, but then ran into an issue with the ASM library. I am using > the REST plugin, which is dependent on the convention plugin. The convention > plugin has the dependency to ASM, and I am getting the error mentioned in > this ticket: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fissue > s.apache.org%2Fjira%2Fprojects%2FWW%2Fissues%2FWW-4866%3Ffilter%3Dallo > penissues&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cc789d7 > 84442b4141887d08d647acb9f6%7C2ce547c5e80a40628a56f25adceefb52%7C0%7C0% > 7C636775204519343782&sdata=JFRCeA9TTXRYdn8Yv6MY0ZKccg%2BgkVpuia%2F > zY381lD0%3D&reserved=0 > > I have tried Java 10 with ASM 6.0 mentioned in the comments and ASM 7.0 with > Java 11. Both produced the same IllegalArgumentException already mentioned. > A quick glance at the source seemed to indicate that ASM changed the > constructor on the class that is being called to accept byte[] instead of > InputStream. Could you post more details? As far I see the constructor that accepts InputStream is still available. > My main goal in all of this was to try and ensure we would be running on a > supported JDK as support for 8 is about to be up. From what I understand, no > one from the Java community has committed to back porting security patches > for 8. Would anyone be willing to share what they are doing with Java 8 in > the enterprise environment if we have to stay on it for Struts applications? > Are you purchasing, or already have oracle support? We do plan support JDK 9 and JDK 11 as from Struts 2.6 (in development), maybe we will be able to port those changes into 2.5.x branch but we will see. Regards -- Łukasz + 48 606 323 122 + https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.le + nart.org.pl%2F&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cc + 789d784442b4141887d08d647acb9f6%7C2ce547c5e80a40628a56f25adceefb52%7C0 + %7C0%7C636775204519343782&sdata=YxFK4LlfpQ6zwAPYDGWRC2jAOGeGPquGdg + J4VkUm4q4%3D&reserved=0 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
Struts 2.5.x support above Java 8
Has anyone got Struts 2.5 to work for Java 11 or anything above Java 8? I have a project that I was trying to migrate to Java 11 using 2.5.18. I have it compiling, but then ran into an issue with the ASM library. I am using the REST plugin, which is dependent on the convention plugin. The convention plugin has the dependency to ASM, and I am getting the error mentioned in this ticket: https://issues.apache.org/jira/projects/WW/issues/WW-4866?filter=allopenissues I have tried Java 10 with ASM 6.0 mentioned in the comments and ASM 7.0 with Java 11. Both produced the same IllegalArgumentException already mentioned. A quick glance at the source seemed to indicate that ASM changed the constructor on the class that is being called to accept byte[] instead of InputStream. My main goal in all of this was to try and ensure we would be running on a supported JDK as support for 8 is about to be up. From what I understand, no one from the Java community has committed to back porting security patches for 8. Would anyone be willing to share what they are doing with Java 8 in the enterprise environment if we have to stay on it for Struts applications? Are you purchasing, or already have oracle support? Paul Zepernick Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
RE: Is HttpParameters Supposed to be Immutable
Thanks for the feedback. I will open up a bug and submit a PR 😊 Paul -Original Message- From: Lukasz Lenart Sent: Wednesday, August 22, 2018 12:54 AM To: Struts Users Mailing List Subject: Re: Is HttpParameters Supposed to be Immutable wt., 21 sie 2018 o 18:32 Paul Zepernick napisał(a): > Which is removing the parameter from the object, I would have expected that > this return a modified copy? Yes, you are right. > Just wondering the intentions of the class, and if this should be logged as a > bug? I would say it's a bug. Raw http parameters are immutable by definition so this class should reflect the same behaviour, that was my intention. Feel free to register an issue and open a PR :) Regards -- Łukasz + 48 606 323 122 + https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.le + nart.org.pl%2F&data=02%7C01%7CPaul.Zepernick%40healthsmart.com%7Cd + 98c321b7e234f5771df08d607eb41ae%7C2ce547c5e80a40628a56f25adceefb52%7C0 + %7C0%7C636705104334716954&sdata=l1i2g3uBxTjEP68wCkgokRAJYi%2BUOnhH + 9Lo3R009bQY%3D&reserved=0 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
Is HttpParameters Supposed to be Immutable
I was doing some work on a custom interceptor that was working with the HttpParameters class. At first glance, it appears that it is supposed to be immutable based on some of the exceptions thrown for implementations of Map methods, for example: @Override public Parameter put(String key, Parameter value) { throw new IllegalAccessError("HttpParameters are immutable, you cannot put value directly!"); } @Override public Parameter remove(Object key) { throw new IllegalAccessError("HttpParameters are immutable, you cannot remove object directly!"); } But then this method is there: public HttpParameters remove(Set paramsToRemove) { for (String paramName : paramsToRemove) { parameters.remove(paramName); } return this; } Which is removing the parameter from the object, I would have expected that this return a modified copy? Just wondering the intentions of the class, and if this should be logged as a bug? Paul Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
RE: Sr Dev Struts 2 Job Irving TX Area
We prefer onsite, but will consider remote as well. Please submit your resume if interested. Thanks Paul -Original Message- From: Dave Newton [mailto:davelnew...@gmail.com] Sent: Monday, April 09, 2018 11:59 AM To: Struts Users Mailing List Subject: Re: Sr Dev Struts 2 Job Irving TX Area Onsite or remote? On Mon, Apr 9, 2018 at 11:15 AM Paul Zepernick < paul.zepern...@healthsmart.com> wrote: > Looking for a Sr Struts 2 dev in the Irving TX area. Please follow > the link below for details of the job description. > > > https://workforcenow.adp.com/mascsr/default/mdf/recruitment/recruitmen > t.html?cid=bec92904-6e43-44f3-a8dd-2909905e90f8&ccId=19000101_01&j > obId=222415&lang=en_US&source=CC4 > > > Paul R. Zepernick > Sr. Programmer Analyst > HealthSmart Benefit Solutions > paul.zepern...@healthsmart.com<mailto:paul.zepern...@healthsmart.com> > > > > > > > Disclaimer: This communication and any files transmitted with it may > contain information that is privileged, confidential and/or exempt > from disclosure under applicable law. If you are not the intended > recipient, you are hereby notified that any disclosure, copying, > distribution, or use of the information contained herein (including > any reliance thereon) is strictly prohibited. If you received this > communication in error, please immediately contact the sender and > destroy the material in its entirety, whether in electronic or hard copy > format. Thank you. > -- e: davelnew...@gmail.com m: 908-380-8699 s: davelnewton_skype t: @dave_newton <https://twitter.com/dave_newton> b: Bucky Bits <http://buckybits.blogspot.com/> g: davelnewton <https://github.com/davelnewton> so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton> Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
Sr Dev Struts 2 Job Irving TX Area
Looking for a Sr Struts 2 dev in the Irving TX area. Please follow the link below for details of the job description. https://workforcenow.adp.com/mascsr/default/mdf/recruitment/recruitment.html?cid=bec92904-6e43-44f3-a8dd-2909905e90f8&ccId=19000101_01&jobId=222415&lang=en_US&source=CC4 Paul R. Zepernick Sr. Programmer Analyst HealthSmart Benefit Solutions paul.zepern...@healthsmart.com<mailto:paul.zepern...@healthsmart.com> Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
RE: Conversion Error Interceptor prevent errors for empty values
Yasser, Thanks for pointing me to the right class. After debugging, I found the problem was in my template and it was including the option body in the value when trying to set it to empty. There is no issue with the Interceptor and it is working as documented. Thanks for your help. Paul R. Zepernick Sr. Programmer Analyst HealthSmart Benefit Solutions -Original Message- From: Yasser Zamani [mailto:yasser.zam...@live.com] On Behalf Of Yasser Zamani Sent: Wednesday, February 14, 2018 11:41 AM To: user@struts.apache.org Subject: Re: Conversion Error Interceptor prevent errors for empty values On 2/14/2018 5:13 PM, Paul Zepernick wrote: > Yes, I have it happening on 2.5.14.1. I have a select box pointing at a > Integer like this: auditForm.incorrectAuditReason.id I am using the rest > plugin which is including it in the stack. I have attached the source from > Maven. Where is the check being done in the code? I see the check for > shouldAddError() always returning true. > No you should check `org.apache.struts2.interceptor.StrutsConversionErrorInterceptor` (prefixed with `Struts`) instead. Could you put a break point on it's `shouldAddError` method and see what happens when you post auditForm.incorrectAuditReason.id? > I have attempted to override the default interceptor by adding this in my > package and overriding the shouldAddError(), but it continues to call the > default Struts ConversionErrorInterceptor. > > class="com.hs.iws.struts2.IwsConversionErrorInterceptor"/> > I think you should define your stack including your new interceptor and ref it in your action definition. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Conversion Error Interceptor prevent errors for empty values
Trying the attachment again as a txt Paul R. Zepernick Sr. Programmer Analyst HealthSmart Benefit Solutions -Original Message- From: Paul Zepernick [mailto:paul.zepern...@healthsmart.com] Sent: Wednesday, February 14, 2018 8:44 AM To: user@struts.apache.org Subject: RE: Conversion Error Interceptor prevent errors for empty values Yes, I have it happening on 2.5.14.1. I have a select box pointing at a Integer like this: auditForm.incorrectAuditReason.id I am using the rest plugin which is including it in the stack. I have attached the source from Maven. Where is the check being done in the code? I see the check for shouldAddError() always returning true. I have attempted to override the default interceptor by adding this in my package and overriding the shouldAddError(), but it continues to call the default Struts ConversionErrorInterceptor. Paul R. Zepernick Sr. Programmer Analyst HealthSmart Benefit Solutions -Original Message- From: Yasser Zamani [mailto:yasser.zam...@live.com] On Behalf Of Yasser Zamani Sent: Wednesday, February 14, 2018 4:25 AM To: user@struts.apache.org Subject: Re: Conversion Error Interceptor prevent errors for empty values On 2/13/2018 8:06 PM, Paul Zepernick wrote: > Can someone provide some clarification on if this interceptor should be > adding a field error when an empty string is passed to a Integer in the > action? No, it should not be happening for `conversionError` interceptor. Does it happen? > I am trying to prevent the field error from happening in this case. It > looks like it should not be happening according to the docs: > https://struts.apache.org/core-developers/conversion-error-interceptor.html , > or am I not understanding what it is saying here: > > "This interceptor extends ConversionErrorInterceptor but only adds conversion > errors from the ActionContext to the field errors of the action if the field > value is not null, "", or {""} (a size 1 String array with only an empty > String). See ConversionErrorInterceptor for more information, as well as the > Type Conversion documentation" You understood correctly. I reviewed it's code and looks like it should behave as above. Doesn't it? I also saw `conversionError` is already included in default stack. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package com.opensymphony.xwork2.interceptor; import com.opensymphony.xwork2.ActionContext; import com.opensymphony.xwork2.ActionInvocation; import com.opensymphony.xwork2.conversion.impl.XWorkConverter; import com.opensymphony.xwork2.util.ValueStack; import org.apache.commons.lang3.StringEscapeUtils; import java.util.HashMap; import java.util.Map; /** * * ConversionErrorInterceptor adds conversion errors from the ActionContext to the Action's field errors. * * * This interceptor adds any error found in the {@link ActionContext}'s conversionErrors map as a field error (provided * that the action implements {@link ValidationAware}). In addition, any field that contains a validation error has its * original value saved such that any subsequent requests for that value return the original value rather than the value * in the action. This is important because if the value "abc" is submitted and can't be converted to an int, we want to * display the original string ("abc&q
RE: Conversion Error Interceptor prevent errors for empty values
Yes, I have it happening on 2.5.14.1. I have a select box pointing at a Integer like this: auditForm.incorrectAuditReason.id I am using the rest plugin which is including it in the stack. I have attached the source from Maven. Where is the check being done in the code? I see the check for shouldAddError() always returning true. I have attempted to override the default interceptor by adding this in my package and overriding the shouldAddError(), but it continues to call the default Struts ConversionErrorInterceptor. Paul R. Zepernick Sr. Programmer Analyst HealthSmart Benefit Solutions -Original Message- From: Yasser Zamani [mailto:yasser.zam...@live.com] On Behalf Of Yasser Zamani Sent: Wednesday, February 14, 2018 4:25 AM To: user@struts.apache.org Subject: Re: Conversion Error Interceptor prevent errors for empty values On 2/13/2018 8:06 PM, Paul Zepernick wrote: > Can someone provide some clarification on if this interceptor should be > adding a field error when an empty string is passed to a Integer in the > action? No, it should not be happening for `conversionError` interceptor. Does it happen? > I am trying to prevent the field error from happening in this case. It > looks like it should not be happening according to the docs: > https://struts.apache.org/core-developers/conversion-error-interceptor.html , > or am I not understanding what it is saying here: > > "This interceptor extends ConversionErrorInterceptor but only adds conversion > errors from the ActionContext to the field errors of the action if the field > value is not null, "", or {""} (a size 1 String array with only an empty > String). See ConversionErrorInterceptor for more information, as well as the > Type Conversion documentation" You understood correctly. I reviewed it's code and looks like it should behave as above. Doesn't it? I also saw `conversionError` is already included in default stack. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Conversion Error Interceptor prevent errors for empty values
Can someone provide some clarification on if this interceptor should be adding a field error when an empty string is passed to a Integer in the action? I am trying to prevent the field error from happening in this case. It looks like it should not be happening according to the docs: https://struts.apache.org/core-developers/conversion-error-interceptor.html , or am I not understanding what it is saying here: "This interceptor extends ConversionErrorInterceptor but only adds conversion errors from the ActionContext to the field errors of the action if the field value is not null, "", or {""} (a size 1 String array with only an empty String). See ConversionErrorInterceptor for more information, as well as the Type Conversion documentation" Paul R. Zepernick Sr. Programmer Analyst HealthSmart Benefit Solutions Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
RE: Struts2.x ActionError And ActionMessage
The tag will print out your errors in the jsp page. Have a look at this tutorial, maybe it will be of some assistance https://www.mkyong.com/struts2/struts-2-actionerror-actionmessage-example/ -Original Message- From: Dhulipudi, Sivannarayana [mailto:sivannarayana.dhulip...@cgi.com] Sent: Thursday, November 16, 2017 11:39 AM To: Struts Users Mailing List Subject: RE: Struts2.x ActionError And ActionMessage Actually we are using Apache commons validation frame work along with struts, when ever validation failed, I want to create one action error message and keep that action error in context and display error message in jsp page. From: Paul Zepernick [paul.zepern...@healthsmart.com] Sent: Thursday, November 16, 2017 9:28 AM To: 'Struts Users Mailing List' Subject: RE: Struts2.x ActionError And ActionMessage ActionError and ActionMessage are not classes you can utilize stand alone. Calling addActionError() is actually building a List in the action and same with addActionMessage(). Are you trying to validate a Struts action or something entirely different, since you say the validation is not done in your action class? Maybe you need to pass the instance of your action class to the class that you have doing the validation? -Original Message- From: Adam Brin [mailto:ab...@digitalantiquity.org] Sent: Thursday, November 16, 2017 10:19 AM To: Struts Users Mailing List Subject: Re: Struts2.x ActionError And ActionMessage Hi Siva, Can you share an example of what you're doing and what's not working? thanks, adam -- _ Adam Brin Director of Technology, Digital Antiquity 480.965.1278 > On Nov 16, 2017, at 8:15 AM, Dhulipudi, Sivannarayana > wrote: > > Hi All, > > I tried to use struts 2.x ActionError and ActonMessage classes to do > validations. > > I saw a lot examples on internet, in those examples adding errors and > messages to actionsupport class like > > addActionErrors() and addActionMessage(). but I want to use ActionError and > ActionMessage classes in my project. > > I'm not doing validation in action class . please help me someone on this > topic. > > Thanks > Siva > > > > From: Lukasz Lenart [lukaszlen...@apache.org] > Sent: Wednesday, November 15, 2017 11:52 PM > To: Struts Users Mailing List > Subject: Re: Migration from Struts1 to Struts2.5 > > 2017-11-15 16:26 GMT+01:00 JK : >> struts2-core-2.5.13.jar >> struts2-tiles-plugin-2.3.8.jar >> tiles-core-2.0.6.jar >> tiles-jsp-2.0.6.jar >> tiles-api-2.0.6.jar > > You are using a wrong version of Tiles, Struts 2.5.13 and the Struts 2 > Tiles plugin based on Tiles 3 - you must use Tiles 3.0.7 at least > http://struts.apache.org/maven/struts2-plugins/struts2-tiles-plugin/de > pendency-management.html > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > - > 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 Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: 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: Struts2.x ActionError And ActionMessage
ActionError and ActionMessage are not classes you can utilize stand alone. Calling addActionError() is actually building a List in the action and same with addActionMessage(). Are you trying to validate a Struts action or something entirely different, since you say the validation is not done in your action class? Maybe you need to pass the instance of your action class to the class that you have doing the validation? -Original Message- From: Adam Brin [mailto:ab...@digitalantiquity.org] Sent: Thursday, November 16, 2017 10:19 AM To: Struts Users Mailing List Subject: Re: Struts2.x ActionError And ActionMessage Hi Siva, Can you share an example of what you’re doing and what’s not working? thanks, adam -- _ Adam Brin Director of Technology, Digital Antiquity 480.965.1278 > On Nov 16, 2017, at 8:15 AM, Dhulipudi, Sivannarayana > wrote: > > Hi All, > > I tried to use struts 2.x ActionError and ActonMessage classes to do > validations. > > I saw a lot examples on internet, in those examples adding errors and > messages to actionsupport class like > > addActionErrors() and addActionMessage(). but I want to use ActionError and > ActionMessage classes in my project. > > I'm not doing validation in action class . please help me someone on this > topic. > > Thanks > Siva > > > > From: Lukasz Lenart [lukaszlen...@apache.org] > Sent: Wednesday, November 15, 2017 11:52 PM > To: Struts Users Mailing List > Subject: Re: Migration from Struts1 to Struts2.5 > > 2017-11-15 16:26 GMT+01:00 JK : >> struts2-core-2.5.13.jar >> struts2-tiles-plugin-2.3.8.jar >> tiles-core-2.0.6.jar >> tiles-jsp-2.0.6.jar >> tiles-api-2.0.6.jar > > You are using a wrong version of Tiles, Struts 2.5.13 and the Struts 2 > Tiles plugin based on Tiles 3 - you must use Tiles 3.0.7 at least > http://struts.apache.org/maven/struts2-plugins/struts2-tiles-plugin/de > pendency-management.html > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > - > 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 Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you.
Re: Issue with Struts2 s:select tag with Object inside a Model Object
I notice that you are using the # notation to access the property. Does it work without it? It seems like something is not available on the action. You could add value="#diagnosisDTO.primaryDiagnosis" to your select and it will pull from the value stack just like the property did instead of searching your action, but your setup should work. I believe there is just some other information we are missing as to why it is not functioning. On Apr 1, 2017 11:56 PM, Kiran Kongala wrote: Hi, Before calling the return "success" in the action method I added couple of println statements and I am seeing the data for the dropdown and below are the values diseasetracking: DiseaseTracking: dstId = 2048 DstCodeId = HPC paID = 2 memberID = 100 memberIdentTypeID = 1 memberAddressID = 2 memberPhonePhoneID = 3 memberFaxPhoneID = 4 prescriberID = 100 prescriberIdentTypeID = 1 prescriberAddressID = 2 prescriberPhonePhoneID = 3 prescriberFaxPhoneID = 4 mdSpecialtyTypeID = 1 comments = null startDate = 2017-03-31T00:20:13.729339 endDate = -12-30T19:00 createdBy = 0 diagnosisDTO = DiagnosisDTO: primaryDiagnosis = 536 otherPrimaryDiagnosis = null genoType = 541 otherGenoType = null genoType2 = 675 otherGenoType2 = null hivCoinfection = 551 renalImpairment = 555 otherRenalImpairment = null postLiverTransplant = 559 diseasetracking DiagnosisDTO.PrimaryDiagnosis: 536 And I added this property but the value is not selected in the select tag. And when I view the source, I am seeing the below source of the jsp Please Select Chronic Hepatitis C Chronic Hepatitis B Chronic Hepatitis C and B Acute Hepatitis C Unknown / Not documented Other Everything looks correct but I am not seeing the value selected in the drop down(536). Thanks On Sat, Apr 1, 2017 at 10:31 PM, Paul Zepernick < paul.zepern...@healthsmart.com> wrote: > What happens when you use a s:property to evaluate > diagnosisDTO.primaryDiagnosis? If you do not get a value, then check to > make sure the path is right or that something is not wrong in your action > that is populating it. Also verify that the key property in your list is > the same type as the value being set, both Integer for example. > > On Apr 1, 2017 7:38 PM, Kiran Kongala wrote: > Hi, > > I am trying to use the Struts2 s:select tag but the drop down value coming > from the db is not being set to the drop down as selected value and the > screen always shows the default first value in the list. > > Can some one please help me. > > *JSP Code* > > list="primaryDiagnosisTypes" >listKey="dstLookupTypeId" >listValue="lookupValue" >multiple="false" >headerKey="-1" >headerValue="Please Select" >size="1"/> > > *Action Class Code* > > > *I have Disease Tracking as a Model object and inside that model I have > DiagnosisDTO object where I have properties which are matched to the jsp > select tag above* > > > > > *This is the Model Object defined in the Action Classpublic > DiseaseTracking getModel() {return this.diseasetracking;}* > > *DiseaseTracking Object with DiagnosisDTO property below * > > > > > > > > > *private DiagnosisDTO diagnosisDTO; public DiagnosisDTO getDiagnosisDTO() > { return diagnosisDTO; } public void setDiagnosisDTO(DiagnosisDTO > diagnosisDTO) { this.diagnosisDTO = diagnosisDTO; }* > > > *DiagnosisDTO Object with property **primaryDiagnosis **and getter and > setter* > > > > > * private int primaryDiagnosis; public int getPrimaryDiagnosis() { return > primaryDiagnosis; }* > > > > > * public void setPrimaryDiagnosis(int primaryDiagnosis) > { this.primaryDiagnosis = primaryDiagnosis; }* > > > *This method is a service call to get the disease tracking object* > > > > > > > > > > > > > > > > > > > > > > > > > * public String getHepC() throws Exception { List allDstLookupTypes = > GenCache.getListOfDstLookupType(user.getCurrentClientId()); > setPrimaryDiagnosisTypes(this.getSpecificDstLookupTypes( > Constants.DST_LOOKUP_GRP_CODE_ID_PRD, > allDstLookupTypes)); DiseaseTrackingDelegate dstDelegate = new > DiseaseTrackingDelegate(); int dstId = 2048; //The below is the > service call to db which will get the disease tracking object with some > lists objects. diseasetracking = > dstDelegate.getDSTById(user.getCurrentClientId(), dstId, null); //the > below is the code to convert the list returned from service to another > object Diagnosis DTO and set that back to Disease Tracking model > object convertDiagnosisLi
Re: Issue with Struts2 s:select tag with Object inside a Model Object
What happens when you use a s:property to evaluate diagnosisDTO.primaryDiagnosis? If you do not get a value, then check to make sure the path is right or that something is not wrong in your action that is populating it. Also verify that the key property in your list is the same type as the value being set, both Integer for example. On Apr 1, 2017 7:38 PM, Kiran Kongala wrote: Hi, I am trying to use the Struts2 s:select tag but the drop down value coming from the db is not being set to the drop down as selected value and the screen always shows the default first value in the list. Can some one please help me. *JSP Code* *Action Class Code* *I have Disease Tracking as a Model object and inside that model I have DiagnosisDTO object where I have properties which are matched to the jsp select tag above* *This is the Model Object defined in the Action Classpublic DiseaseTracking getModel() {return this.diseasetracking;}* *DiseaseTracking Object with DiagnosisDTO property below * *private DiagnosisDTO diagnosisDTO; public DiagnosisDTO getDiagnosisDTO() { return diagnosisDTO; } public void setDiagnosisDTO(DiagnosisDTO diagnosisDTO) { this.diagnosisDTO = diagnosisDTO; }* *DiagnosisDTO Object with property **primaryDiagnosis **and getter and setter* * private int primaryDiagnosis; public int getPrimaryDiagnosis() { return primaryDiagnosis; }* * public void setPrimaryDiagnosis(int primaryDiagnosis) { this.primaryDiagnosis = primaryDiagnosis; }* *This method is a service call to get the disease tracking object* * public String getHepC() throws Exception { List allDstLookupTypes = GenCache.getListOfDstLookupType(user.getCurrentClientId()); setPrimaryDiagnosisTypes(this.getSpecificDstLookupTypes(Constants.DST_LOOKUP_GRP_CODE_ID_PRD, allDstLookupTypes)); DiseaseTrackingDelegate dstDelegate = new DiseaseTrackingDelegate(); int dstId = 2048; //The below is the service call to db which will get the disease tracking object with some lists objects. diseasetracking = dstDelegate.getDSTById(user.getCurrentClientId(), dstId, null); //the below is the code to convert the list returned from service to another object Diagnosis DTO and set that back to Disease Tracking model object convertDiagnosisListToDiagnosisDTO(diseasetracking.getAlDstLookup()); return "success"; } public List getSpecificDstLookupTypes(String grpLookupTypeId, List allDstLookupTypes){ List lookupTypes = new ArrayList(); for(int i=0; i < allDstLookupTypes.size();i++) { if( allDstLookupTypes.get(i).getDstLookupGrpCodeId().equals(grpLookupTypeId)){ lookupTypes.add(allDstLookupTypes.get(i)); } } return lookupTypes;}* *public void convertDiagnosisListToDiagnosisDTO(List alDstLookup) throws CpsEntException { DiagnosisDTO dt = null; try { if(alDstLookup != null && alDstLookup.size() != 0) { dt = new DiagnosisDTO(); for (final DSTLookupDTO dstLookup : alDstLookup) { if(dstLookup.getDstLookupGrpCodeId().equals(Constants.DST_LOOKUP_GRP_CODE_ID_PRD)) {dt.setPdDstLookupId(dstLookup.getDstLookupId()); //dt.setPrimaryDiagnosis(dstLookup.getDstLookupTypeId()); diseasetracking.setPrimaryDiagnosis(dstLookup.getDstLookupTypeId()); dt.setPdDstSubModuleRowId(dstLookup.getDstSubModuleRowId()); dt.setOtherPrimaryDiagnosis(dstLookup.getOtherValue()); } else if(dstLookup.getDstLookupGrpCodeId().equals(Constants.DST_LOOKUP_GRP_CODE_ID_GNT)) { dt.setGenoTypeDstLookupId(dstLookup.getDstLookupId()); dt.setGenoType(dstLookup.getDstLookupTypeId()); dt.setGenoTypeDstSubModuleRowId(dstLookup.getDstSubModuleRowId()); dt.setOtherGenoType(dstLookup.getOtherValue()); } else if(dstLookup.getDstLookupGrpCodeId().equals(Constants.DST_LOOKUP_GRP_CODE_ID_GNT2)) { dt.setGenoType2DstLookupId(dstLookup.getDstLookupId()); dt.setGenoType2(dstLookup.getDstLookupTypeId()); dt.setGenoType2DstSubModuleRowId(dstLookup.getDstSubModuleRowId()); dt.setOtherGenoType2(dstLookup.getOtherValue()); } else if(dstLookup.getDstLookupGrpCodeId().equals(Constants.DST_LOOKUP_GRP_CODE_ID_HVC)) {dt.setHivDstLookupId(dstLookup.getDstLookupId()); dt.setHivCoinfection(dstLookup.getDstLookupTypeId()); dt.setHivDstSubModuleRowId(dstLookup.getDstSubModuleRowId()); } else if(dstLookup.getDstLookupGrpCodeId().equals(Constants.DST_LOOKUP_GRP_CODE_ID_RNI)) {dt.setRenalDstLookupId(dstLookup.getDstLookupId()); dt.setRenalImpairment(dstLookup.getDstLookupTypeId()); dt.setRenalDstSubModuleRowId(dstLookup.getDstSubModuleRowId()); dt.setOtherRenalImpairment(dstLookup.getOtherValue()); } else if(dstLookup.getDstLookupGrpCodeId().equals(Constants.DST_LOOKUP_GRP_CODE_ID_SPLT)) { dt.setPostLiverDstLookupId(dstLookup.getDstLookupId()); dt.setPostLiverTransplan
RE: Struts2 Rest Mapper Taking Over Non Rest Json Result
Thanks Martin, it was getting to the correct action class buy it was not using the result I defined in the action. It was going to its own result implementation based on the fact that I am requesting an application/json data type. I found out that if I add ".action" to the url it processes everything correctly and goes to the correct result. I am not sure if that is the intended behavior, a setup issue on my part, or a bug? -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Tuesday, September 20, 2016 2:24 PM To: Struts Users Mailing List Subject: RE: Struts2 Rest Mapper Taking Over Non Rest Json Result to control navigation why not map it?{1} ... GET: /grid/method="index"when you reference /grid/ struts will call org.healthsmart.NonRestfulAction index method https://struts.apache.org/docs/restfulactionmapper.html or use DMI /WEB-INF/content/hello.jsphello add https://struts.apache.org/docs/action-configuration.html#ActionConfiguration-ActionMappings I would check struts.mapper.prefixMapping for normal "rest prefixMapping vs struts prefixMapping" configurationhttps://struts.apache.org/docs/restfulactionmapper.html if that looks ok as a last result you can implement a custom mapper which will read the URL and redirect to correct class programaticallyhttp://stackoverflow.com/questions/17697432/struts2-rest-plugin-making-both-struts-actions-rest-actions-work-together-but Martin __ > From: paul.zepern...@healthsmart.com > To: user@struts.apache.org > Subject: Struts2 Rest Mapper Taking Over Non Rest Json Result > Date: Tue, 20 Sep 2016 15:28:42 + > > This was also posted to stackoverflow and relevant config information can be > seen in the post: > http://stackoverflow.com/questions/39593721/struts2-rest-mapper-taking-over-non-rest-json-result > > I am working with the DataTables JS library and am trying to write actions > for the grid. I have a api in place that creates the json for me already and > I just need to stream it back. I created a custom result to handle this, but > the result mapped in the action never runs. No matter what the result type, > the REST mapper tries to handle it as soon as it sees that application/json > has been requested from the client. I have used the prefix mapping in the > configuration to have all url's using /grid to bypass the rest mapper. It > seems to be working in some capacity because it runs the correct interceptor > stack and is using the @Action annotation information to map the url. > However, the result specified is NOT running and is instead being provided by > the rest mapper based on the stack trace I am receiving. I would like to > completely bypass the rest mapper for any actions in the /grid namespace. > Have I done something wrong in the configuration that is still causing rest > to be involved in the request to those actions? > > Paul R. Zepernick > Sr. Programmer Analyst > > > > > > > Disclaimer: This communication and any files transmitted with it may contain > information that is privileged, confidential and/or exempt from disclosure > under applicable law. If you are not the intended recipient, you are hereby > notified that any disclosure, copying, distribution, or use of the > information contained herein (including any reliance thereon) is strictly > prohibited. If you received this communication in error, please immediately > contact the sender and destroy the material in its entirety, whether in > electronic or hard copy format. Thank you. > > - > To unsubscribe, e-mail: 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
Struts2 Rest Mapper Taking Over Non Rest Json Result
This was also posted to stackoverflow and relevant config information can be seen in the post: http://stackoverflow.com/questions/39593721/struts2-rest-mapper-taking-over-non-rest-json-result I am working with the DataTables JS library and am trying to write actions for the grid. I have a api in place that creates the json for me already and I just need to stream it back. I created a custom result to handle this, but the result mapped in the action never runs. No matter what the result type, the REST mapper tries to handle it as soon as it sees that application/json has been requested from the client. I have used the prefix mapping in the configuration to have all url's using /grid to bypass the rest mapper. It seems to be working in some capacity because it runs the correct interceptor stack and is using the @Action annotation information to map the url. However, the result specified is NOT running and is instead being provided by the rest mapper based on the stack trace I am receiving. I would like to completely bypass the rest mapper for any actions in the /grid namespace. Have I done something wrong in the configuration that is still causing rest to be involved in the request to those actions? Paul R. Zepernick Sr. Programmer Analyst Disclaimer: This communication and any files transmitted with it may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is strictly prohibited. If you received this communication in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Security guideline
Very good. Cheers, Paul On Sat, Jun 18, 2016 at 1:25 AM, Lukasz Lenart wrote: > Hello > > Please take a look on this, we are constantly updating it based on > reported vulnerabilities. > http://struts.apache.org/docs/security.html > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: how to use ejb 3.1/3.2 in struts2?
Are you using an EE 7 server? I believe 7 integrates CDI and EJB so you can @Inject your remote bean interfaces. This may also be available in 6, but you'd have to research that. PS: @EJB is a specialized injection annotation that only deals with EJB. Obviously, but just wanted to point that out. Cheers, Paul On Tue, Mar 8, 2016 at 9:44 AM, Mike Guo wrote: > Hello, everyone. > > I suppose this is very old question to struts user list. > > how to use EJB 3.1/3.2 in struts2? > > I did some research on google. but I totally no idea what’s the exactly > solution for this. > > some one said use cdi plugin. but if I use cdi plugin, I guess it can be > @inject a ebb into action class. but if I want to inject a remote EJB > interface, I think it is not work. > > also, some one said use JNDI lookup , I suppose it can get it done. but I > think it is very ugly way for it. > > > is there any better solution for this? > > any comments? > > > Many many thanks > > > Mike > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Data Transfer Between Android and MySQL
Hi Paul: One more important detail: The Android app. is not a browser. Best Regards, Paul R. On 03/02/2016 11:40 AM, Paul Benedict wrote: Android is a remote client, and a web service is the common solution to transfer data back to the host. You are free to use whatever technology you want to implement the web service. You have (1) message standard and (2) technology standard to consider. The first are things like XML, SOAP, JSON, etc. The second are products like Axis, Struts 2, JAX-WS, JAX-RS, etc. As David said, there are no "best" answers in general; it's based on the best fit of your requirements. Cheers, Paul On Wed, Mar 2, 2016 at 1:29 PM, Paul Romero wrote: Dear Stuts Community: My general question is what is the best and most commonly deployed way to transfer data between a mobile Android based platform and a MySQL database on a Linux server ? More specifically, is Struts a good choice or am I barking up the wrong tree ? Note that authentication and security are essential in my case and my Android platform uses SSL sockets for Internet connections. Also, it would be highly desirable to address the issue of binary data. It appears that the RESTful/JSON framework is fairly common way to achieve the functionality I described but I am not really sure it is the best way and am certainly open to alternatives. The aforementioned framework requires a "web service" to be implemented on the Linux server. My understanding is that such a "web service" executes PHP code, embedded in HTML, to perform MySQL operations, and converts MySQL responses to JSON format. I presume the "web service" can be implemented as a stand-alone module or using Apache functionality. (i.e. Examples are the Axis framework.) Is this correct and which option can best achieve the functionality I have described ? Are there widely deployed modules or software that have this functionality ? If not, what would be the easiest way to achieve this functionality ? Best Regards, Paul Romero -- Paul Romero --- RCOM Communications Software EMAIL: pa...@rcom-software.com PHONE: (510)482-2769 -- Paul Romero --- RCOM Communications Software EMAIL: pa...@rcom-software.com PHONE: (510)482-2769
Re: Data Transfer Between Android and MySQL
Android is a remote client, and a web service is the common solution to transfer data back to the host. You are free to use whatever technology you want to implement the web service. You have (1) message standard and (2) technology standard to consider. The first are things like XML, SOAP, JSON, etc. The second are products like Axis, Struts 2, JAX-WS, JAX-RS, etc. As David said, there are no "best" answers in general; it's based on the best fit of your requirements. Cheers, Paul On Wed, Mar 2, 2016 at 1:29 PM, Paul Romero wrote: > Dear Stuts Community: > > My general question is what is the best and most commonly deployed way > to transfer data between a mobile Android based platform and a > MySQL database on a Linux server ? More specifically, is Struts a > good choice or am I barking up the wrong tree ? Note that authentication > and security are essential in my case and my Android platform > uses SSL sockets for Internet connections. Also, it would be > highly desirable to address the issue of binary data. > > It appears that the RESTful/JSON framework is fairly common > way to achieve the functionality I described but I am not really > sure it is the best way and am certainly open to alternatives. > > The aforementioned framework requires a "web service" to be implemented > on the Linux server. My understanding is that such a "web service" > executes PHP code, embedded in HTML, to perform MySQL operations, and > converts MySQL responses to JSON format. > > I presume the "web service" can be implemented as a stand-alone module or > using Apache functionality. (i.e. Examples are the Axis framework.) Is > this correct and which option can best achieve the functionality I have > described ? > Are there widely deployed modules or software that have this functionality > ? > If not, what would be the easiest way to achieve this functionality ? > > Best Regards, > > Paul Romero > > -- > > > Paul Romero > --- > RCOM Communications Software > EMAIL: pa...@rcom-software.com > PHONE: (510)482-2769 > > > > >
Data Transfer Between Android and MySQL
Dear Stuts Community: My general question is what is the best and most commonly deployed way to transfer data between a mobile Android based platform and a MySQL database on a Linux server ? More specifically, is Struts a good choice or am I barking up the wrong tree ? Note that authentication and security are essential in my case and my Android platform uses SSL sockets for Internet connections. Also, it would be highly desirable to address the issue of binary data. It appears that the RESTful/JSON framework is fairly common way to achieve the functionality I described but I am not really sure it is the best way and am certainly open to alternatives. The aforementioned framework requires a "web service" to be implemented on the Linux server. My understanding is that such a "web service" executes PHP code, embedded in HTML, to perform MySQL operations, and converts MySQL responses to JSON format. I presume the "web service" can be implemented as a stand-alone module or using Apache functionality. (i.e. Examples are the Axis framework.) Is this correct and which option can best achieve the functionality I have described ? Are there widely deployed modules or software that have this functionality ? If not, what would be the easiest way to achieve this functionality ? Best Regards, Paul Romero -- Paul Romero --- RCOM Communications Software EMAIL: pa...@rcom-software.com PHONE: (510)482-2769
Re: Remove Me
Fernando, removing is a self-service. Please see this: https://struts.apache.org/mail.html Cheers, Paul On Tue, Oct 13, 2015 at 10:15 AM, Fernando FLORES CORCOBA < fef.flo...@gmail.com> wrote: > Remove me from this list. > Thank you. > -- > > -- > *visite www.librodelcastillo.com.ar <http://www.librodelcastillo.com.ar>* >
Re: Struts1 & Struts2 implementation
Do you have different extensions? For example, *.do goes to S1 and *.action goes to S2. Cheers, Paul On Mon, Feb 23, 2015 at 10:48 AM, Lilylove toshop < lilylove2s...@yahoo.com.invalid> wrote: > Dear All, > I want to use Strut1 & Struts2 in my coexist application. I have both the > struts-config.xml and struts.xml in my Netbeans project. The application > was deployed successfully, however it didn't execute the struts2 code. Is > there a step that I missed to get the application to execute both Struts1 > and Struts2 codes?? > Thanks,Lily
Re: Can't find utils.js
Okay. This means the two (no action extension and plugin script resources) are mutually incompatible at this time. I look forward to 2.5 to fixing this. Cheers, Paul On Thu, Nov 13, 2014 at 2:04 AM, Lukasz Lenart wrote: > 2014-11-13 7:44 GMT+01:00 Paul Benedict : > > Yes... but now it's "," > > As far I understand this is broken from the very beginning ... version > 2.1.8 behaves the same way > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Can't find utils.js
Yes... but now it's "," Cheers, Paul On Thu, Nov 13, 2014 at 12:40 AM, Lukasz Lenart wrote: > 2014-11-12 21:45 GMT+01:00 Paul Benedict : > > Using outputs a link to utils.js: > > > > > > > > But the file can't be found. FYI, I have no action extension and the > filter > > processes /* > > What's your exact configuration? > ? > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Can't find utils.js
FYI, I created an issue to track this: https://issues.apache.org/jira/browse/WW-4418 Cheers, Paul On Wed, Nov 12, 2014 at 3:27 PM, Paul Benedict wrote: > Okay, I solved it. I found a "solution" in the wee bottom of this page: > > http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break > > Now this solution makes no sense. It smells of a bug to me. The solution > is to make the action extension a comma. However, this doesn't satisfy me > as it's clearly a hack :-) but at least it works. > > > Cheers, > Paul > > On Wed, Nov 12, 2014 at 2:45 PM, Paul Benedict > wrote: > >> Using outputs a link to utils.js: >> >> >> >> But the file can't be found. FYI, I have no action extension and the >> filter processes /* >> >> Any idea why the file can't be found? >> >> Cheers, >> Paul >> > >
Re: Can't find utils.js
Okay, I solved it. I found a "solution" in the wee bottom of this page: http://stackoverflow.com/questions/12607075/struts2-action-extension-causing-css-javascript-and-struts-dojo-to-break Now this solution makes no sense. It smells of a bug to me. The solution is to make the action extension a comma. However, this doesn't satisfy me as it's clearly a hack :-) but at least it works. Cheers, Paul On Wed, Nov 12, 2014 at 2:45 PM, Paul Benedict wrote: > Using outputs a link to utils.js: > > > > But the file can't be found. FYI, I have no action extension and the > filter processes /* > > Any idea why the file can't be found? > > Cheers, > Paul >
Can't find utils.js
Using outputs a link to utils.js: But the file can't be found. FYI, I have no action extension and the filter processes /* Any idea why the file can't be found? Cheers, Paul
Re: Anyway to map properties to different request names?
It bothers me that the Java programming model dictates the parameter names. In theory "personId" could be sent as "a" -- although a variable named "a" in Java is bad naming conventions. There isn't a good technical reason to keep this 1:1 mapping. The shorter the bytes sent too the better And in reverse, if one is working on re-implementing an existing servlet/service, you have to give poor names to your Java model to match existing form names. Cheers, Paul On Wed, Nov 5, 2014 at 2:47 PM, JOSE L MARTINEZ-AVIAL wrote: > You only need to set the attribute name of the field > > > > You can even use a different Id, if you want to refer to the field in > javascript. Why does it bother you? > > 2014-11-05 15:39 GMT-05:00 Paul Benedict : > > > Let's say I have a getter/setter for field personId. That means in my > > markup, I need to have a field named personId too. However, I am not > really > > found of bleeding Java naming conventions into my web page. Shouldn't > there > > be a way -- is there a way? -- of assigning another name to it? > > > > Hopeful example: > > > > @RequestParam("person") > > public final void setPersonId(String personId) { ... } > > > > Cheers, > > Paul > > >
Anyway to map properties to different request names?
Let's say I have a getter/setter for field personId. That means in my markup, I need to have a field named personId too. However, I am not really found of bleeding Java naming conventions into my web page. Shouldn't there be a way -- is there a way? -- of assigning another name to it? Hopeful example: @RequestParam("person") public final void setPersonId(String personId) { ... } Cheers, Paul
Re: Struts 1 Thread safe action classes
Instantiating a new action class per request is not a bad idea. It's not standard but not bad. Struts 2 does this, I think Spring MVC does this, and a host of other web frameworks. Cheers, Paul On Tue, Nov 4, 2014 at 3:20 PM, Eric Reed wrote: > As Paul said, you must avoid instance variables in Struts 1. > > I once had a HUGE project that was written with Struts 1. Along with > terrible code I saw instance variables everywhere. I think over 650 action > classes with instance variables so I just re-wrote a few lines in the > latest Struts 1 source code and initialized a new action for every > request. It shot up the server memory by a bunch but who cares, memory is > cheap compared to me re-writing all those classes. > > Regards, > Eric > > > > > -Original Message- > From: Paul Benedict [mailto:pbened...@apache.org] > Sent: Tuesday, November 04, 2014 4:16 PM > To: Struts Users Mailing List > Subject: Re: Struts 1 Thread safe action classes > > To be thread safe, your services should never store user data in instance > variables. That's all there is to it. Keep everything local. > > > Cheers, > Paul > > On Tue, Nov 4, 2014 at 3:14 PM, Sekar, Sowmya wrote: > > > How do I accomplish that? > > > > -Original Message- > > From: Paul Benedict [mailto:pbened...@apache.org] > > Sent: Tuesday, November 04, 2014 1:13 PM > > To: Struts Users Mailing List > > Subject: Re: Struts 1 Thread safe action classes > > > > Your service classes should be thread-safe to begin with. You don't > > need multiple instances of a business service. > > > > > > Cheers, > > Paul > > > > On Tue, Nov 4, 2014 at 3:08 PM, Sekar, Sowmya wrote: > > > > > Hi, > > > > > > To invoke service classes from each method in the action classes, > > > are there any other options to make it thread safe other than > > > initializing them as local variables? > > > > > > Thanks, Sowmya > > > > > >
Re: Struts 1 Thread safe action classes
To be thread safe, your services should never store user data in instance variables. That's all there is to it. Keep everything local. Cheers, Paul On Tue, Nov 4, 2014 at 3:14 PM, Sekar, Sowmya wrote: > How do I accomplish that? > > -Original Message- > From: Paul Benedict [mailto:pbened...@apache.org] > Sent: Tuesday, November 04, 2014 1:13 PM > To: Struts Users Mailing List > Subject: Re: Struts 1 Thread safe action classes > > Your service classes should be thread-safe to begin with. You don't need > multiple instances of a business service. > > > Cheers, > Paul > > On Tue, Nov 4, 2014 at 3:08 PM, Sekar, Sowmya wrote: > > > Hi, > > > > To invoke service classes from each method in the action classes, are > > there any other options to make it thread safe other than initializing > > them as local variables? > > > > Thanks, Sowmya > > >
Re: Struts 1 Thread safe action classes
Your service classes should be thread-safe to begin with. You don't need multiple instances of a business service. Cheers, Paul On Tue, Nov 4, 2014 at 3:08 PM, Sekar, Sowmya wrote: > Hi, > > To invoke service classes from each method in the action classes, are > there any other options to make it thread safe other than initializing them > as local variables? > > Thanks, Sowmya >
Re: Is the email regex validator in Struts validation incorrect?
It's impossible to generalize if the developer wants ASCII characters or Unicode characters in email validation. A switch is obviously mandated. However, for Unicode characters, this can be easily solved by using the \w switch (word characters), I believe, as a replacement for the typical [A-Za-z0-9_\-] pattern. Cheers, Paul On Mon, Aug 25, 2014 at 11:22 AM, Dave Newton wrote: > http://tools.ietf.org/html/rfc2822 > > IIRC http://tools.ietf.org/html/rfc2047 discusses non-0-127 chars in > headers, I'm not sure if that extends to addresses. > > The bottom line is that any realistic email regex will miss a lot of edge > cases, and some fairly normal use cases as well. Email regexes are > generally "good enough" and that's about it. Regexes isn't the right > solution for completely-spec-compliant email address validation. > > Note that other email validators can be plugged in fairly easily. > > Dave > > > > > On Mon, Aug 25, 2014 at 12:11 PM, Miguel Almeida > wrote: > > > I have added it to the JIRA - > > https://issues.apache.org/jira/browse/WW-4389 > > > > > > I can't seem to find the actual standard though (i.e., the one in place > > that essentially doesn't allow these characters). For documentation > > purposes, does anyone know what effective standard disallows these > > characters? > > > > Cheers! > > Miguel > > > > On Mon, 2014-08-25 at 10:51 -0500, Paul Benedict wrote: > > > > > I looked up the RFC. The document lists itself as a "proposed standard" > > [1] > > > so it's not really available yet for general use (but correct me if > > wrong). > > > I propose that an enhancement should be made in JIRA to handle this. > > > > > > [1] http://tools.ietf.org/html/rfc6531 > > > > > > > > > > > > Cheers, > > > Paul > > > > > > > > > On Mon, Aug 25, 2014 at 10:46 AM, Miguel Almeida > > wrote: > > > > > > > This is the regex for email validation in Struts: > > > > > > > > \\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)\* > > > > > \.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi| > > > > museum|name|nato|net|org|pro|tel|travel|xxx)$\\b > > > > > > > > I had a report of this failing for a user with an umlaut email > > > > ( shläg...@example.com ). My regex is not very good, but the above > > > > mentioned regex doesn't seem to allow said characters. > > > > > > > > However, International characters above U+007F are permitted by RFC > > > > 6531 : > > > > > > > > http://sphinx.mythic-beasts.com/~pdw/cgi-bin/emailvalidate > > > > > > > > > > > > > > > > What is your view on this? Could this regex be incorrect and miss out > > > > any special characters? > > > > > > > > Miguel Almeida > > > > > > > > > > > > > > -- > e: davelnew...@gmail.com > m: 908-380-8699 > s: davelnewton_skype > t: @dave_newton <https://twitter.com/dave_newton> > b: Bucky Bits <http://buckybits.blogspot.com/> > g: davelnewton <https://github.com/davelnewton> > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton> >
Re: Is the email regex validator in Struts validation incorrect?
I looked up the RFC. The document lists itself as a "proposed standard" [1] so it's not really available yet for general use (but correct me if wrong). I propose that an enhancement should be made in JIRA to handle this. [1] http://tools.ietf.org/html/rfc6531 Cheers, Paul On Mon, Aug 25, 2014 at 10:46 AM, Miguel Almeida wrote: > This is the regex for email validation in Struts: > > \\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)\* > \.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi| > museum|name|nato|net|org|pro|tel|travel|xxx)$\\b > > I had a report of this failing for a user with an umlaut email > ( shläg...@example.com ). My regex is not very good, but the above > mentioned regex doesn't seem to allow said characters. > > However, International characters above U+007F are permitted by RFC > 6531 : > > http://sphinx.mythic-beasts.com/~pdw/cgi-bin/emailvalidate > > > > What is your view on this? Could this regex be incorrect and miss out > any special characters? > > Miguel Almeida > >
Re: Fix security vulnerability
Yes, we have releases planned: https://issues.apache.org/jira/browse/STR/?selectedTab=com.atlassian.jira.jira-projects-plugin:roadmap-panel Cheers, Paul On Wed, Jul 9, 2014 at 4:08 PM, Dave Newton wrote: > I'm not sure. > > In the meantime: > > > http://h30499.www3.hp.com/t5/HP-Security-Research-Blog/Protect-your-Struts1-applications/ba-p/6463188#.U72vCa1VRF9 > > Dave > > > > On Wed, Jul 9, 2014 at 5:01 PM, > wrote: > > > Hi, > > > > http://www.cvedetails.com/cve/CVE-2014-0114/ > > > > Is there a planned fix for version 1.x? > > > > Regards > > Walter > > > > > > > > > > This e-mail may contain confidential information. > > If you are not an addressee or otherwise authorised to receive this > > message, you should not use, copy, disclose or take any action based on > > this e-mail. > > If you have received this e-mail in error, please inform the sender > > promptly and delete this message and any attachments immediately. > > > > > -- > e: davelnew...@gmail.com > m: 908-380-8699 > s: davelnewton_skype > t: @dave_newton <https://twitter.com/dave_newton> > b: Bucky Bits <http://buckybits.blogspot.com/> > g: davelnewton <https://github.com/davelnewton> > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton> >
Re: Struts1->Struts2 JSP tags
Use JSTL or the struts "if" tag Cheers, Paul On Wed, Jul 2, 2014 at 3:42 PM, Christopher Gokey wrote: > So I'm making progress in porting Struts1->Struts2, I've got a couple uses > of Struts tags that I'd like to convert over as well: > logic:iterate > logic:equal > logic:notEmpty > > seem to be the most heavily used. Is there equivalents for these in > Struts2? > > Thanks, > Chris >
Re: Struts1 RequestProcessor
It sounds like what you want is to create a new result type. Cheers, Paul On Tue, Jul 1, 2014 at 4:08 PM, Christopher Gokey wrote: > We've got some pretty old code that I'm trying to port over to Struts2 and > if someone could point me in the right direction in how I can rewrite this > code that we subclassed in Struts1's RequestProcessor to handle the same > type of thing in Struts2, I'd really appreciate it. > > Basically: > > 1) In Struts1, we implements a custom RequestProcessor, that overrides: > > public class CustomRequestProcessor extends RequestProcessor >protected void processForwardConfig(HttpServletRequest request, > HttpServletResponse response, > ForwardConfig forward) throws > IOException, ServletException > > 2) In the method above, it grabs the path: > > String path = forward.getPath(); > > 3) If the path is a .jsp file, it does things special and rewrites where > the JSP file is located. > Then calls: > > newPath = determineNewPath(path); > doForward(newPath, request, response); > > I thought about overwriting StrutsPrepareAndExecuteFilter, but it isn't > obvious how I can grab the path and rewrite it, so any suggestions/help > would be greatly apprecicated. Is this something that an Interceptor > would be best in handling? > > Thanks, > Chris >
Re: dynamic interceptor insertion
I have asked for that feature myself :-) No, that's not possible today. But if you have the time, you can code the solution and share it with everyone! Cheers, Paul On Thu, Jun 26, 2014 at 9:51 AM, Gildas de Cadoudal < gildas.de.cadou...@gmail.com> wrote: > Hi all, > > I would like to dynamically insert an interceptor to a specific place > in existing stack. > Of course I also like the stacks referencing the one where I insert > the interceptor also take advantage of this configuration change. > > Practicable to do this? I started to look on the side of > PackageProvider, but I can not find sufficiently complete > documentation allowing me to do this. > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Issues in Struts2 unit testing
I think you need to minimize your test case and start from something simpler to diagnose the problem. First try using the default stack alone. Let us know how that turns out. Cheers, Paul On Fri, Jun 13, 2014 at 8:25 AM, Krishnaraj A < akrajmscjavaquest...@gmail.com> wrote: > Hi Team, > > > Is any help for the above issue > > Thanks > Krishna raj > > > On Thu, Jun 12, 2014 at 9:05 PM, Krishnaraj A < > akrajmscjavaquest...@gmail.com> wrote: > > > Hi Dave, > > > > I added my struts code. > > > > Junit Code: > > > > public class AdminValidation extends StrutsTestCase { > > > > @Test > > public void testUserNameErrorMessage() throws Exception { > > > > HttpSession session = request.getSession(); > > UserVO uservo1 =new UserVO(); > > uservo1.setUserMailId("akrajmscjavaquest...@gmail.com"); > > uservo1.setReturnedStatus("admin"); > > uservo1.setAccessLevel("1293"); > > uservo1.setIntranetId("Krishnaraj"); > > uservo1.setSuperAdmin(true); > > uservo1.setShowRegContact(false); > > session.setAttribute("user", uservo1); > > ActionProxy proxy = getActionProxy("/MainAdminPage.action"); > > ActionContext context > > =proxy.getInvocation().getInvocationContext(); > > Map session = new HashMap(); > > session.put("user", uservo1); > > context.setSession(session); > > String result = proxy.execute(); > > assertEquals("Result returned form executing the action was not > > success but it should have been.", "success", result); > > } > > } > > > > Struts.xml code: > > > > > > > class="com.interceptor.UserValidation"> > > > class="com.interceptor.SessionClearInterceptor"> > > > > > > > > > > > > > > > > > > > > > > /MainAdmin.jsp > > /Login.jsp > > > > > > UserValidation.java code: > > > > public class UserValidation extends AbstractInterceptor implements > > StrutsStatics { > > > > > > private static final long serialVersionUID = 1L; > > > > public void init() { > > > > } > > > > public void destroy() { > > } > > > > public String intercept(ActionInvocation invocation) throws > Exception { > > > > final ActionContext context = invocation.getInvocationContext(); > > String str =invocation.getAction().getClass().getSimpleName(); > > Map session =context.getSession() ; > > HttpServletRequest request=(HttpServletRequest) > > context.get(HTTP_REQUEST); > > HttpServletResponse response=(HttpServletResponse) > > context.get(HTTP_RESPONSE); > > String str1 =request.getRequestedSessionId(); > > > > request.setCharacterEncoding("UTF-8"); > > final UserVO uservo =(UserVO) session.get("user"); > > String userMailId; > > if(uservo !=null){ > > String mailID=uservo.getUserMailId(); > > if(mailID != null){ > > System.out.println("Success"); > > } > > } > > > > else { > > return "login"; > > > > } > > response.setHeader("Pragma","no-cache"); > > response.setHeader("Cache-Control","no-store"); > > response.setHeader("Expires","0"); > > response.setDateHeader("Expires",-1); > > response.setCharacterEncoding("UTF-8"); > > return invocation.invoke(); > > > > } > > } > > > > I debug the application by placing the break point. When the control go > to > > " return invocation.invoke();" it throws error. > > > > java.lang. > > IllegalStateException: Action has already executed > > > > > > Thanks, > > Krishnaraj > > > > > > > > > > On Thu, Jun 12, 2014 at 8:45 PM, Dave Newton > > wrote: > > > >> Without knowing what's in your interceptor stack it's impossible to > help. > >> > >> Dave > >> > >> > >> On Thu, Jun 12, 2014 at 11:11 AM, Krishnaraj A < > >
Re: Issues in Struts2 unit testing
Go set a breakpoint in Struts where the ISE is being thrown and see what condition is being tested. If possible, take some time to determine when that condition is being set before your invocation. Cheers, Paul On Fri, Jun 13, 2014 at 8:25 AM, Krishnaraj A < akrajmscjavaquest...@gmail.com> wrote: > Hi Team, > > > Is any help for the above issue > > Thanks > Krishna raj > > > On Thu, Jun 12, 2014 at 9:05 PM, Krishnaraj A < > akrajmscjavaquest...@gmail.com> wrote: > > > Hi Dave, > > > > I added my struts code. > > > > Junit Code: > > > > public class AdminValidation extends StrutsTestCase { > > > > @Test > > public void testUserNameErrorMessage() throws Exception { > > > > HttpSession session = request.getSession(); > > UserVO uservo1 =new UserVO(); > > uservo1.setUserMailId("akrajmscjavaquest...@gmail.com"); > > uservo1.setReturnedStatus("admin"); > > uservo1.setAccessLevel("1293"); > > uservo1.setIntranetId("Krishnaraj"); > > uservo1.setSuperAdmin(true); > > uservo1.setShowRegContact(false); > > session.setAttribute("user", uservo1); > > ActionProxy proxy = getActionProxy("/MainAdminPage.action"); > > ActionContext context > > =proxy.getInvocation().getInvocationContext(); > > Map session = new HashMap(); > > session.put("user", uservo1); > > context.setSession(session); > > String result = proxy.execute(); > > assertEquals("Result returned form executing the action was not > > success but it should have been.", "success", result); > > } > > } > > > > Struts.xml code: > > > > > > > class="com.interceptor.UserValidation"> > > > class="com.interceptor.SessionClearInterceptor"> > > > > > > > > > > > > > > > > > > > > > > /MainAdmin.jsp > > /Login.jsp > > > > > > UserValidation.java code: > > > > public class UserValidation extends AbstractInterceptor implements > > StrutsStatics { > > > > > > private static final long serialVersionUID = 1L; > > > > public void init() { > > > > } > > > > public void destroy() { > > } > > > > public String intercept(ActionInvocation invocation) throws > Exception { > > > > final ActionContext context = invocation.getInvocationContext(); > > String str =invocation.getAction().getClass().getSimpleName(); > > Map session =context.getSession() ; > > HttpServletRequest request=(HttpServletRequest) > > context.get(HTTP_REQUEST); > > HttpServletResponse response=(HttpServletResponse) > > context.get(HTTP_RESPONSE); > > String str1 =request.getRequestedSessionId(); > > > > request.setCharacterEncoding("UTF-8"); > > final UserVO uservo =(UserVO) session.get("user"); > > String userMailId; > > if(uservo !=null){ > > String mailID=uservo.getUserMailId(); > > if(mailID != null){ > > System.out.println("Success"); > > } > > } > > > > else { > > return "login"; > > > > } > > response.setHeader("Pragma","no-cache"); > > response.setHeader("Cache-Control","no-store"); > > response.setHeader("Expires","0"); > > response.setDateHeader("Expires",-1); > > response.setCharacterEncoding("UTF-8"); > > return invocation.invoke(); > > > > } > > } > > > > I debug the application by placing the break point. When the control go > to > > " return invocation.invoke();" it throws error. > > > > java.lang. > > IllegalStateException: Action has already executed > > > > > > Thanks, > > Krishnaraj > > > > > > > > > > On Thu, Jun 12, 2014 at 8:45 PM, Dave Newton > > wrote: > > > >> Without knowing what's in your interceptor stack it's impossible to > help. > >> > >> Dave > >> > >> > >> On Thu, Jun 12, 2014 at 11:11 AM, Krishnaraj A < >
Re: Issues in Struts2 unit testing
Put a breakpoint in your execute() and see if it's being called. The error message might be telling the truth: the action has already been executed. Cheers, Paul On Thu, Jun 12, 2014 at 10:15 AM, Dave Newton wrote: > Without knowing what's in your interceptor stack it's impossible to help. > > Dave > > > On Thu, Jun 12, 2014 at 11:11 AM, Krishnaraj A < > akrajmscjavaquest...@gmail.com> wrote: > > > Hi Team, > > > > Iam new to using Struts2 unit testing. Iam using the Struts 2 JUnit > plugin > > <http://struts.apache.org/2.3.1.2/docs/junit-plugin.html>. The normal > > actions which is working fine. But I have issue when I am testing the > > action which has interceptor. > > > > > > > > /MainAdmin.jsp > > /Login.jsp > > > > > > When I start testing the control goes to interceptor and check all the > > validation. > > when it invoke "return invocation.invoke();". it throws error. > > java.lang.IllegalStateException: Action has already executed > > > > I am not able to get the solution for the above problem. Can any one help > > me in this problem to find the solution. Thanks in advance. > > > > Thanks, > > Krishna raj > > > > > > -- > e: davelnew...@gmail.com > m: 908-380-8699 > s: davelnewton_skype > t: @dave_newton <https://twitter.com/dave_newton> > b: Bucky Bits <http://buckybits.blogspot.com/> > g: davelnewton <https://github.com/davelnewton> > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton> >
Re: Struts2 iterator twice for select tag
Maybe you found a bug. Hopefully Struts cleans up its iterator when the tag finishes. Maybe you can look into the source code to find out for us. Cheers, Paul On Tue, Jun 3, 2014 at 12:17 PM, Matt Williams < mattwms1998...@yahoo.com.invalid> wrote: > > I am using struts 2.1.8. I am extending the > "org.apache.struts2.components.Select" tag and writing my own "select.ftl" > (freemarker template). > > I need to iterate over the parameter "parameters.list" twice. > > Example: > <@s.iterator value="parameters.list"> >loop1 > > <@s.iterator value="parameters.list"> > loop2 > > > However, the second iterator doesn't loop. I think the "parameters.list" > is an Iterator object so it is already at the end (created by > org.apache.struts2.util.MakeIterator.convert(Object)). > > Is there a way? > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Required Info on Upgrading Struts 1.2.x to Struts 2.3.x
Struts 1 uses a DTD which doesn't allow custom elements in the configuration... or does it? I have never seen this before. Cheers, Paul On Tue, Jun 3, 2014 at 4:57 AM, Lukasz Lenart wrote: > I have no idea if it is possible or not, but you can use like this > > ${['key1','key2','key3']} > > 2014-06-03 11:42 GMT+02:00 Janardhana Pagadala : > > Hello Lukas > > > > Thanks for your response but the issue is not with tag. As > > mentioned in my question, I would like use custom tag , etc. > > in action in addition to the tag. Hope the questions makes sense > > now. > > > > Please suggest if there is a possibility to implement such feature in > > Struts 2.3.x > > > > Thanks in advance > > > > > > On Tue, Jun 3, 2014 at 2:19 AM, Lukasz Lenart > > wrote: > > > >> 2014-06-03 4:09 GMT+02:00 Janardhana Pagadala : > >> > We would like to implement similar functionality in Struts 2.3.x to > match > >> > with that of above: > >> > > >> > key3="value3"> > >> > > >> > > >> > > >> > /sample.jsp > >> > > >> > > >> > > >> > *Question:* > >> > What is the best way to implement similar functionality in Struts > 2.3.x > >> > (Struts.xml)? > >> > How do we tell the Struts framework to recognize the new "action" tags > >> and > >> > pass the values to be set on the corresponding "action" class? > >> > >> Use param > >> > >> bar > >> > >> or > >> > >> ${bar} > >> > >> if you need set value dynamically > >> > >> > >> Regards > >> -- > >> Łukasz > >> + 48 606 323 122 http://www.lenart.org.pl/ > >> > >> - > >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > >> For additional commands, e-mail: user-h...@struts.apache.org > >> > >> > > > > > > -- > > Thanks, > > > > Janardhana Pagadala > > Cell: 617-653-3240 > > Email: jrpagad...@gmail.com > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Struts 1 Logging
Websphere is notorious for its poor logging support. I used Websphere for about 5 years. The server exposes Commons Logging in the parent class loader so it's already configured -- and not configurable by you. That was my experience, at least. I think you should google "Websphere Struts Logging" and see what you find. It's a battle but I think you'll be able to solve it. Cheers, Paul On Fri, May 30, 2014 at 8:36 AM, Usha Ladkani wrote: > yes.. below is how property file looks like. > > log4j.rootLogger=DEBUG, R > log4j.logger.org.apache.struts=DEBUG > log4j.appender.R=org.apache.log4j.RollingFileAppender > log4j.appender.R.File=../updivalidation/UPDISetup.log > log4j.appender.R.MaxFileSize=10MB > log4j.appender.R.MaxBackupIndex=10 > log4j.appender.R.layout=org.apache.log4j.PatternLayout > log4j.appender.R.layout.ConversionPattern=[%d{MM/dd/yy HH:mm:ss}] source=%c > thread=[%t] %m%n > > > > > > > On Fri, May 30, 2014 at 7:02 PM, Dave Newton > wrote: > > > Did you add the line for Struts debugging? > > > > Dave > > >
Re: Struts 1 Logging
Usha, I don't understand your response. So you have a log file and it's logging? Cheers, Paul On Fri, May 30, 2014 at 7:58 AM, Usha Ladkani wrote: > property file is in classpath , As the log file is being created with > trace. > > We are not using tomcat. we are using our own webserver which is running on > IBM Websphere application server. > > > On Fri, May 30, 2014 at 6:21 PM, Mark Shifman > wrote: > > > > > > > On 05/30/2014 08:26 AM, Usha Ladkani wrote: > > > >> Now empty log file is being created. > >> > >> I see this error in systemout which i printed too > >> > >> [30/5/14 12:23:48:824 UTC] 0086 R UOW= source=SystemErr org=IBM > >> prod=WebSphere component=Application Server thread=[WebContainer : 0] > >>log4j:WARN No appenders could be found for logger > >> (com.ibm.bcg.consoleUI.action.partners.PartnerCreateAction). > >> [30/5/14 12:23:48:839 UTC] 0086 R UOW= source=SystemErr org=IBM > >> prod=WebSphere component=Application Server thread=[WebContainer : 0] > >>log4j:WARN Please initialize the log4j system properly. > >> > >> > >> Below is my property file looks like > >> > >> log4j.logger.org.apache.struts=DEBUG, R > >> log4j.appender.R=org.apache.log4j.RollingFileAppender > >> log4j.appender.R.File=usha.log > >> log4j.appender.R.MaxFileSize=10MB > >> log4j.appender.R.MaxBackupIndex=10 > >> log4j.appender.R.layout=org.apache.log4j.PatternLayout > >> log4j.appender.R.layout.ConversionPattern=[%d{MM/dd/yy HH:mm:ss}] > >> source=%c > >> thread=[%t] %m%n > >> > > Here is yet another example that I use with struts 1 with some additional > > comments. > > Here is yet another example of a log4j.properties file that seems to > work. > > (At least for an example for you to play with) > > > > log4j.rootCategory=INFO, A2 > > # A2 is a DailyRollingFileAppender > > # > > log4j.appender.A2=org.apache.log4j.DailyRollingFileAppender > > log4j.appender.A2.ImmediateFlush=true > > log4j.appender.A2.file=${catalina.home}/logs/myapp_log.txt > > log4j.appender.A2.datePattern='.'-MM-dd > > log4j.appender.A2.append=true > > log4j.appender.A2.layout=org.apache.log4j.PatternLayout > > log4j.appender.A2.layout.ConversionPattern=%-5p %d{ISO8601} > > %M(%F:%L)%n%m%n > > > > # Set Struts/Commons log level > > log4j.logger.org.apache.struts=INFO > > log4j.logger.org.apache.commons=INFO > > log4j.logger.org.displaytag=WARN > > log4j.logger.org.apache.struts.validator=WARN > > > > log4j.logger.org.apache.commons.validator.GenericTypeValidator=ERROR > > log4j.logger.org.apache.struts.chain.commands.servlet.CreateAction=WARN > > log4j.logger.org.apache.struts.chain.ComposableRequestProcessor=WARN > > log4j.logger.org.apache.struts.action.ActionServlet=WARN > > log4j.logger.org.apache.struts.util.PropertyMessageResources=ERROR > > log4j.logger.org.apache.struts.action.ActionMapping=ERROR > > > > log4j.logger.org.exolab.castor.mapping.Mapping=WARN > > > > The file needs to be in your "classes" directory on you file path > > > > you also have to make sure that catalina.home is known from somewhere. I > > use jsvc to start tomcat as a daemon and have > > an tomcat service file (using centos or redhat) that has these lines. > > # Source function library. > > . /etc/init.d/functions > > > > # Adapt the following lines to your configuration > > CATALINA_HOME=/home/apache-tomcat-7.0.20 > > DAEMON_HOME=/home/apache-tomcat-7.0.20/bin > > TOMCAT_USER=tomcat > > > > CATALINA_OPTS=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true > > -XX:+UseNUMA -XX:+UseParallelGC -Xms1024M -Xmx1024M -XX:MaxPermSize=512M > " > > CLASSPATH=\ > > $JAVA_HOME/lib/tools.jar:\ > > $CATALINA_HOME/bin/commons-daemon.jar:\ > > $CATALINA_HOME/bin/bootstrap.jar:\ > > $CATALINA_HOME/bin/tomcat-juli.jar > > ... > > I think I had to add "tomcat-juli.jar" to the CLASSPATH above. > > > > Also there is src code you have to compile to make a "tomcat-juli.jar" > > that will understand log4j. > > > > 2. > >> > >> Download or build |tomcat-juli.jar| and |tomcat-juli-adapters.jar| > >> that are available as an "extras" component for Tomcat. See Additional > >> Components documentation <http://tomcat.apache.org/ > >> tomcat-7.0-doc/extras.html> for details. >
Re: Struts 1 Logging
Okay, but Struts 1 uses Apache Commons Logging. That means you'll need to configure that or use Apache Log4j 1.x configuration which is also supported. Cheers, Paul On Thu, May 29, 2014 at 10:38 PM, Usha Ladkani wrote: > Hello Paul. > > We are using java.util.logging.Logger in our application. > > Regards > Usha > > > On Fri, May 30, 2014 at 9:02 AM, Paul Benedict > wrote: > > > Usha, what logging framework are you using? > > > > > > Cheers, > > Paul > > > > > > On Thu, May 29, 2014 at 10:28 PM, Usha Ladkani > > wrote: > > > > > Hello , > > > > > > We are using Struts 1 , Can someone tell me how can I enable Struts > logs > > in > > > debug mode, Basically I am looking for statements as below - > > > > > > BeanUtils 1 org.apache.commons.beanutils.BeanUtils populate > > > BeanUtils.populate( > > > > > > Thanks and regards > > > > > >
Re: Struts 1 Logging
Usha, what logging framework are you using? Cheers, Paul On Thu, May 29, 2014 at 10:28 PM, Usha Ladkani wrote: > Hello , > > We are using Struts 1 , Can someone tell me how can I enable Struts logs in > debug mode, Basically I am looking for statements as below - > > BeanUtils 1 org.apache.commons.beanutils.BeanUtils populate > BeanUtils.populate( > > Thanks and regards >
Struts Dojo Plugin is broken (2.3.16.3)
Hi! If anyone else have issues with latest Struts Dojo, here's something for you; The error in question can be seen when the javascript error console yells: "TypeError: "$Rev$".match(...) is null" This happens because the current available Struts built from Git and not Subversion. When checking out from Subversion, it appends the revision number to all instances of "$Rev$" in the files. Git does not do keyword substitution. This is the offending line; https://github.com/apache/struts/blob/develop/plugins/dojo/src/main/resources/org/apache/struts2/static/dojo/struts_dojo.js#L36 It looks like this when checked out from Subversion; dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev: 670371 $".match(/[0-9]+/)[0]),toString:function(){ Now unfortunately it looks like this in the latest jar; dojo.version={major:0,minor:4,patch:3,flag:"",revision:Number("$Rev$".match(/[0-9]+/)[0]),toString:function(){ So the .match() fails and kills Dojo. Regards AP. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: utf-8 characters and xslt result type
Your XSL (stylesheet) has the ability to set the output content encoding. Are you using that? And does that work? Cheers, Paul On Sat, May 24, 2014 at 2:05 PM, Lukasz Lenart wrote: > Can you register a bug in JIRA? Then we can extend XSLTResult to set > content-encoding with response. > > 2014-05-23 19:28 GMT+02:00 Arturo Flores : > > Apparently SetCharacterEncodingFilter only sets the character encoding > for > > incoming content, does not affect the response. The custom filter in the > > link did work though, thanks for the tip. > > > > Arturo > > > > > > > > On Fri, May 23, 2014 at 8:54 AM, Arturo Flores > wrote: > > > >> I already have this in my web.xml: > >> > >> > >> CharacterEncodingFilter > >> > >> org.apache.catalina.filters.SetCharacterEncodingFilter > >> > >> > >> encoding > >> UTF-8 > >> > >> > >> ignore > >> true > >> > >> > >> > >> > >> CharacterEncodingFilter > >> /* > >> > >> > >> Shouldn't this be forcing utf-8 encoding? I'll try the method in the > link > >> you provided as well. > >> > >> Arturo > >> > >> > >> > >> On Fri, May 23, 2014 at 8:39 AM, Lukasz Lenart >wrote: > >> > >>> So, encoding is missing. Do two things: > >>> - register a bug in JIRA -> https://issues.apache.org/jira/browse/WW > >>> - use some filter to force UTF-8 encoding -> > >>> > >>> > http://stackoverflow.com/questions/138948/how-to-get-utf-8-working-in-java-webapps > >>> > >>> > >>> Regards > >>> -- > >>> Łukasz > >>> + 48 606 323 122 http://www.lenart.org.pl/ > >>> > >>> 2014-05-23 17:36 GMT+02:00 Arturo Flores : > >>> > The value of Content-Type is text/xml. > >>> > > >>> > Arturo > >>> > > >>> > > >>> > On Thu, May 22, 2014 at 11:47 PM, Lukasz Lenart < > >>> lukaszlen...@apache.org>wrote: > >>> > > >>> >> 2014-05-23 7:54 GMT+02:00 Arturo Flores : > >>> >> > When I request /testutf8 I get the following in the browser: > >>> >> > XML Parsing Error: not well-formed > >>> >> > Location: http://localhost:8080/testutf8 > >>> >> > Line Number 1, Column 48: >>> >> > encoding="UTF-8"?>h�llo world > >>> >> > ---^ > >>> >> > > >>> >> > It seems the utf-8 character is not being handled properly. How > can > >>> I > >>> >> make > >>> >> > the xslt result type handle the utf-8 character correctly? > >>> >> > >>> >> Can you check headers of the response? What's the value of > >>> Content-Type? > >>> >> > >>> >> > >>> >> Regards > >>> >> -- > >>> >> Łukasz > >>> >> + 48 606 323 122 http://www.lenart.org.pl/ > >>> >> > >>> >> > - > >>> >> 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: No parameters set in action when file upload exceeds max size
https://issues.apache.org/jira/browse/WW-3025 Cheers, Paul On Fri, May 9, 2014 at 10:43 AM, Greg Lindholm wrote: > When I try to upload a file that exceeds the configured 2M max then no > parameters get set on my action. > > I can't present the user with a pretty error message since all context is > missing without the rest of the parameters. > > The file upload is part of a form post that include a bunch of other > parameters my app needs to understand the context of the request. > > I've spent all morning in the debugger, the ParametersInterceptor is being > called but the ActionContext.getParameters() is returning null. > > It appears that when > org.apache.commons.fileupload.servlet.ServletFileUpload throws > SizeLimitExceededException all parameter parsing is aborted and the multi > part request wrapper thinks there are no parameters. > > Is this expected behavior? > > Can anyone help? > > Greg > > Struts 2.3.16.3 > > > 2014-05-09 11:28:40,085 WARN > org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest:64 - > Request exceeded size limit! > org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: > the request was rejected because its size (18652294) exceeds the configured > maximum (2097152) > at > > org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.(FileUploadBase.java:965) > at > > org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:310) > at > > org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:334) > at > > org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parseRequest(JakartaMultiPartRequest.java:189) > at > > org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.processUpload(JakartaMultiPartRequest.java:127) > at > > org.apache.struts2.dispatcher.multipart.JakartaMultiPartRequest.parse(JakartaMultiPartRequest.java:92) > at > > org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper.(MultiPartRequestWrapper.java:81) > at > org.apache.struts2.dispatcher.Dispatcher.wrapRequest(Dispatcher.java:803) > at > > org.apache.struts2.dispatcher.ng.PrepareOperations.wrapRequest(PrepareOperations.java:134) > at > > org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter.doFilter(StrutsPrepareFilter.java:88) >
Struts2 Tiles deprecation warning
Struts 2.3.16.1 Tiles 2.2.2 Everytime my application boots, this shows up in the logs: DEPRECATION WARNING! You are using parameter-based initialization, that is no longer supported! Please see docs: http://tiles.apache.org/framework/tutorial/configuration.html I did some internet research; my findings say this is a problem with the Struts 2 plugin being out-of-date. Is this true? Or is this only a configuration issue which I can fix (and how?)? -- Cheers, Paul
Re: No action instance for path /welcomeAction could be created
uld greatly appreciate any help > > > > Thank you > > > > Eugene > > > > > > The information contained in this e-mail, and any attachment, is > confidential and is intended solely for the use of the intended recipient. > Access, copying or re-use of the e-mail or any attachment, or any > information contained therein, by any other person is not authorized. If > you are not the intended recipient please return the e-mail to the sender > and delete it from your computer. Although we attempt to sweep e-mail and > attachments for viruses, we do not guarantee that either are virus-free and > accept no liability for any damage sustained as a result of viruses. > > > > Please refer to http://disclaimer.bnymellon.com/eu.htm for certain > disclosures relating to European legal entities. > > > > - > > 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 > > -- Cheers, Paul
Re: Request parameters need corresponding getters/setters in action?
Can you please clarify where you're upgrading from. You said 2.8.1 ... but did you really mean Struts 1.2.8? On Thu, Mar 27, 2014 at 3:41 PM, Manuel López Blasi < lopezbl...@conicet.gov.ar> wrote: > Hello everybody, > > i'm in the process or migrating our application from struts 2.8.1 to the > latest 2.3.16.1 Ga. > After some intense debugging and researching i have come to the conclusion > that request parameters passed thru url are required > to have corresponding setter mothod (dunno if getter too) in targeted > action class. > > I have and url like this: > http://localhost:8080/sigerh_5_4/view/licencia/usuario/ > listarTramite_input.action?pantallaOrigen=Licencia& > idMenu=27&idModulo=5&idGrupo=4 > > the params would be: > pantallaOrigen=Licencia > &idMenu=27 > &idModulo=5 > &idGrupo=4 > > whenever i click the link i get following exception: > " > INFO: 2014-03-27 17:29:32,673 ERROR .logging.commons.CommonsLogger error > (L:34 ) -Developer Notification (set struts.devMode to > false to disable this message): > Unexpected Exception caught setting 'pantallaOrigen' on 'class > ar.gov.conicet.apps.sigerh.presentation.usuario.CListarTramiteAction: > Error setting expression 'pantallaOrigen' with value ['Licencia', ] > " > > i added setter methods in this action to see if that would fix the issue > and set breakpoints and efectively the framework uses this method and sets > those values. > > Is this a new feature or behaviour? I haven't seen it before. > > Is there a way to configure this so i don't have to reformat the whole > application? > > Strange enough some links seems to not suffer from this issue: > this for example is ok: > http://localhost:8080/sigerh_5_4/view/licencia/usuario/ > tramite.action?tramite.id=789447&accion=ver > > > Another issue with latest release(s): i have noticed that datetimepicker > isn't shown anymore, as if it were broken. > > I checked out struts2 jira issue: > > https://issues.apache.org/jira/browse/WW-4254 > > and grabbign some info from there i managed to modify some files from > struts2-core-2.3.16.1.jar , > i changed some paths in > controlheader.ftl > controlheader-core.ftl > basically applying the same fixes that were performed in that issue. > Prior to that the jsp crashed in the same way described in the jira ticket. > The changes i made fixed it and no exception or warning is shown in the > log anymore. I have dev mode set to true and debug level set to very high > level showing everything. > > Anybody can comment on this two issues? Any quick fix/solution would be > highly appreciated. > > Thanks in advance. > Best Regards. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Cheers, Paul
Re: Dispatcher attempts to write on the response after it has been commited
Yeah. It should be -- but let's also log the response code we couldn't set. Maybe debug()? On Tue, Mar 18, 2014 at 9:28 AM, Lukasz Lenart wrote: > 2014-03-18 15:21 GMT+01:00 Paul Benedict : > > Lukasz, the ServletResponse interface does contain an isCommitted() > method. > > We can avoid this situation by checking it first. > > Great! Fixing this is piece of cake :-) > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Cheers, Paul
Re: Dispatcher attempts to write on the response after it has been commited
Lukasz, the ServletResponse interface does contain an isCommitted() method. We can avoid this situation by checking it first. On Tue, Mar 18, 2014 at 1:24 AM, Lukasz Lenart wrote: > 2014-03-18 7:01 GMT+01:00 Jose L Martinez-Avial : > > Well, that's a good thing, but anyway I think the default dispatcher > should avoid this kind of error. > > The problem is (as far I can recall) that it's a Weblogic specific > situation. I mean, Tomcat doesn't throw exception when user aborts > opening a web page. So I'd like to avoid keep container specific code > in the core. That's why I extend possibilities to customise the core > with custom plugins. > > But sure, prepare a patch and we will see :-) > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Cheers, Paul
Re: Why do I get this XHTML validation errors? (second attempt)
We need a JIRA ticket to solve this permanently. On Fri, Mar 7, 2014 at 2:37 PM, Lukasz Lenart wrote: > YooHoo! That's suppose to work template inheritance! > > 2014-03-07 21:03 GMT+01:00 Fredrik Andersson : > > Hello guys! > > > > I think you solved it! > > > > I put a new file "hidden.ftl" in my resources-folder (I use maven with > eclipse): > > resources/template/xhtml/hidden.ftl > > > > The content in hidden.ftl is: > > > > > > > > <#include "/${parameters.templateDir}/simple/hidden.ftl" > /> > > > > > > > > Now it validates fine! > > > > Best regards > > Fredrik > > > > > > > > > >> From: thechrispr...@gmail.com > >> Date: Thu, 6 Mar 2014 12:45:00 -0800 > >> Subject: Re: Re: Why do I get this XHTML validation errors? (second > attempt) > >> To: user@struts.apache.org > >> > >> To elaborate on Dave's point, try: > >> > >> > >> > >> // both hidden fields > >> > >> > >> > >> (*Chris*) > >> > >> > >> On Thu, Mar 6, 2014 at 12:26 PM, Dave Newton > wrote: > >> > >>> On Thu, Mar 6, 2014 at 3:01 PM, Fredrik Andersson < > fredan...@hotmail.com > >>>>wrote: > >>> > >>>> I have tride to put the hidden attributet att: > >>>> 1 first code line after the form-start-tag > >>>> 2 before the submit-tag > >>>> 3 after the submit-tag, before form-end-tag. > >>>> None of the attempt validates. > >>>> So If you guys got any idea how to solve this mystery plast let me > know. > >>>> > >>> > >>> You could try what I suggested until the hidden tags have xhtml > templates > >>> that emit correct HTML. > >>> > >>> 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 > > -- Cheers, Paul
Re: Re: Why do I get this XHTML validation errors? (second attempt)
> with a > > > document that uses frames (e.g. you must use the "Transitional" > document > > > type to get the "target" attribute), or by using vendor proprietary > > > extensions such as "marginheight" (this is usually fixed by using CSS > to > > > achieve the desired effect instead). > > > This error may also result if the element itself is not supported in > the > > > document type you are using, as an undefined element will have no > > supported > > > attributes; in this case, see the element-undefined error message for > > > further information. > > > How to fix: check the spelling and case of the element and attribute, > > > (Remember XHTML is all lower-case) and/or check that they are both > > allowed > > > in the chosen document type, and/or use CSS instead of this attribute. > If > > > you received this error when using the element to incorporate > > flash > > > media in a Web page, see the FAQ item on valid flash. > > > > > > Error Line 60, Column 161: document type does not allow element "input" > > > here > > > ...1394108222515" > > > id="productcommentssave_PRODUCTCOMMENTSACTION_FORM_TOKEN_NAME"/> > > > The element named above was found in a context where it is not allowed. > > > This could mean that you have incorrectly nested elements -- such as a > > > "style" element in the "body" section instead of inside "head" -- or > two > > > elements that overlap (which is not allowed). > > > One common cause for this error is the use of XHTML syntax in HTML > > > documents. Due to HTML's rules of implicitly closed elements, this > error > > > can create cascading effects. For instance, using XHTML's > "self-closing" > > > tags for "meta" and "link" in the "head" section of a HTML document may > > > cause the parser to infer the end of the "head" section and the > beginning > > > of the "body" section (where "link" and "meta" are not allowed; hence > the > > > reported error). > > > > > > Error Line 61, Column 93: document type does not allow element "input" > > here > > > ...t type="hidden" name="productid" value="3" > > > id="productcommentssave_productid"/> > > > (same as at line 60) > > > > > > Do you guys see anything that I could do to correct this? I would love > to > > > have a app with correct xhtml. > > > > > > Best regards > > > Fredrik > > > > > > -- > e: davelnew...@gmail.com > m: 908-380-8699 > s: davelnewton_skype > t: @dave_newton <https://twitter.com/dave_newton> > b: Bucky Bits <http://buckybits.blogspot.com/> > g: davelnewton <https://github.com/davelnewton> > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton> > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Cheers, Paul
Re: Why do I get this XHTML validation errors? (second attempt)
Please note the "wrap" attribute on is new to (X)HTML5. So it definitely won't validate version <= 4. Chris is right, you should remove it unless you want to validate at a higher HTML version. On Thu, Mar 6, 2014 at 10:48 AM, Chris Pratt wrote: > Did you try moving the elements to the top of the form, or > removing the wrap="hard" from your ? > (*Chris*) > > > On Thu, Mar 6, 2014 at 5:13 AM, Fredrik Andersson >wrote: > > > Hello guys! > > > > I trying to produce a app that renders in XHTML. > > > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > > http://www.w3.org/1999/xhtml";> > > > > How ever I got a form looking like this: > > > > > > > labelposition="top" maxlength="128" size="40" /> > > > labelposition="top" maxlength="128" size="40" /> > > > cols="52" rows="5" labelposition="top" wrap="hard"/> > > > > > value="%{formToken}" /> > > > > > > > > This gets rendered like: > > 25 > action="/productcommentssave.action" method="post"> > > 26 > > 27 > > 28 > for="productcommentssave_productComment_emailAddress" class="label">Email > > address: > > 29 > > 30 > > 31 > 32> > maxlength="128" value="" > > id="productcommentssave_productComment_emailAddress"/> > > 33 > > 34 > > 35 > > 36 > > 37 > for="productcommentssave_productComment_subject" > > class="label">Subject: > > 38 > > 39 > > 40 > 41> > maxlength="128" value="" > > id="productcommentssave_productComment_subject"/> > > 42 > > 43 > > 44 > > 45 > > 46 > for="productcommentssave_productComment_text" class="label">Message (max > > 1024 chars): > > 47 > > 48 > > 49 > 50> > id="productcommentssave_productComment_text"> > > 51 > > 52 > > 53 > > 54 > > 55 > id="productcommentssave_0" value="Submit"/> > > 56 > > 57 > > 58 > > 59 > > 60 > value="1394108222515" > > id="productcommentssave_PRODUCTCOMMENTSACTION_FORM_TOKEN_NAME"/> > > 61 > id="productcommentssave_productid"/> > > 62 > > > > From http://validator.w3.org/#validate_by_input+with_options I validate > > it and get these 3 anoying errors: > > > > Error Line 50, Column 63: there is no attribute "wrap" > > ...Comment.text" cols="52" rows="5" wrap="hard" > > id="productcommentssave_productCo... > > You have used the attribute named above in your document, but the > document > > type you are using does not support that attribute for this element. This > > error is often caused by incorrect use of the "Strict" document type > with a > > document that uses frames (e.g. you must use the "Transitional" document > > type to get the "target" attribute), or by using vendor proprietary > > extensions such as "marginheight" (this is usually fixed by using CSS to > > achieve the desired effect instead). > > This error may also result if the element itself is not supported in the > > document type you are using, as an undefined element will have no > supported > > attributes; in this case, see the element-undefined error message for > > further information. > > How to fix: check the spelling and case of the element and attribute, > > (Remember XHTML is all lower-case) and/or check that they are both > allowed > > in the chosen document type, and/or use CSS instead of this attribute. If > > you received this error when using the element to incorporate > flash > > media in a Web page, see the FAQ item on valid flash. > > > > Error Line 60, Column 161: document type does not allow element "input" > > here > > ...1394108222515" > > id="productcommentssave_PRODUCTCOMMENTSACTION_FORM_TOKEN_NAME"/> > > The element named above was found in a context where it is not allowed. > > This could mean that you have incorrectly nested elements -- such as a > > "style" element in the "body" section instead of inside "head" -- or two > > elements that overlap (which is not allowed). > > One common cause for this error is the use of XHTML syntax in HTML > > documents. Due to HTML's rules of implicitly closed elements, this error > > can create cascading effects. For instance, using XHTML's "self-closing" > > tags for "meta" and "link" in the "head" section of a HTML document may > > cause the parser to infer the end of the "head" section and the beginning > > of the "body" section (where "link" and "meta" are not allowed; hence the > > reported error). > > > > Error Line 61, Column 93: document type does not allow element "input" > here > > ...t type="hidden" name="productid" value="3" > > id="productcommentssave_productid"/> > > (same as at line 60) > > > > Do you guys see anything that I could do to correct this? I would love to > > have a app with correct xhtml. > > > > Best regards > > Fredrik > -- Cheers, Paul
Re: MESSAGE TO ADMINIISTRATOR: Unscribing from this mailing list
Email user-unsubscr...@struts.apache.org and wait for a message. When you receive the message, just respond to it and you'll be finished. On Tue, Jan 7, 2014 at 6:30 PM, Michel Prévost wrote: > I have attempted to remove myself from this list at several occasions, > never > worked. The link sent by the server returns a postmaster error when > clicked. > Could some administrator from this list unsubscribe me please? > > > > Thanks a bunch! > > > > Michel > > -- Cheers, Paul
[OT] Setting up mail server on Linux?
Anyone experienced with installing/configuring mail servers on Linux? I have chosen Postfix as my tool but I'll take any working solution. I don't need to receive any emails, only send emails from my domain from a Struts application. -- Cheers, Paul
Re: Tiles with Annotations
Annotations usually help augment the class being annotated. I don't think annotating a Struts action with Tile definitions is very appropriate for this purpose. The purposes are just very different. XML seems more appropriate than annotations here. On Thu, Jan 2, 2014 at 10:02 AM, Christoph Nenning < christoph.nenn...@lex-com.net> wrote: > Dear List, > > > in our applications we often use the convention-plugin together with > tiles-plugin (tiles 2). > > convention-plugin has the advantage that it is not necessary to put an > entry in struts.xml for each action. So struts.xml usually is very small. > But we still have tiles.xml which needs an entry for each action. In big > applications that file becomes huge and hard to maintain. > > To fix that I created a bunch of Annotations and a struts2 result to be > able to create tile defs with annotations. > > > It would take me some time to turn that into a proper framework patch. > > Now my question is: Do you like that stuff? > > > > Sample application code: > > > > tiles.xml > > > "/WEB-INF/tiles/layout/layout.jsp"> > > > > > > > > > > > SampleAction > > @Result(name=SampleAction.INPUT, type="tiles-annotation") > @TileDef( > extend=".default-layout", > attributes={ > @TileAttribute(name="titleMsgKey", value="text.key.test"), > @TileAttribute(name="content", value= > "/WEB-INF/tiles/test/test.jsp") > } > ) > public class SampleAction extends ActionSupport { > ... > } > > > > web.xml > > > > > > > org.apache.struts2.tiles.StrutsTilesAnnotationsListener > > > > org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG > /WEB-INF/classes/tiles.xml param-value> > > > > > > regards, > Christoph > > This Email was scanned by Sophos Anti Virus > -- Cheers, Paul
Re: Token Session Interceptor and back button
You need to have browser caching disabled on your first page: response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1 response.setHeader("Pragma", "no-cache"); // HTTP 1.0 response.setDateHeader("Expires", 0); // Proxies On Fri, Dec 6, 2013 at 5:03 AM, Miguel Almeida wrote: > Paul, I was thinking about this example...what did you have in mind as a > way to achieve that, tough, i.e., that a browser "back" refreshes the > page? > > I can only see some javascript method/hack for that. Were you thinking > of something else? > > > Miguel > > On Thu, 2013-12-05 at 14:59 -0600, Paul Benedict wrote: > > > Make sure your back-button action refreshes the page. You can't reuse a > > token from the browser's cache. It needs to regenerated. > > > > > > On Thu, Dec 5, 2013 at 12:39 PM, semog12 wrote: > > > > > Hi, > > > > > > I am using the token session interceptor for a form and I have this > > > situation: > > > 1) I am in the form page; > > > 2) I leave the form page; > > > 3) Go back to the form page by the "back" button; > > > 4) Submit the form; > > > > > > And of course the form is not submitted and the token returns > > > "invalid.token" but do not adds no actionError. It will not be > interesting > > > to add an action error? > > > > > > Ok, I can resend to a page with a message but I already have a error > page > > > that presents the action errors when necessary. > > > > > > Thanks, > > > > > > André Gomes > > > > > > > > > > > > -- > > > View this message in context: > > > > http://struts.1045723.n5.nabble.com/Token-Session-Interceptor-and-back-button-tp5714861.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 > > > > > > > > > > > > > -- Cheers, Paul
Re: Token Session Interceptor and back button
Make sure your back-button action refreshes the page. You can't reuse a token from the browser's cache. It needs to regenerated. On Thu, Dec 5, 2013 at 12:39 PM, semog12 wrote: > Hi, > > I am using the token session interceptor for a form and I have this > situation: > 1) I am in the form page; > 2) I leave the form page; > 3) Go back to the form page by the "back" button; > 4) Submit the form; > > And of course the form is not submitted and the token returns > "invalid.token" but do not adds no actionError. It will not be interesting > to add an action error? > > Ok, I can resend to a page with a message but I already have a error page > that presents the action errors when necessary. > > Thanks, > > André Gomes > > > > -- > View this message in context: > http://struts.1045723.n5.nabble.com/Token-Session-Interceptor-and-back-button-tp5714861.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 > > -- Cheers, Paul
Re: Concealing primary key in web application with struts 2 from security perspective?
Mohit, feel free to check out Spring Security. It works with any framework to authenticate or authorize resources; it just becomes your responsibility to configure it correctly. On Sat, Nov 30, 2013 at 9:36 AM, Dave Newton wrote: > I don't see how it could, since there are an essentially unlimited number > of back ends, authorization mechanisms, etc that would need to be accounted > for. Struts 2 is agnostic when it comes to basically everything but the web > layer. > On Nov 30, 2013 3:40 AM, "Mohit Gupta" wrote: > > > I agree its not a struts 2 issue. My intention of question is just to ask > > does struts 2 provide any kind of implementation off the shelf (some kind > > of interceptor or any other approach)to address this. Thanks in advance > > > > > > On Sat, Nov 30, 2013 at 12:16 PM, Paul Benedict > >wrote: > > > > > Exposing the primary key is not a security issue; you always have to > key > > > off something. What you need is business logic that ensures that a user > > may > > > only access what he may. That's not a Struts issue; it's logic that you > > > need to add in your business services. > > > > > > > > > On Fri, Nov 29, 2013 at 11:24 PM, Mohit Gupta > > wrote: > > > > > > > When you have internet facing application , its important not to > expose > > > > direct object reference on UI to protect security vulnerability(where > > > user > > > > can retrieve the unauthorized data by merely changing the primary > key). > > > > When you are righting the application from scratch there are various > > ways > > > > you can handle it like :- > > > > > > > > 1)Handling at data layer where query has user id in where class. user > > id > > > > should be picked from session > > > > > > > > 2)Maintaining the map reference map at server side . Key can be some > > > number > > > > generated based on some algo and value will be primary key. Then > expose > > > > that number on ui . On server side get the value against that key. > Even > > > if > > > > user manipulate the number corresponding value wont be found and > throw > > an > > > > error. Something like this. > > > > > > > > There will be other ways also. > > > > > > > > My question is there something of similar kind available in struts 2 > > > where > > > > you can annotate the any field with primary key and it does the step > 2 > > > for > > > > you or any other implementation to abstract primary key. Any ideas? > > > > > > > > > > > > > > > > -- > > > Cheers, > > > Paul > > > > > > -- Cheers, Paul
Re: Concealing primary key in web application with struts 2 from security perspective?
Exposing the primary key is not a security issue; you always have to key off something. What you need is business logic that ensures that a user may only access what he may. That's not a Struts issue; it's logic that you need to add in your business services. On Fri, Nov 29, 2013 at 11:24 PM, Mohit Gupta wrote: > When you have internet facing application , its important not to expose > direct object reference on UI to protect security vulnerability(where user > can retrieve the unauthorized data by merely changing the primary key). > When you are righting the application from scratch there are various ways > you can handle it like :- > > 1)Handling at data layer where query has user id in where class. user id > should be picked from session > > 2)Maintaining the map reference map at server side . Key can be some number > generated based on some algo and value will be primary key. Then expose > that number on ui . On server side get the value against that key. Even if > user manipulate the number corresponding value wont be found and throw an > error. Something like this. > > There will be other ways also. > > My question is there something of similar kind available in struts 2 where > you can annotate the any field with primary key and it does the step 2 for > you or any other implementation to abstract primary key. Any ideas? > -- Cheers, Paul
Re: can we avoid extension "action"?
You are correct. On Nov 12, 2013 1:42 PM, "Yaragalla Muralidhar" wrote: > The strts filter was mapped to "/*" so i dont think we should be doing > something in web.xml. Correct me if i am wrong? > > *Thanks and Regards,* > Muralidhar Yaragalla. > > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>* > > > On Wed, Nov 13, 2013 at 1:03 AM, Paul Benedict > wrote: > > > In addition, make sure your web.xml is sending the new paths/extensions > to > > the Struts 2 filter. > > > > > > On Tue, Nov 12, 2013 at 1:24 PM, Yaragalla Muralidhar < > > yaragallamur...@gmail.com> wrote: > > > > > Thank you so much Dave. > > > > > > *Thanks and Regards,* > > > Muralidhar Yaragalla. > > > > > > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>* > > > > > > > > > On Wed, Nov 13, 2013 at 12:52 AM, Dave Newton > > > wrote: > > > > > > > Yes. > > > > > > > > > > > > On Tue, Nov 12, 2013 at 2:06 PM, Yaragalla Muralidhar < > > > > yaragallamur...@gmail.com> wrote: > > > > > > > > > IS "`struts.action.extension=action,,`" this a constant in > struts.xml > > > > file? > > > > > > > > > > *Thanks and Regards,* > > > > > Muralidhar Yaragalla. > > > > > > > > > > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>* > > > > > > > > > > > > > > > On Wed, Nov 13, 2013 at 12:32 AM, Dave Newton < > davelnew...@gmail.com > > > > > > > > wrote: > > > > > > > > > > > Sure; set `struts.action.extension=action,,` to be whatever you > > want. > > > > > > > > > > > > > > > > > > Although if you use the form tags you don't need to specify it in > > the > > > > > form. > > > > > > > > > > > > Dave > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Nov 12, 2013 at 1:16 PM, Yaragalla Muralidhar < > > > > > > yaragallamur...@gmail.com> wrote: > > > > > > > > > > > > > Hi when we submit the form we need to set the form action to > > struts > > > > > > action. > > > > > > > Something like . > > > > > > > > > > > > > > So instead of "xxx.action" can i have a different extension > like > > > > > > > "xxx.fire"? > > > > > > > > > > > > > > *Thanks and Regards,* > > > > > > > Muralidhar Yaragalla. > > > > > > > > > > > > > > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/ > >* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > e: davelnew...@gmail.com > > > > > > m: 908-380-8699 > > > > > > s: davelnewton_skype > > > > > > t: @dave_newton <https://twitter.com/dave_newton> > > > > > > b: Bucky Bits <http://buckybits.blogspot.com/> > > > > > > g: davelnewton <https://github.com/davelnewton> > > > > > > so: Dave Newton < > http://stackoverflow.com/users/438992/dave-newton > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > e: davelnew...@gmail.com > > > > m: 908-380-8699 > > > > s: davelnewton_skype > > > > t: @dave_newton <https://twitter.com/dave_newton> > > > > b: Bucky Bits <http://buckybits.blogspot.com/> > > > > g: davelnewton <https://github.com/davelnewton> > > > > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton> > > > > > > > > > > > > > > > -- > > Cheers, > > Paul > > >
Re: struts1 with Ajax using struts tags
When you do AJAX in S1, you are always responding directly to the browser. You need to write your data to the ServletOutputStream and return null. You do not need to use any ActionForward. Paul On Mon, Nov 11, 2013 at 9:35 PM, Narayana wrote: > I have a problem/doubt and describing here.I am using struts1.1(no plain > jsp's only struts tags) and needs to implement ajax in that.Q-1) With out > giving "action" property can't we write ?. If no I am using ajax in that > form(now my form having button to submit form data). Could any one please > help how to add my response back to form variable in same page. > > <%@page import="app.RegisterForm"%> > <%@ taglib uri="/xyz" prefix="html" %> > > > > > <% > RegisterForm form = (RegisterForm)session.getAttribute("registerForm"); > > String user = (form.getUsername() == null) ?"inr" :form.getUsername(); > String pass = form.getPassword().equals("")?"inr" : form.getPassword(); > > //retrieveURL('example3GetCharacters.do'); > %> > > > " > > Login Success > > onclick="retrieveURL('details.do');" /> > > > > > > > my action class is > > > package app; > > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > > import org.apache.struts.action.Action; > import org.apache.struts.action.ActionForm; > import org.apache.struts.action.ActionForward; > import org.apache.struts.action.ActionMapping; > > public class DetailsAction extends Action { > > public ActionForward execute(ActionMapping mapping,ActionForm > > form,HttpServletRequest request,HttpServletResponse > response)throws Exception > > { > RegisterForm detailsForm = (RegisterForm)form; > > detailsForm.setUsername("Struts"); > > System.out.println("inr"+detailsForm.getUsername()); > return mapping.findForward("success"); > } > > > } > > > > -- > View this message in context: > http://struts.1045723.n5.nabble.com/struts1-with-Ajax-using-struts-tags-tp5714637.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 > > -- Cheers, Paul
Re: can we avoid extension "action"?
In addition, make sure your web.xml is sending the new paths/extensions to the Struts 2 filter. On Tue, Nov 12, 2013 at 1:24 PM, Yaragalla Muralidhar < yaragallamur...@gmail.com> wrote: > Thank you so much Dave. > > *Thanks and Regards,* > Muralidhar Yaragalla. > > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>* > > > On Wed, Nov 13, 2013 at 12:52 AM, Dave Newton > wrote: > > > Yes. > > > > > > On Tue, Nov 12, 2013 at 2:06 PM, Yaragalla Muralidhar < > > yaragallamur...@gmail.com> wrote: > > > > > IS "`struts.action.extension=action,,`" this a constant in struts.xml > > file? > > > > > > *Thanks and Regards,* > > > Muralidhar Yaragalla. > > > > > > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>* > > > > > > > > > On Wed, Nov 13, 2013 at 12:32 AM, Dave Newton > > > wrote: > > > > > > > Sure; set `struts.action.extension=action,,` to be whatever you want. > > > > > > > > > > > > Although if you use the form tags you don't need to specify it in the > > > form. > > > > > > > > Dave > > > > > > > > > > > > > > > > On Tue, Nov 12, 2013 at 1:16 PM, Yaragalla Muralidhar < > > > > yaragallamur...@gmail.com> wrote: > > > > > > > > > Hi when we submit the form we need to set the form action to struts > > > > action. > > > > > Something like . > > > > > > > > > > So instead of "xxx.action" can i have a different extension like > > > > > "xxx.fire"? > > > > > > > > > > *Thanks and Regards,* > > > > > Muralidhar Yaragalla. > > > > > > > > > > *http://yaragalla.blogspot.in/ <http://yaragalla.blogspot.in/>* > > > > > > > > > > > > > > > > > > > > > -- > > > > e: davelnew...@gmail.com > > > > m: 908-380-8699 > > > > s: davelnewton_skype > > > > t: @dave_newton <https://twitter.com/dave_newton> > > > > b: Bucky Bits <http://buckybits.blogspot.com/> > > > > g: davelnewton <https://github.com/davelnewton> > > > > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton> > > > > > > > > > > > > > > > -- > > e: davelnew...@gmail.com > > m: 908-380-8699 > > s: davelnewton_skype > > t: @dave_newton <https://twitter.com/dave_newton> > > b: Bucky Bits <http://buckybits.blogspot.com/> > > g: davelnewton <https://github.com/davelnewton> > > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton> > > > -- Cheers, Paul
Re: [ANNOUNCEMENT] Struts2-JSR303-Validation-Plugin available
JSR-303 validation should be the norm for Struts 3. On Fri, Oct 25, 2013 at 1:53 PM, bphill...@ku.edu wrote: > Works now - thank you for the help and for creating a very useful plugin. > > Would you mind if I wrote an article about how to use this plugin for my > blog (http://www.brucephillips.name/blog)? > > Bruce > > > > -- > View this message in context: > http://struts.1045723.n5.nabble.com/ANNOUNCEMENT-Struts2-JSR303-Validation-Plugin-available-tp5714414p5714436.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 > > -- Cheers, Paul
Re: "Cancel" button is not redirecting
If you want to do a redirect, you need your action mapping to handle "cancel" and use a redirectAction result. On Tue, Oct 15, 2013 at 12:53 PM, Antonio Sánchez wrote: > Hi. > > Simple CRUD sample application, paramsPrepareParams, wildcard method > selection. > > Cancel button in edit form, when reached for creating a new employee bean, > is not cancelling and redirecting to index, but actually performing form > action, which is "save". Conversely, cancel is working properly if edit > form is reached from "edit" link, instead of "create". > > I guess it has to do with interceptors stacks and validation, but I have > no idea where the problem is. > > Code for cancel button in employeeForm.jsp: > > name="redirectAction:index"/> > > Working on issue: > https://issues.apache.org/**jira/browse/WW-3993<https://issues.apache.org/jira/browse/WW-3993> > > Thanks! > > - struts.xml: > > > > > > > /WEB-INF/jsp/**employees.jsp > > > > index > /WEB-INF/jsp/**employeeForm.jsp > /WEB-INF/jsp/**error.jsp > > > > > - EmployeeAction > > public class EmployeeAction extends ActionSupport implements Preparable { > private EmployeeService empService = new EmployeeDaoService(); > private DepartmentService deptService = new DepartmentDaoService(); > > private Employee employee; > private List employees; > private List departments; > > public void prepare() throws Exception { > departments = deptService.getAllDepartments(**); > > if (employee != null > && employee.getEmployeeId() != null > && !("".equals(employee.**getEmployeeId())) ) { > employee = empService.getEmployee(**employee.getEmployeeId()); > } > } > > public String save() { > if (employee.getEmployeeId() == null) { > empService.insertEmployee(**employee); > } else { > empService.updateEmployee(**employee); > } > return SUCCESS; > } > > public String delete() { > empService.deleteEmployee(**employee.getEmployeeId()); > return SUCCESS; > } > > public String list() { > employees = empService.getAllEmployees(); > return SUCCESS; > } > > . > > - employees.jsp (index): > > > > ">Add New Employee > > ... > > > even if>odd"> > > > > > > > value="employeeId"/> > > ">Edit > > > value="employeeId"/> > > ">Delete > > > > > - employeeForm (reached from add and edit employee links): > > > label="%{getText('label.**firstName')}" size="40"/> > label="%{getText('label.**lastName')}" size="40"/> > label="%{getText('label.age')}**" size="20"/> > value="%{employee.department.**departmentId}" list="departments" > listKey="departmentId" listValue="name"/> > /> > > name="redirectAction:index"/> > > > > > > > > > > > --**--**- > To unsubscribe, e-mail: > user-unsubscribe@struts.**apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Cheers, Paul
Re: S2: Using HTTPS, when I redirect, I get HTTP
Hmm. Well, there's a couple issues to consider here. 1) When you're behind a load balancer, the machine name (domain) you're running on may not be the domain that's fronted to the public. For example, the user might be accessing www.company.org but you're on host123.company.org. When you're changing protocols, you have to include the FQN. Does your app know the public domain? 2) Is there a Struts enhancement hiding in this question? Maybe we should include a "protocol" and "hostname" as redirect parameters? Lukasz, thoughts? Paul On Tue, Oct 1, 2013 at 9:48 AM, Néstor Boscán wrote: > This one: > > type="redirect">cambioPassword!input.action > > Regards > > > On Tuesday, October 1, 2013, Lukasz Lenart > wrote: > > 2013/9/30 Néstor Boscán : > >> I have an application that runs on weblogic 10.3.6 and struts 2.3.8. The > >> weblogic is behind a loadbalancer that does https to http translation. > When > >> the application uses a redirect it will use HTTP instead of the original > >> HTTPS protocol. Is there a way to force redirect to use HTTPS? > > > > What kind of redirect? to action? > > > > > > Regards > > -- > > Łukasz > > + 48 606 323 122 http://www.lenart.org.pl/ > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > -- Cheers, Paul
Re: Prevent Ajax Multi-Request in Struts 2
Alireza, use some sort of pre-authenticated token. Ignore requests that have a bad token. On Thu, Sep 26, 2013 at 7:43 AM, JOSE L MARTINEZ-AVIAL wrote: > Hi, > Since XHR request can not be cross-domain, you can not get a CSRF through > XHR( the browser will not allow other page to send a XHR to your server). > The only option would be a normal post against your supposed-ajax URL. In > order to protect against it, we check for an HTTP header that is sent on > any ajax request by our javascript framework (Dojo). A normal form can not > be manipulate to add that header, so if the request is suppose to be ajax, > and it does not have the header, you can reject it, because it is a CSRF > attempt > > > Regards > > JL > > > > 2013/9/25 Alireza Fattahi > > > Hi, > > > > We want to avoid multi-request sent via Ajax in struts 2 web based > > application. > > > > The `s:token` can be used in regular request-response jsp pages, but it > > will not work for ajax requests. The problem is the returned respond, > which > > does not populate new value for struts token. > > > > I found this issue at > > > http://stackoverflow.com/questions/13353577/howto-do-csrf-protection-in-struts2-application-for-ajax-requestsbutI > wonder if there is any better way for that? (I think this is a very > > common issue which must have been managed in struts) > > > > > > ~Regards, > > ~~Alireza Fattahi > > > -- Cheers, Paul
Re: Value not persisting in domain object
Every Action class is instantiated per request. If you're updating a collection in one action, it will, of course, not be around in the next collection. It sounds like you need to stuff your shopping cart into the session. On Sun, Sep 1, 2013 at 8:39 PM, Srineel Mazumdar wrote: > Hi All, > > Can anyone please help ? > > Thanks.. > > > On Fri, Aug 30, 2013 at 10:23 PM, Srineel Mazumdar >wrote: > > > Yes.. the same collection. > > > > > > On Wed, Aug 28, 2013 at 6:55 PM, Paul Benedict >wrote: > > > >> Are you retrieving the same collection? > >> > >> > >> On Wed, Aug 28, 2013 at 8:22 AM, Srineel Mazumdar >> >wrote: > >> > >> > Hi, > >> > > >> > I am creating a shopping cart application in Struts 2. I am updating a > >> list > >> > in Cart domain object when the user selects some items in shopping > list > >> > using checkboxes and clicks Next. In the CheckOut page those items > >> would be > >> > shown. But in my case it shows empty list. Upon debugging, I find that > >> list > >> > is updated finally, but an empty list is fetched in Check Out page. > >> > > >> > Can somebody help me by giving some pointers ? > >> > > >> > Thanks., > >> > Srineel > >> > > >> > >> > >> > >> -- > >> Cheers, > >> Paul > >> > > > > > -- Cheers, Paul
Re: Value not persisting in domain object
Are you retrieving the same collection? On Wed, Aug 28, 2013 at 8:22 AM, Srineel Mazumdar wrote: > Hi, > > I am creating a shopping cart application in Struts 2. I am updating a list > in Cart domain object when the user selects some items in shopping list > using checkboxes and clicks Next. In the CheckOut page those items would be > shown. But in my case it shows empty list. Upon debugging, I find that list > is updated finally, but an empty list is fetched in Check Out page. > > Can somebody help me by giving some pointers ? > > Thanks., > Srineel > -- Cheers, Paul
Re: Struts1 to Struts2 Migration Support Query
The Struts 1 plugin supports S1 Action classes only -- there is no view support. The S1 tag libraries won't be functional so you should convert your pages to use S2 tags. On Thu, Aug 15, 2013 at 6:10 AM, wrote: > Hi, > > Sincere Apologies for raising this issue with the entire team. I'm not > aware of the process and not sure if I am raising this in the correct forum. > > Our project is developed on Struts 1.1 and has been running without any > issues for the past 5-8 years. As per the recent announcement of EOL for > struts 1.x, we are planning to move to Struts 2. As per the migration > strategies stated, We are planning to use struts2-struts1-plugin jar file > (available in the latest 2.3.15.1) in our systems and for any new > development we are planning to use Struts 2 framework. > > With regard to this, we have the following Queries. > > If we were using this plugin and as stated in the plugin documentations, > struts1 jar will still needs to be maintained in order to function > correctly, Will there be a scenario of support for this plugin is > required, Can we expect any fix from apache to address the issue on the > plugin or struts1 jar files. > > As stated in the website ( > http://struts.apache.org/development/2.x/docs/struts-1-plugin.html) I'm > not able to see the ticket specified for continued use of struts 1 tag > libraries in jsps. Can you please share some information about the latest > status on this JIRA ticket. > > Also it will be good, if there are any readily available migration tools > from Struts1 to Struts2 for JSPs or Java servlets source code. > > Many thanks in advance for your help. > > Regards, > Vijay. > > > This e-mail and any files transmitted with it are for the sole use of the > intended recipient(s) and may contain confidential and privileged > information. If you are not the intended recipient(s), please reply to the > sender and destroy all copies of the original message. Any unauthorized > review, use, disclosure, dissemination, forwarding, printing or copying of > this email, and/or any action taken in reliance on the contents of this > e-mail is strictly prohibited and may be unlawful. > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Cheers, Paul
Re: Annotation Support for bypassing prepare
I don't see a performance concern here. Checking a few strings isn't going to slow down anything. On Aug 8, 2013 12:06 AM, "Sreekanth S. Nair" < sreekanth.n...@egovernments.org> wrote: > Guess same performance concern is applicable for that as well. Any ideas of > making it simpler for existing app without much coding, performance and > clumsiness could be better. And i think @SkipPreapre at method level gives > more visibility than at class level > @SkipPrepare({"xdsdasds",ydsdsdsdsds","zsdsdsdsdsds"}). > > -- > Thanks & Regards > Srikanth > Software Developer > > eGovernments Foundations > www.egovernments.org > Mob : 9980078913 > > > > On Thu, Aug 8, 2013 at 9:42 AM, Paul Benedict > wrote: > > > Not an array of prepares, but an array of strings for which "execute" > > methods the Preaparable callback should be excluded. > > On Aug 7, 2013 11:09 PM, "Sreekanth S. Nair" < > > sreekanth.n...@egovernments.org> wrote: > > > > > With all gratitude, I strongly disagree with that idea . That bring > more > > > clumsiness to big strust2 applications. And the idea of taking an array > > of > > > Prepare is a good idea but don't you think it consumes a pinch of > runtime > > > performance. > > > > > >
Re: Annotation Support for bypassing prepare
Not an array of prepares, but an array of strings for which "execute" methods the Preaparable callback should be excluded. On Aug 7, 2013 11:09 PM, "Sreekanth S. Nair" < sreekanth.n...@egovernments.org> wrote: > With all gratitude, I strongly disagree with that idea . That bring more > clumsiness to big strust2 applications. And the idea of taking an array of > Prepare is a good idea but don't you think it consumes a pinch of runtime > performance. >
Re: Annotation Support for bypassing prepare
> > > > either configure the interceptor package-wide, or change the >>> prepare >>> > > > > interceptor to always skip preparation for methods annotated with >>> > > > > @DoNotPrepare, etc. >>> > > > > >>> > > > > Dave >>> > > > > >>> > > > > >>> > > > > >>> > > > > On Fri, Jul 26, 2013 at 9:19 AM, Sreekanth S. Nair < >>> > > > > sreekanth.n...@egovernments.org> wrote: >>> > > > > >>> > > > > > Too many methods :( needs its own prepare then. >>> > > > > > >>> > > > > > -- >>> > > > > > Thanks & Regards >>> > > > > > Srikanth >>> > > > > > Software Developer >>> > > > > > >>> > > > > > eGovernments Foundations >>> > > > > > www.egovernments.org >>> > > > > > Mob : 9980078913 >>> > > > > > >>> > > > > > >>> > > > > > >>> > > > > > On Fri, Jul 26, 2013 at 6:37 PM, Dave Newton < >>> > davelnew...@gmail.com> >>> > > > > > wrote: >>> > > > > > >>> > > > > > > Did you try `prepareWhateverMethodThatNeedsPrepare`? I don't >>> > recall >>> > > > if >>> > > > > > that >>> > > > > > > works or not. >>> > > > > > > >>> > > > > > > >>> > > > > > > On Fri, Jul 26, 2013 at 7:24 AM, Sreekanth S. Nair < >>> > > > > > > sreekanth.n...@egovernments.org> wrote: >>> > > > > > > >>> > > > > > > > No i can't do that, because that Action contains other >>> method >>> > > which >>> > > > > > needs >>> > > > > > > > Prepare, the only option i can think of is moving these >>> Ajax >>> > > method >>> > > > > to >>> > > > > > > some >>> > > > > > > > other Action which is not extending Prepareable. But as of >>> now >>> > > its >>> > > > > very >>> > > > > > > > hard because so many resources i have to change. Any other >>> > idea? >>> > > > > > > > >>> > > > > > > > -- >>> > > > > > > > Thanks & Regards >>> > > > > > > > Srikanth >>> > > > > > > > Software Developer >>> > > > > > > > >>> > > > > > > > eGovernments Foundations >>> > > > > > > > www.egovernments.org >>> > > > > > > > Mob : 9980078913 >>> > > > > > > > >>> > > > > > > > >>> > > > > > > > >>> > > > > > > > On Fri, Jul 26, 2013 at 4:44 PM, Paul Benedict < >>> > > > pbened...@apache.org >>> > > > > > >>> > > > > > > > wrote: >>> > > > > > > > >>> > > > > > > > > Have you thought of removing the "implements Preparable" >>> from >>> > > > your >>> > > > > > > > action? >>> > > > > > > > > That will do it. >>> > > > > > > > > On Jul 26, 2013 6:12 AM, "Sreekanth S. Nair" < >>> > > > > > > > > sreekanth.n...@egovernments.org> wrote: >>> > > > > > > > > >>> > > > > > > > > > Suppose i need to call any ajax validation on the same >>> > > Action, >>> > > > it >>> > > > > > > > > > unnecessarily run in to prepare. Where that ajax >>> validation >>> > > > > doesn't >>> > > > > > > > > > required to call prepare. >>> > > > > > > > > > >>> > > > > > > > > > -- >>> > > > > > > > > > Thanks & Regards >>> > > > > > > > > > Srikanth >>> > > > > > > > > > Software Developer >>> > > > > > > > > > >>> > > > > > > > > > eGovernments Foundations >>> > > > > > > > > > www.egovernments.org >>> > > > > > > > > > Mob : 9980078913 >>> > > > > > > > > > >>> > > > > > > > > > >>> > > > > > > > > > >>> > > > > > > > > > On Fri, Jul 26, 2013 at 4:40 PM, Paul Benedict < >>> > > > > > pbened...@apache.org >>> > > > > > > > >>> > > > > > > > > > wrote: >>> > > > > > > > > > >>> > > > > > > > > > > Why would you want to bypass it? >>> > > > > > > > > > > On Jul 26, 2013 3:47 AM, "Sreekanth S. Nair" < >>> > > > > > > > > > > sreekanth.n...@egovernments.org> wrote: >>> > > > > > > > > > > >>> > > > > > > > > > > > Is there any annotation available to bypass prepare >>> > > method >>> > > > > > while >>> > > > > > > > > > invoking >>> > > > > > > > > > > > certain methods, just like @skipvalidation >>> > > > > > > > > > > > -- >>> > > > > > > > > > > > Thanks & Regards >>> > > > > > > > > > > > Srikanth >>> > > > > > > > > > > > >>> > > > > > > > > > > >>> > > > > > > > > > >>> > > > > > > > > >>> > > > > > > > >>> > > > > > > >>> > > > > > > >>> > > > > > > >>> > > > > > > -- >>> > > > > > > e: davelnew...@gmail.com >>> > > > > > > m: 908-380-8699 >>> > > > > > > s: davelnewton_skype >>> > > > > > > t: @dave_newton <https://twitter.com/dave_newton> >>> > > > > > > b: Bucky Bits <http://buckybits.blogspot.com/> >>> > > > > > > g: davelnewton <https://github.com/davelnewton> >>> > > > > > > so: Dave Newton < >>> > http://stackoverflow.com/users/438992/dave-newton >>> > > > >>> > > > > > > >>> > > > > > >>> > > > > >>> > > > > >>> > > > > >>> > > > > -- >>> > > > > e: davelnew...@gmail.com >>> > > > > m: 908-380-8699 >>> > > > > s: davelnewton_skype >>> > > > > t: @dave_newton <https://twitter.com/dave_newton> >>> > > > > b: Bucky Bits <http://buckybits.blogspot.com/> >>> > > > > g: davelnewton <https://github.com/davelnewton> >>> > > > > so: Dave Newton < >>> http://stackoverflow.com/users/438992/dave-newton> >>> > > > > >>> > > > >>> > > >>> > > >>> > > >>> > > -- >>> > > e: davelnew...@gmail.com >>> > > m: 908-380-8699 >>> > > s: davelnewton_skype >>> > > t: @dave_newton <https://twitter.com/dave_newton> >>> > > b: Bucky Bits <http://buckybits.blogspot.com/> >>> > > g: davelnewton <https://github.com/davelnewton> >>> > > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton> >>> > > >>> > >>> >> >> > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > -- Cheers, Paul
Re: Apple sec breach.. Struts?
I'll voice my personal opinion. No matter what framework you choose (Struts, MyFaces, Tapestry, etc.), it is the responsibility of all IT shops to do a security vulnerability assessment before first releasing to production and after each update. That is "Security 101" because there are multitude of attack vectors that can be exploited through any inadvertent mistake here and there. Sometimes the mistake will be in your code, sometimes it will be in third party dependencies, but you own the final product so you must take responsibility for the entire product. Did a company like Apple, who sits on billions of cash, do that? I don't know. I hope they did because that would be performing due diligence. They are not poor by any means. I'll hope for the best here. Lastly, it cannot be ignored that Struts is a free product built by volunteers. The work done here is long, arduous, and passionate -- and on a budget of $0. There is no money coming in to fund anything expensive. Unlike some other Apache projects where corporations (like IBM) are funding development, no one is funding Struts. You get the best that volunteers can do without them receiving a dime. The obvious implication is that you, who consume volunteer work for free, must take the product "as is" and do your part of making sure your application is secure. PS: If you find a security vulnerability in Struts, please privately report it to secur...@apache.org so it can be fixed. Cheers, Paul
Re: Annotation Support for bypassing prepare
Have you thought of removing the "implements Preparable" from your action? That will do it. On Jul 26, 2013 6:12 AM, "Sreekanth S. Nair" < sreekanth.n...@egovernments.org> wrote: > Suppose i need to call any ajax validation on the same Action, it > unnecessarily run in to prepare. Where that ajax validation doesn't > required to call prepare. > > -- > Thanks & Regards > Srikanth > Software Developer > > eGovernments Foundations > www.egovernments.org > Mob : 9980078913 > ---- > > > On Fri, Jul 26, 2013 at 4:40 PM, Paul Benedict > wrote: > > > Why would you want to bypass it? > > On Jul 26, 2013 3:47 AM, "Sreekanth S. Nair" < > > sreekanth.n...@egovernments.org> wrote: > > > > > Is there any annotation available to bypass prepare method while > invoking > > > certain methods, just like @skipvalidation > > > -- > > > Thanks & Regards > > > Srikanth > > > > > >
Re: Annotation Support for bypassing prepare
Why would you want to bypass it? On Jul 26, 2013 3:47 AM, "Sreekanth S. Nair" < sreekanth.n...@egovernments.org> wrote: > Is there any annotation available to bypass prepare method while invoking > certain methods, just like @skipvalidation > -- > Thanks & Regards > Srikanth >