Re: Need to lookup additional data to append to redirection to outside web site
Hi, Set the attributes in the request (request.setAttribute(name, value);) then dispatch the request. RequestDispatcher dispatcher = getServletContext() .getRequestDispatcher(URL of the page); dispatcher.forward(request, response); On Tue, Jun 21, 2011 at 7:14 AM, John Himpel j...@jlhimpel.net wrote: Good evening, I have an S2 application the needs to: 1) Verify some input parameters (I know how to do this) 2) Retrieve some additional data based upon the input parameters (I know how to do this). 3) Then format a post type http request with hidden fields containing data from #1 and #2 above to be sent via https to an outside vendor provided web based application running in the outside vendor's domain. 4) The vendor app will then process the application to completion. I believe I know how to do this as a get http request by defining the redirect result in struts.xml. However, I'm at a loss on how do this via a post request. Any advise would be greatly appreciated. Thanks. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Regards Kushan Jayathilake
Re: Need to lookup additional data to append to redirection to outside web site
On Mon, 2011-06-20 at 20:44 -0500, John Himpel wrote: Good evening, I have an S2 application the needs to: 1) Verify some input parameters (I know how to do this) 2) Retrieve some additional data based upon the input parameters (I know how to do this). 3) Then format a post type http request with hidden fields containing data from #1 and #2 above to be sent via https to an outside vendor provided web based application running in the outside vendor's domain. 4) The vendor app will then process the application to completion. I believe I know how to do this as a get http request by defining the redirect result in struts.xml. However, I'm at a loss on how do this via a post request. Any advise would be greatly appreciated. To facilitate HTTP comms between your action and a third party web-app you may wish to look at the client portion of Apache HTTPComponenents http://hc.apache.org/ (which I've never used although I've used it in it's previous incarnation as HttpClient) or HttpUnit (http://httpunit.sourceforge.net/) which is heavier and emulates a browser in it's own right. Originally designed for unit-testing web pages, it works well when used to scrape third-party web-apps, form-fill etc etc. Regards - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Need to lookup additional data to append to redirection to outside web site
The servlet dispatcher can only forward to local servlets and jsps, so it's not really an option. Anyway, usually it's not a good idea flowing unsecure parameters from http to https, you could try to pass via javascript (through jquery [1]), but it's always a security risk. [1] http://api.jquery.com/jQuery.post/ On 21 June 2011 09:41, Roger Varley roger.var...@googlemail.com wrote: On Mon, 2011-06-20 at 20:44 -0500, John Himpel wrote: Good evening, I have an S2 application the needs to: 1) Verify some input parameters (I know how to do this) 2) Retrieve some additional data based upon the input parameters (I know how to do this). 3) Then format a post type http request with hidden fields containing data from #1 and #2 above to be sent via https to an outside vendor provided web based application running in the outside vendor's domain. 4) The vendor app will then process the application to completion. I believe I know how to do this as a get http request by defining the redirect result in struts.xml. However, I'm at a loss on how do this via a post request. Any advise would be greatly appreciated. To facilitate HTTP comms between your action and a third party web-app you may wish to look at the client portion of Apache HTTPComponenents http://hc.apache.org/ (which I've never used although I've used it in it's previous incarnation as HttpClient) or HttpUnit (http://httpunit.sourceforge.net/) which is heavier and emulates a browser in it's own right. Originally designed for unit-testing web pages, it works well when used to scrape third-party web-apps, form-fill etc etc. Regards - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: dinamic name for textfield
Thanks for reply. but Type field is evaluated to run time for me! -- View this message in context: http://struts.1045723.n5.nabble.com/dinamic-name-for-textfield-tp4506481p4507886.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: dinamic name for textfield
My example: I have master JSP: jsp:include page=formInclude.jsp flush=true jsp:param value=type name=myObject1/ /jsp:include jsp:include page=formInclude.jsp flush=true jsp:param value=type name=myObject2/ /jsp:include and included page: s:textfield key=myField name=%{#parameters.type.myField} /br / In my Action I have 2 object: private MyObject myObject1 = new MyObject(); private MyObject myObject2 = new MyObject(); then both have myMethod attribute How can I manage this? Thanks -- View this message in context: http://struts.1045723.n5.nabble.com/dinamic-name-for-textfield-tp4506481p4509618.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: Html:link Javascript validation
Siva, Don't declare the action path, if u want validate before submitting the form to action class. Declare the action path in the script itself. Regards Sunil -Original Message- From: sivaks75 [mailto:sivakumar.subbura...@verizonwireless.com] Sent: Tuesday, June 21, 2011 11:14 AM To: user@struts.apache.org Subject: Html:link Javascript validation Hi, I wanted to perform javascript validation when HTML link is clicked. If validation fails, I want to stop the process. In Javascript function, i added return false. so that it stops the process. When I was running the application, after performing the javascript validation (though Layout ID is NULL), it throwed alert message and invoked the action also which i was not expecting. How do we stop the process if javascript validation fails? html:link style=font-weight: bold; font-size:11; background:none target=_blank paramId=layoutID paramName=frmEmailLayout paramProperty=layoutID action=emaillayout.do?function=viewHTML onClick=validateLayout() View File as HTML /html:link function validateLayoutID(){ var1 = document.forms[0].layoutID.value; if(var1==){ alert(Layout ID cannot be empty); document.forms[0].layoutID.focus(); return false; } } Any help appreciated! Regards, Siva -- View this message in context: http://struts.1045723.n5.nabble.com/Html-link-Javascript-validation-tp4509339p4509339.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 The information contained in this e-mail message and any attachments is confidential, and is intended only for the use of the party to whom it is addressed. This message and any attachments herein are subject to scanning and may be monitored at any time for review. If you are not the above-named intended recipient, you are hereby notified that any dissemination, copying or disclosure of this communication is strictly prohibited. If you have received this communication in error, please notify XIUS immediately by reply to this message or by telephoning (781) 904-5000, and destroy this message and its attachments, without making any copy or distribution. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Html:link Javascript validation
The onclick attribute should return true/false based on whether or not the form should be submitted. If there's no return keyword, the form will be submitted regardless of what happens in the onclick handler. Dave On Tue, Jun 21, 2011 at 8:22 AM, Sunil Choppara sunil.chopp...@xius.com wrote: Siva, Don't declare the action path, if u want validate before submitting the form to action class. Declare the action path in the script itself. Regards Sunil -Original Message- From: sivaks75 [mailto:sivakumar.subbura...@verizonwireless.com] Sent: Tuesday, June 21, 2011 11:14 AM To: user@struts.apache.org Subject: Html:link Javascript validation Hi, I wanted to perform javascript validation when HTML link is clicked. If validation fails, I want to stop the process. In Javascript function, i added return false. so that it stops the process. When I was running the application, after performing the javascript validation (though Layout ID is NULL), it throwed alert message and invoked the action also which i was not expecting. How do we stop the process if javascript validation fails? html:link style=font-weight: bold; font-size:11; background:none target=_blank paramId=layoutID paramName=frmEmailLayout paramProperty=layoutID action=emaillayout.do?function=viewHTML onClick=validateLayout() View File as HTML /html:link function validateLayoutID(){ var1 = document.forms[0].layoutID.value; if(var1==){ alert(Layout ID cannot be empty); document.forms[0].layoutID.focus(); return false; } } Any help appreciated! Regards, Siva -- View this message in context: http://struts.1045723.n5.nabble.com/Html-link-Javascript-validation-tp4509339p4509339.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 The information contained in this e-mail message and any attachments is confidential, and is intended only for the use of the party to whom it is addressed. This message and any attachments herein are subject to scanning and may be monitored at any time for review. If you are not the above-named intended recipient, you are hereby notified that any dissemination, copying or disclosure of this communication is strictly prohibited. If you have received this communication in error, please notify XIUS immediately by reply to this message or by telephoning (781) 904-5000, and destroy this message and its attachments, without making any copy or distribution. - 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: dinamic name for textfield
According to what you showed, the type attribute is taken from the page parameters at run time, which is what I showed, if you don't want to evaluate the myField portion yet, try: s:textfield name=%{#parameters.type + '.myField'} maxlength=250 size=20 / (*Chris*) On Mon, Jun 20, 2011 at 1:25 PM, k3v1n mitn...@email.it wrote: Thanks for reply. but Type field is evaluated to run time for me! -- View this message in context: http://struts.1045723.n5.nabble.com/dinamic-name-for-textfield-tp4506481p4507886.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
RedirectAction supports anchor param
I've opened this minor documentation issue as: https://issues.apache.org/jira/browse/WW-3652 Affected files will be: src/core/src/main/java/org/apache/struts2/dispatcher/ServletActionRedirectResult.java (needs javadoc updates) -Roland
File Upload Issue when Max Size Reached
I am testing the Struts 2.2.3 built in file upload support and noticing that if I upload a file that exceeds my configured size of 20MB that the additional form parameters that are submitted with the upload are lost. Can anyone else confirm they you're experiencing this problem? Ultimately I need the additional parameters to remain but it seems when the interceptor reaches the maximum size exception, the other parameters are lost? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Migration from Struts 2.0.14 to Struts 2.2.3 - tabbed panel not working
Hello I am working on POC migrating application from Struts 2.0.14 to Struts 2.2.3 with DOJO 2.2.3 plugin. On the way DOJO framework will be updated from version 0.4.0 to 0.4.3. Application has main tabbed panel with few tabs, each containing another tabbed panel with few sub tabs. Upon hitting main tabs or any sub tabs a function is executed that sets some form elements etc. This function is fired by events passed to tabbed panel-selectChild topic upon selecting any tab within main or sub tabbed panel. The problem is that after moving to struts 2.2.3 the event is generated for main tabbed panel but it seems it is not generated for tabbed panel that exist within tab of the main tabbed panel. I tried to specify afterSelectTabNotifyTopic attribute on tabbed panel but it did not work either. Did anyone encounter such problem or has any tips on what could be the culprit? I would appreciate any help. Regards, Andrzej
RE: File Upload Issue when Max Size Reached
Hi Chris - did you increase struts.multipart.maxSize=12345 in struts.properties? http://www.jarvana.com/jarvana/view/org/apache/struts/struts2-core/2.2.1/struts2-core-2.2.1-javadoc.jar!/org/apache/struts2/interceptor/FileUploadInterceptor.html Bon Chance Martin Gainty __ Note de déni et de confidentialité Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Subject: File Upload Issue when Max Size Reached Date: Tue, 21 Jun 2011 13:50:51 -0500 From: chris.cranf...@setech.com To: user@struts.apache.org I am testing the Struts 2.2.3 built in file upload support and noticing that if I upload a file that exceeds my configured size of 20MB that the additional form parameters that are submitted with the upload are lost. Can anyone else confirm they you're experiencing this problem? Ultimately I need the additional parameters to remain but it seems when the interceptor reaches the maximum size exception, the other parameters are lost? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Migration from Struts 2.0.14 to Struts 2.2.3 - tabbed panel not working
It seems that this problem is caused by scripts not being executed when the content of the tab is loaded. Here is the example. Main tab has 3 other sub tabs A1, A2, A3. Each sub tab (lets say A1) has its own tabbed panel with additional tabs (A11, A12, A13). Main tabbed panel element is defined as follows: s:tabbedpanel id=X doLayout=true selectedTab=A1 sx:div id=A1 theme=ajax labelposition=top executeScripts=true/sx:div /s:tabbedpanel When A1 is selected event is sent to X-selectChild topic. That event is handled by a function that executes following: dojo.widget.byId(A1).href = some url; dojo.widget.byId(A1).cacheContent = false; dojo.widget.byId(A1).refresh() The content of the A1 is provided by jsp which defines script element similar to the following: dojo.addOnLoad(subscribeToNavigationEvents) subscribeToNavigationEvents() function is responsible for subscribing onto the A1 tabbed panel-selectChild topic and providing handler that does some processing when any of the A11, A12 and A13 are selected. Turns out the dojo.addOnLoad(subscribeToNavigationEvents) is never executed when the content of the tab A1 is loaded and the event handler is not registered. It works fine in Struts 2.0.14 however. I would appreciate any help. Regards, Andrzej On Tue, Jun 21, 2011 at 2:34 PM, Andrzej Adamczyk vaterm...@gmail.comwrote: Hello I am working on POC migrating application from Struts 2.0.14 to Struts 2.2.3 with DOJO 2.2.3 plugin. On the way DOJO framework will be updated from version 0.4.0 to 0.4.3. Application has main tabbed panel with few tabs, each containing another tabbed panel with few sub tabs. Upon hitting main tabs or any sub tabs a function is executed that sets some form elements etc. This function is fired by events passed to tabbed panel-selectChild topic upon selecting any tab within main or sub tabbed panel. The problem is that after moving to struts 2.2.3 the event is generated for main tabbed panel but it seems it is not generated for tabbed panel that exist within tab of the main tabbed panel. I tried to specify afterSelectTabNotifyTopic attribute on tabbed panel but it did not work either. Did anyone encounter such problem or has any tips on what could be the culprit? I would appreciate any help. Regards, Andrzej
Re: File Upload Issue when Max Size Reached
Hi Chris, looks like it's related with [1], I will take a look soon. [1] https://issues.apache.org/jira/browse/WW-3025 On 21 June 2011 20:50, CRANFORD, CHRIS chris.cranf...@setech.com wrote: I am testing the Struts 2.2.3 built in file upload support and noticing that if I upload a file that exceeds my configured size of 20MB that the additional form parameters that are submitted with the upload are lost. Can anyone else confirm they you're experiencing this problem? Ultimately I need the additional parameters to remain but it seems when the interceptor reaches the maximum size exception, the other parameters are lost? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org