Re: is there any method that executes only when validation fails
Hi, No by default! But I believe you can extend and change this behavior. Or you can create an global result for INPUT redirecting to a specific Action/Method. Hope it can helps you. --- FELIPE LORENZ Gerente de Projetos Idealogic Software Fone: (51) 3715 5523 - (51) 3715 5548 www.idealogic.com.br On 22/04/2015 12:46, Yaragalla Muralidhar wrote: Thank you. *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ [1] http://yaragalla.blogspot.in/ [1]* On Wed, Apr 22, 2015 at 9:15 PM, Dave Newton davelnew...@gmail.com wrote: No. On Wed, Apr 22, 2015 at 11:43 AM, Yaragalla Muralidhar yaragallamur...@gmail.com wrote: Hi, In struts Action class is there any method that gets executed only when validation fails? *Thanks and Regards,* Muralidhar Yaragalla. *http://yaragalla.blogspot.in/ [1] http://yaragalla.blogspot.in/ [1]* -- e: davelnew...@gmail.com m: 908-380-8699 s: davelnewton_skype t: @dave_newton https://twitter.com/dave_newton [2] b: Bucky Bits http://buckybits.blogspot.com/ [3] g: davelnewton https://github.com/davelnewton [4] so: Dave Newton http://stackoverflow.com/users/438992/dave-newton [5] Links: -- [1] http://yaragalla.blogspot.in/ [2] https://twitter.com/dave_newton [3] http://buckybits.blogspot.com/ [4] https://github.com/davelnewton [5] http://stackoverflow.com/users/438992/dave-newton
Re: Struts2 Json Plugin - overwrites parameter values in url string?
Hi Burton, It should not be happining. Which version of struts and json plugin are you using? regards, --- FELIPE LORENZ Gerente de Projetos Idealogic Software Fone: (51) 3715 5523 - (51) 3715 5548 www.idealogic.com.br On 28/11/2014 13:29, Burton Rhodes wrote: I have a simple json action that searches for a Contact in the system. I am using a GET request with the following url: ContactSearchJson.action?searchCriteria.searchStringContact=DoesearchCriteria.categories=agent You'll notice I'm trying to set two variable in the object searchCriteria. However, when the variables are set in the action only one variable is set, but not both. If I remove either searchStringContact or categories, the remaining value will set fine. My assumption is it is setting the searchCriteria.searchStringContact value, then when it comes across the searchCriteria.categories value it overwrites the entire object so the only value that is set is categories. My questions is, if this a bugor a feature in the json-plugin? Or am I doing something wrong here? Thanks, Burton
Re: Rest + JSON
Thanks Lukasz, I think I´ll create a CustomContentTypeHandler. Em 26/02/2014 04:21, Lukasz Lenart escreveu: 2014-02-25 19:08 GMT+01:00 Felipe Lorenz felipe.lor...@idealogic.com.br: Hi, I was not clear with my doubt. I dont´t want to use json-plugin, since rest-plugin already has a json solution. I wanna try to use 100% of rest-plugin json solution and, at same time, keep the control over the data is returned. I think the only option you have is to write your own ContentTypeHandler [1] and override built-in JSON handler [1] http://struts.apache.org/release/2.3.x/docs/rest-plugin.html#RESTPlugin-CustomContentTypeHandlers Regards - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Rest + JSON
Hello Lukasz, There is any impact if we add the following code in the JsonLibHandler class: JsonConfig jsonConfig = new JsonConfig(); jsonConfig.setCycleDetectionStrategy(CycleDetectionStrategy.LENIENT); Just right above the line: if (target != null sb.length() 0 sb.charAt(0) == '[') { And use it? I can't see a reason to not use it. Since it is throwing Exception in the actual code at same time will not make difference if my object does not contain a cyclic reference. What is your opinion? Also, it is just a workaround for the cyclic problem. I still want to have same control over the results, using ContentTypeHandler, as in the json-plugin. There is a way to read some parameter coming from the request by the ContentTypeHandler? Thanks, Felipe Lorenz Em 26/02/2014 10:02, Lukasz Lenart escreveu: You can always share your work as a patch or a plugin ;-) 2014-02-26 14:00 GMT+01:00 Felipe Lorenz felipe.lor...@idealogic.com.br: Thanks Lukasz, I think I´ll create a CustomContentTypeHandler. Em 26/02/2014 04:21, Lukasz Lenart escreveu: 2014-02-25 19:08 GMT+01:00 Felipe Lorenz felipe.lor...@idealogic.com.br: Hi, I was not clear with my doubt. I dont´t want to use json-plugin, since rest-plugin already has a json solution. I wanna try to use 100% of rest-plugin json solution and, at same time, keep the control over the data is returned. I think the only option you have is to write your own ContentTypeHandler [1] and override built-in JSON handler [1] http://struts.apache.org/release/2.3.x/docs/rest-plugin.html#RESTPlugin-CustomContentTypeHandlers Regards - 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
Rest + JSON
Hello, I have been working on projects with Struts2 + Rest + JSON. It is just perfect. But, there is always a but, when I use JSON as response I have to define the json plugin and add the rules in the struts.xml file. I know rest plugin has it own json solution through adding .json in the end of URL, but I always falls in the cyclic exception. I complete understand this exception, what I don´t know is how to configure it. I mean, there is a way to put a limit in how deep the objetcs will be parsed? Or even describe what I want in the json response? Thanks in advance, Felipe Lorenz - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Rest + JSON
Hi, I was not clear with my doubt. I dont´t want to use json-plugin, since rest-plugin already has a json solution. I wanna try to use 100% of rest-plugin json solution and, at same time, keep the control over the data is returned. Thanks, Felipe Lorenz Em 25/02/2014 13:25, Lukasz Lenart escreveu: http://struts.apache.org/release/2.3.x/docs/json-plugin.html#JSONPlugin-CustomizingSerializationandDeserialization ? 2014-02-25 15:09 GMT+01:00 Felipe Lorenz felipe.lor...@idealogic.com.br: Hello, I have been working on projects with Struts2 + Rest + JSON. It is just perfect. But, there is always a but, when I use JSON as response I have to define the json plugin and add the rules in the struts.xml file. I know rest plugin has it own json solution through adding .json in the end of URL, but I always falls in the cyclic exception. I complete understand this exception, what I don´t know is how to configure it. I mean, there is a way to put a limit in how deep the objetcs will be parsed? Or even describe what I want in the json response? Thanks in advance, Felipe Lorenz - 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
JSON + REST
Hi, I'm working on a project using conventions with rest plugin and I am looking for a way to restrict the output of the json results. Since the Actions class has many attributes, like lists, and so on, would be good if I could restrict the output. I know that json plugin can do it for me using the param includeParams, but the rest plugins already has json result, so I dont want to add another plugin. Is there a way to limit the json output just using rest plugin with annotations? Thanks, Felipe Lorenz
Re: How to make interceptor to be invoked only for HTTP Request not for Response
I dont think it is possible. But I believe you can just ignore the response and do nothing with that. I am not sure if I understand your question. But an interceptor has only one call per request/response. So your code could like this: public class Interceptor { method { removeSpaceFromRequest(); String resp = invoke(); //here, you do nothing with the response. return resp; } } Felipe Lorenz Gerente de Projetos Idealogic Software Fone: (51) 3715 5523 - (51) 3715 5548 www.idealogic.com.br Em 09/07/2013, às 09:13, Sreekanth S. Nair escreveu: Yes, i have an Interceptor basically to Trimming of input values, i don't want to do this to be happened while request coming back with response. -- Thanks Regards Srikanth Software Developer eGovernments Foundations www.egovernments.org Mob : 9980078913 On Tue, Jul 9, 2013 at 5:41 PM, umeshawas...@gmail.com wrote: Any specific reason to do that? --Original Message-- From: Sreekanth S. Nair To: Struts Users Mailing List ReplyTo: Struts Users Mailing List Subject: How to make interceptor to be invoked only for HTTP Request not for Response Sent: Jul 9, 2013 5:33 PM How to make interceptor to be invoked only for HTTP Request not for Response Sent from BlackBerry® on Airtel
Re: Warning message when execAndWait
In the link you can see some example and how you can redefine it: http://struts.apache.org/release/2.3.x/docs/struts-defaultxml.html But, as far as I can see, toke interceptor is not used by any stack. Probably the version is different. Felipe Lorenz Em 27/06/2013, às 20:59, ngarigar...@yahoo.com escreveu: How can i redefine the completeStack without the token interceptor ? My intention was NOT to use token. I guess my option here is to turn off this message. Sent from my iPad On Jun 27, 2013, at 5:19 PM, Felipe Lorenz felipe.lor...@idealogic.com.br wrote: As far as I can see, you are using the completeStack which use token interceptor. If you intend to use token, you can turn off this message by configuring the log properly. If not, you should redifine the completeStack without the token interceptor. Felipe Lorenz Em 27/06/2013, às 17:35, Omar Ngarigari escreveu: 1. Yes struts.dev is setted to false. 2. This is how I am using the interceptor: interceptor-ref name=completeStack/ interceptor-ref name=execAndWait param name=delay1000/param param name=delaySleepInterval1000/param /interceptor-ref result name=wait/pages/wait.jsp/result 3. I am using struts2.3.1.2 Thanks, From: Felipe Lorenz felipe.lor...@idealogic.com.br To: Struts Users Mailing List user@struts.apache.org; Omar Ngarigari ngarigar...@yahoo.com Sent: Thursday, June 27, 2013 4:27 PM Subject: Re: Warning message when execAndWait Hello Omar, Is needed more information, but I can guess some things: 1 - struts.dev is setted to false? 2 - are you using token interceptor? 3 - if yes, there is a token value in the submitted form? 4 - what version of struts are the project using? there is a resolved issue about it: https://issues.apache.org/jira/browse/WW-1741 Att, Felipe Lorenz Em 27/06/2013, às 17:14, Omar Ngarigari escreveu: Hello, Is anybody knows why I am getting the following warning message while waiting page is displaying. (execAndWait)? WARN [org.apache.struts2.util.TokenHelper] Could not find token mapped to token name struts.token Thanks, - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: s:action tag showing result
Sure! I have created an user at jira, but I think I dont have permissions to open a new issue. Or am I in the wrong place? :) Felipe Lorenz Em 27/06/2013, às 03:11, Lukasz Lenart escreveu: Thanks Felipe! I think we must extend RestActionProxyFactory to also add exclude list of namespaces, eg. /ajax,/login, thus will allow to work in your configuration. Could you register an issue? Thanks in advance -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/6/26 Felipe Lorenz felipe.lor...@idealogic.com.br: Hi Lukasz, I could identify one plugin wich could be creating this behaviour, the rest plugin. Since I have this configuration: constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/ constant name=struts.mapper.prefixMapping value=:rest,/ajax:struts,/login:struts/ I expect that, when I request the following url http://xxx.com/ajax/anyThingHere, struts should handle this call. But instead, RestActionProxyFactory is handle this call. But the RestActionProxyFactory class has a if, and every time the namespace attribute is injected with /ajax value. So the condition always is redirect to the rest plugin handler and not to the struts default. Here is my ActionProxyFactory implementation: public class CustomActionProxyFactory extends RestActionProxyFactory { @Override public ActionProxy createActionProxy(String namespace, String actionName, String methodName, MapString, Object extraContext, boolean executeResult, boolean cleanupContext) { RestActionProxyFactory p = new RestActionProxyFactory(); p.setContainer(container); if (/ajax.equals(namespace)) { p.setNamespace(/idealogic); } return p.createActionProxy(namespace, actionName, methodName, extraContext, executeResult, cleanupContext); } } By some reason, it fixed the origin behaviour. I hope it could help you. Thanks, Felipe Lorenz Em 26/06/2013, às 04:45, Lukasz Lenart escreveu: As I understand you use s:action executeResult=false/ ? Which means result named json shouldn't be executed, you can even remove it. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/6/22 Felipe Lorenz felipe.lor...@idealogic.com.br: Hello Lukasz, I still facing this behaviour. Even with 2.3.16-SNAPSHOT. One thing that make me thing, was the flush attribute. When it is true, the json result (the string) appear in the position where the action tag is in the jsp. But, when I change it to false, the result appears in the top os my page. One workaround that I can use is return a result name that is no defined in the struts.xml. This workaround throw an exception, since struts could no find my result name, but my list is populated and no result from this action tag appear in my page. I hope this information can help. Also, I am printing my config: struts.xml: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.3//EN http://struts.apache.org/dtds/struts-2.3.dtd; struts order=10 constant name=struts.devMode value=false / constant name=struts.action.extension value=,json,xhtml,xml/ constant name=struts.convention.action.mapAllMatches value=true / constant name=struts.convention.default.parent.package value=default/ constant name=struts.custom.i18n.resources value=global / constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/ constant name=struts.mapper.prefixMapping value=:rest,/ajax:struts,/login:struts/ package name=default extends=rest-default interceptors interceptor class=br.com.idealogic.interceptor.LoginInterceptor name=login/ interceptor class=br.com.idealogic.interceptor.PermissaoInterceptor name=permissao/ interceptor class=br.com.idealogic.interceptor.I18nInterceptor name=idioma/ interceptor class=br.com.idealogic.interceptor.JPAInterceptor name=jpa/ interceptor-stack name=jpaStack interceptor-ref name=login/ interceptor-ref name=permissao/ interceptor-ref name=idioma/ interceptor-ref name=jpa/ interceptor-ref name=restDefaultStack/ /interceptor-stack /interceptors default-interceptor-ref name=jpaStack/ default-action-ref name=login_sistema/default-action-ref global-results result name=login/login.jsp/result result name
Re: s:action tag showing result
felipe.lorenz Felipe Lorenz Gerente de Projetos Idealogic Software Fone: (51) 3715 5523 - (51) 3715 5548 www.idealogic.com.br Em 27/06/2013, às 09:17, Lukasz Lenart escreveu: Username? 2013/6/27 Felipe Lorenz felipe.lor...@idealogic.com.br: Sure! I have created an user at jira, but I think I dont have permissions to open a new issue. Or am I in the wrong place? :) Felipe Lorenz Em 27/06/2013, às 03:11, Lukasz Lenart escreveu: Thanks Felipe! I think we must extend RestActionProxyFactory to also add exclude list of namespaces, eg. /ajax,/login, thus will allow to work in your configuration. Could you register an issue? Thanks in advance -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/6/26 Felipe Lorenz felipe.lor...@idealogic.com.br: Hi Lukasz, I could identify one plugin wich could be creating this behaviour, the rest plugin. Since I have this configuration: constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/ constant name=struts.mapper.prefixMapping value=:rest,/ajax:struts,/login:struts/ I expect that, when I request the following url http://xxx.com/ajax/anyThingHere, struts should handle this call. But instead, RestActionProxyFactory is handle this call. But the RestActionProxyFactory class has a if, and every time the namespace attribute is injected with /ajax value. So the condition always is redirect to the rest plugin handler and not to the struts default. Here is my ActionProxyFactory implementation: public class CustomActionProxyFactory extends RestActionProxyFactory { @Override public ActionProxy createActionProxy(String namespace, String actionName, String methodName, MapString, Object extraContext, boolean executeResult, boolean cleanupContext) { RestActionProxyFactory p = new RestActionProxyFactory(); p.setContainer(container); if (/ajax.equals(namespace)) { p.setNamespace(/idealogic); } return p.createActionProxy(namespace, actionName, methodName, extraContext, executeResult, cleanupContext); } } By some reason, it fixed the origin behaviour. I hope it could help you. Thanks, Felipe Lorenz Em 26/06/2013, às 04:45, Lukasz Lenart escreveu: As I understand you use s:action executeResult=false/ ? Which means result named json shouldn't be executed, you can even remove it. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/6/22 Felipe Lorenz felipe.lor...@idealogic.com.br: Hello Lukasz, I still facing this behaviour. Even with 2.3.16-SNAPSHOT. One thing that make me thing, was the flush attribute. When it is true, the json result (the string) appear in the position where the action tag is in the jsp. But, when I change it to false, the result appears in the top os my page. One workaround that I can use is return a result name that is no defined in the struts.xml. This workaround throw an exception, since struts could no find my result name, but my list is populated and no result from this action tag appear in my page. I hope this information can help. Also, I am printing my config: struts.xml: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.3//EN http://struts.apache.org/dtds/struts-2.3.dtd; struts order=10 constant name=struts.devMode value=false / constant name=struts.action.extension value=,json,xhtml,xml/ constant name=struts.convention.action.mapAllMatches value=true / constant name=struts.convention.default.parent.package value=default/ constant name=struts.custom.i18n.resources value=global / constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/ constant name=struts.mapper.prefixMapping value=:rest,/ajax:struts,/login:struts/ package name=default extends=rest-default interceptors interceptor class=br.com.idealogic.interceptor.LoginInterceptor name=login/ interceptor class=br.com.idealogic.interceptor.PermissaoInterceptor name=permissao/ interceptor class=br.com.idealogic.interceptor.I18nInterceptor name=idioma/ interceptor class=br.com.idealogic.interceptor.JPAInterceptor name=jpa/ interceptor-stack name=jpaStack interceptor-ref name=login/ interceptor-ref name=permissao/ interceptor-ref name=idioma/ interceptor-ref name=jpa/ interceptor-ref name=restDefaultStack/ /interceptor-stack /interceptors default-interceptor
Re: s:action tag showing result
Hello Martin, I'm not sure. Actually my experience with Spring is almost, but very close to 0. I know what spring does and I know there is a lot of modules in Spring, but I never try it in my projects. Maybe Lukasz can help you with it. Att, Felipe Lorenz Em 27/06/2013, às 12:11, Martin Gainty escreveu: Felipe and Lukasz Spring 3.1 supports injectable namespaces to constructor of Spring Object would something like this work for proxyFactory? http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/htmlsingle/spring-framework-reference.html#beans-c-namespace Obrigado, Martin __ Por favor, não altere ou perturbar essa transmissão From: lukaszlen...@apache.org Date: Thu, 27 Jun 2013 14:17:18 +0200 Subject: Re: s:action tag showing result To: user@struts.apache.org Username? 2013/6/27 Felipe Lorenz felipe.lor...@idealogic.com.br: Sure! I have created an user at jira, but I think I dont have permissions to open a new issue. Or am I in the wrong place? :) Felipe Lorenz Em 27/06/2013, às 03:11, Lukasz Lenart escreveu: Thanks Felipe! I think we must extend RestActionProxyFactory to also add exclude list of namespaces, eg. /ajax,/login, thus will allow to work in your configuration. Could you register an issue? Thanks in advance -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/6/26 Felipe Lorenz felipe.lor...@idealogic.com.br: Hi Lukasz, I could identify one plugin wich could be creating this behaviour, the rest plugin. Since I have this configuration: constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/ constant name=struts.mapper.prefixMapping value=:rest,/ajax:struts,/login:struts/ I expect that, when I request the following url http://xxx.com/ajax/anyThingHere, struts should handle this call. But instead, RestActionProxyFactory is handle this call. But the RestActionProxyFactory class has a if, and every time the namespace attribute is injected with /ajax value. So the condition always is redirect to the rest plugin handler and not to the struts default. Here is my ActionProxyFactory implementation: public class CustomActionProxyFactory extends RestActionProxyFactory { @Override public ActionProxy createActionProxy(String namespace, String actionName, String methodName, MapString, Object extraContext, boolean executeResult, boolean cleanupContext) { RestActionProxyFactory p = new RestActionProxyFactory(); p.setContainer(container); if (/ajax.equals(namespace)) { p.setNamespace(/idealogic); } return p.createActionProxy(namespace, actionName, methodName, extraContext, executeResult, cleanupContext); } } By some reason, it fixed the origin behaviour. I hope it could help you. Thanks, Felipe Lorenz Em 26/06/2013, às 04:45, Lukasz Lenart escreveu: As I understand you use s:action executeResult=false/ ? Which means result named json shouldn't be executed, you can even remove it. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/6/22 Felipe Lorenz felipe.lor...@idealogic.com.br: Hello Lukasz, I still facing this behaviour. Even with 2.3.16-SNAPSHOT. One thing that make me thing, was the flush attribute. When it is true, the json result (the string) appear in the position where the action tag is in the jsp. But, when I change it to false, the result appears in the top os my page. One workaround that I can use is return a result name that is no defined in the struts.xml. This workaround throw an exception, since struts could no find my result name, but my list is populated and no result from this action tag appear in my page. I hope this information can help. Also, I am printing my config: struts.xml: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.3//EN http://struts.apache.org/dtds/struts-2.3.dtd; struts order=10 constant name=struts.devMode value=false / constant name=struts.action.extension value=,json,xhtml,xml/ constant name=struts.convention.action.mapAllMatches value=true / constant name=struts.convention.default.parent.package value=default/ constant name=struts.custom.i18n.resources value=global / constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/ constant name=struts.mapper.prefixMapping value=:rest,/ajax:struts,/login:struts/ package name=default extends=rest-default interceptors interceptor class=br.com.idealogic.interceptor.LoginInterceptor name=login/ interceptor class
Re: s:action tag showing result
Issue created! Felipe Lorenz Em 27/06/2013, às 16:46, Lukasz Lenart escreveu: 2013/6/27 Felipe Lorenz felipe.lor...@idealogic.com.br: felipe.lorenz You should have Create Issue on the top right? 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: Warning message when execAndWait
Hello Omar, Is needed more information, but I can guess some things: 1 - struts.dev is setted to false? 2 - are you using token interceptor? 3 - if yes, there is a token value in the submitted form? 4 - what version of struts are the project using? there is a resolved issue about it: https://issues.apache.org/jira/browse/WW-1741 Att, Felipe Lorenz Em 27/06/2013, às 17:14, Omar Ngarigari escreveu: Hello, Is anybody knows why I am getting the following warning message while waiting page is displaying. (execAndWait)? WARN [org.apache.struts2.util.TokenHelper] Could not find token mapped to token name struts.token Thanks,
Re: Warning message when execAndWait
As far as I can see, you are using the completeStack which use token interceptor. If you intend to use token, you can turn off this message by configuring the log properly. If not, you should redifine the completeStack without the token interceptor. Felipe Lorenz Em 27/06/2013, às 17:35, Omar Ngarigari escreveu: 1. Yes struts.dev is setted to false. 2. This is how I am using the interceptor: interceptor-ref name=completeStack/ interceptor-ref name=execAndWait param name=delay1000/param param name=delaySleepInterval1000/param /interceptor-ref result name=wait/pages/wait.jsp/result 3. I am using struts2.3.1.2 Thanks, From: Felipe Lorenz felipe.lor...@idealogic.com.br To: Struts Users Mailing List user@struts.apache.org; Omar Ngarigari ngarigar...@yahoo.com Sent: Thursday, June 27, 2013 4:27 PM Subject: Re: Warning message when execAndWait Hello Omar, Is needed more information, but I can guess some things: 1 - struts.dev is setted to false? 2 - are you using token interceptor? 3 - if yes, there is a token value in the submitted form? 4 - what version of struts are the project using? there is a resolved issue about it: https://issues.apache.org/jira/browse/WW-1741 Att, Felipe Lorenz Em 27/06/2013, às 17:14, Omar Ngarigari escreveu: Hello, Is anybody knows why I am getting the following warning message while waiting page is displaying. (execAndWait)? WARN [org.apache.struts2.util.TokenHelper] Could not find token mapped to token name struts.token Thanks,
Re: s:action tag showing result
Hi Lukasz, I could identify one plugin wich could be creating this behaviour, the rest plugin. Since I have this configuration: constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/ constant name=struts.mapper.prefixMapping value=:rest,/ajax:struts,/login:struts/ I expect that, when I request the following url http://xxx.com/ajax/anyThingHere, struts should handle this call. But instead, RestActionProxyFactory is handle this call. But the RestActionProxyFactory class has a if, and every time the namespace attribute is injected with /ajax value. So the condition always is redirect to the rest plugin handler and not to the struts default. Here is my ActionProxyFactory implementation: public class CustomActionProxyFactory extends RestActionProxyFactory { @Override public ActionProxy createActionProxy(String namespace, String actionName, String methodName, MapString, Object extraContext, boolean executeResult, boolean cleanupContext) { RestActionProxyFactory p = new RestActionProxyFactory(); p.setContainer(container); if (/ajax.equals(namespace)) { p.setNamespace(/idealogic); } return p.createActionProxy(namespace, actionName, methodName, extraContext, executeResult, cleanupContext); } } By some reason, it fixed the origin behaviour. I hope it could help you. Thanks, Felipe Lorenz Em 26/06/2013, às 04:45, Lukasz Lenart escreveu: As I understand you use s:action executeResult=false/ ? Which means result named json shouldn't be executed, you can even remove it. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/6/22 Felipe Lorenz felipe.lor...@idealogic.com.br: Hello Lukasz, I still facing this behaviour. Even with 2.3.16-SNAPSHOT. One thing that make me thing, was the flush attribute. When it is true, the json result (the string) appear in the position where the action tag is in the jsp. But, when I change it to false, the result appears in the top os my page. One workaround that I can use is return a result name that is no defined in the struts.xml. This workaround throw an exception, since struts could no find my result name, but my list is populated and no result from this action tag appear in my page. I hope this information can help. Also, I am printing my config: struts.xml: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.3//EN http://struts.apache.org/dtds/struts-2.3.dtd; struts order=10 constant name=struts.devMode value=false / constant name=struts.action.extension value=,json,xhtml,xml/ constant name=struts.convention.action.mapAllMatches value=true / constant name=struts.convention.default.parent.package value=default/ constant name=struts.custom.i18n.resources value=global / constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/ constant name=struts.mapper.prefixMapping value=:rest,/ajax:struts,/login:struts/ package name=default extends=rest-default interceptors interceptor class=br.com.idealogic.interceptor.LoginInterceptor name=login/ interceptor class=br.com.idealogic.interceptor.PermissaoInterceptor name=permissao/ interceptor class=br.com.idealogic.interceptor.I18nInterceptor name=idioma/ interceptor class=br.com.idealogic.interceptor.JPAInterceptor name=jpa/ interceptor-stack name=jpaStack interceptor-ref name=login/ interceptor-ref name=permissao/ interceptor-ref name=idioma/ interceptor-ref name=jpa/ interceptor-ref name=restDefaultStack/ /interceptor-stack /interceptors default-interceptor-ref name=jpaStack/ default-action-ref name=login_sistema/default-action-ref global-results result name=login/login.jsp/result result name=forbidden/forbidden.jsp/result /global-results /package include file=struts-ajax.xml/ include file=struts-login.xml/ include file=struts-filtro.xml/ /struts struts-ajax.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts package name=ajax extends=json-default namespace=/ajax interceptors interceptor class
Re: s:action tag showing result
Hello Lukasz, I still facing this behaviour. Even with 2.3.16-SNAPSHOT. One thing that make me thing, was the flush attribute. When it is true, the json result (the string) appear in the position where the action tag is in the jsp. But, when I change it to false, the result appears in the top os my page. One workaround that I can use is return a result name that is no defined in the struts.xml. This workaround throw an exception, since struts could no find my result name, but my list is populated and no result from this action tag appear in my page. I hope this information can help. Also, I am printing my config: struts.xml: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.3//EN http://struts.apache.org/dtds/struts-2.3.dtd; struts order=10 constant name=struts.devMode value=false / constant name=struts.action.extension value=,json,xhtml,xml/ constant name=struts.convention.action.mapAllMatches value=true / constant name=struts.convention.default.parent.package value=default/ constant name=struts.custom.i18n.resources value=global / constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.PrefixBasedActionMapper/ constant name=struts.mapper.prefixMapping value=:rest,/ajax:struts,/login:struts/ package name=default extends=rest-default interceptors interceptor class=br.com.idealogic.interceptor.LoginInterceptor name=login/ interceptor class=br.com.idealogic.interceptor.PermissaoInterceptor name=permissao/ interceptor class=br.com.idealogic.interceptor.I18nInterceptor name=idioma/ interceptor class=br.com.idealogic.interceptor.JPAInterceptor name=jpa/ interceptor-stack name=jpaStack interceptor-ref name=login/ interceptor-ref name=permissao/ interceptor-ref name=idioma/ interceptor-ref name=jpa/ interceptor-ref name=restDefaultStack/ /interceptor-stack /interceptors default-interceptor-ref name=jpaStack/ default-action-ref name=login_sistema/default-action-ref global-results result name=login/login.jsp/result result name=forbidden/forbidden.jsp/result /global-results /package include file=struts-ajax.xml/ include file=struts-login.xml/ include file=struts-filtro.xml/ /struts struts-ajax.xml ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts package name=ajax extends=json-default namespace=/ajax interceptors interceptor class=br.com.idealogic.interceptor.JPAInterceptor name=jpa/ interceptor-stack name=jpaJsonStack interceptor-ref name=jpa/ interceptor-ref name=jsonValidationWorkflowStack/ /interceptor-stack /interceptors default-interceptor-ref name=jpaJsonStack/ action name=loadCidadeByEstado method=loadCidadeByEstado class=br.com.seedingControl.action.CidadeAction result name=json type=json param name=includeProperties ^cidades\[\d+\]\.idCidade, ^cidades\[\d+\]\.nmCidade /param /result /action /package /struts Thanks for all your help! Felipe Lorenz Em 22/06/2013, às 04:27, Lukasz Lenart escreveu: 2013/6/22 Litman, Bruno blit...@alabamainteractive.org: We are also experiencing issues with tags and theme files, we are upgrading many applications from 2.3.4.1 to 2.3.14.3 I am not sure if this is related - if not and if I need to start a new discussion please let me know and accept my apology. 1/ We previously always coded forms as : s:form action=login namespace=/ Now randomly, this fails to generate the proper action url in the html (it is missing the '.action', which results in a 404 once you post the form) The only workaround we have found so far is to add the '.action' suffix to the s:form's action attribute. Before it was always added for us by struts. So now we are having success with s:form action=login.action namespace=/... Is this expected behavior? Did this change recently? 2.3.4.1 is not so ancient.. No, it isn't - mainly a bug - Struts
Re: s:action tag showing result
Hi Lukasz, I try struts v. 2.3.8, and everything works fine. But, the first version I've notice this strange behaviour was 2.3.12. I try to find the ftl file for the action tag, but I could no find it. There is a special file? How does it works? Thanks, Felipe Lorenz Gerente de Projetos Idealogic Software Fone: (51) 3715 5523 - (51) 3715 5548 www.idealogic.com.br Em 21/06/2013, às 02:34, Lukasz Lenart escreveu: Have you tried to use the previous versions? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ 2013/6/20 Felipe Lorenz felipe.lor...@idealogic.com.br: Hi all, I have been using struts quite a long time, but in the last days I have faced a strange behaviour of s:action tag. In my JSP I am using the tag action to load list to be used to mount my s:select. But in the redered HTML, the result of the action is showing, even when the executeResult is false. There is something I missing? JSP code: s:action namespace=/ajax name=loadEstadoByPais var=estado flush=false / s:select label=%{getText('global.lbl_nmEstado')} name=cidade.estado.idEstado listKey=idEstado listValue=nmEstado list=#estado.estados emptyOption=true id=estadoCombo tooltip=%{getText('global.hint_nmEstado')}/ struts.xml: action name=loadEstadoByPais method=loadEstadoByPais class=br.com.seedingControl.action.EstadoAction result name=index type=json param name=includeProperties ^estados\[\d+\]\.idEstado, ^estados\[\d+\]\.nmEstado /param /result /action As you can see, in the struts.xml, I have only json result, and I only need as json, but when I use the action tag, I just only need the populated list to be used in the select tag. It is working very well, but the problem is that the json result is showing in the HTML. And it is showing in the top, not in the action tag position, what is strange. Also, I try to change the struts.devMode to false, but nothing changes. The project is using struts 2.3.14.3 with rest-plugin. But for this kind ok action, I avoid rest and use just json-plugin. Please, if need any further info, ask me! Thanks in advance. Felipe Lorenz - 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: s:action tag showing result
Thanks for all your help Lukasz, Looking with more attention (I know, sorry) my struts.xml and comparing with the json plugin wiki, my result was different. Before, I had: result name=json type=json And to fix the issue, I remove the name attribute. result type=json But, my question is, why does it affect the action tag? I understand that using executeResult = false should be respected. Att, Felipe Lorenz Gerente de Projetos Idealogic Software Fone: (51) 3715 5523 - (51) 3715 5548 www.idealogic.com.br Em 21/06/2013, às 10:15, Lukasz Lenart escreveu: Could you try with the latest (almost released) version 2.3.15? I was checking locally with struts2-blank app and everything works, but maybe my setup is a bit different. If so I will need an example app (maven based the best). 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: s:action tag showing result
There is a maven repository for the snapshots? Felipe Lorenz Gerente de Projetos Idealogic Software Fone: (51) 3715 5523 - (51) 3715 5548 www.idealogic.com.br Em 21/06/2013, às 10:47, Lukasz Lenart escreveu: I have tested with struts2-blank and it works - I mean, executeResult is respected (as in 2.3.15). You can test that by simple removing all result definitions from struts.xml for that action. 2013/6/21 Felipe Lorenz felipe.lor...@idealogic.com.br: Thanks for all your help Lukasz, Looking with more attention (I know, sorry) my struts.xml and comparing with the json plugin wiki, my result was different. Before, I had: result name=json type=json And to fix the issue, I remove the name attribute. result type=json But, my question is, why does it affect the action tag? I understand that using executeResult = false should be respected. Att, Felipe Lorenz Gerente de Projetos Idealogic Software Fone: (51) 3715 5523 - (51) 3715 5548 www.idealogic.com.br Em 21/06/2013, às 10:15, Lukasz Lenart escreveu: Could you try with the latest (almost released) version 2.3.15? I was checking locally with struts2-blank app and everything works, but maybe my setup is a bit different. If so I will need an example app (maven based the best). 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
s:action tag showing result
Hi all, I have been using struts quite a long time, but in the last days I have faced a strange behaviour of s:action tag. In my JSP I am using the tag action to load list to be used to mount my s:select. But in the redered HTML, the result of the action is showing, even when the executeResult is false. There is something I missing? JSP code: s:action namespace=/ajax name=loadEstadoByPais var=estado flush=false / s:select label=%{getText('global.lbl_nmEstado')} name=cidade.estado.idEstado listKey=idEstado listValue=nmEstado list=#estado.estados emptyOption=true id=estadoCombo tooltip=%{getText('global.hint_nmEstado')}/ struts.xml: action name=loadEstadoByPais method=loadEstadoByPais class=br.com.seedingControl.action.EstadoAction result name=index type=json param name=includeProperties ^estados\[\d+\]\.idEstado, ^estados\[\d+\]\.nmEstado /param /result /action As you can see, in the struts.xml, I have only json result, and I only need as json, but when I use the action tag, I just only need the populated list to be used in the select tag. It is working very well, but the problem is that the json result is showing in the HTML. And it is showing in the top, not in the action tag position, what is strange. Also, I try to change the struts.devMode to false, but nothing changes. The project is using struts 2.3.14.3 with rest-plugin. But for this kind ok action, I avoid rest and use just json-plugin. Please, if need any further info, ask me! Thanks in advance. Felipe Lorenz - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Live Reload - Play framework
I like it. It has some fast way to create pages. And I really enjoy the possibility to pass params directly to a method, without getters setters. It can be new feature to S2! Helps to keep the Action class clean! See you! On Fri, Dec 10, 2010 at 9:14 AM, Frans Thamura fr...@meruvian.org wrote: any one look this http://www.playframework.org/ will this feature inside S2 F -- Felipe A. Lorenz Idealogic Software http://www.idealogic.com.br
Re: How struts2 supports optgroup?
Nobody can help me? On Wed, Feb 10, 2010 at 10:13 AM, Felipe Lorenz felipe.lor...@gmail.comwrote: Im sory, but the example at http://struts.apache.org/2.1.8.1/docs/optgroup .html is very simple. Dont have a real example... But anyway... Im trying to use s:optgroup without success.. Here is how I did without struts tag: select name=despesa.projeto.codigo s:iterator value=projetos s:if test=%{projetoCollection.size 0} optgroup label=s:property value=descricao / s:iterator value=projetoCollection option value=s:property value=codigo/s:property value=descricao//option /s:iterator /optgroup /s:if /s:iterator /select And here is how im trying to do: s:select name=despesa.projeto.codigo list=projeto s:optgroup label=%{descricao} list=projetoCollection listKey=codigo listValue=descricao/ /s:select But the result I want something like this: select name=despesa.projeto.codigo optgroup label=Blabla option value=53Blabla/option /optgroup optgroup label=IDEALOGIC option value=3Assessoria de Comunica#xE7;#xE3;o/option option value=8Capacita#xE7;#xE3;o de Clientes/option option value=11Instala#xE7;#xE3;o/Manuten#xE7;#xE3;o servidor Idealogic/option option value=5Prospec#xE7;#xE3;o/option option value=7Prova de Conceito/option option value=2Rotinas Administrativas/option option value=6Visita T#xE9;cnica/option /optgroup optgroup label=OUTROS CLIENTES option value=31Blabla/option option value=24Blabla/option option value=51Blabla/option option value=23Blabla/option option value=30Blabla/option option value=25Blabla/option option value=32Blabla/option option value=50Blabla/option /optgroup /select Thks. On Tue, Jan 12, 2010 at 7:39 PM, Gabriel Belingueres belingue...@gmail.com wrote: http://struts.apache.org/2.1.8.1/docs/optgroup.html 2010/1/12 Emi Lu em...@encs.concordia.ca: Good afternoon, Could someone tell me how struts2 support optgroup please? Thanks a lot! -- Lu Ying select optgroup label=Australia option value =sydneySydney/option option value =melbourneMelbourne/option /optgroup optgroup label=New Zealand option value =cromwellCromwell/option option value =queenstownQueenstown/option /optgroup /select - 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 -- Felipe A. Lorenz Idealogic Software http://www.idealogic.com.br -- Felipe A. Lorenz Idealogic Software http://www.idealogic.com.br
Re: How struts2 supports optgroup?
Im sory, but the example at http://struts.apache.org/2.1.8.1/docs/optgroup .html is very simple. Dont have a real example... But anyway... Im trying to use s:optgroup without success.. Here is how I did without struts tag: select name=despesa.projeto.codigo s:iterator value=projetos s:if test=%{projetoCollection.size 0} optgroup label=s:property value=descricao / s:iterator value=projetoCollection option value=s:property value=codigo/s:property value=descricao//option /s:iterator /optgroup /s:if /s:iterator /select And here is how im trying to do: s:select name=despesa.projeto.codigo list=projeto s:optgroup label=%{descricao} list=projetoCollection listKey=codigo listValue=descricao/ /s:select But the result I want something like this: select name=despesa.projeto.codigo optgroup label=Blabla option value=53Blabla/option /optgroup optgroup label=IDEALOGIC option value=3Assessoria de Comunica#xE7;#xE3;o/option option value=8Capacita#xE7;#xE3;o de Clientes/option option value=11Instala#xE7;#xE3;o/Manuten#xE7;#xE3;o servidor Idealogic/option option value=5Prospec#xE7;#xE3;o/option option value=7Prova de Conceito/option option value=2Rotinas Administrativas/option option value=6Visita T#xE9;cnica/option /optgroup optgroup label=OUTROS CLIENTES option value=31Blabla/option option value=24Blabla/option option value=51Blabla/option option value=23Blabla/option option value=30Blabla/option option value=25Blabla/option option value=32Blabla/option option value=50Blabla/option /optgroup /select Thks. On Tue, Jan 12, 2010 at 7:39 PM, Gabriel Belingueres belingue...@gmail.comwrote: http://struts.apache.org/2.1.8.1/docs/optgroup.html 2010/1/12 Emi Lu em...@encs.concordia.ca: Good afternoon, Could someone tell me how struts2 support optgroup please? Thanks a lot! -- Lu Ying select optgroup label=Australia option value =sydneySydney/option option value =melbourneMelbourne/option /optgroup optgroup label=New Zealand option value =cromwellCromwell/option option value =queenstownQueenstown/option /optgroup /select - 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 -- Felipe A. Lorenz Idealogic Software http://www.idealogic.com.br
Re: Struts2 select tag with multiple enabled
Im not sure. but i think you need to add the attribute name. i.e.: s:select multiple=true headerKey=-1 list=rejectionReasons value=%{fmrTenant.terminationReason} required=true name=something / On Thu, Apr 16, 2009 at 10:45 AM, Bhaarat Sharma bhaara...@gmail.comwrote: I am using a select tag like this s:select multiple=true headerKey=-1 list=rejectionReasons value=%{fmrTenant.terminationReason} required=true/ list = rejectionReasons invokes the following method: public List getRejectionReasons() { return rejectionReasons; } I am using value=%{fmrTenant.terminationReason} because I want to preselec some of the values returned. this invokes the following method public String[] getTerminationReason() { return terminationReason; } I am getting the following error Expected number, date, or string. parameters.nameValue evaluated instead to freemarker.ext.beans.ArrayModel on line 60, column 101 in template/simple/select.ftl. The problematic instruction: -- == if tag.contains(parameters.nameValue, itemKey) == true || (parameters.nameValue?exists parameters.nameValue?string == itemKey) [on line 60, column 9 in template/simple/select.ftl] in user-directive s.iterator [on line 40, column 1 in template/simple/select.ftl] -- I looked for this error online and seems like this is a bug in struts2: https://issues.apache.org/struts/browse/WW-1747 I just wanted to make sure whether there is a work around as to how I am trying to do this? Thanks! -- Felipe A. Lorenz Idealogic Software http://www.idealogic.com.br
Re: Removing the align=right from s:submit tag
You can change it by using CSS! 2009/4/14 Ignacio de Córdoba icord...@skios.es Hi there, i am using css_xhtml them and renders all form elements quite ok but it inserts a align=right in the div enclosing every submit button. Is there anyway to remove that right alignment? I guess all this should be a matter of css and not an alignment in the HTML code. Don't know if it is a bug of the theme or the desired code rendered. I've searched here but found no info on how to extend or modify a builtin them in struts2. thanks for any help, Ignacio -- View this message in context: http://www.nabble.com/Removing-the-align%3D%22right%22-from-%3Cs%3Asubmit%3E-tag-tp23037513p23037513.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 -- Felipe A. Lorenz Idealogic Software http://www.idealogic.com.br
Re: Application based Security
I agree with Andy Law, Interceptors is much better, and you can implement your security as you want. To my applications I use an object in a Session Scope and check if it still exists... if not... redirect to login action.. simple and easy. On Mon, Dec 15, 2008 at 10:35 AM, shekher awasthi shekher.awas...@gmail.com wrote: I am planing to use interceptor for this but not sure how to plan this as using interceptor can not gurantee a robust authenticate mechanism what i planned is as below if user provide the valid information store the user object in the session scoped map and for all incoming request to secure region check the user object in the session using the interceptor,but will that be a robust approach??? any suggestion for this On Mon, Dec 15, 2008 at 5:55 PM, Andy Law andy@roslin.ed.ac.uk wrote: Shekher wrote: Hi All, We are developing an application based on Struts2 framework. We are on way to develop application based security so that the unauthorized user can not access the secure area,it needs the request to be from the authorized person.We can have the Below mentioed approach 1) For Secure area the user must be logged in to the ysystem and have authorization for accessing that 2) For every request coming to the secured region, we need to put the check if the user is a valid one or not. We cab think of the functionality which checks for the icoming request for its authentication and permits only authenticated request. I need your suggestion about the approach we can follow in struts2 so that we can achieve the above mentioed points and also maintenance and enterprise integration will be area of concern. IF any one have worked or working on similar area pleaes share his/her view how to achieve that here in struts2 Thanks in advance shekher I think that you need to be looking at Interceptors. You can couple them as tightly or as loosely to your Actions as you like. You can also build systems using Interceptors that factor out the control of the authentication and authorisation to completely separate code which makes integrating with other enterprise systems a bit easier. Later, Andy -- View this message in context: http://www.nabble.com/Application-based-Security-tp21010272p21012989.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Getter Method call twice - S2
Did you try to debug your application? Or try to see from what Action/JSP its called! Or create a Interceptor to print a log: public class Log4JInterceptor extends AbstractInterceptor { @Override public String intercept(ActionInvocation invocation) throws Exception { String comando = invocation.getInvocationContext().getName(); Map parametros = invocation.getInvocationContext().getParameters(); Map sessao = invocation.getInvocationContext().getSession(); String loginUsuario = anonimo; if( sessao.containsKey(SessionSuport.USER_SESSION) ) { Colaborador colaborador = (Colaborador) sessao.get( SessionSuport.USER_SESSION ); loginUsuario = colaborador.getLogin(); } String linhaLog = ; Logger log = Logger.getLogger( comando ); String retorno = invocation.invoke(); if( !retorno.equals(erro) ) { for( Object chave : parametros.keySet() ) { Object valor = parametros.get( chave ); String valorStr = ; if( valor instanceof String[] ) { for( String atual : ((String[])valor) ) valorStr += atual + ,; } valorStr = valorStr.substring( 0, valorStr.length()-1 ); linhaLog += chave + = + valorStr + ;; } linhaLog = linhaLog.trim(); if( !linhaLog.equals() ) { PatternLayout layout = new PatternLayout( %d{HH:mm:ss} - + loginUsuario + - %c - %m%n ); String formatoData = dd-MM-; SimpleDateFormat sdf = new SimpleDateFormat( formatoData ); String hoje = sdf.format( new Date() ); String nomeArquivo = logGerAtividade.log; DailyRollingFileAppender appender = new DailyRollingFileAppender( layout, nomeArquivo, dd-MM- ); appender.setEncoding( ISO-8859-1 ); ConsoleAppender consoleAppender = new ConsoleAppender( layout, System.out ); consoleAppender.setEncoding( ISO-8859-1 ); log.addAppender( appender ); log.addAppender( consoleAppender ); log.info( linhaLog ); log.removeAllAppenders(); } } else { ActionSupport action = ActionSupport.class.cast( invocation.getAction() ); Collection erros = action.getActionErrors(); for( Object erro : erros ) { linhaLog += erro + ,; } linhaLog = linhaLog.substring( 0, linhaLog.length()-1 ); if( !linhaLog.equals() ) { PatternLayout layout = new PatternLayout( %d{HH:mm:ss} - + loginUsuario + - %c - %m%n ); String formatoData = dd-MM-; SimpleDateFormat sdf = new SimpleDateFormat( formatoData ); String hoje = sdf.format( new Date() ); String nomeArquivo = logGerAtividadeERROR.log; DailyRollingFileAppender appender = new DailyRollingFileAppender( layout, nomeArquivo, dd-MM- ); appender.setEncoding( ISO-8859-1 ); ConsoleAppender consoleAppender = new ConsoleAppender( layout, System.out ); consoleAppender.setEncoding( ISO-8859-1 ); log.addAppender( appender ); log.addAppender( consoleAppender ); log.info( linhaLog ); log.removeAllAppenders(); } } return retorno; } } On Fri, Dec 5, 2008 at 9:07 AM, Eugenio Perrotta Neto [EMAIL PROTECTED] wrote: anybody has the answer? On Thu, Dec 4, 2008 at 2:05 PM, Eugenio Perrotta Neto [EMAIL PROTECTED] wrote: the code is here: i have a tag file called page.tag %@ tag body-content=scriptless % %@ tag pageEncoding=UTF-8 % [EMAIL PROTECTED] prefix=s uri=/struts-tags % [EMAIL PROTECTED] prefix=sicat2 uri=/WEB-INF/sicat2.tld % !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 / link rel=stylesheet href=s:url value='/css/main.css' includeParams='none' encode='false' namespace=/ / type=text/css/ link rel=shortcut icon href=s:url value='/images/favicon.ico'/ / titles:property value=appName / : s:property value=moduleName / : s:property value=pageTitle //title SCRIPT src=s:url value='/js/lib/prototype/ prototype-1.6.0.3.js' includeParams='none' / charset=UTF-8 type=text/javascript/SCRIPT SCRIPT src=s:url value='/js/common.js' includeParams='none'/ charset=UTF-8 type=text/javascript/SCRIPT /head body class=sicat2 table width=100% trtdh1 id=pageTitles:property value=moduleName/ : s:property value=pageTitle//h1/td/tr trtdjsp:doBody //td/tr /table
Re: Important ActionContext.getContext().getSession() error
Hi Francisco... I use it in many diferrents browser, and never got this error... but i use the following sentence: Map session = ActionContext.get.. I dont put this String, String!!! On Wed, Nov 12, 2008 at 1:53 PM, Francisco Exposito [EMAIL PROTECTED] wrote: Hi, I have the next sentence in order to get info from session: MapString,String session = ActionContext.getContext().getSession(); And then i put or get info. It works properly in firefox local and remote and in ie local. But if I try to execute it in a remote ie, I get that session is null. Any help please? Regards, Paco _ Diviértete y aprende con el juego de palabras del Abecedario http://www.vivelive.com/abecedario/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Using Struts with Dojo vs GWT
Hi, In my projects ive been use Struts 2 with JQuery. Why JQuery? Lighweight, easy to learn and use and run it in all browsers... On Mon, Oct 20, 2008 at 5:28 AM, Wes Wannemacher [EMAIL PROTECTED] wrote: I don't know if this is a question we can answer for you. Dojo has its advantages and disadvantages, but from a practical perspective it is a very different framework than GWT. If the application you are going to create could make better use of GWT, then use it... Lately, the AJAX-ified applications I have worked on haven't used either GWT or Dojo. The nice thing about Struts 2 is that it is flexible enough that what you do in your UI shouldn't have any bearing on how you build your actions. I just happily built an app that used JQuery heavily on the front-end and Struts 2 + Spring / JPA on the backend. I could have done it with the Struts 2 AJAX tags, but was looking for an excuse to learn more about JQuery. -Wes On Sun, 2008-10-19 at 23:19 -0700, Ryan Detert wrote: I am new to Struts but have used the GWT before. Would it be wise at all to try and use the GWT with Struts or should I just stick with Dojo? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA Toplink without Spring
Thanks folk... ill see it!! On Thu, Oct 2, 2008 at 1:36 PM, Martin Gainty [EMAIL PROTECTED] wrote: attempting to follow your sans Spring implementation curious as to which Bean will you be using to take the place of JndiObjectFactoryBean? another alternative would be to implement a stateless session bean such as what is described at http://www.oracle.com/technology/pub/articles/dikmans-spring-toplink.html does this help? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Thu, 2 Oct 2008 21:45:49 +0200 From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: Re: JPA Toplink without Spring -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Felipe, sorry, didn't read carefully. Did you have a lool at Oracle's Toplink Forum ? http://forums.oracle.com/forums/forum.jspa;jsessionid=8d92201c30d6c8545719450d4cc49ae1ecd52fbaab42.e34Qc3aLbh8RbO0LbxmRb3eObNeMe0?forumID=48start=0 or Oracle's toplink page: http://www.oracle.com/technology/products/ias/toplink/index.html There are also some Toplink-Howtos to find: http://www.oracle.com/technology/products/ias/toplink/technical/tips/index.html Maybe that helps you. Felipe Lorenz schrieb: Thanks for replay. But thats the problem... im not using spring. So, do you have a clue? On Thu, Oct 2, 2008 at 9:31 AM, Volker Karlmeier [EMAIL PROTECTED] wrote: http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-jpa-spring/doc/how-to-ejb30-jpa-spring.html http://www.zdnet.de/using_oracle_toplink_with_the_spring_framework_download-39002355-60263173-1.htm http://almaer.com/blog/toplink-spring-integration http://www.saunderswebsolutions.com/articlecontent/7 May find more using Spring toplink howto in Google :) Felipe Lorenz schrieb: Hi. Im trying to find on google what is the best practice to use jpa(toplink). Where i should save the EntityManagerFactory? ApplicationScope? Session? And create an EntityManager for each action called? How? Existe an tutorial for? I just found tutorials using Spring and Hibernate. Thanks in advice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - -- - --- V. Karlmeier Friedrich-Freye-Str. 61 D-45481 Mülheim/Ruhr Tel. : +49-(0)208-7785675 Mobile: +49-(0)176-21056587 Mail : [EMAIL PROTECTED] web : http://www.magiccode.eu - --- -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI5STtx4KjH6Tk4MMRAuCzAKCTVtUrNNllR7U/W4teDapitIXdhgCfXOpM V+RO2vPBL0nC/KNEGXd297Q= =dMDo -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Stay up to date on your PC, the Web, and your mobile phone with Windows Live. http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JPA Toplink without Spring
Hi. Im trying to find on google what is the best practice to use jpa(toplink). Where i should save the EntityManagerFactory? ApplicationScope? Session? And create an EntityManager for each action called? How? Existe an tutorial for? I just found tutorials using Spring and Hibernate. Thanks in advice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JPA Toplink without Spring
Thanks for replay. But thats the problem... im not using spring. So, do you have a clue? On Thu, Oct 2, 2008 at 9:31 AM, Volker Karlmeier [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-ejb30-jpa-spring/doc/how-to-ejb30-jpa-spring.html http://www.zdnet.de/using_oracle_toplink_with_the_spring_framework_download-39002355-60263173-1.htm http://almaer.com/blog/toplink-spring-integration http://www.saunderswebsolutions.com/articlecontent/7 May find more using Spring toplink howto in Google :) Felipe Lorenz schrieb: Hi. Im trying to find on google what is the best practice to use jpa(toplink). Where i should save the EntityManagerFactory? ApplicationScope? Session? And create an EntityManager for each action called? How? Existe an tutorial for? I just found tutorials using Spring and Hibernate. Thanks in advice. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - -- - --- V. Karlmeier Friedrich-Freye-Str. 61 D-45481 Mülheim/Ruhr Tel. : +49-(0)208-7785675 Mobile: +49-(0)176-21056587 Mail : [EMAIL PROTECTED] web : http://www.magiccode.eu - --- -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFI5Pdbx4KjH6Tk4MMRAvnCAKCipK45llx9WhyLemyWn8NU2F4IXgCdEmC6 NNxaNZ/dK0z43B+ad9TrRec= =xcJZ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action as Welcome File
Hi.. Did you try change in web.xml file? Change from index.jsp to your_action.action!! i dont know if it work... Felipe. On Thu, Aug 21, 2008 at 7:24 AM, Roger [EMAIL PROTECTED] wrote: Sorry, I know that I've read about this here before, but I can't find the thread. Can someone point me to how to configure an action as the welcome file? Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Checkbox problem
Hi... you can do tag in another tag... cause its a recursive, and well.. Dave can explain better why!! ehehheh sorry.. my english is not good.. But you can try create a new boolean attribute in you action class and tranform the bd type (Y/N) to a boolean type (true/false).. Or s:if test=ticket.ccUpdateFlag='Y' s:checkbox theme=simple name=ticket.ccUpdateFlag id=ticket.ccUpdateFlag value=true / /s:if s:else s:checkbox theme=simple name=ticket.ccUpdateFlag id=ticket.ccUpdateFlag value=false / /s:else Good luke. On Wed, Aug 20, 2008 at 5:02 PM, Struts Two [EMAIL PROTECTED] wrote: I have a checkbox as follows in a jsp: s:checkbox theme=simple name=ticket.ccUpdateFlag id=ticket.ccUpdateFlag / Once a user selects the checkbox and submits the form, ccUpdateFlag is set to true. However, on the database side the value is stored as 'Y' or 'N' . So my getCcUpdateFlag returns 'Y' or 'N' depending on the fact ccUpdateFlag is set to true or false. Now on a different page (say update/vie page), I have the same exact check box. I have been trying to map 'Y' to fieldValue=true unsuccessfully so far. I have tried the followings: s:checkbox theme=simple name=ticket.ccUpdateFlag id=ticket.ccUpdateFlag s:if test=ticket.ccUpdateFlag='Y'filedValue=true/s:if / This breaks the page and the page does not even compile, I get invalid jsp exception.. I then went to my bean and added the following method: public boolean isCCUpate(){ return Y.equals(getCcUpdateFlag()); } I then tried to use the following: s:checkbox theme=simple name=ticket.ccUpdateFlag id=ticket.ccUpdateFlag fieldValue=s:property value='ticket.CCUpate'/ / This would also fail, looking at generated html, here is what is generated: input type=checkbox name=ticket.ccUpdateFlag value=lt;s:property value='ticket.CCUpate'/gt; id=ticket.ccUpdateFlag/ input type=hidden name=__checkbox_ticket.ccUpdateFlag value=lt;s:property value='ticket.CCUpate'/gt; / Is there a way that I can have checkbox fieldValue=true if ticket.ccUpdateflag == 'Y'. __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How start with multilanguage app
Uhummm... good... i follow this links and work... very good. But my actions class need to extend ActionSupport? On Mon, Aug 11, 2008 at 4:31 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Mon, 8/11/08, Felipe Lorenz [EMAIL PROTECTED] wrote: I want to learn about multilanguages applications selected by user, but i dont know how!? I tried google... but nothing concrete about it Somebody have a tutorial? Or something to help me?! http://struts.apache.org/2.x/docs/localization.html http://struts.apache.org/2.x/docs/i18n-interceptor.html Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Remotely passing parameters to struts
hi... i dont think so... On Mon, Aug 11, 2008 at 8:45 AM, jaki [EMAIL PROTECTED] wrote: Hi all, I have a web application which needs to pass parameters to a struts app which resides on another machine. I will not be calling the struts class using a jsp but from a normal java method. So, is there a way to pass arguements without using a request/response object? -- View this message in context: http://www.nabble.com/Remotely-passing-parameters-to-struts-tp18928369p18928369.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How start with multilanguage app
Hi people. I want to learn about multilanguages applications selected by user, but i dont know how!? I tried google... but nothing concrete about it Somebody have a tutorial? Or something to help me?! I think the user can change language in the index jsp, by a configuration or in any jsp(if possible).. Thks in advice. Felipe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] Testing if session variable is present
Hummm.. Struts 1 or 2? This code is to S2. s:if test=%{#session.your_variable != null} do something /s:if I didnt test it, so im not sure about the code. But try it, and tell us. Felipe Lorenz On Tue, Jul 29, 2008 at 9:34 AM, Milan Milanovic [EMAIL PROTECTED]wrote: Hi, I need to test in jsp if some session variable is present, and based on that to show some struts view code or not. How can I do that ? -- Thx, Milan -- View this message in context: http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18716278.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How can i user Swing as V in the Struts MVC
yes, you can... but you'll need a HTTPClient from apache.. or do your http connection by yourself. And determine de communication, cause normally, the response from Struts is a JSP file.. or html..., otherwise, you can change the response to XML.. almost a WebServices.. EHHEHEHE Do a simple teste... but I belive that's possible... On 6/16/08, Dimitris Mouchritsas [EMAIL PROTECTED] wrote: Ehteshamul Haque wrote: I dont know whether is it possible or not. But the question is interesting to me. If possible, please someone answer. Ehteshamul Haque 'A great man is not the one who never falls, but the one who rises every time he falls' --- On Sat, 6/14/08, (¯`·.k ! k !.·´¯) [EMAIL PROTECTED] wrote: From: (¯`·.k ! k !.·´¯) [EMAIL PROTECTED] Subject: How can i user Swing as V in the Struts MVC To: apache struts user@struts.apache.org Date: Saturday, June 14, 2008, 10:03 PM Hi .. i m going to build a struts based application but i dont want to use JSP'snbsp; instead of JSP's i want to use Swing GUI .. how can i communicate Swing GUI with struts app and how i will get the response back .. e.g. search results waiting for reply - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Well, I suppose you could use javascript-applet communication, but it seems a bit far fetched. I don't think your architecture is correct here. Swing guis are supposed to talk to the business layer, not to the controller layer. Regards Dimitris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with action-redirect
I dont know if it is just a warning... cause i dont use devMode on. And when i use the action whith action-redirect, it doesnt work. Strange Do you have idea? Thanks! On Wed, Jun 11, 2008 at 5:12 PM, Dave Newton [EMAIL PROTECTED] wrote: That's a warning issued because params may be set either the action or on a result. It may go away if you turn devMode off; I don't recall what the current status of this issue is. Dave --- On Wed, 6/11/08, Felipe Lorenz [EMAIL PROTECTED] wrote: From: Felipe Lorenz [EMAIL PROTECTED] Subject: Re: Problems with action-redirect To: Struts Users Mailing List user@struts.apache.org, [EMAIL PROTECTED] Date: Wednesday, June 11, 2008, 4:03 PM oooppps.. my bad And i use struts 2.0.11 WARNING: Caught OgnlException while setting property 'candidatoExt.codIdFeder' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.candidatoExt at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122) at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.getProperty(OgnlValueStack.java:58) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643) at ognl.ASTProperty.getValueBody(ASTProperty.java:92) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.ASTChain.setValueBody(ASTChain.java:168) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.Ognl.setValue(Ognl.java:476) at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186) at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49) at org.apache.struts2.impl.StrutsObjectFactory.buildResult(StrutsObjectFactory.java:95) at com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:195) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:342) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223
Re: Problems with action-redirect
Finally work fine... go flipper!!! ehhehehehh OK, now, how do i turn off this log warning? Remember, my devMode isnt on On Thu, Jun 12, 2008 at 8:23 AM, Ralf Fischer [EMAIL PROTECTED] wrote: Hi, On Thu, Jun 12, 2008 at 1:08 PM, Felipe Lorenz [EMAIL PROTECTED] wrote: I dont know if it is just a warning... cause i dont use devMode on. And when i use the action whith action-redirect, it doesnt work. It IS just a warnung, as you see from the message: WARNING: Caught OgnlException while setting property 'candidatoExt.codIdFeder' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.candidatoExt OGNL tries to find the property candidatoExt on type ServletActionRedirectResult, which obviously isn't there. IIRC this is a known issue. When using the redirect aciton result you have to set the action name and, optionally, the namespace to where you want struts to redirect the request. Usually besides these two result parameters you add parameters to the result definition in your configuration which parametrize the redirect target, like you do with 'candidatoExt.codIdFeder'. OGNL itself at this point cannot distinguish between parameters for the result it self and the redirect target, thus tries to set all values in the result and encounters the problems as you see in your logfile. They usually don't harm. Strange Yes. Do you have idea? Not yet at least. Are there any other exceptions in your logfile? Bye, -Ralf Thanks! On Wed, Jun 11, 2008 at 5:12 PM, Dave Newton [EMAIL PROTECTED] wrote: That's a warning issued because params may be set either the action or on a result. It may go away if you turn devMode off; I don't recall what the current status of this issue is. Dave --- On Wed, 6/11/08, Felipe Lorenz [EMAIL PROTECTED] wrote: From: Felipe Lorenz [EMAIL PROTECTED] Subject: Re: Problems with action-redirect To: Struts Users Mailing List user@struts.apache.org, [EMAIL PROTECTED] Date: Wednesday, June 11, 2008, 4:03 PM oooppps.. my bad And i use struts 2.0.11 WARNING: Caught OgnlException while setting property 'candidatoExt.codIdFeder' on type 'org.apache.struts2.dispatcher.ServletActionRedirectResult'. ognl.NoSuchPropertyException: org.apache.struts2.dispatcher.ServletActionRedirectResult.candidatoExt at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122) at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.getProperty(OgnlValueStack.java:58) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1643) at ognl.ASTProperty.getValueBody(ASTProperty.java:92) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170) at ognl.SimpleNode.getValue(SimpleNode.java:210) at ognl.ASTChain.setValueBody(ASTChain.java:168) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) at ognl.SimpleNode.setValue(SimpleNode.java:246) at ognl.Ognl.setValue(Ognl.java:476) at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186) at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76) at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:49) at org.apache.struts2.impl.StrutsObjectFactory.buildResult(StrutsObjectFactory.java:95) at com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:195) at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:342) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48
Problems with action-redirect
Hi folks... Im did try a action-redirect, but it throw a exception. And i dont know why, cause i use it in other action-redirect and work. What can be? Here is my action-redirect work: action name=login method=login class=br.com.mercur.th.action.UsuarioAction result name=success type=redirect-action param name=actionName/load_dadosPessoais/param param name=parsetrue/param param name=candidatoExt.codIdFeder${cpf}/param /result result name=error/TH_Login.jsp/result result name=input/TH_Login.jsp/result /action And here dont work: action name=save_dadosPessoais method=create class=br.com.mercur.th.action.DadosPessoaisAction result name=success type=redirect-action param name=actionName/load_endereco/param param name=parsetrue/param param name=candidatoExt.codIdFeder222/param /result result name=error/TH_DadosPessoais.jsp/result result name=input/TH_DadosPessoais.jsp/result /action And here is my struts.xml: ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts PUBLIC -//Apache Software Fundation//DTD Struts Configuration 2.0//EN ./struts-2.0.dtd struts include file=struts-default.xml / package name=default extends=struts-default action name=login method=login class=br.com.mercur.th.action.UsuarioAction result name=success type=redirect-action param name=actionName/load_dadosPessoais/param param name=parsetrue/param param name=candidatoExt.codIdFeder${cpf}/param /result result name=error/TH_Login.jsp/result result name=input/TH_Login.jsp/result /action action name=save_dadosPessoais method=create class=br.com.mercur.th.action.DadosPessoaisAction result name=success type=redirect-action param name=actionName/load_endereco/param param name=parsetrue/param param name=candidatoExt.codIdFeder222/param /result result name=error/TH_DadosPessoais.jsp/result result name=input/TH_DadosPessoais.jsp/result /action action name=load_dadosPessoais method=load class=br.com.mercur.th.action.DadosPessoaisAction result name=success/TH_DadosPessoais.jsp/result result name=error/TH_DadosPessoais.jsp/result result name=input/TH_DadosPessoais.jsp/result /action action name=save_endereco method=create class=br.com.mercur.th.action.EnderecoAction result name=success/TH_FormAcademic.jsp/result result name=error/TH_Endereco.jsp/result result name=input/TH_Endereco.jsp/result /action action name=load_endereco method=load class=br.com.mercur.th.action.EnderecoAction result name=success/TH_Endereco.jsp/result result name=error/TH_Endereco.jsp/result result name=input/TH_Endereco.jsp/result /action action name=save_formAcademic method=create class=br.com.mercur.th.action.FormAcademicAction result name=success/TH_ExpProfissional.jsp/result result name=error/TH_FormAcademic.jsp/result result name=input/TH_FormAcademic.jsp/result /action action name=save_expProfissional method=create class=br.com.mercur.th.action.ExpProfissionalAction result name=success/finish.jsp/result result name=error/TH_ExpProfissional.jsp/result result name=input/TH_ExpProfissional.jsp/result /action action name=pop_pais method=pais class=br.com.mercur.th.action.UtilsActions result/index.html/result /action action name=tipo_curso method=tipoCurso class=br.com.mercur.th.action.UtilsActions result/index.html/result /action action name=grau_Instr method=grauInstr class=br.com.mercur.th.action.UtilsActions result/index.html/result /action action name=cursos method=cursos class=br.com.mercur.th.action.UtilsActions result/TH_FormAcademicCursoSelect.jsp/result /action action name=empresas method=empresas class=br.com.mercur.th.action.UtilsActions result/index.html/result /action action name=adicionarCurso method=adicionarCurso class=br.com.mercur.th.action.FormAcademicAction result/TH_FormAcademicCurso.jsp/result /action action name=removerCurso method=removerCurso class=br.com.mercur.th.action.FormAcademicAction result/TH_FormAcademicCurso.jsp/result /action action name=update_ExpProfiEnder method=expProfiEnder class=br.com.mercur.th.action.ExpProfissionalAction result/TH_ExpProfiEnder.jsp/result /action action
Re: Problems with action-redirect
) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:123) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) On Wed, Jun 11, 2008 at 4:59 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Wed, 6/11/08, Felipe Lorenz [EMAIL PROTECTED] wrote: Im did try a action-redirect, but it throw a exception. And i dont know why, cause i use it in other action-redirect and work. What can be? You didn't even say what the exception was or provide any information about under what circumstances the exception was thrown. So to answer your question it could be just about anything, as I don't see anything obviously wrong with your configuration. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts editor
I dont know.. exist one for NetBeans.. but is beta.. https://nbstruts2support.dev.java.net/ But, if you find one, PLEASE tell us... On Tue, Jun 10, 2008 at 4:46 PM, Lalchandra Rampersaud [EMAIL PROTECTED] wrote: hi, i am having a hard time creating my .jsp pages with struts components in eclipse with myeclipse. is there a struts editor available that will make the visual designing part easier? Lalchandra Rampersaud Carpe diem - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Help required on Struts-Datagrid
I dont know... maybe if you have 2 DIV, the first for header and de second for data, where hava a scroll.. But how do it, i dont know... but i saw it... On Mon, Jun 9, 2008 at 7:33 AM, mukul.object [EMAIL PROTECTED] wrote: Hello All, I am seeking for suggestions on how can we fix the header/column-names in Struts-Datagrid. In my jsp , I have implemented struts-datagrid and showing many rows at a time. While scrolling the page , the column-names/header of the datagrid also scroll up and down and do not remain visible to the user. Is there any way to fix the column-name/header to the top of datagrid? Kindly suggest any solution. Thanks -Mukul -- View this message in context: http://www.nabble.com/Help-required-on-Struts-Datagrid-tp17730148p17730148.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Modifying session attributes in Struts 2
nothing diferent.. just it. On Mon, Jun 9, 2008 at 7:34 PM, Gamble, Wesley (WG10) [EMAIL PROTECTED] wrote: All, If I have a Struts action, and I acquire the session map via: Map session = ActionContext.getContext().getSession(); can I simply use session.put(new_key, new_value); to modify session attributes or do I need to do something different? Thanks, Wes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Modifying session attributes in Struts 2
you right... just do what you did say! On Mon, Jun 9, 2008 at 7:52 PM, Gamble, Wesley (WG10) [EMAIL PROTECTED] wrote: Huh? -Original Message- From: Felipe Lorenz [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2008 5:37 PM To: Struts Users Mailing List Subject: Re: Modifying session attributes in Struts 2 nothing diferent.. just it. On Mon, Jun 9, 2008 at 7:34 PM, Gamble, Wesley (WG10) [EMAIL PROTECTED] wrote: All, If I have a Struts action, and I acquire the session map via: Map session = ActionContext.getContext().getSession(); can I simply use session.put(new_key, new_value); to modify session attributes or do I need to do something different? Thanks, Wes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display tag and AJAX
Hi.. you can out the display tag inside of a remote div... and, every time when you want refresh the DT, just refresh the div On Wed, Jun 4, 2008 at 10:41 PM, Arunkumar Balasubramanian [EMAIL PROTECTED] wrote: Can we update the display:table with an ajax call? Here is what I was expecting to do. - There are different radio buttons (each will have different status of results) - Depending on the selection, the display:table has to update the rows. - There display:table headers dosen't change and the values inside the display:rablechanges based on the selections. I was trying to do the following. - Make an AJAX call when the user clicks on radio buttons, so that only the display:tablegets refreshed and not the entire page. - Based on the selections, the display:table will update the results. If someone was able to provide the reference for how to perform the above task it would be great. Thanks in advance. _ It's easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn how. https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow
Re: focusElement attribute in s:form tag
newMedicine.newMedicineDEscription is the name ou the id? Need to be the id of element. try to put it i the end, but without a method...you can do this... On Thu, Jun 5, 2008 at 2:53 AM, StrutsUser [EMAIL PROTECTED] wrote: Hi, I tried as you have mentioned. The script gets called, the element is obtained, but focus is not set. script function setDefaultFocus() { alert(focusElm +document.getElementById(newMedicine.newMedicineDEscription)); document.getElementById(newMedicine.newMedicineDEscription).focus(); } /script I am calling it at the end of the JSP page using scriptsetDefaultFocus()/script I am unable to find out the reason for this. --- felipe.lorenz wrote: Ok. put it insede of tag HEAD. SOmething like this: head script defer _your_javascript_here_ /script /head On Wed, Jun 4, 2008 at 9:40 AM, StrutsUser [EMAIL PROTECTED] wrote: Hi, I tried this by putting this code in a javascript function and calling it during onfocus of s:form. It's not working. I am not sure how to call this function always when the page is loaded. Ajay felipe.lorenz wrote: Sure: document.getElementById(id_of_element).focus(); On Wed, Jun 4, 2008 at 8:40 AM, StrutsUser [EMAIL PROTECTED] wrote: Thanks Felipe. Could you give me some pointers in writing this sort of Javascript code for focussing on an element. I am not well versed in Javascript. That's why. Thanks Regards Ajay felipe.lorenz wrote: I do this by java scritp... On Wed, Jun 4, 2008 at 8:12 AM, StrutsUser [EMAIL PROTECTED] wrote: Hi, I have a requirement where I need to set the focus in a particular element when a page is loaded. I tried using the 'focusElement' attribute in s:form tag. I got the error 'Attribute focusElement invalid for tag form according to TLD'. I am using struts2-core-2.0.11.jar and the form tag in this version does not have the 'focusElement' attribute. I tried downloading version 2.0.11.1 also. This too does not have this attribute. Could anyone please help me on how to get the latest struts2 jar. Or is there anyother way to set the focus to an element when the page is loaded? Thanks Regards -- View this message in context: http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644275.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644692.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17645786.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17662672.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Images in s:select
try something with CSS... On Tue, Jun 3, 2008 at 6:48 PM, Volker Karlmeier [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, is it possible to design a list with an s:select-tag that conaints images ? I want to offer a list of available langauges with a flag, but how can I realize it ? any suggestions ? Volker Stetze2008 schrieb: hi, when opening http://localhost:8080/myApplication/ on my local Jetty server instead of showing the action defined in the welcomefilelist of my web.xml I'm asked to download a file from type application/octet-stream. it works on the tomcat internet server. does anybody know how to solve this locally? thanks in advance, Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.3 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFIRbwUx4KjH6Tk4MMRAuNcAJ9EmrGuUWQp/GPGmZ/s446wk1vBPgCdHDgn cALnW+RM5LoUaK079Ashq1k= =VJb6 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts 2 radio tag selected default
i dont think so i do it by javascript... if somobady know... please.. tell us.. On Wed, Jun 4, 2008 at 5:58 AM, aspat [EMAIL PROTECTED] wrote: Hi, I would like to know if there is a way to select a radio button in struts 2 by default, which allow me to avoid converting the code as follows : input type=radio checked=true name=listSWModel id=listSWModelradioList : value=List :/label for=listSWModelradioList :List :/label I will prefer to use : s:radio id=listSWModelradio name=listSWModel list=listSWModelList / Can someone help me, thanks, aspat -- View this message in context: http://www.nabble.com/struts-2-radio-tag-selected-default-tp17642159p17642159.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: focusElement attribute in s:form tag
I do this by java scritp... On Wed, Jun 4, 2008 at 8:12 AM, StrutsUser [EMAIL PROTECTED] wrote: Hi, I have a requirement where I need to set the focus in a particular element when a page is loaded. I tried using the 'focusElement' attribute in s:form tag. I got the error 'Attribute focusElement invalid for tag form according to TLD'. I am using struts2-core-2.0.11.jar and the form tag in this version does not have the 'focusElement' attribute. I tried downloading version 2.0.11.1 also. This too does not have this attribute. Could anyone please help me on how to get the latest struts2 jar. Or is there anyother way to set the focus to an element when the page is loaded? Thanks Regards -- View this message in context: http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644275.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: focusElement attribute in s:form tag
Sure: document.getElementById(id_of_element).focus(); On Wed, Jun 4, 2008 at 8:40 AM, StrutsUser [EMAIL PROTECTED] wrote: Thanks Felipe. Could you give me some pointers in writing this sort of Javascript code for focussing on an element. I am not well versed in Javascript. That's why. Thanks Regards Ajay felipe.lorenz wrote: I do this by java scritp... On Wed, Jun 4, 2008 at 8:12 AM, StrutsUser [EMAIL PROTECTED] wrote: Hi, I have a requirement where I need to set the focus in a particular element when a page is loaded. I tried using the 'focusElement' attribute in s:form tag. I got the error 'Attribute focusElement invalid for tag form according to TLD'. I am using struts2-core-2.0.11.jar and the form tag in this version does not have the 'focusElement' attribute. I tried downloading version 2.0.11.1 also. This too does not have this attribute. Could anyone please help me on how to get the latest struts2 jar. Or is there anyother way to set the focus to an element when the page is loaded? Thanks Regards -- View this message in context: http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644275.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644692.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help with remote div
Hi folks. I've try to use remote divs, but the javascripts doesnt work, and i get some exceptions! This is my index.jsp [EMAIL PROTECTED] contentType=text/html pageEncoding=UTF-8% %@ taglib prefix=s uri=/struts-tags% !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleJSP Page/title s:head theme=ajax/ link href=css/flora/flora.tabs.css rel=stylesheet type=text/css/ script type=text/javascript src=script/jquery-1.2.3.min.js/script script type=text/javascript src=script/ui.core.min.js/script script type=text/javascript src=script/ui.tabs.min.js/script script type=text/javascript src=script/jquery.maskedinput-1.1.3.pack.js/script /head body div id=tab class=flora style=width: 714px; height: 325px; ul class=ui-tabs-nav li id=1a href=#spanDados Pessoais/span/a/li li id=2a href=#spanEndereço/span/a/li /ul s:div id=the_Div href=TH_DadosPessoais.jsp loadingText=Carregando... cssClass=ui-tabs-panel executeScripts=true separateScripts=false theme=ajax /s:div /div /body /html And this is my TH_DadosPessoais.jsp head [EMAIL PROTECTED] contentType=text/html pageEncoding=UTF-8% %@ taglib prefix=s uri=/struts-tags% !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleJSP Page/title s:head theme=ajax debug=true/ link href=css/form.css rel=stylesheet type=text/css/ link href=css/flora.datepicker.css rel=stylesheet type=text/css/ script type=text/javascript src=script/jquery-1.2.3.min.js/script script type=text/javascript src=script/jquery.maskedinput-1.1.3.pack.js/script script type=text/javascript $(document).ready(function(){ $(input).each(function(){ $(this).focus(function(){ $(this).css('background-color', '#F7FEA0'); }); $(this).blur(function(){ $(this).css('background-color', 'white'); }); }); $(#dataNasc_input).mask(99/99/, {placeholder: }); $(#numCartHabilit_input).mask(999, {placeholder: }); $(#origem0).get(0).checked = true; document.getElementById(nom_condempr).focus(); }); /script /head body I think the problem is the scripts tag, but i've try delete, but even a simple alert('') dont work. Why?
Re: focusElement attribute in s:form tag
Ok. put it insede of tag HEAD. SOmething like this: head script defer _your_javascript_here_ /script /head On Wed, Jun 4, 2008 at 9:40 AM, StrutsUser [EMAIL PROTECTED] wrote: Hi, I tried this by putting this code in a javascript function and calling it during onfocus of s:form. It's not working. I am not sure how to call this function always when the page is loaded. Ajay felipe.lorenz wrote: Sure: document.getElementById(id_of_element).focus(); On Wed, Jun 4, 2008 at 8:40 AM, StrutsUser [EMAIL PROTECTED] wrote: Thanks Felipe. Could you give me some pointers in writing this sort of Javascript code for focussing on an element. I am not well versed in Javascript. That's why. Thanks Regards Ajay felipe.lorenz wrote: I do this by java scritp... On Wed, Jun 4, 2008 at 8:12 AM, StrutsUser [EMAIL PROTECTED] wrote: Hi, I have a requirement where I need to set the focus in a particular element when a page is loaded. I tried using the 'focusElement' attribute in s:form tag. I got the error 'Attribute focusElement invalid for tag form according to TLD'. I am using struts2-core-2.0.11.jar and the form tag in this version does not have the 'focusElement' attribute. I tried downloading version 2.0.11.1 also. This too does not have this attribute. Could anyone please help me on how to get the latest struts2 jar. Or is there anyother way to set the focus to an element when the page is loaded? Thanks Regards -- View this message in context: http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644275.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644692.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17645786.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: s:select - execute action onChange
Hi. What action? A action to update another select, i.e.? I use something like this: onChange=jsFunction(this.value); function jsFunction( id ) { var div = dojo.widget.byId(my div); div.href = myAction?myField=+id; div.refresh(); } That is it? On Wed, Jun 4, 2008 at 4:12 PM, Stetze2008 [EMAIL PROTECTED] wrote: hi I'm sorry but I did not find a quick solution for my problem on the web. I want to execute an action if another value of the select-box was selected. So i guess I have to use the onChange attribute but I dont know how. this is my actual form: s:form action=changeDefaultScope namespace=/user method=POST theme=simple s:select list=myList key=label.allscopes listKey=id listValue=name value=myValue emptyOption=false name=scopeId theme=simple / s:submit key=button.changeScope theme=simple / /s:form I would like to call the action without the submit button. (Javasscript - onChange) Can anybody help? Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Struts 2] Formatting double
Are you brazilian to use a comma for decimal separator? whatever, if your system work only with that format(000.000,00) you can create a String field in Action class, and do the parse from string to double manually. On Wed, Jun 4, 2008 at 2:14 PM, Dave Newton [EMAIL PROTECTED] wrote: It's standard Java I18N formatting, IIRC. Maybe try some Java docs, [1] might help. Dave [1] http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html --- On Wed, 6/4/08, Milan Milanovic [EMAIL PROTECTED] wrote: From: Milan Milanovic [EMAIL PROTECTED] Subject: Re: [Struts 2] Formatting double To: Struts Users Mailing List user@struts.apache.org Date: Wednesday, June 4, 2008, 12:06 PM I found how to do it in this page: http://www.roseindia.net/struts/struts2/struts-2-format.shtml But I'm not sure how can I format number e.g., like this: 000.000.000,00 kg ? These patterns are not clear to me. -- Thx, Milan Milan Milanovic [EMAIL PROTECTED] wrote: Hi, I have a double value that should be formated in following format: 000.000,00. I just need to show this value in the jsp page with . How can I do this ? -- Thx in advance, Milan Milanovic - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting a s:select selected value
use javascript for this problem... On Wed, Jun 4, 2008 at 4:35 PM, piltrafeta [EMAIL PROTECTED] wrote: If i put key=maxCoord it continues taking the value from the listbox of the first record... styl9090 wrote: Try changing this line, s:select name=maxCoord .../ to s:select key=maxCoord .../ then, your variable(maxCoord) will hold the selected value from the list box. piltrafeta wrote: Actually session.coordValues has a list with numbers from 1 to 10, and this is correct... The thing is that it takes maxCoord as an array. And it returns only the first element, which means the value in the first select of the list of records. I've tried creating only one form for all the records and what i obtains in my maxCoord is a list with the values for each record. Laurie Harper wrote: The most likely explanation would be that your option values collection (session.coordValues) has empty or inconsistent key values. Check that it contains what you think it does. L. piltrafeta wrote: Hi , i have a jsp with some forms like this : s:form action=acceptUser method=post tr td s:a href=# onclick=accept(%{#users.value._id}) Accept /s:a /td tds:url id=url action=rejectUser includeParams=none s:param name=idUser value=%{#users.value._id} / /s:url s:a href=%{url} Reject /s:a !--s:form action=rejectUser method=post s:a href=# onclick=onLinkClick(%{#users.value._id}) Reject /s:a /s:form-- /td tds:property value=#users.value._name//td tds:property value=#users.value._username//td tds:select name=maxCoord headerValue= headerKey= list=#session.coordValues size=1 multiple=false / /td /tr s:hidden name=idUser/ /s:form and in my JavaActionClass i have a attribute with the same name as the select element : private String maxCoord; public String accept() { print(maxCoord); return SUCCESS; } public String getMaxCoord() { return maxCoord; } public void setMaxCoord(String maxCoord) { this.maxCoord = maxCoord; } when i'm printing the maxCoord value, i only obtanins the correct value if i select the first form in my jsp class... if i chose any of the other i get an empty string. Can you halp me with this please ? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Getting-a-s%3Aselect-selected-value-tp17566943p17654835.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Getting a s:select selected value
Use javascript to select an item. On Wed, Jun 4, 2008 at 5:02 PM, piltrafeta [EMAIL PROTECTED] wrote: what do you mean ? felipe.lorenz wrote: use javascript for this problem... On Wed, Jun 4, 2008 at 4:35 PM, piltrafeta [EMAIL PROTECTED] wrote: If i put key=maxCoord it continues taking the value from the listbox of the first record... styl9090 wrote: Try changing this line, s:select name=maxCoord .../ to s:select key=maxCoord .../ then, your variable(maxCoord) will hold the selected value from the list box. piltrafeta wrote: Actually session.coordValues has a list with numbers from 1 to 10, and this is correct... The thing is that it takes maxCoord as an array. And it returns only the first element, which means the value in the first select of the list of records. I've tried creating only one form for all the records and what i obtains in my maxCoord is a list with the values for each record. Laurie Harper wrote: The most likely explanation would be that your option values collection (session.coordValues) has empty or inconsistent key values. Check that it contains what you think it does. L. piltrafeta wrote: Hi , i have a jsp with some forms like this : s:form action=acceptUser method=post tr td s:a href=# onclick=accept(%{#users.value._id}) Accept /s:a /td tds:url id=url action=rejectUser includeParams=none s:param name=idUser value=%{#users.value._id} / /s:url s:a href=%{url} Reject /s:a !--s:form action=rejectUser method=post s:a href=# onclick=onLinkClick(%{#users.value._id}) Reject /s:a /s:form-- /td tds:property value=#users.value._name//td tds:property value=#users.value._username//td tds:select name=maxCoord headerValue= headerKey= list=#session.coordValues size=1 multiple=false / /td /tr s:hidden name=idUser/ /s:form and in my JavaActionClass i have a attribute with the same name as the select element : private String maxCoord; public String accept() { print(maxCoord); return SUCCESS; } public String getMaxCoord() { return maxCoord; } public void setMaxCoord(String maxCoord) { this.maxCoord = maxCoord; } when i'm printing the maxCoord value, i only obtanins the correct value if i select the first form in my jsp class... if i chose any of the other i get an empty string. Can you halp me with this please ? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Getting-a-s%3Aselect-selected-value-tp17566943p17654835.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Getting-a-s%3Aselect-selected-value-tp17566943p17655387.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Struts 2] Formatting double
Im sorry!!! On Wed, Jun 4, 2008 at 6:46 PM, Roger Varley [EMAIL PROTECTED] wrote: On Wednesday 04 June 2008 22:49:15 Felipe Lorenz wrote: Are you brazilian to use a comma for decimal separator? You might be surprised at the number of countries that use a comma as the decimal separaor as opposed to the dot. http://en.wikipedia.org/wiki/Decimal_point Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problems with forms field
hummm this is not necessary.. i just want do send, not retrieve... but i fix the problem... i dont know whats happen, i did create a new project in NetBeans... maybe it lost something... i dont know... But thanks folks... On Tue, May 20, 2008 at 2:59 AM, Laurie Harper [EMAIL PROTECTED] wrote: Looks like you're missing a getter for dadosPessoais in your action class... L. Felipe Lorenz wrote: Ok.. i did it... its all right.. but i dont know... i will print my code: JSP: [EMAIL PROTECTED] contentType=text/html pageEncoding=UTF-8% %@ taglib prefix=s uri=/struts-tags % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleJSP Page/title /head body s:form action=save_dadosPessoais method=POST theme=xhtml s:textfield name=dadosPessoais.nome theme=xhtml/ s:textfield name=dadosPessoais.cpf theme=xhtml/ s:textfield name=dadosPessoais.origem theme=xhtml/ s:submit value=Enviar theme=xhtml / /s:form /body /html MY STRUTS.XML: ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts PUBLIC -//Apache Software Fundation//DTD Struts Configuration 2.0//EN ./struts-2.0.dtd struts include file=struts-default.xml / package name=default extends=struts-default action name=save_dadosPessoais method=create class=br.com.mercur.th.action.DadosPessoaisAction result/TH_DadosPessoais.jsp/result /action /package /struts ACTION CLASS public class DadosPessoaisAction { private DadosPessoais dadosPessoais; public String create() { System.out.println(DADOS PESSOAIS); System.out.println(dadosPessoais.getNome()); System.out.println(dadosPessoais.getOrigem()); System.out.println(dadosPessoais.getCpf()); return ActionSupport.SUCCESS; } public void setDadosPessoais(DadosPessoais dadosPessoais) { this.dadosPessoais = dadosPessoais; } } DadosPessoais Class: public class DadosPessoais { private String nome; private String origem; private String cpf; public void setNome(String nome) { this.nome = nome; } public String getNome() { return nome; } public void setOrigem(String origem) { this.origem = origem; } public String getOrigem() { return origem; } public String getCpf() { return cpf; } public void setCpf(String cpf) { this.cpf = cpf; } } On Mon, May 19, 2008 at 3:30 PM, Milan Milanovic [EMAIL PROTECTED] wrote: Check the names of the fields, they must mach with attributes names in action class, and also check that you have correct get/set methods for them in your action class. -- Milan Jim Kiley [EMAIL PROTECTED] wrote: Felipe, It would be much easier for others to help you if you would include relevant parts of your code, as well as let us know what version of Struts you are using. jk On Mon, May 19, 2008 at 2:15 PM, Felipe Lorenz wrote: Hi, i did work with struts, and im work with it. But, i dont how, the value of field are not send to Action class.. for example: My forms have 3 fields.. text.. normal.. simple.. so, when i submit this the form only the last filed are set. I put a System.out in my action class, and i see only the last field seted.. the other stay NULL... Why? -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
NoClassDefFoundError Exception
Hi folks. When i start the tomcat 5.5 this exception appear to me: 20/05/2008 08:48:03 org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter struts2 java.lang.NoClassDefFoundError: com/opensymphony/xwork2/config/ConfigurationProvider at org.apache.struts2.dispatcher.FilterDispatcher.createDispatcher(FilterDispatcher.java:239) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:200) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:78) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.config.ConfigurationProvider at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) ... 29 more But, everything work fine... i use Struts 2.0.11.1, Tomcat 5.5 and my WEB.XML: ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app What can be?
Re: NoClassDefFoundError Exception
hu very strange, because i have the fallows jar: antlr-2.7.2.jar commons-beanutils-1.6.jar commons-chain-1.1.jar commons-logging-1.0.4.jar commons-logging-api-1.1.jar commons-validator-1.3.0.jar freemarker-2.3.8.jar ognl-2.6.11.jar oro-2.0.8.jar struts2-core-2.0.11.1.jar xworks-2.0.4.jar and TopLinks Essentials. On Tue, May 20, 2008 at 1:43 PM, Rushikesh Thakkar [EMAIL PROTECTED] wrote: You need to have xwork-2.0.*.jar file in your WEB-INF/lib folder. -Rushikesh On Tue, May 20, 2008 at 6:40 PM, Felipe Lorenz [EMAIL PROTECTED] wrote: Hi folks. When i start the tomcat 5.5 this exception appear to me: 20/05/2008 08:48:03 org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter struts2 java.lang.NoClassDefFoundError: com/opensymphony/xwork2/config/ConfigurationProvider at org.apache.struts2.dispatcher.FilterDispatcher.createDispatcher(FilterDispatcher.java:239) at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:200) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:78) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.config.ConfigurationProvider at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1363) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) ... 29 more But, everything work fine... i use Struts 2.0.11.1, Tomcat 5.5 and my WEB.XML: ?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation= http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app What can be? -- -Rushikesh
Problems with forms field
Hi, i did work with struts, and im work with it. But, i dont how, the value of field are not send to Action class.. for example: My forms have 3 fields.. text.. normal.. simple.. so, when i submit this the form only the last filed are set. I put a System.out in my action class, and i see only the last field seted.. the other stay NULL... Why?
Re: Problems with forms field
Ok.. i did it... its all right.. but i dont know... i will print my code: JSP: [EMAIL PROTECTED] contentType=text/html pageEncoding=UTF-8% %@ taglib prefix=s uri=/struts-tags % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleJSP Page/title /head body s:form action=save_dadosPessoais method=POST theme=xhtml s:textfield name=dadosPessoais.nome theme=xhtml/ s:textfield name=dadosPessoais.cpf theme=xhtml/ s:textfield name=dadosPessoais.origem theme=xhtml/ s:submit value=Enviar theme=xhtml / /s:form /body /html MY STRUTS.XML: ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts PUBLIC -//Apache Software Fundation//DTD Struts Configuration 2.0//EN ./struts-2.0.dtd struts include file=struts-default.xml / package name=default extends=struts-default action name=save_dadosPessoais method=create class=br.com.mercur.th.action.DadosPessoaisAction result/TH_DadosPessoais.jsp/result /action /package /struts ACTION CLASS public class DadosPessoaisAction { private DadosPessoais dadosPessoais; public String create() { System.out.println(DADOS PESSOAIS); System.out.println(dadosPessoais.getNome()); System.out.println(dadosPessoais.getOrigem()); System.out.println(dadosPessoais.getCpf()); return ActionSupport.SUCCESS; } public void setDadosPessoais(DadosPessoais dadosPessoais) { this.dadosPessoais = dadosPessoais; } } DadosPessoais Class: public class DadosPessoais { private String nome; private String origem; private String cpf; public void setNome(String nome) { this.nome = nome; } public String getNome() { return nome; } public void setOrigem(String origem) { this.origem = origem; } public String getOrigem() { return origem; } public String getCpf() { return cpf; } public void setCpf(String cpf) { this.cpf = cpf; } } On Mon, May 19, 2008 at 3:30 PM, Milan Milanovic [EMAIL PROTECTED] wrote: Check the names of the fields, they must mach with attributes names in action class, and also check that you have correct get/set methods for them in your action class. -- Milan Jim Kiley [EMAIL PROTECTED] wrote: Felipe, It would be much easier for others to help you if you would include relevant parts of your code, as well as let us know what version of Struts you are using. jk On Mon, May 19, 2008 at 2:15 PM, Felipe Lorenz wrote: Hi, i did work with struts, and im work with it. But, i dont how, the value of field are not send to Action class.. for example: My forms have 3 fields.. text.. normal.. simple.. so, when i submit this the form only the last filed are set. I put a System.out in my action class, and i see only the last field seted.. the other stay NULL... Why? -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com
Struts 2 with Axis WS NOPS.
Hi dudes. I have a problem. Ive try to acess a Web Service, created with Axis 1.4, with my struts aplication. But it throw a java.net.ConnectException: Connection timed out: connect. but, when i execute my class to test the acess of WS without tomcat, etc..., its works. What can be? My libraries: - axis.jar - jaxrpc.jar - commons-discovery-0.2.jar - activation.jar - saaj.jar - wsdl4j-1.5.1.jar ..and Struts 2.0.11.1 Tnks!
Re: Struts 2 with Axis WS NOPS.
UPDATE: i've did try with Tomcat 5.5 and 6, but still not working. On Mon, May 19, 2008 at 8:25 PM, Felipe Lorenz [EMAIL PROTECTED] wrote: Hi dudes. I have a problem. Ive try to acess a Web Service, created with Axis 1.4, with my struts aplication. But it throw a java.net.ConnectException: Connection timed out: connect. but, when i execute my class to test the acess of WS without tomcat, etc..., its works. What can be? My libraries: - axis.jar - jaxrpc.jar - commons-discovery-0.2.jar - activation.jar - saaj.jar - wsdl4j-1.5.1.jar ..and Struts 2.0.11.1 Tnks!
Re: [Struts2] Table pagination (paging)?
Yes, displaytag is simple and easy to use On Sun, May 18, 2008 at 6:40 AM, David Canos [EMAIL PROTECTED] wrote: I have never used it, but I have heard good opinions about display tag project. http://displaytag.sourceforge.net/ Take a look at it. 2008/5/18 sol myr [EMAIL PROTECTED]: Hi, What's the Strut2 recommendation for Table Pagination (AKA Paging)? We're showing a large table (say, 500 records) and need to break it down to 25 pages (20 records per page). So we need a widget where users can select a page: page: 1 2 3 4 5 .. 24 25 And then a table showing this page - e.g. page 2 is records 26-50: | record No. | Date | price 26. 27. ... ... ... 50. ... Does struts2 have tags (or design recommendations) for this, either simple or ajax-based? Note we know how to page on the Model side (oracle ROWNUM), we're just not sure how to integrate it with *Struts* UI. Thanks very much, Sollie.
Re: [Struts 2] Simple combobox behaviour
You need eht attribute listKey where you'll put the Person id!!! see: http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/components/Select.html On Thu, May 15, 2008 at 5:19 PM, Milan Milanovic [EMAIL PROTECTED] wrote: Hi, I have simple class Fruit, that have id (long), name (String), and buyers List of Person. In my action class I have Fruit fruit; object with get/set methods. In my jsp I have combo box defined like this: s:select id=buyers labed=Buyer list=buyers name=fruit.buyers emtpyOption=false value = fruit.buyers hedaerKey=none multiple=false/ and when I sumbit form that contain this combo box, it generates following error: 22:16:18,281 ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'fruit.buyers' on class 'com.myproject.actions.FruitAction': Error setting expression 'fruit.buyers' with value '[Ljava.lang.String;@15b4492'
Re: [Struts 2] Simple combobox behaviour
Ok.. if i get your idea... the list yout want to put in combobox is fruit.buyers, hu? Then, try it: s:select id=buyers labed=Buyer list=buyers listValue=personName listKey=personId name=fruit.buyers emtpyOption=false hedaerKey=none/ if you have the object fruit, then: s:select id=buyers labed=Buyer list=fruit.buyers listValue=personName listKey=personId name=fruit.buyers emtpyOption=false hedaerKey=none/ maybe the name is not correct. Try chage the attr name to person, for example. s:select id=buyers labed=Buyer list=fruit.buyers listValue=personName listKey=personId name=person emtpyOption=false hedaerKey=none/ On Thu, May 15, 2008 at 6:05 PM, Milan Milanovic [EMAIL PROTECTED] wrote: When I set listKey=fruit.buyers.id, I get a empty combo box, but with correct number of emtpy spaces (in my case 4) ? -- Thanks, Milan Felipe Lorenz [EMAIL PROTECTED] wrote: You need eht attribute listKey where you'll put the Person id!!! see: http://struts.apache.org/2.x/struts2-core/apidocs/org/apache/struts2/components/Select.html On Thu, May 15, 2008 at 5:19 PM, Milan Milanovic wrote: Hi, I have simple class Fruit, that have id (long), name (String), and buyers List of . In my action class I have Fruit fruit; object with get/set methods. In my jsp I have combo box defined like this: emtpyOption=false value = fruit.buyers hedaerKey=none multiple=false/ and when I sumbit form that contain this combo box, it generates following error: 22:16:18,281 ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 - ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'fruit.buyers' on class 'com.myproject.actions.FruitAction': Error setting expression 'fruit.buyers' with value '[Ljava.lang.String;@15b4492'
Re: Struts Annotation
Yes.. told it in my question... i need to know if have some different way to use one class to implement CRUD methods!! On Wed, May 14, 2008 at 10:08 AM, Ian Roughley [EMAIL PROTECTED] wrote: Results are annotated at the class level, see http://struts.apache.org/2.0.6/docs/annotations.html /Ian Felipe Lorenz wrote: Hi. Im try to use annotations for action results. but, the annotations is for a class, not for each method in an class... fallow this idea, for each CRUD operations i need one actions class??? Or have other way to do one action class for CRUD operations? Felipe A. lorenz www.idealogic.com.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Annotation
Hi. Im try to use annotations for action results. but, the annotations is for a class, not for each method in an class... fallow this idea, for each CRUD operations i need one actions class??? Or have other way to do one action class for CRUD operations? Felipe A. lorenz www.idealogic.com.br
Re: JFreeChart plugin
Hi, did you try put the action (DrawChart_display.action) in HREF attribute of the DIV? I use js to do it! Something like: function refresh() { var div = dojo.widget.byId('#div_id'); div.href = 'DrawChart_display.action' + params_if_have; div.refresh(); } Felipe Augusto Lorenz www.idealogic.com.br On Tue, May 13, 2008 at 5:50 PM, Leena Borle [EMAIL PROTECTED] wrote: Hi, I'm using Tomcat-5.5.25. I found out that, if I include action's url in img src=DrawChart_display.action alt=No Image /, it gets displayed. I am trying to display chart using Remote-Button/Remote-DIV method of S2. Which means when user submits form data, I need to display chart inside a DIV below this form. something like this ... s:form . s:submit value=Draw chart href=%{display_chart} theme=ajax targets=chart_div cssClass=buttons / /s:form div id=chart_div/div /div Any idea how to achieve this without specifying action's URL directly to image tag ? Leena On Tue, May 13, 2008 at 11:45 AM, Randy Burgess [EMAIL PROTECTED] wrote: I used the example code from the documentation on WebLogic 9.2.2 and it ran fine. I built off that example code and now have several actions creating nice 3D pie charts. Which application server are you using? Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications From: Leena Borle [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Tue, 13 May 2008 10:41:57 -0700 To: Struts Users Mailing List user@struts.apache.org Subject: JFreeChart plugin Hello, Has anyone tried out JFreeChart plugin? I am trying to run the sample code available on plugin documentation page. I see all ASCII characters getting printed on my browser screen instead of an image file. Any help is appreciated. Thanks, Leena. This email and any attachments (Message) may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [struts 2] Table question
Hi! To have a composed string you can do it in JSP. Something like: s:select list='fruit' listKey='fruit_id' listValue=${fruit_id} ${fruit_name} / for example. And, for pagination, try displayTag, its easy to use Felipe A. Lorenz www.idealogic.com.br On Tue, May 13, 2008 at 12:00 PM, Milan Milanovic [EMAIL PROTECTED] wrote: Thanks Jim! Could you give me an example for the second thing (pagination) ? I need something simple as you said. For combo box, how can I tell my combobox to retrieve data from list of composed strings (e.g. ListString where I will compose 1 Apple), but when selected to choose in my action class from list of Fruits, e.g. ListFruit, where Fruit have id and name attributes ? -- Thx, Milan Milanovic - Original Message From: Jim Kiley [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, May 13, 2008 3:34:58 PM Subject: Re: [struts 2] Table question I have to admit that in your first instance I would cheat -- I would dummy up a method somewhere on my action class or my POJO that returned the desired string, rather than trying to compose the string within the JSP. I am unfamiliar with the various tags that can be used to display chunks of a table. I know they're out there (the display tag library comes to mind). The most recent time I had to do this I rolled my own; it was pretty painless. I held the data in a List of data objects, and then used List.subList() in my action method to determine the precise chunk of the List that I wanted to show. Hope this helps. jk On Tue, May 13, 2008 at 9:30 AM, Milan Milanovic [EMAIL PROTECTED] wrote: Hi, first I'll ask again my earlier question, is there possibility to show in a combo box two values, for example I want to show id and name of the every fruit: 1 Apple ? The second question is, my struts 2 application on one jsp page will have 5 combo boxes, 4 text boxes, two buttons and two datetime pickers, and below all these controls a table that will show what is entered using controls above. The problem is that my table will have about 100-120 records (rows) to show, and I think that is very much for one jsp page, and also I want user to see about last 10 rows, because he need to see if there is any error. How can I do this, can I use table pagination (how) ? -- Thx in advance, Milan Milanovic -- Jim Kiley Technical Consultant | Summa [p] 412.258.3346 [m] 412.445.1729 http://www.summa-tech.com