RE: change border of field when error comes(Custom CSS)
let me explain your idea works on error message ,it creates border on error messages i am trying something that it chages border of element(textbox,combobox) on which error comes so i am iterating fieldErrors List from valuestack and get its key as elementname and using #s:property value=key/, create dynamically css class corresponding to element id so it automatically detect and apply it thanks Jishnu Viswanath wrote: That's the way you should not do it, I still don't understand what are you doing there, though There is an attribute called cssClass and cssStyle s:fielderror cssClass=className/ style type=text/css . className { border:1px solid #cc; } /style s:fielderror cssStyle=border:1px solid red;/ Try it, it should work, I never tried with fieldError cos I never used it. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Hardik Shah [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2008 4:03 PM To: user@struts.apache.org Subject: Re: change border of field when error comes(Custom CSS) thanks i dont know how to create custom theme for that but i have done manually STYLE type=text/css s:iterator value=fieldErrors #s:property value=key/, /s:iterator { border-color: #FFE6F7; } /STYLE Torsten Krah wrote: Am Donnerstag, 16. Oktober 2008 09:14:19 schrieb Hardik Shah: can anybody gives idea Make a custom theme for your tag you want to get a custom border and add your css definition there. Another solution would be, to use s:if and look in the fielderror List for a failure for your field and if one exists, use a custom css definition. -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. -- Linus Torvalds -- View this message in context: http://www.nabble.com/change-border-of-field-when-error-comes%28Custom-CSS%29-tp20008381p20010973.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] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/change-border-of-field-when-error-comes%28Custom-CSS%29-tp20008381p20027603.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]
How to access actionMessage and actionError in s:component / with freemarker
Hi,all I want to write a custom tag to display s:actionmessage and s:actionerror in different style, so I write some freemarker page like this: @s.if test=%{actionMessages} div class=message @s.actionmessage / /div /@s.if @s.if test=%{actionErrors} div class=errors @s.actionerror / /div /@s.if without the if logic, error messages can display in the right way but with all my hold code as upon, it doesn't work. How I tried ${actionMessages}, #actionMessages and all didn't work. is that a way to judge does actionErrors or actionMessages exists? --- Thanks! Mobile: +086-15864011231 Website:http://www.openmotel.cn http://www.vvthumb.com GTalk:[EMAIL PROTECTED] Skype:saharabear Haulyn Runner Jason
Re: Want to make dropdown (s:select) readonly without making it disabled
May, write yourself define struts2-Tag is good solution. On Fri, Oct 17, 2008 at 1:18 PM, arunabh [EMAIL PROTECTED]wrote: Hi , Thank you for the reply . But the side you reffered me to , they charge money for signing up . And without signing up i can't see the solutions . So could tell me what is the solution for the problem . With Regards Arunabh Kawczynski, David wrote: Try picking one of the suggestions from here: http://www.experts-exchange.com/Programming/Languages/Java/J2EE/JSP/Q_23 689617.html -Original Message- From: arunabh [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2008 10:13 AM To: user@struts.apache.org Subject: Want to make dropdown (s:select) readonly without making it disabled Hi, I'm using struts2. I want to make a drop down (s:select /) as a read only element. If I use disabled attribute the data would be lost upon submission. So I can't use disabled. How do I make it read only without losing the data while submission? Thanks, Arunabh -- View this message in context: http://www.nabble.com/Want-to-make-dropdown-%28%3Cs%3Aselect%3E%29-reado nly-without-making-it-disabled-tp20014436p20014436.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] Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Want-to-make-dropdown-%28%3Cs%3Aselect%3E%29-readonly-without-making-it-disabled-tp20014436p20027257.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] -- BestRegards, Mead http://yayisoft.com Bob Hope - A James Cagney love scene is one where he lets the other guy live.
Re: Is it a bug for s:form tag?
the param like %{id} you shall use s:hidden tag On Thu, Oct 16, 2008 at 5:00 PM, Haulyn Jason [EMAIL PROTECTED] wrote: Hi, all When I use s:form namespace=website action=edit/s:form, everything works well, struts2 generate the html as below: form id=XXX action=/myapp/website/edit/form But when I want to add some parameters, and change the code as:s:form namespace=website action=edit/%{id}/s:form,struts looks lost the namespace param. It generates the html as below: form id=XXX action=edit/123/form When I change the code to s:form action=/website/edit/%{id}/s:form, it generates what I need as below: form id=XXX action=/myapp/website/edit/form Can anybody tell me why struts lost the namespace param? I use Struts2.1.2Beta with codebehind and rest plugin with Apache tomcat 6.0.18, Thanks. --- Thanks! Mobile: +086-15864011231 Website:http://www.openmotel.cn http://www.vvthumb.com GTalk:[EMAIL PROTECTED] [EMAIL PROTECTED] Skype:saharabear Haulyn Runner Jason -- BestRegards, Mead http://yayisoft.com Lewis Mumford - Our national flower is the concrete cloverleaf.
how to use struts.serve.static
hi i have change this property to false and copy static folder in webroot/struts/ but it doesnt work ,i dont know why any body gives me idea? trying to use performance tuning concept in struts docs help me -- View this message in context: http://www.nabble.com/how-to-use-struts.serve.static-tp20027812p20027812.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]
Which is the XML parser used by Struts2
Hi all, How do I find out the name of the DEFAULT SAX parser implementation class used by Struts2? Struts2 picks up the Oracle xml parser from web-inf/lib whenever I place the Oracle's XMLParserv2.jar there, and it fails while parsing. From Tomcat's mailing list I found out that the SAXParserFactory class can be explicitly specified, if I know the SAXParserFactpry class for Struts I probably will be out of the woods. To give you a background of the problem, I am using struts2 and Oracle's XSU in one of our webapps. XSU has a tight dependency on its own XML parser xmlparserv2.jar, when I drop this into the web-inf lib folder, struts2 picks the classes in this jar to do its xml parsing chore instead of picking its own xml parser, and fails. Thanks a lot, Vinay.
Re: Is it a bug for s:form tag?
ok, it works well, but I use the rest plugin, when I want to use delete form, I tried to add an s:hidden but it does not work. I always have to use s:form action=/website/orders/%{id}?_method=delete/s:form. It does not look well. --- Thanks! Mobile: +086-15864011231 Website:http://www.openmotel.cn http://www.vvthumb.com GTalk:[EMAIL PROTECTED] Skype:saharabear Haulyn Runner Jason - Original Message From: Mead Lai [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, October 17, 2008 3:29:50 PM Subject: Re: Is it a bug for s:form tag? the param like %{id} you shall use s:hidden tag On Thu, Oct 16, 2008 at 5:00 PM, Haulyn Jason [EMAIL PROTECTED] wrote: Hi, all When I use s:form namespace=website action=edit/s:form, everything works well, struts2 generate the html as below: form id=XXX action=/myapp/website/edit/form But when I want to add some parameters, and change the code as:s:form namespace=website action=edit/%{id}/s:form,struts looks lost the namespace param. It generates the html as below: form id=XXX action=edit/123/form When I change the code to s:form action=/website/edit/%{id}/s:form, it generates what I need as below: form id=XXX action=/myapp/website/edit/form Can anybody tell me why struts lost the namespace param? I use Struts2.1.2Beta with codebehind and rest plugin with Apache tomcat 6.0.18, Thanks. --- Thanks! Mobile: +086-15864011231 Website:http://www.openmotel.cn http://www.vvthumb.com GTalk:[EMAIL PROTECTED] [EMAIL PROTECTED] Skype:saharabear Haulyn Runner Jason -- BestRegards, Mead http://yayisoft.com Lewis Mumford - Our national flower is the concrete cloverleaf. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: 404 error in struts 2 blank helloworld example in RAD7
Struts 2.0.11.2 has a known issue for running on websphere. Downgrade to struts 2.0.11.1 [That is the one I am currently using with RAD 7.5 and Websphere 6.1.0.19 and it works perfect] or upgrade to build 2.0.12 which is supposed to have fixed the issue [I have not tried it yet] - Original Message From: Tim Jowers [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, October 16, 2008 6:52:23 PM Subject: 404 error in struts 2 blank helloworld example in RAD7 Hi, Has anyone run the struts2-blank-2.0.11.2.war in RAD7/WebSphere? I get 404 on calling an action. First, https://localhost:9444/testo/example/HelloWorld.jsp works. Then the action 404's: https://localhost:9444/testo/example/HelloWorld.action?request_locale=en I validated the HelloWorld.class can be loaded with a JSP scriptlet. Here is the struts.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 constant name=struts.enable.DynamicMethodInvocation value=true / constant name=struts.devMode value=true / package name=example namespace=/example extends=struts-default action name=HelloWorld class=example.HelloWorld result/example/HelloWorld.jsp/result /action action name=* class=example.ExampleSupport result/example/{1}.jsp/result /action /package /struts I know it is being loaded as the jsp is being loaded and if I put in a bogus class name like example.HelloWorld2 then it emits an error message. This is supposed to be simple but I do not see any other logged messages or anything telling me why it is 404. Maybe this has something to do with WebSphere taking over *.action mappings or something.??? Thanks for any insights, Tim Jowers P.S I note the example.ExampleSupport class is never classloaded. Not sure why it was in the example as it seems to be ignored always. Here's the server log: [10/16/08 18:45:53:283 EDT] 000a WsServerImpl A WSVR0001I: Server server1 open for e-business [10/16/08 18:47:17:376 EDT] 0021 ServletWrappe I SRVE0242I: [samj2ee] [/testo] [/example/HelloWorld.jsp]: Initialization successful. [10/16/08 18:47:17:688 EDT] 0021 XmlConfigurat I com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register Parsing configuration file [struts-default.xml] [10/16/08 18:47:17:798 EDT] 0021 XmlConfigurat I com..opensymphony.xwork2.config.providers.XmlConfigurationProvider register Parsing configuration file [struts-plugin.xml] [10/16/08 18:47:17:813 EDT] 0021 XmlConfigurat I com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register Parsing configuration file [struts.xml] [10/16/08 18:47:17:845 EDT] 0021 Settings W org.apache.struts2.config.Settings getLocale Settings: Could not parse struts.locale setting, substituting default VM locale [10/16/08 18:47:17:860 EDT] 0021 DefaultConfig I com.opensymphony.xwork2.config.impl.DefaultConfiguration$ContainerProperties setProperty Overriding property struts.i18n.reload - old value: false new value: true [10/16/08 18:47:17:860 EDT] 0021 DefaultConfig I com.opensymphony.xwork2.config.impl.DefaultConfiguration$ContainerProperties setProperty Overriding property struts.configuration.xml.reload - old value: false new value: true [10/16/08 18:47:18:313 EDT] 0021 ObjectTypeDet I com.opensymphony.xwork2.util.ObjectTypeDeterminerFactory clinit Setting DefaultObjectTypeDeterminer as default ... __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to access actionMessage and actionError in s:component / with freemarker
Hi,all Thanks. I get it. I change my code as follow: #if (actionMessages?size0) div class=message @s.actionmessage / /div /#if Everything works well. I use freemarker syntax. --- Thanks! Mobile: +086-15864011231 Website:http://www.openmotel.cn http://www.vvthumb.com GTalk:[EMAIL PROTECTED] Skype:saharabear Haulyn Runner Jason - Original Message From: Haulyn Jason [EMAIL PROTECTED] To: struts-mail-list user@struts.apache.org Sent: Friday, October 17, 2008 3:12:13 PM Subject: How to access actionMessage and actionError in s:component / with freemarker Hi,all I want to write a custom tag to display s:actionmessage and s:actionerror in different style, so I write some freemarker page like this: @s.if test=%{actionMessages} div class=message @s.actionmessage / /div /@s.if @s.if test=%{actionErrors} div class=errors @s.actionerror / /div /@s.if without the if logic, error messages can display in the right way but with all my hold code as upon, it doesn't work. How I tried ${actionMessages}, #actionMessages and all didn't work. is that a way to judge does actionErrors or actionMessages exists? --- Thanks! Mobile: +086-15864011231 Website:http://www.openmotel.cn http://www.vvthumb.com GTalk:[EMAIL PROTECTED] Skype:saharabear Haulyn Runner Jason __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
How to setup exceptions with zero-configuration?
Hi,all before I use codebehind and rest plugin in struts2.1.2Beta, I can solve exceptions as the follow code: action name=DataAccess class=com.company.DataAccess exception-mapping exception=com.company.SecurityException result=login/ result name=SQLException type=chainSQLExceptionAction/result result/DataAccess.jsp/result /action But,Now I use rest plugin and codebehind, no xml configuration. I know I can setup globle exception in my xml, but how to implement the same functionality as the xml code upon. I tried to find an annotation but failed. Is there another way? --- Thanks! Mobile: +086-15864011231 Website:http://www.openmotel.cn http://www.vvthumb.com GTalk:[EMAIL PROTECTED] Skype:saharabear Haulyn Runner Jason __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Strus2, Freemarker and getting request.getContextPath()
I expect this is probably very easy but I have not seen and description anywhere of how to do it. I currently have this in a Struts2 enabled jsp page: %request.getContextPath()% and need to convert it to freemarker. I have tried the obvious: ${request.contextPath} ${request.getContextPath} and also adding a servlet filter (and when that failed an interceptor) that sets: request.setAttribute(requestObject , request); but the best error I can get is: freemarker.beans - Key 'requestObject' was not found on instance of org.apache.struts2.dispatcher.StrutsRequestWrapper How can I get access to the Request object inside of my Freemarker template when I am using Struts 2? -- View this message in context: http://www.nabble.com/Strus2%2C-Freemarker-and-getting-request.getContextPath%28%29-tp20032062p20032062.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: Strus2, Freemarker and getting request.getContextPath()
--- On Fri, 10/17/08, doahh wrote: How can I get access to the Request object inside of my Freemarker template when I am using Struts 2? http://struts.apache.org/2.x/docs/freemarker-support.html Towards the top, under the Objects in the Context is. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to setup exceptions with zero-configuration?
hI, in your *.struts.xml file ( a subcontext struts configuration file) Define a global mapping to jsp like global-results result name=HandleSqlExceptionAction../Error.jsp/result /global-results map the exception to the global mapping defined above global-exception-mappings exception-mapping exception=java.sql.SQLException result=HandleSqlExceptionAction/ /global-exception-mappings Note : I have kept this is in one of the sub context struts configuration file which gets included in the struts.xml. YOu can put this in struts.xml and try it ou hope that helps -- View this message in context: http://www.nabble.com/How-to-setup-exceptions-with-zero-configuration--tp20031565p20032460.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]
FilterDispatcher - ContentType not set, how to set in to text/html?
Hi. You can configure the action to set the result type to e.g. plain text ( http://struts.apache.org/2.x/docs/result-types.html). How to tell the action, its content type is text/html? I am calling my action action name=registerStatic class=com.opensymphony.xwork2.ActionSupport result name=success/WEB-INF/view/consumer/register.jsp/result result name=input/WEB-INF/view/consumer/register.jsp/result /action and the http header misses the contentType. I am using struts-2.0.11.2. -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. -- Linus Torvalds smime.p7s Description: S/MIME cryptographic signature
How to handle different div's and 1 or more ActionForms
Hello, I have an application with 2 buttons. Each button hides/shows a div. In each div I want to use the same ActionForm, but different Actions. Maybe this can't be done, but I also have problems using a different ActionForm for each div. A short overview: - my initial jsp looks like this: ... script language=javascript type=text/javascript //![CDATA[ function startCompleteOrder() { setVisible('completeOrderPopup'); runAjax(url, 'completeOrderPopup'); } function startChangeStatus() { setVisible('changeStatusPopup'); runAjax(url, 'changeStatusPopup'); } //]] /script ... div id=completeOrderPopup class=popup [EMAIL PROTECTED] file=completeOrder.jsp% /div div id=changeStatusPopup class=popup [EMAIL PROTECTED] file=changeStatus.jsp% /div input class=dataButton id=changeStatusBtn type=button value=Change status onclick=startChangeStatus(); / input class=dataButton id=completeOrderBtn type=button value=Complete order onclick=startCompleteOrder(); / ... - completeOrder.jsp looks like this: jsp:include page=heading.jsp flush=true / %@ taglib uri=struts-bean prefix=bean % %@ taglib uri=struts-html prefix=html % %@ taglib uri=struts-logic prefix=logic % %@ taglib uri=taglib prefix=tag % html:form styleId=statusForm action=saveCompleteOrder.do html:hidden name=statusForm property=barCode styleId=barCode / ... /html:form - changeStatus.jsp looks like this: jsp:include page=heading.jsp flush=true / %@ taglib uri=struts-bean prefix=bean % %@ taglib uri=struts-html prefix=html % %@ taglib uri=struts-logic prefix=logic % %@ taglib uri=taglib prefix=tag % html:form styleId=statusForm action=saveStatusChange.do html:hidden name=P080576_changeStatusForm property=barCode styleId=changeStatusBarCode / ... /html:form If I run my application, it sometimes works for changeStatus, sometimes for completeOrder and sometimes for both. But I want it to work always... How can I use the same ActionForm (or different ActionForms) in multiple divs? Thanks! -- View this message in context: http://www.nabble.com/How-to-handle-different-div%27s-and-1-or-more-ActionForms-tp20032791p20032791.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]
trimming request parameters in struts 2
Hi, I would like to set up struts 2 so that all request parameters are trimmed (leading and trailing whitespace removed) when the parameters are bound to the action. I sort of expected this to be the default behavior, but I'm finding it is not (struts 2.0.11). I looked around to see if maybe there's an interceptor you could configure to do this but so far, I haven't found one. Am I missing something? Thanks, -Adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Want to make dropdown (s:select) readonly without making it disabled
I forgot, my corp pays for me. Sorry about that. Here are some suggestions from that page: - while loading file, create one hidden input type[field] and assign dropdown selected value to this hidden input type. When you will submit the page, extract value from this hidden filed - restore back to original value when user try to change select name=s1 onchange=restoreOld(this);return false; ... /select input type=hidden name=s1_old id=s1_old value=s1's value script language=javascript function restoreOld(sObj){ sObj.selectedIndex=document.getElementById(s1_old).value; } /script -Original Message- From: arunabh [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2008 1:19 AM To: user@struts.apache.org Subject: RE: Want to make dropdown (s:select) readonly without making it disabled Hi , Thank you for the reply . But the side you reffered me to , they charge money for signing up . And without signing up i can't see the solutions . So could tell me what is the solution for the problem . With Regards Arunabh Kawczynski, David wrote: Try picking one of the suggestions from here: http://www.experts-exchange.com/Programming/Languages/Java/J2EE/JSP/Q_23 689617.html -Original Message- From: arunabh [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2008 10:13 AM To: user@struts.apache.org Subject: Want to make dropdown (s:select) readonly without making it disabled Hi, I'm using struts2. I want to make a drop down (s:select /) as a read only element. If I use disabled attribute the data would be lost upon submission. So I can't use disabled. How do I make it read only without losing the data while submission? Thanks, Arunabh -- View this message in context: http://www.nabble.com/Want-to-make-dropdown-%28%3Cs%3Aselect%3E%29-reado nly-without-making-it-disabled-tp20014436p20014436.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] Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Want-to-make-dropdown-%28%3Cs%3Aselect%3E%29-reado nly-without-making-it-disabled-tp20014436p20027257.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] Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FilterDispatcher - ContentType not set, how to set in to text/html?
--- On Fri, 10/17/08, Torsten Krah wrote: Answering to myself - although i am confused that this is not the default when delivering jsps: AFAIK it is; I've never had to set the content type. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: FilterDispatcher - ContentType not set, how to set in to text/html?
Am Freitag, 17. Oktober 2008 15:33:24 schrieb Dave Newton: AFAIK it is; I've never had to set the content type. I am running my struts2 war in Pluto 1.1.6 (Tomcat 5.5.x) and Liferay 5.1.x (JBoss 4). Portlet Actions are working fine (because the container sets the stuff). But running Actions through the FilterDispatcher results in a missing contentType header. -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. -- Linus Torvalds smime.p7s Description: S/MIME cryptographic signature
[S2] grabbing current URL in an interceptor
Is it possible, inside an interceptor, to grab the URL of the current request? The typical scenario for why I would like to be able to do that: 1) A user is about to perform MyRestrictedAction, but (say) the user lacks authentication for that particular action. 2) CheckUserAuthenticatedInterceptor butts in and throws a UserNotAuthenticatedException which (globally-)redirects to some Login page. (Both the UserNotAuthenticatedException and the LoginAction classes are TargetAware, that is, they can be told about the ultimate target of this temporary interception of the normal flow.) 3) On successful login, the (TargetAware) LoginAction redirects to action MyRestrictedAction, to resume where we left off. To make that seamless, it would be necessary, in step 2, for the CheckUserAuthenticatedInterceptor to record the current URL... Suggestions? (I am assuming that a possible answer will involve chaining in a clever way invocation.getActionContext().getSomethingOrOther().getUri(), and then there will be headachy questions about the parameters, etc.)
Re: FilterDispatcher - ContentType not set, how to set in to text/html?
Am Freitag, 17. Oktober 2008 14:57:23 schrieb Torsten Krah: How to tell the action, its content type is text/html? Answering to myself - although i am confused that this is not the default when delivering jsps: ... extends ActionSupport implements ServletResponseAware ... ... response.setContentType(text/html); ... -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. -- Linus Torvalds smime.p7s Description: S/MIME cryptographic signature
Re: [S2] grabbing current URL in an interceptor
Am Freitag, 17. Oktober 2008 15:53:03 schrieb Pierre Thibaudeau: Suggestions? Yes but more to your question. Instead of the uri, the action name, method and namespace called would be better. In this way the same can be applied to portlets too. So i would like to enhance your original thread question. -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. -- Linus Torvalds smime.p7s Description: S/MIME cryptographic signature
Re: trimming request parameters in struts 2
Am Freitag, 17. Oktober 2008 15:22:43 schrieb Adam Lister: Am I missing something? Write your own one which does that and add it to your stack. -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. -- Linus Torvalds smime.p7s Description: S/MIME cryptographic signature
row selection using dojo from Struts 2.1.2
How would you use dojo to know what row was selected in a displaytag collection? I have this working with javascript and Firefox, of course ie does this differently. I would like to use dojo for cross browser compatibility issues (among other things). I did not see this functionality demonstrated in the showcase example from Struts 2.1.2. -- View this message in context: http://www.nabble.com/row-selection-using-dojo-from-Struts-2.1.2-tp20034185p20034185.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: FilterDispatcher - ContentType not set, how to set in to text/html?
you can configure fileUpload Interceptor to allow these predefined types http://cwiki.apache.org/WW/file-upload-interceptor.html interceptor-ref name=fileUpload param name=allowedTypes image/png,image/gif,image/jpeg /param /interceptor-ref http://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/dispatcher/FilterDispatcher.html If there is a reason for supporting setContentType method in FilterDispatcher then suggest the reasons in JIRA https://issues.apache.org/struts/secure/IssueNavigator.jspa?reset=truepid=10030fixfor=21861 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: Fri, 17 Oct 2008 06:33:24 -0700 From: [EMAIL PROTECTED] Subject: Re: FilterDispatcher - ContentType not set, how to set in to text/html? To: user@struts.apache.org --- On Fri, 10/17/08, Torsten Krah wrote: Answering to myself - although i am confused that this is not the default when delivering jsps: AFAIK it is; I've never had to set the content type. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Stay organized with simple drag and drop from Windows Live Hotmail. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_102008
DefaultErrorHandler.jspError
Hi, I have setup same version of java on linux also. JDk 1.5 Tomcat 5.5 Struts1.2.8 Even then the struts are not recognized. Sample struts applications also not working in linux system. struts-exercise-taglib servlets-examples I get similar error -Original Message- From: Raghu [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2008 7:51 PM To: user@struts.apache.org Subject: org.apache.jasper.JasperException: File /tags/struts-logic I have struts application running in windows-xp., jdk1.5, apache-tomcat-5.5 I moved the same application to linux, jdk1.6.0-10, and apache-tomcat 5.5.26 I am getting following error on linux system. HTTP Status 500 - description : The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: File /tags/struts-logic not found at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler. java:105). Any thoughts on this error. Is the problem because of using different java versions on linux and windows? Regards, Raghu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trimming request parameters in struts 2
Yes, I could write my own request filter that does this, but I was sort of hoping there'd be something in the framework that could do it for me, as other web frameworks that I've used in the past have offered this functionality, and it seems to be something that people would fairly commonly want to do. I just wanted to check first to make sure that there was no way to do it via configuration of struts 2. Thanks, -Adam Torsten Krah wrote: Am Freitag, 17. Oktober 2008 15:22:43 schrieb Adam Lister: Am I missing something? Write your own one which does that and add it to your stack. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] grabbing current URL in an interceptor
Instead of the uri, the action name, method and namespace called would be better. In this way the same can be applied to portlets too. So i would like to enhance your original thread question. I belive this can be obtained from the action invocation. Nils-H - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: trimming request parameters in struts 2
Hi Adam, I vaguely believe that what you are looking for can be found, not among interceptors, but among converters. (Isn't there a trim flag, somewhere?) Sorry for the vague answer, but I hope it can steer you in the right general direction! 2008/10/17 Adam Lister [EMAIL PROTECTED] Yes, I could write my own request filter that does this, but I was sort of hoping there'd be something in the framework that could do it for me, as other web frameworks that I've used in the past have offered this functionality, and it seems to be something that people would fairly commonly want to do. I just wanted to check first to make sure that there was no way to do it via configuration of struts 2.
Re: FilterDispatcher - ContentType not set, how to set in to text/html?
Am Freitag, 17. Oktober 2008 16:18:27 schrieb Martin Gainty: you can configure fileUpload Interceptor to allow these predefined types Its not a upload problem. I am delivering a simple jsp page with more or less static html and there is no content type set. I don't want a method at the FilterDispatcher to set it, but i wonder why it gets not set (maybe some portlet - servlet problem, as it seems people who are using only the FilterDispatcher does not have this problem ... ). -- Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge. Siehe http://www.gnu.org/philosophy/no-word-attachments.de.html Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. -- Linus Torvalds smime.p7s Description: S/MIME cryptographic signature
Re: Strus2, Freemarker and getting request.getContextPath()
Thanks for the reply, I am sure I am being dumb but I haven't had any luck in getting them working. I have tried: ${req} ${#req} %{req} %{#req} can you give an example of the correct syntax please? -- View this message in context: http://www.nabble.com/Re%3A-Strus2%2C-Freemarker-and-getting-request.getContextPath%28%29-tp20032257p20035357.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: 404 error in struts 2 blank helloworld example in RAD7
Thanks for the feedback. Wow. i would NEVER have expected so much problems from sub-releases of the libs. I'm trying it in Tomcat 5.5. the lib versioning problems there are a big mess too. I first tried my files from the RAD7/WebSphere and had the same failures. Then I unjarred struts-2.0.11-all.jar and copied the libs to Tomcat5.5/shared/lib. Then i copied the .war examples to Tomcat5.5/webapps. They loaded and worked. Hooray! The other example still did not. But wait When I restart Tomcat5.5. it fails. What gives? The libs I had on WebSphere work but the ones from struts-2.0.11-all.jar do not! Oct 17, 2008 11:06:08 AM com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register INFO: Parsing configuration file [struts-default.xml] Oct 17, 2008 11:06:08 AM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Oct 17, 2008 11:06:08 AM org.apache.catalina.core.StandardContext start SEVERE: Context [/hellostruts] startup failed due to previous errors Here's what i have from WebSphere/before and what works: C:\svnviews\cb35\CORP_BANK_SRC\builddir /b C:\Tomcat5.5\webapps\hellostruts\WEB -INF\lib freemarker-2.3.8.jar ognl-2.6.11.jar struts-core-1.3.5.jar struts2-codebehind-plugin-2.0.11.jar struts2-config-browser-plugin-2.0.11.jar struts2-core-2.0.11.jar xwork-2.0.4.jar The all match what is in the struts-2.0.11-all.jar. struts-2.0.11-all.jar also has some additional .jar files and looks like these break loading the webapp .war files onto tomcat5.5. So, I do have a working configuration for tomcat5.5. Now for WebSphere/Rad7. WebSphere does not give an error message but does load the .jsp but just not the .action. This must be a websphere configuration issue or an issue with conflicting .jars. i'll continue to investigate. Thanks for your help, TimJowers On Fri, Oct 17, 2008 at 6:09 AM, Struts Two [EMAIL PROTECTED] wrote: Struts 2.0.11.2 has a known issue for running on websphere. Downgrade to struts 2.0.11.1 [That is the one I am currently using with RAD 7.5 and Websphere 6.1.0.19 and it works perfect] or upgrade to build 2.0.12 which is supposed to have fixed the issue [I have not tried it yet] - Original Message From: Tim Jowers [EMAIL PROTECTED] To: user@struts.apache.org Sent: Thursday, October 16, 2008 6:52:23 PM Subject: 404 error in struts 2 blank helloworld example in RAD7 Hi, Has anyone run the struts2-blank-2.0.11.2.war in RAD7/WebSphere? I get 404 on calling an action. First, https://localhost:9444/testo/example/HelloWorld.jsp works. Then the action 404's: https://localhost:9444/testo/example/HelloWorld.action?request_locale=en I validated the HelloWorld.class can be loaded with a JSP scriptlet. Here is the struts.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 constant name=struts.enable.DynamicMethodInvocation value=true / constant name=struts.devMode value=true / package name=example namespace=/example extends=struts-default action name=HelloWorld class=example.HelloWorld result/example/HelloWorld.jsp/result /action action name=* class=example.ExampleSupport result/example/{1}.jsp/result /action /package /struts I know it is being loaded as the jsp is being loaded and if I put in a bogus class name like example.HelloWorld2 then it emits an error message. This is supposed to be simple but I do not see any other logged messages or anything telling me why it is 404. Maybe this has something to do with WebSphere taking over *.action mappings or something.??? Thanks for any insights, Tim Jowers P.S I note the example.ExampleSupport class is never classloaded. Not sure why it was in the example as it seems to be ignored always. Here's the server log: [10/16/08 18:45:53:283 EDT] 000a WsServerImpl A WSVR0001I: Server server1 open for e-business [10/16/08 18:47:17:376 EDT] 0021 ServletWrappe I SRVE0242I: [samj2ee] [/testo] [/example/HelloWorld.jsp]: Initialization successful. [10/16/08 18:47:17:688 EDT] 0021 XmlConfigurat I com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register Parsing configuration file [struts-default.xml] [10/16/08 18:47:17:798 EDT] 0021 XmlConfigurat I com..opensymphony.xwork2.config.providers.XmlConfigurationProvider register Parsing configuration file [struts-plugin.xml] [10/16/08 18:47:17:813 EDT] 0021 XmlConfigurat I com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register Parsing configuration file [struts.xml] [10/16/08 18:47:17:845 EDT] 0021 Settings W org.apache.struts2.config.Settings getLocale Settings: Could not parse struts.locale setting, substituting default VM locale [10/16/08 18:47:17:860 EDT] 0021 DefaultConfig I
how to transfer element between two list boxes ?
Hi, I am using struts1.2.9 I have a jsp file that has two list boxes : html:form action=transfertoDB html:select property=menu size=10 html:option value=--SELECT--/html:option html:options collection=menuList1 property=value labelProperty=label / /html:select html:select property=menu size=10 html:option value=--SELECT--/html:option html:options collection=menuList2 property=value labelProperty=label / /html:select /html:form I have two questions : 1) I hard coded the size of the lists to 10,How to make the size dynamic? 2) I would like to transfer element between the two lists . Thank you , your help is appreciated. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Strus2, Freemarker and getting request.getContextPath()
%{#request} That should get you the request context, as stated in: http://struts.apache.org/2.x/docs/ognl.html doahh wrote: Thanks for the reply, I am sure I am being dumb but I haven't had any luck in getting them working. I have tried: ${req} ${#req} %{req} %{#req} can you give an example of the correct syntax please? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2+YUI
HI All, DO any one have any clue about this probelm...??? i am really stuck here. On Thu, Oct 16, 2008 at 3:33 PM, shekher awasthi [EMAIL PROTECTED]wrote: Hi All, I am trying to integrate struts2 with YUI ,but facing some problems with this. I want that when my action get called by YUI it must return a arrayList of string which i must be able to handle using the YUI. For this i took the help of example from YUI site and able to hit the action but my problem is that how can i get the access to the arraylist which my action is populating when its execute methos is called .below i m pasting the code from my action calss as well as the YUI code. Plaese let me know how can i get this arraylist in my YUI code * YUI CODE* div id=container/div script type=text/javascript language=javascript var div = document.getElementById('container'); var handleSuccess = function(o){ alert(pass); if(o.responseText !== undefined){ alert(test11); div.innerHTML = liTransaction id: + o.tId + /li; div.innerHTML += liHTTP status: + o.status + /li; div.innerHTML += liStatus code message: + o.statusText + /li; div.innerHTML += liHTTP headers: ul + o.getAllResponseHeaders + /ul/li; div.innerHTML += liServer response: + o.getList().toString + /li; div.innerHTML += liArgument object: Object ( [foo] = + o.argument.foo + [bar] = + o.argument.bar + )/li; } } var handleFailure = function(o){ alert(fail); YAHOO.log(The failure handler was called. tId: + o.tId + ., info, example); if(o.responseText !== undefined){ div.innerHTML = ulliTransaction id: + o.tId + /li; div.innerHTML += liHTTP status: + o.status + /li; div.innerHTML += liStatus code message: + o.statusText + /li/ul; } } var callback = { success:handleSuccess, failure:handleFailure, argument: { foo:foo, bar:bar } }; var sUrl = YUITestAction.action; function makeRequest(){ alert(test); var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); } /script *MY ACTION CLASS* public class YUITestAction extends ActionSupport{ /** * */ private static final long serialVersionUID = 1926031204500756104L; ArrayListString list=new ArrayListString(); public String execute() throws Exception{ System.out.println(inside the execute method); return SUCCESS; } public ArrayListString getList(){ list.add(test1); list.add(test2); list.add(aum); list.add(arun); list.add(mannu); list.add(umesh); return list; } } any help in this regard is much appricaited --shekher
Re: Struts2+YUI
I am not a YUI guy, but I'm assuming YUI is expecting a javascript array of string. What does your struts.xml look like? What have you defined for the SUCCESS result? Is it a jsp? If it is a jsp, you should make the jsp write out the array as YUI is expecting it. The jsp will have access to what is in your action via the standard struts tags. Another option is to use a stream result and stream the javascript fragment directly from the action class. Ultimately your action must probably produce something like [foo, bar, whatever] as it's response. You can test this by first hitting the action directly with your browser. aum strut wrote: HI All, DO any one have any clue about this probelm...??? i am really stuck here. On Thu, Oct 16, 2008 at 3:33 PM, shekher awasthi [EMAIL PROTECTED]wrote: Hi All, I am trying to integrate struts2 with YUI ,but facing some problems with this. I want that when my action get called by YUI it must return a arrayList of string which i must be able to handle using the YUI. For this i took the help of example from YUI site and able to hit the action but my problem is that how can i get the access to the arraylist which my action is populating when its execute methos is called .below i m pasting the code from my action calss as well as the YUI code. Plaese let me know how can i get this arraylist in my YUI code * YUI CODE* div id=container/div script type=text/javascript language=javascript var div = document.getElementById('container'); var handleSuccess = function(o){ alert(pass); if(o.responseText !== undefined){ alert(test11); div.innerHTML = liTransaction id: + o.tId + /li; div.innerHTML += liHTTP status: + o.status + /li; div.innerHTML += liStatus code message: + o.statusText + /li; div.innerHTML += liHTTP headers: ul + o.getAllResponseHeaders + /ul/li; div.innerHTML += liServer response: + o.getList().toString + /li; div.innerHTML += liArgument object: Object ( [foo] = + o.argument.foo + [bar] = + o.argument.bar + )/li; } } var handleFailure = function(o){ alert(fail); YAHOO.log(The failure handler was called. tId: + o.tId + ., info, example); if(o.responseText !== undefined){ div.innerHTML = ulliTransaction id: + o.tId + /li; div.innerHTML += liHTTP status: + o.status + /li; div.innerHTML += liStatus code message: + o.statusText + /li/ul; } } var callback = { success:handleSuccess, failure:handleFailure, argument: { foo:foo, bar:bar } }; var sUrl = YUITestAction.action; function makeRequest(){ alert(test); var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); } /script *MY ACTION CLASS* public class YUITestAction extends ActionSupport{ /** * */ private static final long serialVersionUID = 1926031204500756104L; ArrayListString list=new ArrayListString(); public String execute() throws Exception{ System.out.println(inside the execute method); return SUCCESS; } public ArrayListString getList(){ list.add(test1); list.add(test2); list.add(aum); list.add(arun); list.add(mannu); list.add(umesh); return list; } } any help in this regard is much appricaited --shekher - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Session timeout - SOLVED
I've done it using an interceptor and it works properly. Thanks all! From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: RE: Session timeout Date: Thu, 16 Oct 2008 12:12:08 -0400 your web.xml contains a session-timeout parameter set e.g. session-config session-timeout30/session-timeout /session-config from my understanding..regular catalina SSL or non-SSL connector has no ability to understand events you may want to look at implementing NIOConnector which will throw RetryRequest for Continuation.getEvent() calls http://www.mortbay.org/jetty/jetty-6/apidocs/org/mortbay/jetty/nio/SelectChannelConnector.html This is extremely beta so caveat emptor make sure you specify an unused port for %SomeUnusedPort% Connector port=%SomeUnusedPort% useSendfile=true useExecutor=true acceptorThreadCount=1 pollerThreadCount=1 pollerThreadPriority=java.lang.Thread#NORM_PRIORITY selectorTimeout=1000 useComet=true prcessCache=200 socket.directBuffer=false socket.rxBufSize=25188 socket.txBufSize=43800 socket.appReadBufSize=8192 socket.appWriteBufSize=8192 socket.bufferPool=500 socket.bufferPoolSize=1 socket.processorCache=500 socket.keyCache=500 socket.eventCache=500 socket.tcpNoDelay=false socket.soKeepAlive=true socket.soTimeout=5000 protocol=org.apache.coyote.http11.Http11NioProtocol maxThreads=150 connectionTimeout=6 redirectPort=8443 / HTH 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. From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: Session timeout Date: Thu, 16 Oct 2008 15:31:02 + Hi, How can I check if my session is timed out and redirect then to the login page? Regards, Paco _ Llega la nueva temporada. Consulta las nuevas tendencias en MSN Estilo http://estilo.es.msn.com/moda/ _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008 _ ¿Sigue el calor? Consulta MSN El tiempo http://eltiempo.es.msn.com/
RE: Session timeout - SOLVED
Francisco- Not clear how an interceptor can solve this..how does interceptor solve reception of timeout 'event's? Thanks, 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. From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: RE: Session timeout - SOLVED Date: Fri, 17 Oct 2008 16:48:05 + I've done it using an interceptor and it works properly. Thanks all! From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: RE: Session timeout Date: Thu, 16 Oct 2008 12:12:08 -0400 your web.xml contains a session-timeout parameter set e.g. session-config session-timeout30/session-timeout /session-config from my understanding..regular catalina SSL or non-SSL connector has no ability to understand events you may want to look at implementing NIOConnector which will throw RetryRequest for Continuation.getEvent() calls http://www.mortbay.org/jetty/jetty-6/apidocs/org/mortbay/jetty/nio/SelectChannelConnector.html This is extremely beta so caveat emptor make sure you specify an unused port for %SomeUnusedPort% Connector port=%SomeUnusedPort% useSendfile=true useExecutor=true acceptorThreadCount=1 pollerThreadCount=1 pollerThreadPriority=java.lang.Thread#NORM_PRIORITY selectorTimeout=1000 useComet=true prcessCache=200 socket.directBuffer=false socket.rxBufSize=25188 socket.txBufSize=43800 socket.appReadBufSize=8192 socket.appWriteBufSize=8192 socket.bufferPool=500 socket.bufferPoolSize=1 socket.processorCache=500 socket.keyCache=500 socket.eventCache=500 socket.tcpNoDelay=false socket.soKeepAlive=true socket.soTimeout=5000 protocol=org.apache.coyote.http11.Http11NioProtocol maxThreads=150 connectionTimeout=6 redirectPort=8443 / HTH 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. From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: Session timeout Date: Thu, 16 Oct 2008 15:31:02 + Hi, How can I check if my session is timed out and redirect then to the login page? Regards, Paco _ Llega la nueva temporada. Consulta las nuevas tendencias en MSN Estilo http://estilo.es.msn.com/moda/ _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008 _ ¿Sigue el calor? Consulta MSN El tiempo http://eltiempo.es.msn.com/ _ When your life is on the go—take your life with you. http://clk.atdmt.com/MRT/go/115298558/direct/01/
Re: Strus2, Freemarker and getting request.getContextPath()
Thanks again for the reply, it didn't work for me but I managed to get it thanks to the documentation you pointed me towards. I got it through: ${action.servletResponseFromActionContext.contextPath} where 'servletResponseFromActionContext' is a method 'getServletResponseFromActionContext' of my action that returns the real HttpServletRequest object. My method is: public HttpServletResponse getServletResponseFromActionContext(){ ActionContext actionContext = ActionContext.getContext(); final HttpServletResponse response = (HttpServletResponse) actionContext.get(StrutsStatics.HTTP_RESPONSE); return response; } and your action must implement 'ServletResponseAware'. I have no idea why the mehtod you gave doesn't work for me but I always got the string printed out as plain text - odd as obviously I can use the 'action' parameter OK (I can also use the 'struts' parameter). -- View this message in context: http://www.nabble.com/Re%3A-Strus2%2C-Freemarker-and-getting-request.getContextPath%28%29-tp20032257p20037248.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 to transfer element between two list boxes ?
--- On Fri, 10/17/08, A. Lotfi wrote: html:form action=transfertoDB html:select property=menu size=10 html:option value=--SELECT--/html:option html:options collection=menuList1 property=value labelProperty=label / [...] I have two questions : 1) I hard coded the size of the lists to 10,How to make the size dynamic? Use JSP EL: html:select property=menu size=${theSize} 2) I would like to transfer element between the two lists. Not a Struts question; that's JavaScript. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strus2, Freemarker and getting request.getContextPath()
--- On Fri, 10/17/08, doahh wrote: I have no idea why the mehtod you gave doesn't work for me [...] Because he provided JSP syntax (more accurate the OGNL syntax inside an S2 property tag in either JSP or FreeMarker). A plain %{expression} inside FreeMarker, IIRC, would be meaningless. Another FreeMarker page at [1] provides different names for the scopes; I don't know why the two docs aren't the same, or which is correct. You should also be able to access the values via the OGNL syntax inside an @s.property... FreeMarker tag. Dave [1] http://struts.apache.org/2.x/docs/freemarker.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] grabbing current URL in an interceptor
Instead of the uri, the action name, method and namespace called would be better. In this way the same can be applied to portlets too. So i would like to enhance your original thread question. I belive this can be obtained from the action invocation. I believe so too, but I would love to see some specifics... For instance: invocation.getInvocationContext().getContextMap() yields the contextMap, but then what? I suppose somewhere in the contextMap are the various bits of information I am interested in, but which are they and how do I piece them together?
Re: 404 error in struts 2 blank helloworld example in RAD7
So, I do have a working configuration for tomcat5.5. Now for WebSphere/Rad7. WebSphere does not give an error message but does load the .jsp but just not the .action. This must be a websphere configuration issue or an issue with conflicting .jars. i'll continue to investigate. Before you run struts 2 on Websphere, make sure you set the following property through websphere admin console: Application servers server1 Web container Custom Properties com.ibm.ws.webcontainer.invokefilterscompatibility == true My assumption is you are also running Struts 2.0.11.1 as my current project is based on this release, and I have not been experiencing any problems of any sort. Bear in mind if you are using struts 2.1.2 Beta version you may still experience problem running urls that end with .action directly from browser url address. I had this issue before 2.1.2 goes to beta and there is a JIRA still open for this. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 404 error in struts 2 blank helloworld example in RAD7
http://www-01.ibm.com/support/docview.wss?uid=swg1PK33090 if JSF cant locate a .JS there should not be any special algorithms or manipulations to handle the 404 The problem is with JSF not locating the .js file (even though the resource is located by other means later on) I'm going to ping the JSF folks to see if they have a fix .. anyone else? 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: Fri, 17 Oct 2008 11:01:43 -0700 From: [EMAIL PROTECTED] Subject: Re: 404 error in struts 2 blank helloworld example in RAD7 To: user@struts.apache.org So, I do have a working configuration for tomcat5.5. Now for WebSphere/Rad7. WebSphere does not give an error message but does load the .jsp but just not the .action. This must be a websphere configuration issue or an issue with conflicting .jars. i'll continue to investigate. Before you run struts 2 on Websphere, make sure you set the following property through websphere admin console: Application servers server1 Web container Custom Properties com.ibm.ws.webcontainer.invokefilterscompatibility == true My assumption is you are also running Struts 2.0.11.1 as my current project is based on this release, and I have not been experiencing any problems of any sort. Bear in mind if you are using struts 2.1.2 Beta version you may still experience problem running urls that end with .action directly from browser url address. I had this issue before 2.1.2 goes to beta and there is a JIRA still open for this. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008
RE: 404 error in struts 2 blank helloworld example in RAD7
--- On Fri, 10/17/08, Martin Gainty wrote: if JSF cant locate a .JS there should not be any special algorithms or manipulations to handle the 404 The problem is with JSF not locating the .js file (even though the resource is located by other means later on) I'm going to ping the JSF folks to see if they have a fix .. anyone else? Yeah; what does this have to do with JSF? This is a known, documented, and AFAIK fixable RAD7 issue and I don't recall seeing anything about JSF in the thread. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 404 error in struts 2 blank helloworld example in RAD7
the workaround https://issues.apache.org/jira/browse/TAP5-222 is to override HTTPServletRequest getPath() method as @Override public String getPath() { //Websphere returns the path in the getPathInfo() String path = request.getPathInfo(); //path == null so no Websphere if (path == null) { return super.getPath(); } //TODO find out if this is necessary if (path.length() == 0) { path = /; } HTH 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. From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: RE: 404 error in struts 2 blank helloworld example in RAD7 Date: Fri, 17 Oct 2008 14:48:36 -0400 http://www-01.ibm.com/support/docview.wss?uid=swg1PK33090 if JSF cant locate a .JS there should not be any special algorithms or manipulations to handle the 404 The problem is with JSF not locating the .js file (even though the resource is located by other means later on) I'm going to ping the JSF folks to see if they have a fix .. anyone else? 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: Fri, 17 Oct 2008 11:01:43 -0700 From: [EMAIL PROTECTED] Subject: Re: 404 error in struts 2 blank helloworld example in RAD7 To: user@struts.apache.org So, I do have a working configuration for tomcat5.5. Now for WebSphere/Rad7. WebSphere does not give an error message but does load the .jsp but just not the .action. This must be a websphere configuration issue or an issue with conflicting .jars. i'll continue to investigate. Before you run struts 2 on Websphere, make sure you set the following property through websphere admin console: Application servers server1 Web container Custom Properties com.ibm.ws.webcontainer.invokefilterscompatibility == true My assumption is you are also running Struts 2.0.11.1 as my current project is based on this release, and I have not been experiencing any problems of any sort. Bear in mind if you are using struts 2.1.2 Beta version you may still experience problem running urls that end with .action directly from browser url address. I had this issue before 2.1.2 goes to beta and there is a JIRA still open for this. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Want to read Hotmail messages in Outlook? The Wordsmiths show you how. Learn Now _ You live life beyond your PC. So now Windows goes beyond your PC. http://clk.atdmt.com/MRT/go/115298556/direct/01/
Re: dynamic action in form
It worked out.. Thank you! Laurie Harper wrote: styl9090 wrote: Hi, I am using struts 2 in my current project. How can I write the action dynamically in my JSP form tag? Here is the example: This case, I have my form action is in session. s:form name=sampleForm action= I have tried using below, which didn't work: s:form name=openForm action=%{session.action_name} Assuming the action attribute is evaluated, it would be %{#session (notice the '#'). L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/dynamic-action-in-form-tp20001478p20039684.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]
Struts 2 session in Weblogic 10.0
Hi guys, I'm having some trouble with a session variable not being saved in Weblogic 10. I'm tracking the login of a user by allowing my login class to implement sessionAware, and putting a key/value pair into the session upon successful login. This works just fine testing in Tomcat 5.5, but Weblogic does not seem to store the session variable at all (session has a size of 0 after login). Has anyone run into this problem using Weblogic 10 where your session variables do not get stored properly in Struts 2? Thanks!
Re: Tons of Could not find property messages - log4j is not helping?
Is there a way to determine which logging properties need to be configured to remove / change all of the struts logging? I haven't seen a confluence page on that topic yet. i.e., if I wanted to set the whole logging level for all of struts2 to ERROR, how would I find the property names to set? Thanks, John Miguel wrote: Hi!, if you want to silence those annoing messages try the following logger: log4j.logger.com.opensymphony.xwork2.ognl.OgnlValueStack if you were using a properties file log4j.logger.com.opensymphony.xwork2.ognl.OgnlValueStack=NONE, stdout with the xml should be something similar. Have a good day Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco S. On Thu, Oct 2, 2008 at 17:19, Dave Belfer-Shevett [EMAIL PROTECTED] wrote: I saw another thread about this already, and the suggestions were to turn off dev mode (I'm not running devmode), or to filter them out in my logging mechanism. I have log4j.xml in my .war file, and I use it to control logging in all my classes, but I can't find the right magical incantation to turn this one off. Currently I'm using: category name=com.opensymphony.xwork2.util.logging.commons.CommonsLogger priority value=ERROR/ /category but that is doing nothing (i've tried various incantaions on the name line, none have any effect). Help please? -- ---..---. Dave Belfer-Shevett \ KB1FWR \ JID: [EMAIL PROTECTED] \ blog:planet-geek.com '---. [EMAIL PROTECTED]/ 25)You can't spit out the car window without \ ---pulling over to the side of the road and| | stopping. (from You might be a yankee | |if...) | \__/ - 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]
Re: 404 error in struts 2 blank helloworld example in RAD7
Thanks for the emails. I downgraded and made the setting but haven't solved my malfunction yet. I'm on WebSphere Platform 6.1 [BASE 6.1.0.17cf170821.07]. So, I'll mess with it some more later. Tim On Fri, Oct 17, 2008 at 2:01 PM, Struts Two [EMAIL PROTECTED] wrote: So, I do have a working configuration for tomcat5.5. Now for WebSphere/Rad7. WebSphere does not give an error message but does load the .jsp but just not the .action. This must be a websphere configuration issue or an issue with conflicting .jars. i'll continue to investigate. Before you run struts 2 on Websphere, make sure you set the following property through websphere admin console: Application servers server1 Web container Custom Properties com.ibm.ws.webcontainer.invokefilterscompatibility == true My assumption is you are also running Struts 2.0.11.1 as my current project is based on this release, and I have not been experiencing any problems of any sort. Bear in mind if you are using struts 2.1.2 Beta version you may still experience problem running urls that end with .action directly from browser url address. I had this issue before 2.1.2 goes to beta and there is a JIRA still open for this. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Hibernate and Struts
I did try this as you told but I am still getting the exception. Anyways to get a solution to that. I think this is a widespread problem(having gone through the forums), is there any other way. I am also looking to test this finally on Webshpere so are there some issues there? On 10/17/08, jygnash [EMAIL PROTECTED] wrote: Hi Anoop, YOu can use the JNDI context to get the Hibernate's SessionFactory. 1) in hibernate-cfg.xml give the jndi name as below hibernate-configuration session-factory name=HibernateSessionFactory 2) in one of your startup servlet or first class handling the request for session factory creation (we had a start up servlet) , you can have the session factory created and made avialable try { //Create the SessionFactory from hibernate.cfg.xml sessionFactory = new Configuration().configure().buildSessionFactory(); } catch (Throwable ex) { // Make sure you log the exception, as it might be swallowed System.err.println(Initial SessionFactory creation failed. + ex); throw new ExceptionInInitializerError(ex); } 3) //in rest of classes which needs the hibernate session factory can get it from JNDI InitialContext ctx = new InitialContext(); SessionFactory sessionFactory = (SessionFactory) ctx.lookup(HibernateSessionFactory); session = sessionFactory.openSession(); //.getCurrentSession(); hope that helps -- View this message in context: http://www.nabble.com/Hibernate-and-Struts-tp19985981p20016169.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] -- Anoop Dhanvijay DA-IICT Most of man's failures were when they didn't realize how close they were to success, when they finally gave up! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts 2 session in Weblogic 10.0
I've seen that, and it had to do with the transition from https to http resulting in discrete sessions. -Original Message- From: Peterson, Ryan [mailto:[EMAIL PROTECTED] Sent: Friday, October 17, 2008 3:46 PM To: user@struts.apache.org Subject: Struts 2 session in Weblogic 10.0 Hi guys, I'm having some trouble with a session variable not being saved in Weblogic 10. I'm tracking the login of a user by allowing my login class to implement sessionAware, and putting a key/value pair into the session upon successful login. This works just fine testing in Tomcat 5.5, but Weblogic does not seem to store the session variable at all (session has a size of 0 after login). Has anyone run into this problem using Weblogic 10 where your session variables do not get stored properly in Struts 2? Thanks! Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Strus2, Freemarker and getting request.getContextPath()
Sorry, should have read the original question more carefully! Because he provided JSP syntax (more accurate the OGNL syntax inside an S2 property tag in either JSP or FreeMarker). A plain %{expression} inside FreeMarker, IIRC, would be meaningless. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tons of Could not find property messages - log4j is not helping?
Is there a way to determine which logging properties need to be configured to remove / change all of the struts logging? I haven't seen a confluence page on that topic yet. i.e., if I wanted to set the whole logging level for all of struts2 to ERROR, how would I find the property names to set? Well, given that the whole of Struts2 fits under two hierarchies (org.apache.struts2.* and com.opensymphony.*), I would think that the following two lines would do the trick: log4j.logger.org.apache.struts2=error, stdout log4j.logger.com.opensymphony=error, stdout
Re: Tons of Could not find property messages - log4j is not helping?
Yeah I had tried that but they are still getting through. I must have some other config issue with log4j. -John Pierre Thibaudeau wrote: Is there a way to determine which logging properties need to be configured to remove / change all of the struts logging? I haven't seen a confluence page on that topic yet. i.e., if I wanted to set the whole logging level for all of struts2 to ERROR, how would I find the property names to set? Well, given that the whole of Struts2 fits under two hierarchies (org.apache.struts2.* and com.opensymphony.*), I would think that the following two lines would do the trick: log4j.logger.org.apache.struts2=error, stdout log4j.logger.com.opensymphony=error, stdout - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tons of Could not find property messages - log4j is not helping?
Nope, I'm having the same problem. I've set those two categories, but still get lots of junk in the logs. (*Chris*) On Fri, Oct 17, 2008 at 2:29 PM, 928572663 [EMAIL PROTECTED] wrote: Yeah I had tried that but they are still getting through. I must have some other config issue with log4j. -John Pierre Thibaudeau wrote: Is there a way to determine which logging properties need to be configured to remove / change all of the struts logging? I haven't seen a confluence page on that topic yet. i.e., if I wanted to set the whole logging level for all of struts2 to ERROR, how would I find the property names to set? Well, given that the whole of Struts2 fits under two hierarchies (org.apache.struts2.* and com.opensymphony.*), I would think that the following two lines would do the trick: log4j.logger.org.apache.struts2=error, stdout log4j.logger.com.opensymphony=error, stdout - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] grabbing current URL in an interceptor
Maybe these links will help: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionInvocation.html http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionProxy.html Nils-H On Fri, Oct 17, 2008 at 7:43 PM, Pierre Thibaudeau [EMAIL PROTECTED] wrote: Instead of the uri, the action name, method and namespace called would be better. In this way the same can be applied to portlets too. So i would like to enhance your original thread question. I belive this can be obtained from the action invocation. I believe so too, but I would love to see some specifics... For instance: invocation.getInvocationContext().getContextMap() yields the contextMap, but then what? I suppose somewhere in the contextMap are the various bits of information I am interested in, but which are they and how do I piece them together? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tons of Could not find property messages - log4j is not helping?
import org.apache.log4j.Logger; public class BeyondFuBarAction extends FuBarAction { private static final Logger LOG = Logger.getLogger(BeyondFuBarAction.class); /** override super */ public String execute() throws Exception { LOG.error(beyond FUBAR); 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: Fri, 17 Oct 2008 14:36:49 -0700 From: [EMAIL PROTECTED] To: user@struts.apache.org; [EMAIL PROTECTED] Subject: Re: Tons of Could not find property messages - log4j is not helping? Nope, I'm having the same problem. I've set those two categories, but still get lots of junk in the logs. (*Chris*) On Fri, Oct 17, 2008 at 2:29 PM, 928572663 [EMAIL PROTECTED] wrote: Yeah I had tried that but they are still getting through. I must have some other config issue with log4j. -John Pierre Thibaudeau wrote: Is there a way to determine which logging properties need to be configured to remove / change all of the struts logging? I haven't seen a confluence page on that topic yet. i.e., if I wanted to set the whole logging level for all of struts2 to ERROR, how would I find the property names to set? Well, given that the whole of Struts2 fits under two hierarchies (org.apache.struts2.* and com.opensymphony.*), I would think that the following two lines would do the trick: log4j.logger.org.apache.struts2=error, stdout log4j.logger.com.opensymphony=error, stdout - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Stay organized with simple drag and drop from Windows Live Hotmail. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_102008
RE: Tons of Could not find property messages - log4j is not helping?
--- On Fri, 10/17/08, Martin Gainty wrote: import org.apache.log4j.Logger; public class BeyondFuBarAction extends FuBarAction { private static final Logger LOG = Logger.getLogger(BeyondFuBarAction.class); /** override super */ public String execute() throws Exception { LOG.error(beyond FUBAR); I think part of your code got truncated, the part that turns off the could not find property log messages. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tons of Could not find property messages - log4j is not helping?
I can't find the original thread w/ the log msgs. There's also the ognl logger; log4j.logger.ognl=XXX (or however Log4J does it, if you're using Log4J). Dave --- On Fri, 10/17/08, Chris Pratt [EMAIL PROTECTED] wrote: From: Chris Pratt [EMAIL PROTECTED] Subject: Re: Tons of Could not find property messages - log4j is not helping? To: Struts Users Mailing List user@struts.apache.org, [EMAIL PROTECTED] Date: Friday, October 17, 2008, 5:36 PM Nope, I'm having the same problem. I've set those two categories, but still get lots of junk in the logs. (*Chris*) On Fri, Oct 17, 2008 at 2:29 PM, 928572663 [EMAIL PROTECTED] wrote: Yeah I had tried that but they are still getting through. I must have some other config issue with log4j. -John Pierre Thibaudeau wrote: Is there a way to determine which logging properties need to be configured to remove / change all of the struts logging? I haven't seen a confluence page on that topic yet. i.e., if I wanted to set the whole logging level for all of struts2 to ERROR, how would I find the property names to set? Well, given that the whole of Struts2 fits under two hierarchies (org.apache.struts2.* and com.opensymphony.*), I would think that the following two lines would do the trick: log4j.logger.org.apache.struts2=error, stdout log4j.logger.com.opensymphony=error, stdout - 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: Tons of Could not find property messages - log4j is not helping?
Hmmm, I don't get it Martin, how does writing something to the log prevent things from getting written to the log? (*Chris*) On Fri, Oct 17, 2008 at 3:05 PM, Martin Gainty [EMAIL PROTECTED] wrote: import org.apache.log4j.Logger; public class BeyondFuBarAction extends FuBarAction { private static final Logger LOG = Logger.getLogger(BeyondFuBarAction.class); /** override super */ public String execute() throws Exception { LOG.error(beyond FUBAR); 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: Fri, 17 Oct 2008 14:36:49 -0700 From: [EMAIL PROTECTED] To: user@struts.apache.org; [EMAIL PROTECTED] Subject: Re: Tons of Could not find property messages - log4j is not helping? Nope, I'm having the same problem. I've set those two categories, but still get lots of junk in the logs. (*Chris*) On Fri, Oct 17, 2008 at 2:29 PM, 928572663 [EMAIL PROTECTED] wrote: Yeah I had tried that but they are still getting through. I must have some other config issue with log4j. -John Pierre Thibaudeau wrote: Is there a way to determine which logging properties need to be configured to remove / change all of the struts logging? I haven't seen a confluence page on that topic yet. i.e., if I wanted to set the whole logging level for all of struts2 to ERROR, how would I find the property names to set? Well, given that the whole of Struts2 fits under two hierarchies (org.apache.struts2.* and com.opensymphony.*), I would think that the following two lines would do the trick: log4j.logger.org.apache.struts2=error, stdout log4j.logger.com.opensymphony=error, stdout - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Stay organized with simple drag and drop from Windows Live Hotmail. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_102008
Re: Tons of Could not find property messages - log4j is not helping?
--- On Fri, 10/17/08, Chris Pratt wrote: Hmmm, I don't get it Martin, how does writing something to the log prevent things from getting written to the log? Reverse psychology. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tons of Could not find property messages - log4j is not helping?
very good dave.. assuming your log4j configuration has a FILELOG appender appender name=FILELOG class=org.apache.log4j.RollingFileAppender //Logger extends Category so use getAppender to get the Apender object Appender appender=log.getAppender(FILELOG); //finally to get the actual name of the log String NameOfLogFile=appender.fileName; ... 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: Fri, 17 Oct 2008 15:55:18 -0700 From: [EMAIL PROTECTED] Subject: Re: Tons of Could not find property messages - log4j is not helping? To: user@struts.apache.org --- On Fri, 10/17/08, Chris Pratt wrote: Hmmm, I don't get it Martin, how does writing something to the log prevent things from getting written to the log? Reverse psychology. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008
Re: [S2] grabbing current URL in an interceptor
Thanks Nils. Though, to be honest, it doesn't really help since my previous post in this thread (and the question it asks) was based on a reading of those very links... ;) I hit the same wall: how to extract from an ActionInvocation (or an ActionContext) the namespace, the name and the parameters of the current action (or, equivalently, the URI). 2008/10/17 Nils-Helge Garli Hegvik [EMAIL PROTECTED] Maybe these links will help: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionInvocation.html http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionProxy.html
Re: Tons of Could not find property messages - log4j is not helping?
Wow, I have no idea where you're going with this. So far you've shown code that can write more messages to a log and find out the name of the log file. How does this help in turning off the obnoxious messages that the framework is logging that aren't in the obvious categories? (*Chris*) On Fri, Oct 17, 2008 at 4:42 PM, Martin Gainty [EMAIL PROTECTED] wrote: very good dave.. assuming your log4j configuration has a FILELOG appender appender name=FILELOG class=org.apache.log4j.RollingFileAppender //Logger extends Category so use getAppender to get the Apender object Appender appender=log.getAppender(FILELOG); //finally to get the actual name of the log String NameOfLogFile=appender.fileName; ... 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: Fri, 17 Oct 2008 15:55:18 -0700 From: [EMAIL PROTECTED] Subject: Re: Tons of Could not find property messages - log4j is not helping? To: user@struts.apache.org --- On Fri, 10/17/08, Chris Pratt wrote: Hmmm, I don't get it Martin, how does writing something to the log prevent things from getting written to the log? Reverse psychology. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns%2120EE04FBC541789%21167.entry?ocid=TXT_TAGLM_WL_hotmail_092008
RE: Tons of Could not find property messages - log4j is not helping?
you'll need to be more specific about which categories of messages you want to log File? SMTP? JDBC? categories are listed: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Appender.html you'll also need to be specific about which level of messages you want and dont want http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Category.html#setLevel where ALL means everything including any/all messages you categorise as obnoxious OFF turns off all logging http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html Provide more specifics if you want specific help on operational characteristics, code and or environment for log4j 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: Fri, 17 Oct 2008 17:09:43 -0700 From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: Re: Tons of Could not find property messages - log4j is not helping? Wow, I have no idea where you're going with this. So far you've shown code that can write more messages to a log and find out the name of the log file. How does this help in turning off the obnoxious messages that the framework is logging that aren't in the obvious categories? (*Chris*) On Fri, Oct 17, 2008 at 4:42 PM, Martin Gainty [EMAIL PROTECTED] wrote: very good dave.. assuming your log4j configuration has a FILELOG appender appender name=FILELOG class=org.apache.log4j.RollingFileAppender //Logger extends Category so use getAppender to get the Apender object Appender appender=log.getAppender(FILELOG); //finally to get the actual name of the log String NameOfLogFile=appender.fileName; ... 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: Fri, 17 Oct 2008 15:55:18 -0700 From: [EMAIL PROTECTED] Subject: Re: Tons of Could not find property messages - log4j is not helping? To: user@struts.apache.org --- On Fri, 10/17/08, Chris Pratt wrote: Hmmm, I don't get it Martin, how does writing something to the log prevent things from getting written to the log? Reverse psychology. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns%2120EE04FBC541789%21167.entry?ocid=TXT_TAGLM_WL_hotmail_092008 _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008
Re: Tons of Could not find property messages - log4j is not helping?
I have a log4j.xml file located in my /src directory in my webapp (Dynamic Web Project from eclipse ganymede). ?xml version=1.0 encoding=UTF-8? !DOCTYPE log4j:configuration SYSTEM log4j.dtd log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; appender name=stdout class=org.apache.log4j.ConsoleAppender layout class=org.apache.log4j.TTCCLayout / /appender !-- log detail configuration -- logger name=com.opensymphony.xwork2 level value=error / appender-ref ref=stdout / /logger logger name=org.apache.struts2 level value=error / appender-ref ref=stdout / /logger logger name=freemarker level value=warn / appender-ref ref=stdout / /logger root level value=error / appender-ref ref=stdout / /root /log4j:configuration I've got log4j.jar in my appserver's classpath. It looks like I'm getting everything in the stdout console - mostly DEBUG messages. As far as I can tell log4j is not filtering anything out. -John Martin Gainty wrote: you'll need to be more specific about which categories of messages you want to log File? SMTP? JDBC? categories are listed: http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Appender.html you'll also need to be specific about which level of messages you want and dont want http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Category.html#setLevel where ALL means everything including any/all messages you categorise as obnoxious OFF turns off all logging http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html Provide more specifics if you want specific help on operational characteristics, code and or environment for log4j 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: Fri, 17 Oct 2008 17:09:43 -0700 From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: Re: Tons of Could not find property messages - log4j is not helping? Wow, I have no idea where you're going with this. So far you've shown code that can write more messages to a log and find out the name of the log file. How does this help in turning off the obnoxious messages that the framework is logging that aren't in the obvious categories? (*Chris*) On Fri, Oct 17, 2008 at 4:42 PM, Martin Gainty [EMAIL PROTECTED] wrote: very good dave.. assuming your log4j configuration has a FILELOG appender appender name=FILELOG class=org.apache.log4j.RollingFileAppender //Logger extends Category so use getAppender to get the Apender object Appender appender=log.getAppender(FILELOG); //finally to get the actual name of the log String NameOfLogFile=appender.fileName; ... 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: Fri, 17 Oct 2008 15:55:18 -0700 From: [EMAIL PROTECTED] Subject: Re: Tons of Could not find property messages - log4j is not helping? To: user@struts.apache.org --- On Fri, 10/17/08, Chris Pratt wrote: Hmmm, I don't get it Martin, how does writing something to the log prevent things from getting written to the log? Reverse psychology. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns%2120EE04FBC541789%21167.entry?ocid=TXT_TAGLM_WL_hotmail_092008 _ Want to read Hotmail messages in Outlook? The Wordsmiths show you how. http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]