Re: Servlet 3.0 supported ?
2013/7/15 Sreekanth S. Nair sreekanth.n...@egovernments.org: What are feature supported by struts2 wrt servlet3.0 (specifically anything from async) Nothing as far I know. Also async support if for servlets, but S2 bases on filter. 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: problem while integrating struts 2 hibernate3.5 and tiles
Could you post the whole stacktrace? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/7/14 alok mazumdar alokmazumdar...@gmail.com: hello user, when iam integrating struts and hibernate it is working fine,struts with tiles fine,but when i am integrating all three it shows error! 1)Exception sending context initialized event to listener instance of class org.apache.struts2.tiles.StrutsTilesListener java.lang.NullPointerException at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1058) at org.apache.commons.digester.Digester.parse(Digester.java:1887) 2) validateJarFile(F:\project\ProjectWork\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\project-E-commerce\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 3)resource not found 404 error - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Plug in page link broken
Thanks for reporting, corrected in the source. For now you can use this https://cwiki.apache.org/confluence/display/S2PLUGINS/Home Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/7/12 Alireza Fattahi afatt...@yahoo.com: Hi, The plugin page link : https://cwiki.apache.org/S2PLUGINS/home.html in struts site is broken: Not Found The requested URL /S2PLUGINS/home.html was not found on this server. Apache/2.2.22 (Ubuntu) Server at cwiki.apache.org Port 80 ~Regards, ~~Alireza Fattahi - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
2013/7/13 Sreekanth S. Nair sreekanth.n...@egovernments.org: Hi, I'm getting the following exception when i try to use strust2-jquery-plugin, My web.xml fragment for struts2 as follows. filter-mapping filter-namestruts2Prepare/filter-name url-pattern*.action/url-pattern /filter-mapping filter-mapping filter-namesitemesh/filter-name url-pattern*.action/url-pattern url-pattern*.jsp/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher dispatcherINCLUDE/dispatcher /filter-mapping filter-mapping filter-namestruts2Execute/filter-name url-pattern*.action/url-pattern /filter-mapping Without jquery-struts2-plugin its working Why do you map Struts2 filter just to *.action? What about static resources served by the framework? Change mapping to catch all requests (/*) or extract all static resources into appropriate folders. 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: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
/* basically works but i felt its unnecessary to map filter with /* url pattern. As you said extracting all static resource to appropriate folder would work. But i have no idea about which / what all have to be extracted (even this may help in strust2 performance). Since i have posted a query long back regarding the performance tuning part, but the answer i got doesn't cover from which all jars and what are the files have to be extracted. -- Thanks Regards Srikanth On Mon, Jul 15, 2013 at 12:28 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/7/13 Sreekanth S. Nair sreekanth.n...@egovernments.org: Hi, I'm getting the following exception when i try to use strust2-jquery-plugin, My web.xml fragment for struts2 as follows. filter-mapping filter-namestruts2Prepare/filter-name url-pattern*.action/url-pattern /filter-mapping filter-mapping filter-namesitemesh/filter-name url-pattern*.action/url-pattern url-pattern*.jsp/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher dispatcherINCLUDE/dispatcher /filter-mapping filter-mapping filter-namestruts2Execute/filter-name url-pattern*.action/url-pattern /filter-mapping Without jquery-struts2-plugin its working Why do you map Struts2 filter just to *.action? What about static resources served by the framework? Change mapping to catch all requests (/*) or extract all static resources into appropriate folders. 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: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
It's very easy, extract struts2-core and check folder structure, the same with jquery plugin. You can also disable serving static content by Struts http://struts.apache.org/development/2.x/docs/static-content.html Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/7/15 Sreekanth S. Nair sreekanth.n...@egovernments.org: /* basically works but i felt its unnecessary to map filter with /* url pattern. As you said extracting all static resource to appropriate folder would work. But i have no idea about which / what all have to be extracted (even this may help in strust2 performance). Since i have posted a query long back regarding the performance tuning part, but the answer i got doesn't cover from which all jars and what are the files have to be extracted. -- Thanks Regards Srikanth On Mon, Jul 15, 2013 at 12:28 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/7/13 Sreekanth S. Nair sreekanth.n...@egovernments.org: Hi, I'm getting the following exception when i try to use strust2-jquery-plugin, My web.xml fragment for struts2 as follows. filter-mapping filter-namestruts2Prepare/filter-name url-pattern*.action/url-pattern /filter-mapping filter-mapping filter-namesitemesh/filter-name url-pattern*.action/url-pattern url-pattern*.jsp/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher dispatcherINCLUDE/dispatcher /filter-mapping filter-mapping filter-namestruts2Execute/filter-name url-pattern*.action/url-pattern /filter-mapping Without jquery-struts2-plugin its working Why do you map Struts2 filter just to *.action? What about static resources served by the framework? Change mapping to catch all requests (/*) or extract all static resources into appropriate folders. 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
Re: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
Struts2-core dojo-plugin is fine and its straight forward. But in jquery plugin there is no static folder, one template folder is there (this contains both flt and some js and css). -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 15, 2013 at 12:54 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: It's very easy, extract struts2-core and check folder structure, the same with jquery plugin. You can also disable serving static content by Struts http://struts.apache.org/development/2.x/docs/static-content.html Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/7/15 Sreekanth S. Nair sreekanth.n...@egovernments.org: /* basically works but i felt its unnecessary to map filter with /* url pattern. As you said extracting all static resource to appropriate folder would work. But i have no idea about which / what all have to be extracted (even this may help in strust2 performance). Since i have posted a query long back regarding the performance tuning part, but the answer i got doesn't cover from which all jars and what are the files have to be extracted. -- Thanks Regards Srikanth On Mon, Jul 15, 2013 at 12:28 PM, Lukasz Lenart lukaszlen...@apache.org wrote: 2013/7/13 Sreekanth S. Nair sreekanth.n...@egovernments.org: Hi, I'm getting the following exception when i try to use strust2-jquery-plugin, My web.xml fragment for struts2 as follows. filter-mapping filter-namestruts2Prepare/filter-name url-pattern*.action/url-pattern /filter-mapping filter-mapping filter-namesitemesh/filter-name url-pattern*.action/url-pattern url-pattern*.jsp/url-pattern dispatcherREQUEST/dispatcher dispatcherFORWARD/dispatcher dispatcherINCLUDE/dispatcher /filter-mapping filter-mapping filter-namestruts2Execute/filter-name url-pattern*.action/url-pattern /filter-mapping Without jquery-struts2-plugin its working Why do you map Struts2 filter just to *.action? What about static resources served by the framework? Change mapping to catch all requests (/*) or extract all static resources into appropriate folders. 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
Re: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
2013/7/15 Sreekanth S. Nair sreekanth.n...@egovernments.org: Struts2-core dojo-plugin is fine and its straight forward. But in jquery plugin there is no static folder, one template folder is there (this contains both flt and some js and css). Why do you mix dojo plugin (deprecated) with jquery? And what I see, the folder template contains all static data. 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
Error while using executeAndWait interceptor
Hi, getting the following exeception while using executeAndWait filter @ line Number 186 i have the following line of code, which causing the NPE, without executeAndWait this Action works pretty much fine. final HttpServletRequest req = ServletActionContext.getRequest(); [0m[33m13:03:43,031 WARN [org.apache.struts2.interceptor.ExecuteAndWaitInterceptor] (http-localhost/127.0.0.1:8080-1) ExecuteAndWait interceptor has detected that no result named 'wait' is available. Defaulting to a plain built-in wait page. It is highly recommend you provide an action-specific or global result named 'wait'. [0m[31m13:03:43,043 ERROR [org.egov.web.actions.common.HomepageAction] (homepageBackgroundThread) Error occurred while preparing Portal Home Page, Cause : null: java.lang.NullPointerException at org.apache.struts2.ServletActionContext.getRequest(ServletActionContext.java:112) [struts2-core-2.3.15.jar:2.3.15] at org.egov.web.actions.common.HomepageAction.execute(HomepageAction.java:186) [egov-egi.jar:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_25] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_25] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_25] at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_25] at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450) [xwork-core-2.3.15.jar:2.3.15] at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289) [xwork-core-2.3.15.jar:2.3.15] at org.apache.struts2.interceptor.BackgroundProcess$1.run(BackgroundProcess.java:57) [struts2-core-2.3.15.jar:2.3.15] at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25] -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913
Re: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
Some legacy jsp's are still using dojo tags, to keep it we are maintaining dojo. And about Jquery, template/jquery/ folder contains .flt, what i have to do with this? once i extracted where i suppose to add in My web app, static or struts directory? -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 15, 2013 at 1:10 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/7/15 Sreekanth S. Nair sreekanth.n...@egovernments.org: Struts2-core dojo-plugin is fine and its straight forward. But in jquery plugin there is no static folder, one template folder is there (this contains both flt and some js and css). Why do you mix dojo plugin (deprecated) with jquery? And what I see, the folder template contains all static data. 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: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
Sorry to bother you, templates (.flt) has to be put inside template folder thats quite right but still confused with freemarker template to be moved or not. My doubt is not about template files but about the these static contents. Where i have to add these static files ? inside a *static* or *struts*directory ? -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 15, 2013 at 1:27 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/7/15 Sreekanth S. Nair sreekanth.n...@egovernments.org: Some legacy jsp's are still using dojo tags, to keep it we are maintaining dojo. And about Jquery, template/jquery/ folder contains .flt, what i have to do with this? once i extracted where i suppose to add in My web app, static or struts directory? Put next to other static contents as jQuery plugin basically is a theme http://struts.apache.org/development/2.x/docs/template-loading.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: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
2013/7/15 Sreekanth S. Nair sreekanth.n...@egovernments.org: Some legacy jsp's are still using dojo tags, to keep it we are maintaining dojo. And about Jquery, template/jquery/ folder contains .flt, what i have to do with this? once i extracted where i suppose to add in My web app, static or struts directory? Put next to other static contents as jQuery plugin basically is a theme http://struts.apache.org/development/2.x/docs/template-loading.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: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
2013/7/15 Sreekanth S. Nair sreekanth.n...@egovernments.org: Sorry to bother you, templates (.flt) has to be put inside template folder thats quite right but still confused with freemarker template to be moved or not. My doubt is not about template files but about the these static contents. Where i have to add these static files ? inside a *static* or *struts*directory ? Extract and move as a whole. 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: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
Sorry i didn get you. You mean directly under WebContant folder? Is like this the following struts2-core.jar/ template to WebContent/template struts2-jquery-plugin/template to WebContent/template (as it is or static and .flt should be in seperate folder ) strust2-core.jar/org/apache/struts2/static/ to where ? -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 15, 2013 at 1:43 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/7/15 Sreekanth S. Nair sreekanth.n...@egovernments.org: Sorry to bother you, templates (.flt) has to be put inside template folder thats quite right but still confused with freemarker template to be moved or not. My doubt is not about template files but about the these static contents. Where i have to add these static files ? inside a *static* or *struts*directory ? Extract and move as a whole. 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
json validation with utf-8 error messages
Hi, The characters of error messages with json validation and a utf-8 error message is not displayed correctly. I added filter filter-nameSetEncoding/filter-name filter-classorg.apache.catalina.filters.SetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueUTF-8/param-value /init-param /filter and filter-mapping filter-nameSetEncoding/filter-name url-pattern*/url-pattern /filter-mapping But it did not fix the issue. Any comments?! ~Regards, ~~Alireza Fattahi
Re: json validation with utf-8 error messages
2013/7/15 Alireza Fattahi afatt...@yahoo.com: Any comments?! Any example?!?!?!?!?!?! 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: S2 custom authentication: remembering original request
The problem was I did not consider the namespace in the interceptor, config file and login action. action name=authenticate class... result type=chain param name=actionName${#session.action}/param param name=namespace${#session.space}/param /result /action Well, this is actually the easy part but the original question remains: How do I remember the original request parameters? When the flow is forwarded to Login.jsp the original request is lost. I can save the parameters map in session but when the time comes for the originally requested action (dynamic result) I don't know how to pass the original request parameters. I guess the right place to do it is the custom interceptor but I don't know how to pass parameters to the request. Is it possible to do? El Viernes, 12 de julio de 2013 17:39:59 usted escribió: If I use redirections I will lose the original request(parameters, uploading binary data ...). But I am unable to make it work using forwards (chaining actions). I give up. I can't do his with S2. I guess this use case requires some external approach: servlet filter (as Dave pointed out), container managed security, Spring security... Thank you all for your support. El Viernes, 12 de julio de 2013 16:09:54 Rahul Tokase escribió: Hi Here is the way you can achieve this. You need to design login action to have the url 'redirectto' parameter which will holds the redirectaction. Upon login interception you will first check the login is done and then check for this parameter if there any value then simply forward to that action. else if login is required redirect it to the login page. If 'redirectto' url parameter is blank and login is success then forward it to the home page. On Wed, Jul 10, 2013 at 5:57 PM, Antonio Sánchez juntandolin...@gmail.comwrote: Use Case: request some protected resource - redirect action for authentication - access protected resource. I'm using a custom interceptor that redirects (redirectAction) to a global result if no user object is found in session. The final action result then redirects to a login page. The interceptor gets the original action requested (using request.getServletPath(), but not sure if this is right), and puts it in the value stack. It would be used with dynamic redirection in the final result upon login success( ${nextAction} ) . This action must be passed in between redirections. But I need to reuse the original request. Reconstructing the request with a query string is not an option. I need the original request: GET/POST method, all parameters/values, maybe uploading binary content (inputstream), maybe headers... Is it possible to do this? How? -- Partially related to this: I'm having problems with redirections. The original request parameters are forwarded only using dispatcher result . If I use redirectAction or redirect, original params are lost. Why? - 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: json validation with utf-8 error messages
Hi, I used to save the messages.resources with UTF-8 encoding and the s:text name=some.text / showed correctly but the json validation messages not! I saved mesages.resource with ansi encoding and chaned all strings from native to ascii ( by http://native2ascii.net/ ) the json validation messages displayed correctly but the s:text name=some.text / did not show correct messages, just question marks. I added %@ page contentType=text/html; charset=utf-8 % to the page and now I have correct json validation messages AND s:text name=some.text / I don't know is it best practice or not. ~Regards, ~~Alireza Fattahi From: Lukasz Lenart lukaszlen...@apache.org To: Struts Users Mailing List user@struts.apache.org Sent: Monday, 15 July 2013, 13:30 Subject: Re: json validation with utf-8 error messages 2013/7/15 Alireza Fattahi afatt...@yahoo.com: Any comments?! Any example?!?!?!?!?!?! 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: S2 custom authentication: remembering original request
Hi Antonio, You can't modify the parameter map from the Servlet request, but you can pass the extra params from your first request to your action by putting them in the struts parameters map by calling invocation. getInvocationContext().getParameters().#put. So to recap, you have your interceptor that catches the unauthorised action, you store the uri and all the params you need in the session, you redirect to the login page, and on login success you pass add the extra params to the strut2 parameter map, and then struts will populate your action. Antonios On 15 July 2013 10:16, Antonio Sánchez juntandolin...@gmail.com wrote: The problem was I did not consider the namespace in the interceptor, config file and login action. action name=authenticate class... result type=chain param name=actionName${#session.action}/param param name=namespace${#session.space}/param /result /action Well, this is actually the easy part but the original question remains: How do I remember the original request parameters? When the flow is forwarded to Login.jsp the original request is lost. I can save the parameters map in session but when the time comes for the originally requested action (dynamic result) I don't know how to pass the original request parameters. I guess the right place to do it is the custom interceptor but I don't know how to pass parameters to the request. Is it possible to do? El Viernes, 12 de julio de 2013 17:39:59 usted escribió: If I use redirections I will lose the original request(parameters, uploading binary data ...). But I am unable to make it work using forwards (chaining actions). I give up. I can't do his with S2. I guess this use case requires some external approach: servlet filter (as Dave pointed out), container managed security, Spring security... Thank you all for your support. El Viernes, 12 de julio de 2013 16:09:54 Rahul Tokase escribió: Hi Here is the way you can achieve this. You need to design login action to have the url 'redirectto' parameter which will holds the redirectaction. Upon login interception you will first check the login is done and then check for this parameter if there any value then simply forward to that action. else if login is required redirect it to the login page. If 'redirectto' url parameter is blank and login is success then forward it to the home page. On Wed, Jul 10, 2013 at 5:57 PM, Antonio Sánchez juntandolin...@gmail.comwrote: Use Case: request some protected resource - redirect action for authentication - access protected resource. I'm using a custom interceptor that redirects (redirectAction) to a global result if no user object is found in session. The final action result then redirects to a login page. The interceptor gets the original action requested (using request.getServletPath(), but not sure if this is right), and puts it in the value stack. It would be used with dynamic redirection in the final result upon login success( ${nextAction} ) . This action must be passed in between redirections. But I need to reuse the original request. Reconstructing the request with a query string is not an option. I need the original request: GET/POST method, all parameters/values, maybe uploading binary content (inputstream), maybe headers... Is it possible to do this? How? -- Partially related to this: I'm having problems with redirections. The original request parameters are forwarded only using dispatcher result . If I use redirectAction or redirect, original params are lost. Why? - 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: Error while using struts-jquery-plugin 3.6.0 + sitemesh-2.4.2.jar + struts 2.3.15
Even extracting static content to local web-app also throwing the same error if we don't mapped with /*. -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 15, 2013 at 1:51 PM, Sreekanth S. Nair sreekanth.n...@egovernments.org wrote: Sorry i didn get you. You mean directly under WebContant folder? Is like this the following struts2-core.jar/ template to WebContent/template struts2-jquery-plugin/template to WebContent/template (as it is or static and .flt should be in seperate folder ) strust2-core.jar/org/apache/struts2/static/ to where ? -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Mon, Jul 15, 2013 at 1:43 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/7/15 Sreekanth S. Nair sreekanth.n...@egovernments.org: Sorry to bother you, templates (.flt) has to be put inside template folder thats quite right but still confused with freemarker template to be moved or not. My doubt is not about template files but about the these static contents. Where i have to add these static files ? inside a *static* or *struts*directory ? Extract and move as a whole. 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
Tags Attributes
Hi, Does anyone why: s:fielderror un_defined_attribute=test/ generates error: Attribute un_defined_attribute invalid for tag fielderror according to TLD But s:textfield name=amount key=form.label.amount un_defined_attribute=test/ Does not generate an error and creates below html: input id=transferAccount_amount type=text un_defined_attribute=test value= name=amount/input is it hard coded some where ?! ~Regards, ~~Alireza Fattahi
Re: Tags Attributes
2013/7/15 Alireza Fattahi afatt...@yahoo.com: Hi, Does anyone why: s:fielderror un_defined_attribute=test/ generates error: Attribute un_defined_attribute invalid for tag fielderror according to TLD But s:textfield name=amount key=form.label.amount un_defined_attribute=test/ Does not generate an error and creates below html: input id=transferAccount_amount type=text un_defined_attribute=test value= name=amount/input is it hard coded some where ?! No, Dynamic Attributes 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: S2 custom authentication: remembering original request
Hi Antonios. Thank you very much. I was using invocation.getProxy().getConfig().getParams() instead, but that returns an immutable map. It works using getInvocationContext().getParameters(). Thank you. I have to say that I'm not chaining actions: it doesn't make sense to remember the original request if Login.jsp result breaks the chain and, at the end of the day, I have to code for remembering the original parameters (in the interceptor). I'm using redirectAction. One more question: What should I do in case the original request is a multipart request? For instance: select picture - click upload - authentication - upload action. El Lunes, 15 de julio de 2013 10:29:26 Antonios Gkogkakis escribió: Hi Antonio, You can't modify the parameter map from the Servlet request, but you can pass the extra params from your first request to your action by putting them in the struts parameters map by calling invocation. getInvocationContext().getParameters().#put. So to recap, you have your interceptor that catches the unauthorised action, you store the uri and all the params you need in the session, you redirect to the login page, and on login success you pass add the extra params to the strut2 parameter map, and then struts will populate your action. Antonios On 15 July 2013 10:16, Antonio Sánchez juntandolin...@gmail.com wrote: The problem was I did not consider the namespace in the interceptor, config file and login action. action name=authenticate class... result type=chain param name=actionName${#session.action}/param param name=namespace${#session.space}/param /result /action Well, this is actually the easy part but the original question remains: How do I remember the original request parameters? When the flow is forwarded to Login.jsp the original request is lost. I can save the parameters map in session but when the time comes for the originally requested action (dynamic result) I don't know how to pass the original request parameters. I guess the right place to do it is the custom interceptor but I don't know how to pass parameters to the request. Is it possible to do? El Viernes, 12 de julio de 2013 17:39:59 usted escribió: If I use redirections I will lose the original request(parameters, uploading binary data ...). But I am unable to make it work using forwards (chaining actions). I give up. I can't do his with S2. I guess this use case requires some external approach: servlet filter (as Dave pointed out), container managed security, Spring security... Thank you all for your support. El Viernes, 12 de julio de 2013 16:09:54 Rahul Tokase escribió: Hi Here is the way you can achieve this. You need to design login action to have the url 'redirectto' parameter which will holds the redirectaction. Upon login interception you will first check the login is done and then check for this parameter if there any value then simply forward to that action. else if login is required redirect it to the login page. If 'redirectto' url parameter is blank and login is success then forward it to the home page. On Wed, Jul 10, 2013 at 5:57 PM, Antonio Sánchez juntandolin...@gmail.comwrote: Use Case: request some protected resource - redirect action for authentication - access protected resource. I'm using a custom interceptor that redirects (redirectAction) to a global result if no user object is found in session. The final action result then redirects to a login page. The interceptor gets the original action requested (using request.getServletPath(), but not sure if this is right), and puts it in the value stack. It would be used with dynamic redirection in the final result upon login success( ${nextAction} ) . This action must be passed in between redirections. But I need to reuse the original request. Reconstructing the request with a query string is not an option. I need the original request: GET/POST method, all parameters/values, maybe uploading binary content (inputstream), maybe headers... Is it possible to do this? How? -- Partially related to this: I'm having problems with redirections. The original request parameters are forwarded only using dispatcher result . If I use redirectAction or redirect, original params are lost. Why? - 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: