Roadmap and activity
We are currently trialling Struts 2 as a replacement as the framework of choice in the place of Struts 1 and was wondering how 'active' is the development on the current framework? I see that last year a new release came out every few months, but there has been nothing since September. CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipients responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278.
ParametersInterceptor setting values using a String[]
This appears to have been mentioned a number of times in the Struts 2 and XWork forums but I cannot find a real answer: Using Struts 2.0.11 I am experiencing the following problem. I have an action with the method setId(Integer id) { ... } When this value is set via a HTTP request through the ParametersInterceptor it succeeds when using both GET and POST. However when a GET is performed I get the following exception logged SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'id' on 'class com.opensymphony.xwork2.ActionSupport: Error setting expression 'id' with value '[Ljava.lang.String;@1a1f635' XWork appears to store the a single GET parameters as an array of Strings and attempt to set the value using the String[] first, when that errors tries to convert it. The problem with this is it logs the first failure as an ERROR. Why is this happening and short of creating my own TypeConverter or blocking it in the logger config, how can I stop this error being logged for GET requests? Matthew Seaborn Software Architect t+44(0) 208 484 0729 m +44(0) 7949 465 142 e [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sussex House Plane Tree Crescent Feltham, Middlesex, TW13 7HE United Kingdom http://www.performgroup.com/ http://www.performgroup.com/ CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipients responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278.
Re: ParametersInterceptor setting values using a String[]
Matthew Seaborn wrote: Why is this happening and short of creating my own TypeConverter or blocking it in the logger config, how can I stop this error being logged for GET requests? AFAIK this error is only logged in devMode. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ParametersInterceptor setting values using a String[]
Thanks for the prompt response. Having had a look at the code in Xwork that comes as part of Struts 2 (included below) it seems to log it regardless of the devMode. This is the same for 2.0.4 and 2.1.0. I cannot believe this hasn't been spotted before now, so I assume I am doing something wrong. try { stack.setValue(name, value); } catch (RuntimeException e) { if (devMode) { String developerNotification = LocalizedTextUtil.findText(ParametersInterceptor.class, devmode.notification, ActionContext.getContext().getLocale(), Developer Notification:\n{0}, new Object[]{ e.getMessage() }); LOG.error(developerNotification); if (action instanceof ValidationAware) { ((ValidationAware) action).addActionMessage(developerNotification); } } else { LOG.error(ParametersInterceptor - [setParameters]: Unexpected Exception caught setting '+name+' on '+action.getClass()+: + e.getMessage()); } } -Original Message- From: Daniel Baldes [mailto:[EMAIL PROTECTED] Sent: 14 February 2008 10:14 To: Struts Users Mailing List Subject: Re: ParametersInterceptor setting values using a String[] Matthew Seaborn wrote: Why is this happening and short of creating my own TypeConverter or blocking it in the logger config, how can I stop this error being logged for GET requests? AFAIK this error is only logged in devMode. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipients responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 WebApp context
Thanks Ian and Laurie for looking into this. Excuse me Laurie, for missing out an imp. info. that web.xml also contains spring ContextLoaderListener declaration. I now feel that it is more a spring / tomcat issue and not a really a struts2 issue. I observed the tomcat's console logs while it was shutting down. I could see the info messages indicating that the spring context was being destroyed. But when I 'reload' the context of the same web-app using Tomcat Manager application, I don't see those info messages. So, I guess I need to either change the way tomcat reloads the context (only if it's possible) or find out a way to reload spring context when Tomcat reloads the web-app context. Correct me if I'm wrong. Direct me if I'm right.. :) - Rushikesh On Wed, Feb 13, 2008 at 9:29 PM, Laurie Harper [EMAIL PROTECTED] wrote: (3) web.xml doesn't contain anything but struts2 filter declaration. If that's the case, how is Spring getting initialized? Usually you would configure one of Spring's context listeners, which will take care of loading the Spring context on startup and destroying it when the application is shut down / undeployed. As Ian indicated, you'll need *some* sort of context listener to close the Spring context (i.e. reverse whatever Spring setup logic you have), whether it be one of the ones supplied by Spring or your own. L. Rushikesh Thakkar wrote: I want to release a database connection while reloading the context (using Tomcat Manager web app) of a Struts2 Web Application. I am also using Spring and hibernate. (Spring's HibernateTemplate, Spring SessionFactory and Apache Commons-dbcp with HSql standalone-database) As I am using HSql 'standalone' database, even if the web application context gets reloaded, the database connection is not released while destroying the context. So I get 'Database is already in use by other process' error. I want to know whether there is any way to implement something like destroy() method of servlet in a Struts2 application. I am not sure whether I can do it with spring configuration. Any idea? If there are many ways of doing it, kindly also tell which way is the best for me. (1) struts.properties: struts.objectFactory = org.apache.struts2.spring.StrutsSpringObjectFactory (2) applicationContext.xml (my spring configuration file) beans default-autowire=autodetect bean id=myDataSource class= org.apache.commons.dbcp.BasicDataSource destroy-method=close property name=driverClassName value=org.hsqldb.jdbcDriver / property name=url value=jdbc:hsqldb:file:C:/Projects/db/hsqlTest / property name=username value=sa/ property name=password value=/ /bean bean id=mySessionFactory class= org.springframework.orm.hibernate3.LocalSessionFactoryBean property name=dataSource ref=myDataSource/ property name=mappingResources list valueno/bbs/webservice/client/config/model/certificate.hbm.xml/value /property property name=hibernateProperties props prop key=hibernate.dialect org.hibernate.dialect.HSQLDialect/prop prop key=hibernate.show_sqltrue/prop /props /property /bean bean id=hibernateTemplate class= org.springframework.orm.hibernate3.HibernateTemplate property name=sessionFactory ref bean=mySessionFactory/ /property /bean bean id=testClientDao class= webservice.client.dao.hibernate.TestClientDAO property name=hibernateTemplate ref bean=hibernateTemplate/ /property /bean !-- Some Strus2-Actions follow -- /beans (3) web.xml doesn't contain anything but struts2 filter declaration. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [struts] about paramsPrepareParamsStack
Almost. Really it should be the other way around, since you don't want user-set parameters to override your static parameters. I agree with you. Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ParametersInterceptor setting values using a String[]
Hi Matthew, The params interceptor is calling setId on ActionSupport (the default action), not on your action that has the setId method, so an exception is being thrown as there's no matching setter whatsoever. You may have a config error. All params are treated as arrays because its valid in HTTP for the same parameter to be specified multiple times in the same request. The default type conversion will call setId(Integer id) using the first element in the array if that's the first property to be matched. The error is only logged when the exception occurs and this is *infrequent* in normal use. Hope that helps! regards, Jeromy Evans This appears to have been mentioned a number of times in the Struts 2 and XWork forums but I cannot find a real answer: Using Struts 2.0.11 I am experiencing the following problem. I have an action with the method setId(Integer id) { ... } When this value is set via a HTTP request through the ParametersInterceptor it succeeds when using both GET and POST. However when a GET is performed I get the following exception logged SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'id' on 'class com.opensymphony.xwork2.ActionSupport: Error setting expression 'id' with value '[Ljava.lang.String;@1a1f635' XWork appears to store the a single GET parameters as an array of Strings and attempt to set the value using the String[] first, when that errors tries to convert it. The problem with this is it logs the first failure as an ERROR. Why is this happening and short of creating my own TypeConverter or blocking it in the logger config, how can I stop this error being logged for GET requests? Matthew Seaborn Software Architect t+44(0) 208 484 0729 m +44(0) 7949 465 142 e [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sussex House Plane Tree Crescent Feltham, Middlesex, TW13 7HE United Kingdom http://www.performgroup.com/ http://www.performgroup.com/ CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipients responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Roadmap and activity
I'll give you my opinion: Yes, struts 2 development is active but the activity ebbs and flows with the volunteers. The stall in a release is due to a number of compounding factors: - Struts 2.1 includes some major changes from 2.0.11. 2.0.11 is stable and no *major* bugs are known to be affecting it right now. The desirable improvements are mainly going into 2.1 - There are some issues complicating release of Struts 2.1, especially the intention to factor out OGNL so other EL's can be used (JUEL) and merging of several plugins into the Convention plugin. - Volunteers typically contribute in the areas affecting them most or in areas that interest them and there's plenty of interesting bits to work on. That means the boring bits get neglected. You can monitor activity through the developers list. regards, Jeromy Evans We are currently trialling Struts 2 as a replacement as the framework of choice in the place of Struts 1 and was wondering how 'active' is the development on the current framework? I see that last year a new release came out every few months, but there has been nothing since September. CONFIDENTIALITY - This email and any files transmitted with it, are confidential, may be legally privileged and are intended solely for the use of the individual or entity to whom they are addressed. If this has come to you in error, you must not copy, distribute, disclose or use any of the information it contains. Please notify the sender immediately and delete them from your system. SECURITY - Please be aware that communication by email, by its very nature, is not 100% secure and by communicating with Perform Group by email you consent to us monitoring and reading any such correspondence. VIRUSES - Although this email message has been scanned for the presence of computer viruses, the sender accepts no liability for any damage sustained as a result of a computer virus and it is the recipients responsibility to ensure that email is virus free. AUTHORITY - Any views or opinions expressed in this email are solely those of the sender and do not necessarily represent those of Perform Group. COPYRIGHT - Copyright of this email and any attachments belongs to Perform Group, Companies House Registration number 6324278. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2 - Xworks action
Hi, I had been following the example in http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html to build my own app. But I do not want to use the custom library or tiles or ognl or struts tags or dojo. I am using plain jsp and el. I just want to hit the POJO action class thru url. What url should I use? Is it needed that I use s:url. If not how I can construct my url . I tried http://localhost:8080/packagename/actionname.action and http://localhost:8080/executeactionname.action?method=methodname Both did not work in my case. I got a 404 error. I checked that struts.xml is in classpath and I have a persistence.xml in META-INF directory too. And also I have an applicationContext.xml in WEB-INF too. My struts.xml looks like ?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.objectFactory value=spring / constant name=struts.devMode value=true / package name=employeeregistration extends=struts-default action name=employeeAcct method=execute class=employeeAction result/index.jsp/result result name=input/index.jsp/result /action action name=createAccount method=createEmployeeAccount class=employeeAction result/index.jsp/result result name=input/index.jsp/result /action /package /struts -- Thanks Arun George
Re: Struts2 - Xworks action
Sorry My web.xml was in wrong place. Now I cannot start my app. It says ERROR: ListenerStart. Why is this hyappening? On 2/14/08, Arun [EMAIL PROTECTED] wrote: Hi, I had been following the example in http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html to build my own app. But I do not want to use the custom library or tiles or ognl or struts tags or dojo. I am using plain jsp and el. I just want to hit the POJO action class thru url. What url should I use? Is it needed that I use s:url. If not how I can construct my url . I tried http://localhost:8080/packagename/actionname.action and http://localhost:8080/executeactionname.action?method=methodname Both did not work in my case. I got a 404 error. I checked that struts.xml is in classpath and I have a persistence.xml in META-INF directory too. And also I have an applicationContext.xml in WEB-INF too. My struts.xml looks like ?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.objectFactory value=spring / constant name=struts.devMode value=true / package name=employeeregistration extends=struts-default action name=employeeAcct method=execute class=employeeAction result/index.jsp/result result name=input/index.jsp/result /action action name=createAccount method=createEmployeeAccount class=employeeAction result/index.jsp/result result name=input/index.jsp/result /action /package /struts -- Thanks Arun George -- Thanks Arun George
Re: Roadmap and activity
2008/2/14, Matthew Seaborn [EMAIL PROTECTED]: We are currently trialling Struts 2 as a replacement as the framework of choice in the place of Struts 1 and was wondering how 'active' is the development on the current framework? I see that last year a new release came out every few months, but there has been nothing since September. At Apache, the activity cannot be measured as number of releases per year, that you can see, for instance, at Eclipse. There is no schedule and no deadline, since we are all volunteers. As Jeromy stated, you can monitor the activity by seeing messages in the Struts Developers mailing list, or in the list of resolved issues and the commits in SVN. And I have to say that Struts 2 is *very* active. Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 WebApp context
This question will probably result in an answer / better solution if asked on the Spring forums. /Ian -- Ian Roughley From Down Around, Inc. Consulting * Training / Mentoring * Agile Process * Open Source web: http://www.fdar.com - email: [EMAIL PROTECTED] Rushikesh Thakkar wrote: Thanks Ian and Laurie for looking into this. Excuse me Laurie, for missing out an imp. info. that web.xml also contains spring ContextLoaderListener declaration. I now feel that it is more a spring / tomcat issue and not a really a struts2 issue. I observed the tomcat's console logs while it was shutting down. I could see the info messages indicating that the spring context was being destroyed. But when I 'reload' the context of the same web-app using Tomcat Manager application, I don't see those info messages. So, I guess I need to either change the way tomcat reloads the context (only if it's possible) or find out a way to reload spring context when Tomcat reloads the web-app context. Correct me if I'm wrong. Direct me if I'm right.. :) - Rushikesh On Wed, Feb 13, 2008 at 9:29 PM, Laurie Harper [EMAIL PROTECTED] wrote: (3) web.xml doesn't contain anything but struts2 filter declaration. If that's the case, how is Spring getting initialized? Usually you would configure one of Spring's context listeners, which will take care of loading the Spring context on startup and destroying it when the application is shut down / undeployed. As Ian indicated, you'll need *some* sort of context listener to close the Spring context (i.e. reverse whatever Spring setup logic you have), whether it be one of the ones supplied by Spring or your own. L. Rushikesh Thakkar wrote: I want to release a database connection while reloading the context (using Tomcat Manager web app) of a Struts2 Web Application. I am also using Spring and hibernate. (Spring's HibernateTemplate, Spring SessionFactory and Apache Commons-dbcp with HSql standalone-database) As I am using HSql 'standalone' database, even if the web application context gets reloaded, the database connection is not released while destroying the context. So I get 'Database is already in use by other process' error. I want to know whether there is any way to implement something like destroy() method of servlet in a Struts2 application. I am not sure whether I can do it with spring configuration. Any idea? If there are many ways of doing it, kindly also tell which way is the best for me. (1) struts.properties: struts.objectFactory = org.apache.struts2.spring.StrutsSpringObjectFactory (2) applicationContext.xml (my spring configuration file) beans default-autowire=autodetect bean id=myDataSource class= org.apache.commons.dbcp.BasicDataSource destroy-method=close property name=driverClassName value=org.hsqldb.jdbcDriver / property name=url value=jdbc:hsqldb:file:C:/Projects/db/hsqlTest / property name=username value=sa/ property name=password value=/ /bean bean id=mySessionFactory class= org.springframework.orm.hibernate3.LocalSessionFactoryBean property name=dataSource ref=myDataSource/ property name=mappingResources list valueno/bbs/webservice/client/config/model/certificate.hbm.xml/value /property property name=hibernateProperties props prop key=hibernate.dialect org.hibernate.dialect.HSQLDialect/prop prop key=hibernate.show_sqltrue/prop /props /property /bean bean id=hibernateTemplate class= org.springframework.orm.hibernate3.HibernateTemplate property name=sessionFactory ref bean=mySessionFactory/ /property /bean bean id=testClientDao class= webservice.client.dao.hibernate.TestClientDAO property name=hibernateTemplate ref bean=hibernateTemplate/ /property /bean !-- Some Strus2-Actions follow -- /beans (3) web.xml doesn't contain anything but struts2 filter declaration. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 - Xworks action
Do you have the S2 filter defined in your web.xml? The URL would be: http://localhost:8080/appContext/employeeAcct.action where appContext is whatever context you're deploying to. --- Arun [EMAIL PROTECTED] wrote: Is it needed that I use s:url[?] It's easier and less error-prone. s:url action=employeeAcct/ Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts2 WebApp context
Yea, I will do that. But its still unsolved, so if anybody has got some solution, please feel free to guide me. Thank you.. On Thu, Feb 14, 2008 at 4:18 PM, Ian Roughley [EMAIL PROTECTED] wrote: This question will probably result in an answer / better solution if asked on the Spring forums. /Ian -- Ian Roughley From Down Around, Inc. Consulting * Training / Mentoring * Agile Process * Open Source web: http://www.fdar.com - email: [EMAIL PROTECTED] Rushikesh Thakkar wrote: Thanks Ian and Laurie for looking into this. Excuse me Laurie, for missing out an imp. info. that web.xml also contains spring ContextLoaderListener declaration. I now feel that it is more a spring / tomcat issue and not a really a struts2 issue. I observed the tomcat's console logs while it was shutting down. I could see the info messages indicating that the spring context was being destroyed. But when I 'reload' the context of the same web-app using Tomcat Manager application, I don't see those info messages. So, I guess I need to either change the way tomcat reloads the context (only if it's possible) or find out a way to reload spring context when Tomcat reloads the web-app context. Correct me if I'm wrong. Direct me if I'm right.. :) - Rushikesh On Wed, Feb 13, 2008 at 9:29 PM, Laurie Harper [EMAIL PROTECTED] wrote: (3) web.xml doesn't contain anything but struts2 filter declaration. If that's the case, how is Spring getting initialized? Usually you would configure one of Spring's context listeners, which will take care of loading the Spring context on startup and destroying it when the application is shut down / undeployed. As Ian indicated, you'll need *some* sort of context listener to close the Spring context (i.e. reverse whatever Spring setup logic you have), whether it be one of the ones supplied by Spring or your own. L. Rushikesh Thakkar wrote: I want to release a database connection while reloading the context (using Tomcat Manager web app) of a Struts2 Web Application. I am also using Spring and hibernate. (Spring's HibernateTemplate, Spring SessionFactory and Apache Commons-dbcp with HSql standalone-database) As I am using HSql 'standalone' database, even if the web application context gets reloaded, the database connection is not released while destroying the context. So I get 'Database is already in use by other process' error. I want to know whether there is any way to implement something like destroy() method of servlet in a Struts2 application. I am not sure whether I can do it with spring configuration. Any idea? If there are many ways of doing it, kindly also tell which way is the best for me. (1) struts.properties: struts.objectFactory = org.apache.struts2.spring.StrutsSpringObjectFactory (2) applicationContext.xml (my spring configuration file) beans default-autowire=autodetect bean id=myDataSource class= org.apache.commons.dbcp.BasicDataSource destroy-method=close property name=driverClassName value=org.hsqldb.jdbcDriver / property name=url value=jdbc:hsqldb:file:C:/Projects/db/hsqlTest / property name=username value=sa/ property name=password value=/ /bean bean id=mySessionFactory class= org.springframework.orm.hibernate3.LocalSessionFactoryBean property name=dataSource ref=myDataSource/ property name=mappingResources list valueno/bbs/webservice/client/config/model/certificate.hbm.xml/value /property property name=hibernateProperties props prop key=hibernate.dialect org.hibernate.dialect.HSQLDialect/prop prop key=hibernate.show_sqltrue/prop /props /property /bean bean id=hibernateTemplate class= org.springframework.orm.hibernate3.HibernateTemplate property name=sessionFactory ref bean=mySessionFactory/ /property /bean bean id=testClientDao class= webservice.client.dao.hibernate.TestClientDAO property name=hibernateTemplate ref bean=hibernateTemplate/ /property /bean !-- Some Strus2-Actions follow -- /beans (3) web.xml doesn't contain anything but struts2 filter declaration. - 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: Struts-EL and JSP 2.0
2008/2/14, javaskull [EMAIL PROTECTED]: I'm using RAD 7.0 and WAS 6.1 which is a JSP 2.0 container. If I'm using the Struts 1.38 version, should I not put Struts-EL in the WEB- INF\lib folder? I had read that Struts-EL won't work with JSP 2.0 and I should not use Struts-EL for that. Thanks, You don't need it since EL evaluation is made by the container with JSP 2.x. Antonio
Ajax tabbedPanel and sitemesh problem
Hi, I am having problem using an ajax tabbedPanel with sitemesh. If I don't decorate page.jsp, the tabbedPanel works fine. As soon as I decorate it, the s:head theme=ajax / in the head section of page.jsp doesn't make it through to the final decorated page. As a result, only the html is displayed. Any help would be appreciated. Thank you. David web.xml ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 filter filter-namestruts-cleanup/filter-name filter-class org.apache.struts2.dispatcher.ActionContextCleanUp /filter-class /filter filter filter-namesitemesh/filter-name filter-class com.opensymphony.module.sitemesh.filter.PageFilter /filter-class /filter filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts-cleanup/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-namesitemesh/filter-name url-pattern/*/url-pattern /filter-mapping filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list /web-app decorators.xml: ?xml version=1.0 encoding=ISO-8859-1? decorators defaultdir=/decorators decorator name=main page=main.jsp pattern/*/pattern /decorator /decorators main.jsp (main decorator): %@ taglib uri=http://www.opensymphony.com/sitemesh/decorator; prefix=decorator % !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN html head titledecorator:title default=Default Title / /title %@ include file=/includes/style.jsp% /head body %@ include file=/includes/header.jsp% %@ include file=/includes/loginStatus.jsp% table class=main width=1000 tr td width=180 valign=top %@ include file=/includes/navbar.jsp% /td td width=820 valign=top div class=contentdecorator:body//div /td /tr tr td colspan=2 width=1000 valign=top %@ include file=/includes/footer.jsp% /td /tr /table /body /html page.jsp to be decorated. %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib prefix=s uri=/struts-tags % html head titleCow Quest/title s:head theme=ajax / /head body table tr td s:tabbedPanel id=test s:div id=first label=First Tab theme=ajax labelposition=top p Tab content here /p /s:div s:div id=second label=Second Tab theme=ajax labelposition=top p Tab content here /p /s:div s:div id=third label=Third Tab theme=ajax labelposition=top p Tab content here /p /s:div /s:tabbedPanel /td /tr /table /body /html -- View this message in context: http://www.nabble.com/Ajax-tabbedPanel-and-sitemesh-problem-tp15481642p15481642.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]
serializable and exceptions
Hey everyone, I seem to be coming across two issues when running multiple jvms with session sharing ... i have not run into this during my previous testing, since i was not worried about a high-availability environment, and did not test inside a cluster... Anyways, i receive this exception when using the ModelDriven interface (the Accounts object is my model): [2/14/08 3:35:04:737 GMT] 0052 HttpSessDRSBu E storeObject: Caught Exception while trying to serialize. Stack trace: java.io.NotSerializableException: com.cerner.healthe.admin.portlet.model.Accounts I did not really investigate how the ModelDriven interface works, it just made my ui code cleaner, and allowed me to group a bunch of fields outside of my action. Anyways, i was wondering if changing the ModelDriven interface to require the object to implement Serializable would make sense? Because of this serializable exception, my exception interceptor forwards me to a page, and then i display the exception. At this point, i get another similar exception: [2/14/08 16:16:48:936 GMT] 0029 HttpSessDRSBu E storeObject: Caught Exception while trying to serialize. Stack trace: java.io.NotSerializableException: com.opensymphony.xwork2.interceptor.ExceptionHolder I see that the xwork2 interceptor implement the Serializable interface, but that particular class does not. Is xwork2 code part of the struts2 code base, i.e., is this the right place to post for these exceptions? Finally (this kinda has a bunch of things all wrapped into one), is there any easier way to increase the logging of the exception interceptor, besides re-defining the default interceptor stack? I tried to just re-define the interceptor, i also tried to just set the parameters, but it did not seem to work unless i configured my own stack in this way: interceptors interceptor-stack name=defaultLoggingStack interceptor-ref name=exception param name=logEnabledtrue/param param name=logLevelwarn/param /interceptor-ref interceptor-ref name=alias / interceptor-ref name=servlet-config / interceptor-ref name=prepare / interceptor-ref name=i18n / interceptor-ref name=chain / interceptor-ref name=debugging / interceptor-ref name=profiling / interceptor-ref name=scoped-model-driven / interceptor-ref name=model-driven / interceptor-ref name=fileUpload / interceptor-ref name=checkbox / interceptor-ref name=static-params / interceptor-ref name=params / interceptor-ref name=conversionError / interceptor-ref name=validation param name=excludeMethods input,back,cancel,browse /param /interceptor-ref interceptor-ref name=workflow param name=excludeMethods input,back,cancel,browse /param /interceptor-ref /interceptor-stack !-- Default stack for operating in portlet environment -- interceptor-stack name=portletDefaultLoggingStack interceptor-ref name=portletState / interceptor-ref name=defaultLoggingStack / interceptor-ref name=portletAware / /interceptor-stack /interceptors -- Brian
Struts-EL and JSP 2.0
I'm using RAD 7.0 and WAS 6.1 which is a JSP 2.0 container. If I'm using the Struts 1.38 version, should I not put Struts-EL in the WEB- INF\lib folder? I had read that Struts-EL won't work with JSP 2.0 and I should not use Struts-EL for that. Thanks, -G P.S. EL Expressions are not working in displaytag-el for me, but are working on the page itself, anyone else have this and know how to fix it? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Question on usage of EL in tiles:put name attribute
Hi Antonio, Thanks for the response. My answers are inline. - Anup -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 13, 2008 11:56 PM To: Struts Users Mailing List Subject: Re: Question on usage of EL in tiles:put name attribute 2008/2/14, Anup Chatterjee [EMAIL PROTECTED]: The above code in JSP doesn't work saying that the attribute I'm passing in the put is not found in the child tile's context. Are you sure that you put every attributes present in your template page? [Anup] Yes! Question is - the JSR spec says EL can be used on tag attributes but the tag put's name attribute doesn't seem to allow this, unless I'm missing something. If it is a bug, it won't be fixed in Struts-Tiles. My suggestion is to try it with Tiles 2: http://tiles.apache.org/ If it does not work, file a bug in Tiles (2). [Anup] Will try your suggestion with Tiles 2, but I think I'm missing something while I'm trying to pass the name and it isn't a bug. Can you suggest a workaround or details on what I'm missing above? You could use the tiles:putList tag. [Anup] The final child tile is expecting non list elements in my case, I don't think I can use putList. Ciao Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts-EL and JSP 2.0
Just so it's clear, you not only don't need it, but it's presence would probably cause subtle (well, maybe not so subtle) problems. Don't use it in a JSP 2.x+ container. -Original Message- From: Antonio Petrelli [mailto:[EMAIL PROTECTED] Sent: Thursday, February 14, 2008 8:50 AM To: Struts Users Mailing List Subject: Re: Struts-EL and JSP 2.0 2008/2/14, javaskull [EMAIL PROTECTED]: I'm using RAD 7.0 and WAS 6.1 which is a JSP 2.0 container. If I'm using the Struts 1.38 version, should I not put Struts-EL in the WEB- INF\lib folder? I had read that Struts-EL won't work with JSP 2.0 and I should not use Struts-EL for that. Thanks, You don't need it since EL evaluation is made by the container with JSP 2.x. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax tabbedPanel and sitemesh problem
It works if I put s:head theme=ajax/ in the body of the html. daveck wrote: Hi, I am having problem using an ajax tabbedPanel with sitemesh. If I don't decorate page.jsp, the tabbedPanel works fine. As soon as I decorate it, the s:head theme=ajax / in the head section of page.jsp doesn't make it through to the final decorated page. As a result, only the html is displayed. Any help would be appreciated. Thank you. David -- View this message in context: http://www.nabble.com/Ajax-tabbedPanel-and-sitemesh-problem-tp15481642p15484121.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]
Parameters in URL
Hi, i'm new to struts. I'm developing a web application and I can't understand why parameters still in the url beetwen actions calls. I try to explain it better (sorry for my poor english): I call myAction?paramx=valuex and the url becomes .../myAction?paramx=valuex correctly. Then, my new displayed JSP call myAction2 but the shown url is .../myAction?paramx=valuex even if i invoked myAction2 without any parameter. So I've two questions: 1)It's only a display thing or paramx=valuex is actually passed also to myAction2? 2)How I can avoid this behaviour?I read about includeparams=false in struts.xml, but I'm not sure if it's the right solution... Thank you in advance!! -- View this message in context: http://www.nabble.com/Parameters-in-URL-tp15485039p15485039.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: Parameters in URL
http://struts.apache.org/2.0.11/docs/why-are-request-parameters-appended-to-our-hyperlinks.html regards musachy On Thu, Feb 14, 2008 at 1:33 PM, Paranoid_Fabio [EMAIL PROTECTED] wrote: Hi, i'm new to struts. I'm developing a web application and I can't understand why parameters still in the url beetwen actions calls. I try to explain it better (sorry for my poor english): I call myAction?paramx=valuex and the url becomes .../myAction?paramx=valuex correctly. Then, my new displayed JSP call myAction2 but the shown url is .../myAction?paramx=valuex even if i invoked myAction2 without any parameter. So I've two questions: 1)It's only a display thing or paramx=valuex is actually passed also to myAction2? 2)How I can avoid this behaviour?I read about includeparams=false in struts.xml, but I'm not sure if it's the right solution... Thank you in advance!! -- View this message in context: http://www.nabble.com/Parameters-in-URL-tp15485039p15485039.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] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: datetimepicker (type=time) problem - SOLVED!
Ah-ha! The theme=ajax attribute has to be on the head tag, not on the picker. That is the ticket. It works like a charm now! Thank you Jeromy! On Wed, Feb 13, 2008 at 5:17 PM, Jeromy Evans [EMAIL PROTECTED] wrote: StrutsTimePicker is an extension of the dropdowndatepicker included with Struts2. I found my test program that uses the Timepicker in Struts 2.0.8 and it still works. The JSP is below: %@ taglib prefix=s uri=/struts-tags % html head titleHello World!/title s:head theme=ajax debug=true/ /head body div id=timepicker s:datetimepicker name=incomingAnswer displayFormat=h:mm a type=time value=%{'12:34 AM'} required=true/ /div /body /html I don't see any mention in the release notes of changea affecting this between 2.0.8 and 2.0.9 (http://struts.apache.org/2.0.11/docs/release-notes-2011.html) I suggest creating a test application like the one above. You're right they're not working in the showcase for some reason. I just remembered a developer mention that in the latest version an ID is *usually* mandatory for the dojo widgets. Try giving yours an ID too. Let me know if you have any success. If not, I'll convert my test program to 2.0.9. Belinda Lawson wrote: It appears that planetstruts.org's demo pages suffer the same problem. See anything wrong there with their examples? http://www.planetstruts.org/struts2-showcase/tags/ui/timepicker/ 7 I'll take a look in firebug too. Thanks -- I hadn't used that before. View Source shows something sort of interesting. It's using dojoType=struts:StrutsTimePicker instead of using dojoType=dropdowndatepicker Does that make any sense that it would be a completely different dojoType that belongs to some struts library instead of to the dojo code? Just seems a little strange to me. On Feb 13, 2008 3:13 PM, Jeromy Evans [EMAIL PROTECTED] wrote: Your JSP below looks correct. If the date picker is on the same page and is working, all I can think of is an ID conflict or the time picker is using the wrong theme. Have a look at the generated HTML to ensure the dojo tag is included and looks right. Ensure there's no ID conflict with the other date picker Ensure it's using the ajax theme Use FireBug to ensure all the required resources are being loaded (no 404 not found errors) I don't use it any more but when I did the JSP looked like this: s:datetimepicker name=incomingAnswer displayFormat=h:mm a type=time value=%{defaultAnswerTime} required=true/ Belinda Lawson wrote: Hello, I'm trying to use the datetimepicker tag to enter both a date and a time independently. The date portion works fine. However, I find that when I use the attribute type=time, my picker does not appear on the page. My tag looks like this: s:datetimepicker label=Start Time type=time name=dateRangeStartTime displayFormat=HH:mm / Can anyone tell me what I've left out in order to get it to render properly? I'm on 2.0.9. Thanks much, -Belinda No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.4/1277 - Release Date: 13/02/2008 8:00 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.4/1277 - Release Date: 13/02/2008 8:00 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts2 JSF Integration
Hello, I'm new to Struts2 JSF. Please help with the following questions. Where can I find documentation for Struts2 JSF Integration. What steps I should follow to create a web application using Struts2 JSF. Where can I get a good working example of Struts2 JSF Integration. If anyone has a working example plz send it across. Thanx, Kumar
Scope interceptor / Practical Apache Struts 2
Hello, In Chapter 6 of Practical Apache Struts 2 Web 2.0 Projects, It explains how to use the scope interceptor to create sort of wizard pages. I've been trying to figure these out, but cannot get this to work. Even the included example (downloadable from http://www.apress.com/book/view/1590599039 ) do not work for me. I was hoping someone could try them and tell me if they are indeed broken or if i am doing something wrong. And what that might be? Running the examples with no changes and when going to the second step in the workflow I get the following error: HTTP ERROR: 500 Error setting expression 'model' with value '[EMAIL PROTECTED]' RequestURI=/app/event/selectLocation!input.action Caused by: Error setting expression 'model' with value '[EMAIL PROTECTED]' - [unknown location] at com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java:171) at com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java:146) at org.apache.struts2.interceptor.ScopeInterceptor.before(ScopeInterceptor.java:321) at org.apache.struts2.interceptor.ScopeInterceptor.intercept(ScopeInterceptor.java:424) cut Caused by: No object in the CompoundRoot has a publicly accessible property named 'model' (no setter could be found). - [unknown location] at com.opensymphony.xwork2.util.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:68) at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656) at ognl.ASTProperty.setValueBody(ASTProperty.java:101) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) cut Can provide full stack trace if needed The following is also outputted from the example. SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'duration' on 'class com.fdar.apress.s2.actions.event.EnterEventDetailsAction: Error setting expression 'duration' with value '[Ljava.lang.String;@602f892f' 14-feb-2008 20:10:30 com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'name' on 'class com.fdar.apress.s2.actions.event.EnterEventDetailsAction: Error setting expression 'name' with value '[Ljava.lang.String;@50d79dfe' 14-feb-2008 20:10:30 com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'timeZoneOffset' on 'class com.fdar.apress.s2.actions.event.EnterEventDetailsAction: Error setting expression 'timeZoneOffset' with value '[Ljava.lang.String;@52a53948' 14-feb-2008 20:10:30 com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parameters in URL
Ok.I've read that but even using includeParams=none params are shown in the URL. My code is like this: s:url id=en action=showAdminPage includeParams=false s:param name=request_localeen_US/s:param /s:url s:a href=%{en} When the user clicks on the English flag, the showAdminPage is called switching the Locale. I'm using the url tag correctly.Am I? Clicking on the link, the browser shows ../showAdminPage.action?request_locale=en_US e the parameter remains displayed when i call other actions from the new jsp. What i'm doing wrong? Paranoid_Fabio wrote: Hi, i'm new to struts. I'm developing a web application and I can't understand why parameters still in the url beetwen actions calls. I try to explain it better (sorry for my poor english): I call myAction?paramx=valuex and the url becomes .../myAction?paramx=valuex correctly. Then, my new displayed JSP call myAction2 but the shown url is .../myAction?paramx=valuex even if i invoked myAction2 without any parameter. So I've two questions: 1)It's only a display thing or paramx=valuex is actually passed also to myAction2? 2)How I can avoid this behaviour?I read about includeparams=false in struts.xml, but I'm not sure if it's the right solution... Thank you in advance!! -- View this message in context: http://www.nabble.com/Parameters-in-URL-tp15485039p15488658.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: Parameters in URL
--- Paranoid_Fabio [EMAIL PROTECTED] wrote: s:url id=en action=showAdminPage includeParams=false s:param name=request_localeen_US/s:param /s:url s:a href=%{en} I'm using the url tag correctly.Am I? No. What i'm doing wrong? You're using an unknown value for the includeParams attribute. http://struts.apache.org/2.0.11/docs/url.html Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dynamic Results
Anyone realize why this is not working? I have get/set methods in my ChartAction, but the getters are not fetching the values for the Result. action name=chart class=actions.ChartAction result type=chart param name=height${height}/param param name=width${width}/param /result /action -- Scott [EMAIL PROTECTED]
Re: Parameters in URL
set includeParams = 'none' On Thu, Feb 14, 2008 at 3:31 PM, Dave Newton [EMAIL PROTECTED] wrote: --- Paranoid_Fabio [EMAIL PROTECTED] wrote: s:url id=en action=showAdminPage includeParams=false s:param name=request_localeen_US/s:param /s:url s:a href=%{en} I'm using the url tag correctly.Am I? No. What i'm doing wrong? You're using an unknown value for the includeParams attribute. http://struts.apache.org/2.0.11/docs/url.html Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Scope interceptor / Practical Apache Struts 2
I just re-ran my local version of the code without problems, and verified that the base class does have a getModel() and setModel() methods. If you contact me off-list I can supply another copy of the code, that might be a resolution. Did you have any problems running the code from chapter 5? /Ian -- Ian Roughley From Down Around, Inc. Consulting * Training / Mentoring * Agile Process * Open Source web: http://www.fdar.com - email: [EMAIL PROTECTED] Selckin wrote: Hello, In Chapter 6 of Practical Apache Struts 2 Web 2.0 Projects, It explains how to use the scope interceptor to create sort of wizard pages. I've been trying to figure these out, but cannot get this to work. Even the included example (downloadable from http://www.apress.com/book/view/1590599039 ) do not work for me. I was hoping someone could try them and tell me if they are indeed broken or if i am doing something wrong. And what that might be? Running the examples with no changes and when going to the second step in the workflow I get the following error: HTTP ERROR: 500 Error setting expression 'model' with value '[EMAIL PROTECTED]' RequestURI=/app/event/selectLocation!input.action Caused by: Error setting expression 'model' with value '[EMAIL PROTECTED]' - [unknown location] at com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java:171) at com.opensymphony.xwork2.util.OgnlValueStack.setValue(OgnlValueStack.java:146) at org.apache.struts2.interceptor.ScopeInterceptor.before(ScopeInterceptor.java:321) at org.apache.struts2.interceptor.ScopeInterceptor.intercept(ScopeInterceptor.java:424) cut Caused by: No object in the CompoundRoot has a publicly accessible property named 'model' (no setter could be found). - [unknown location] at com.opensymphony.xwork2.util.CompoundRootAccessor.setProperty(CompoundRootAccessor.java:68) at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656) at ognl.ASTProperty.setValueBody(ASTProperty.java:101) at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177) cut Can provide full stack trace if needed The following is also outputted from the example. SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'duration' on 'class com.fdar.apress.s2.actions.event.EnterEventDetailsAction: Error setting expression 'duration' with value '[Ljava.lang.String;@602f892f' 14-feb-2008 20:10:30 com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'name' on 'class com.fdar.apress.s2.actions.event.EnterEventDetailsAction: Error setting expression 'name' with value '[Ljava.lang.String;@50d79dfe' 14-feb-2008 20:10:30 com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'timeZoneOffset' on 'class com.fdar.apress.s2.actions.event.EnterEventDetailsAction: Error setting expression 'timeZoneOffset' with value '[Ljava.lang.String;@52a53948' 14-feb-2008 20:10:30 com.opensymphony.xwork2.interceptor.ParametersInterceptor setParameters Thanks. - 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: serializable and exceptions
Yes, for my own objects, i am going to implement the serializable interface, however, the xwork class, even if i were to rewrite/replace it, i would also have to rewrite the interceptor to use the new object ... On 2/14/08, Randy Burgess [EMAIL PROTECTED] wrote: That would be the first thing I would do and generate a serialVersionUID for the pojo. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications From: Brian Relph [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Thu, 14 Feb 2008 10:38:28 -0600 To: Struts Users Mailing List user@struts.apache.org Subject: serializable and exceptions Hey everyone, I seem to be coming across two issues when running multiple jvms with session sharing ... i have not run into this during my previous testing, since i was not worried about a high-availability environment, and did not test inside a cluster... Anyways, i receive this exception when using the ModelDriven interface (the Accounts object is my model): [2/14/08 3:35:04:737 GMT] 0052 HttpSessDRSBu E storeObject: Caught Exception while trying to serialize. Stack trace: java.io.NotSerializableException: com.cerner.healthe.admin.portlet.model.Accounts I did not really investigate how the ModelDriven interface works, it just made my ui code cleaner, and allowed me to group a bunch of fields outside of my action. Anyways, i was wondering if changing the ModelDriven interface to require the object to implement Serializable would make sense? Because of this serializable exception, my exception interceptor forwards me to a page, and then i display the exception. At this point, i get another similar exception: [2/14/08 16:16:48:936 GMT] 0029 HttpSessDRSBu E storeObject: Caught Exception while trying to serialize. Stack trace: java.io.NotSerializableException: com.opensymphony.xwork2.interceptor.ExceptionHolder I see that the xwork2 interceptor implement the Serializable interface, but that particular class does not. Is xwork2 code part of the struts2 code base, i.e., is this the right place to post for these exceptions? Finally (this kinda has a bunch of things all wrapped into one), is there any easier way to increase the logging of the exception interceptor, besides re-defining the default interceptor stack? I tried to just re-define the interceptor, i also tried to just set the parameters, but it did not seem to work unless i configured my own stack in this way: interceptors interceptor-stack name=defaultLoggingStack interceptor-ref name=exception param name=logEnabledtrue/param param name=logLevelwarn/param /interceptor-ref interceptor-ref name=alias / interceptor-ref name=servlet-config / interceptor-ref name=prepare / interceptor-ref name=i18n / interceptor-ref name=chain / interceptor-ref name=debugging / interceptor-ref name=profiling / interceptor-ref name=scoped-model-driven / interceptor-ref name=model-driven / interceptor-ref name=fileUpload / interceptor-ref name=checkbox / interceptor-ref name=static-params / interceptor-ref name=params / interceptor-ref name=conversionError / interceptor-ref name=validation param name=excludeMethods input,back,cancel,browse /param /interceptor-ref interceptor-ref name=workflow param name=excludeMethods input,back,cancel,browse /param /interceptor-ref /interceptor-stack !-- Default stack for operating in portlet environment -- interceptor-stack name=portletDefaultLoggingStack interceptor-ref name=portletState / interceptor-ref name=defaultLoggingStack / interceptor-ref name=portletAware / /interceptor-stack /interceptors -- Brian This email and any attachments (Message) may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brian
Re: Struts2 JSF Integration
Maybe this helps: http://struts.apache.org/2.x/docs/jsf-plugin.html Venkata Nagendra wrote: Hello, I'm new to Struts2 JSF. Please help with the following questions. Where can I find documentation for Struts2 JSF Integration. What steps I should follow to create a web application using Struts2 JSF. Where can I get a good working example of Struts2 JSF Integration. If anyone has a working example plz send it across. Thanx, Kumar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parameters in URL
Teach a man to fish... --- Musachy Barroso [EMAIL PROTECTED] wrote: set includeParams = 'none' On Thu, Feb 14, 2008 at 3:31 PM, Dave Newton [EMAIL PROTECTED] wrote: --- Paranoid_Fabio [EMAIL PROTECTED] wrote: s:url id=en action=showAdminPage includeParams=false s:param name=request_localeen_US/s:param /s:url s:a href=%{en} I'm using the url tag correctly.Am I? No. What i'm doing wrong? You're using an unknown value for the includeParams attribute. http://struts.apache.org/2.0.11/docs/url.html Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - 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: Parameters in URL
:) On Thu, Feb 14, 2008 at 3:42 PM, Dave Newton [EMAIL PROTECTED] wrote: Teach a man to fish... --- Musachy Barroso [EMAIL PROTECTED] wrote: set includeParams = 'none' On Thu, Feb 14, 2008 at 3:31 PM, Dave Newton [EMAIL PROTECTED] wrote: --- Paranoid_Fabio [EMAIL PROTECTED] wrote: s:url id=en action=showAdminPage includeParams=false s:param name=request_localeen_US/s:param /s:url s:a href=%{en} I'm using the url tag correctly.Am I? No. What i'm doing wrong? You're using an unknown value for the includeParams attribute. http://struts.apache.org/2.0.11/docs/url.html Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hey you! Would you help me to carry the stone? Pink Floyd - 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] -- Hey you! Would you help me to carry the stone? Pink Floyd - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Results
--- [EMAIL PROTECTED] wrote: Anyone realize why this is not working? I have get/set methods in my ChartAction, but the getters are not fetching the values for the Result. action name=chart class=actions.ChartAction result type=chart param name=height${height}/param param name=width${width}/param /result /action Probably because the chart result doesn't parse its parameters. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
More sitemesh struts2 problems
sitemesh is taking the content from the first pair of tags in the main.jsp (my main decorator) and putting it in the s:tabbedPanel id=test /tabbledPanel tag of the page it's trying to decorate! The first pair of tags could be any html tag (p/p, div,/div, etc...). The code is in a post I left earlier today. Crazy... any help would be appreciated. Feel dumb. -- View this message in context: http://www.nabble.com/More-sitemesh-struts2-problems-tp15489382p15489382.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: serializable and exceptions
I wonder if making your object implement serializable will have any affect on the Xwork object. Have you tried to see what happens? Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications From: Brian Relph [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Thu, 14 Feb 2008 14:27:19 -0600 To: Struts Users Mailing List user@struts.apache.org Subject: Re: serializable and exceptions Yes, for my own objects, i am going to implement the serializable interface, however, the xwork class, even if i were to rewrite/replace it, i would also have to rewrite the interceptor to use the new object ... On 2/14/08, Randy Burgess [EMAIL PROTECTED] wrote: That would be the first thing I would do and generate a serialVersionUID for the pojo. Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications From: Brian Relph [EMAIL PROTECTED] Reply-To: Struts Users Mailing List user@struts.apache.org Date: Thu, 14 Feb 2008 10:38:28 -0600 To: Struts Users Mailing List user@struts.apache.org Subject: serializable and exceptions Hey everyone, I seem to be coming across two issues when running multiple jvms with session sharing ... i have not run into this during my previous testing, since i was not worried about a high-availability environment, and did not test inside a cluster... Anyways, i receive this exception when using the ModelDriven interface (the Accounts object is my model): [2/14/08 3:35:04:737 GMT] 0052 HttpSessDRSBu E storeObject: Caught Exception while trying to serialize. Stack trace: java.io.NotSerializableException: com.cerner.healthe.admin.portlet.model.Accounts I did not really investigate how the ModelDriven interface works, it just made my ui code cleaner, and allowed me to group a bunch of fields outside of my action. Anyways, i was wondering if changing the ModelDriven interface to require the object to implement Serializable would make sense? Because of this serializable exception, my exception interceptor forwards me to a page, and then i display the exception. At this point, i get another similar exception: [2/14/08 16:16:48:936 GMT] 0029 HttpSessDRSBu E storeObject: Caught Exception while trying to serialize. Stack trace: java.io.NotSerializableException: com.opensymphony.xwork2.interceptor.ExceptionHolder I see that the xwork2 interceptor implement the Serializable interface, but that particular class does not. Is xwork2 code part of the struts2 code base, i.e., is this the right place to post for these exceptions? Finally (this kinda has a bunch of things all wrapped into one), is there any easier way to increase the logging of the exception interceptor, besides re-defining the default interceptor stack? I tried to just re-define the interceptor, i also tried to just set the parameters, but it did not seem to work unless i configured my own stack in this way: interceptors interceptor-stack name=defaultLoggingStack interceptor-ref name=exception param name=logEnabledtrue/param param name=logLevelwarn/param /interceptor-ref interceptor-ref name=alias / interceptor-ref name=servlet-config / interceptor-ref name=prepare / interceptor-ref name=i18n / interceptor-ref name=chain / interceptor-ref name=debugging / interceptor-ref name=profiling / interceptor-ref name=scoped-model-driven / interceptor-ref name=model-driven / interceptor-ref name=fileUpload / interceptor-ref name=checkbox / interceptor-ref name=static-params / interceptor-ref name=params / interceptor-ref name=conversionError / interceptor-ref name=validation param name=excludeMethods input,back,cancel,browse /param /interceptor-ref interceptor-ref name=workflow param name=excludeMethods input,back,cancel,browse /param /interceptor-ref /interceptor-stack !-- Default stack for operating in portlet environment -- interceptor-stack name=portletDefaultLoggingStack interceptor-ref name=portletState / interceptor-ref name=defaultLoggingStack / interceptor-ref name=portletAware / /interceptor-stack /interceptors -- Brian This email and any attachments (Message) may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Brian This email and any attachments (Message) may contain
Bypassing action mappings
Hi - Newbie question- I hope this isn't too obvious. I'm trying to enable the OGNL debug console (using request param 'debug=console'), and am receiving the error There is no Action mapped for namespace /struts and action name webconsole since struts is trying to map the URL. The webconsole is just a plain HTML file - the DebuggingInterceptor tries to launch it in a new window with URL /struts/webconsole.html. Do I need to declare the webconsole.html file in my struts.xml somehow, so it gets left alone? I don't see a way to do this in the DTD. Do I need to declare a limited interceptor stack? Thanks for ideas - Kent -- View this message in context: http://www.nabble.com/Bypassing-action-mappings-tp15490514p15490514.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: Bypassing action mappings
--- wkbutler [EMAIL PROTECTED] wrote: I'm trying to enable the OGNL debug console (using request param 'debug=console'), and am receiving the error There is no Action mapped for namespace /struts and action name webconsole since struts is trying to map the URL. The webconsole is just a plain HTML file - the DebuggingInterceptor tries to launch it in a new window with URL /struts/webconsole.html. Do I need to declare the webconsole.html file in my struts.xml somehow, so it gets left alone? I don't see a way to do this in the DTD. Do I need to declare a limited interceptor stack? Have you done anything odd in your struts.xml? What does your filter mapping look like? You shouldn't need to do anything to get debug=console to work. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Results
I understand the quirky plug-in, but that does not explain why OGNL is looking for a setHeight(String) on ChartResult! If I hardcode ints into these two parms, life is good. I am puzzled at why S2 is not executing getHeight() on my ChartAction and substituting the height and weight into these params. Can you look at this http://struts.apache.org/2.x/docs/result-configuration.htmland tell me how the two differ? Peace, Scott On Thu, Feb 14, 2008 at 3:35 PM, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: Anyone realize why this is not working? I have get/set methods in my ChartAction, but the getters are not fetching the values for the Result. action name=chart class=actions.ChartAction result type=chart param name=height${height}/param param name=width${width}/param /result /action Probably because the chart result doesn't parse its parameters. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Re: Dynamic Results
--- [EMAIL PROTECTED] wrote: I understand the quirky plug-in, but that does not explain why OGNL is looking for a setHeight(String) on ChartResult! Because parameters can be for the result (for example, FreeMarkerResult's contentType parameter). I am puzzled at why S2 is not executing getHeight() on my ChartAction and substituting the height and weight into these params. I already told you; the JFreeChart result class doesn't parse parameters. Evaluating parameters isn't a it just happens thing, it's dependent on how the result is coded. If you look at the code for StrutsResultSupport you'll see that there's a method called conditionalParse() that handles that. The JFreeChart result does not extend StrutsResultSupport; it is simply an implementation of Result, and therefore does not evaluate expressions contained in its parameters. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [struts] Dynamic Results
[EMAIL PROTECTED] wrote: I am puzzled at why S2 is not executing getHeight() on my ChartAction and substituting the height and weight into these params. This is done by StrutsResultSupport. I would guess that whatever class is implementing your chart result does not extend/leverage that capability. http://struts.apache.org/2.0.11/struts2-core/apidocs/org/apache/struts2/dispatcher/StrutsResultSupport.html -Dale - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Results
D -- Have you ever been asked to write children's books? :-) S On Thu, Feb 14, 2008 at 4:33 PM, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: I understand the quirky plug-in, but that does not explain why OGNL is looking for a setHeight(String) on ChartResult! Because parameters can be for the result (for example, FreeMarkerResult's contentType parameter). I am puzzled at why S2 is not executing getHeight() on my ChartAction and substituting the height and weight into these params. I already told you; the JFreeChart result class doesn't parse parameters. Evaluating parameters isn't a it just happens thing, it's dependent on how the result is coded. If you look at the code for StrutsResultSupport you'll see that there's a method called conditionalParse() that handles that. The JFreeChart result does not extend StrutsResultSupport; it is simply an implementation of Result, and therefore does not evaluate expressions contained in its parameters. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
s:select / and AJAX
All, Need some help and or direction in how to chain together s:select / tags using ajax. I understand the basics of how it works, but I cant make it happen using struts 2. Does anyone have some examples or something I can check out? I would be very appreciative. E. Ryan Stanley Phone: 720.578.3703 Pager: 801.482.0172 mailto:[EMAIL PROTECTED] This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
Re: [struts] Dynamic Results
--- [EMAIL PROTECTED] wrote: The ChartAction extends ActionSupport. Wouldn't the action-mapping-OGNL-parsing be looking for height/width getters on the ChartAction? I think we're all talking past each other here. It's the responsibility of the *result* to parse OGNL in its parameters: the JFreeChart result doesn't do that. If you look at the source of the JFreeChart result and compare it to something like the servlet redirect result you'll notice that JFreeChart just implements Result, whereas the the servlet result result extends StrutsResultSupport. It's StrutsResultSupport that does the evaluation of parameters. Dave On Thu, Feb 14, 2008 at 4:39 PM, Dale Newfield [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: I am puzzled at why S2 is not executing getHeight() on my ChartAction and substituting the height and weight into these params. This is done by StrutsResultSupport. I would guess that whatever class is implementing your chart result does not extend/leverage that capability. http://struts.apache.org/2.0.11/struts2-core/apidocs/org/apache/struts2/dispatcher/StrutsResultSupport.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Re: Dynamic Results
--- [EMAIL PROTECTED] wrote: Have you ever been asked to write children's books? :-) Yes, and illustrate. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: radio tag - how to have the items order vertically?
you suggested: Use theme=simple on the radio then add breaks between each radio button; or Q: what do you mean by add breaks between each radio button Thank you! -- View this message in context: http://www.nabble.com/radio-tag---how-to-have-the-items-order-vertically--tp15468384p15492163.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: radio tag - how to have the items order vertically?
--- xianwinwin [EMAIL PROTECTED] wrote: you suggested: Use theme=simple on the radio then add breaks between each radio button; or Q: what do you mean by add breaks between each radio button You'll probably need to either: modify an existing s:radio.../ template, create your own, or play around with CSS to force it to render how you want. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: radio tag - how to have the items order vertically?
When you use theme=simple the radio buttons are rendered as plain html inputs: eg. input type=radio name=... You can simply lay theme out using HTML or css: eg. with line breaks: s:radio .../br/s:radio .../br/ with css: input['type='radio'] { display: block; } or within a table. If you're using the radios from a list it may be easier to override the template to include a br/ between each item. xianwinwin wrote: you suggested: Use theme=simple on the radio then add breaks between each radio button; or Q: what do you mean by add breaks between each radio button Thank you! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: radio tag - how to have the items order vertically?
is there any concrete example of how to modify an existing s:radio.../ template, thanks! -- View this message in context: http://www.nabble.com/radio-tag---how-to-have-the-items-order-vertically--tp15468384p15492763.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: More sitemesh struts2 problems
daveck wrote: sitemesh is taking the content from the first pair of tags in the main.jsp (my main decorator) and putting it in the s:tabbedPanel id=test /tabbledPanel tag of the page it's trying to decorate! Is it possible that you're using a remote tab and sitemesh is doing it's job decorating the ajax html response? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Ajax tabbedPanel and sitemesh problem
Is it possible your decorator is missing the decorator:head/ tag in its head section? daveck wrote: It works if I put s:head theme=ajax/ in the body of the html. daveck wrote: Hi, I am having problem using an ajax tabbedPanel with sitemesh. If I don't decorate page.jsp, the tabbedPanel works fine. As soon as I decorate it, the s:head theme=ajax / in the head section of page.jsp doesn't make it through to the final decorated page. As a result, only the html is displayed. Any help would be appreciated. Thank you. David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dynamic Results
action name=chart class=actions.ChartAction result type=chart param name=height${height}/param param name=width${width}/param /result /action I double checked my configuration and I have itJustHappens=true :) It seems very odd that OGNL tried issuing chart.setHeight(${height}) Caused by: java.lang.NoSuchMethodException: setHeight(java.lang.String) 2008-02-14 17:44:53,229Caught OgnlException while setting property 'height' on type 'org.apache.struts2.dispatcher.ChartResult'.
Re: Dynamic Results
--- [EMAIL PROTECTED] wrote: It seems very odd that OGNL tried issuing chart.setHeight(${height}) Why? It has a java.lang.String parameter; it's matching method signatures. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Rumors about poor performance
I've got an anecdotal report of Spring MVC performance being *much* better than Struts 2. And zero data to back it up. ;) I'm trying to get the version numbers that were used for testing (most likely the 2.0.11 GA release) and more information on what the tests looked like. I'm told that it was just simple page requests, nothing fancy. Has anyone had occasion to test similar apps done in both frameworks? Any relevant experience to share? Thanks, -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem in validating optiontransferselect element
Prashant Khanal wrote: @RequiredFieldValidator(key=sequence.selectedLevelsNotEmpty, message = one or more levels must be selected) public void setSelectedLevels(ListLong selectedLevels) { this.selectedLevels = selectedLevels; } As i have to validate the right select element of the optiontransferselect so i used the setter property of the selectedLevels. Hope i am missing something as upon submit no validation error is thrown. Try including a getter for this property as well. Validation is performed on the action instance so it will need to call getSelectedLevel() to validate this property I also can't recall whether these validators work on collections or not. regards, Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bypassing action mappings
That was it Dave, thanks. I'm using Appfuse and it declares a StaticFilter in the web.xml - adding /struts/* to the includes did the trick. newton.dave wrote: --- wkbutler [EMAIL PROTECTED] wrote: I'm trying to enable the OGNL debug console (using request param 'debug=console'), and am receiving the error There is no Action mapped for namespace /struts and action name webconsole since struts is trying to map the URL. The webconsole is just a plain HTML file - the DebuggingInterceptor tries to launch it in a new window with URL /struts/webconsole.html. Do I need to declare the webconsole.html file in my struts.xml somehow, so it gets left alone? I don't see a way to do this in the DTD. Do I need to declare a limited interceptor stack? Have you done anything odd in your struts.xml? What does your filter mapping look like? You shouldn't need to do anything to get debug=console to work. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Bypassing-action-mappings-tp15490514p15494933.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: German/Turkey etc decimal use comma in input fields.
I've implemented this now... but its not working correctly. I'm using Struts 2.0.9 (am aware of the new versions). I have an AmountDTO which has a CurrencyCode (String), and a BigDecimal. I have created an xwork-conversion.properties in the root of the classpath which has the following line in it. java.math.BigDecimal=example.BigDecimalConverter The converter was not working at all with the ActionClass-conversion.properties. I lookup the current locale as follows Locale locale = ActionContext.getContext().getLocale(); NumberFormat format = DecimalFormat.getInstance(locale); If i turn on Debug, i can step through the convertFromString method, and the correct value is assigned to the result. The converter works!!! :) this is a good thing. However, after the converter - the AmountDTO.value in the action has null set against it. (value is a BigDecimal with appropriate getters and setters) What could cause this? All I have changed is the converter, and its obeying its contract correctly (and detecting the appropriate class, and returning an appropriate instance) Ideas? Jeromy Evans - Blue Sky Minds wrote: This should give you an idea. It's modified from existing code so I haven't tested it. I've decided to use a collection of NumberFormat's. You could use any string - decimal conversion technique you like. This can be used to an action by created a actionname-conversion.properties will in the same directory as the class, with an entry: propertyName=example.DecimalConverter where propertyName is the name of the property name that needs custom conversion and actionName is the short class name of your action -- View this message in context: http://www.nabble.com/German-Turkey-etc-decimal-use-comma-in-input-fields.-tp15473083p15495155.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: problem in validating optiontransferselect element
Hello Jeromy, I do have getters for this property as well. I am not been able to find a way out on this. I have to check whether or not the selected list is empty. I could not get any hints from the mailing list archive too. On 2/15/08, Jeromy Evans [EMAIL PROTECTED] wrote: Prashant Khanal wrote: @RequiredFieldValidator(key=sequence.selectedLevelsNotEmpty, message = one or more levels must be selected) public void setSelectedLevels(ListLong selectedLevels) { this.selectedLevels = selectedLevels; } As i have to validate the right select element of the optiontransferselect so i used the setter property of the selectedLevels. Hope i am missing something as upon submit no validation error is thrown. Try including a getter for this property as well. Validation is performed on the action instance so it will need to call getSelectedLevel() to validate this property I also can't recall whether these validators work on collections or not. regards, Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Prashant Khanal
Re: German/Turkey etc decimal use comma in input fields.
Sounds great. Nothing stands out to me. Maybe turn on developer mode to see if there's any errors logged when trying to set the value (struts.devMode=true) Is it possible it can't instantiate an AmountDTO object or call the corresponding getter before setting the BigDecimal value? Also try to set a BigDecimal in your action directly rather than the property of your AmountDTO. Another solution is to provide an AmountDTO converter rather than a BigDecimal converter.. Ned Collyer wrote: I've implemented this now... but its not working correctly. I'm using Struts 2.0.9 (am aware of the new versions). I have an AmountDTO which has a CurrencyCode (String), and a BigDecimal. I have created an xwork-conversion.properties in the root of the classpath which has the following line in it. java.math.BigDecimal=example.BigDecimalConverter The converter was not working at all with the ActionClass-conversion.properties. I lookup the current locale as follows Locale locale = ActionContext.getContext().getLocale(); NumberFormat format = DecimalFormat.getInstance(locale); If i turn on Debug, i can step through the convertFromString method, and the correct value is assigned to the result. The converter works!!! :) this is a good thing. However, after the converter - the AmountDTO.value in the action has null set against it. (value is a BigDecimal with appropriate getters and setters) What could cause this? All I have changed is the converter, and its obeying its contract correctly (and detecting the appropriate class, and returning an appropriate instance) Ideas? Jeromy Evans - Blue Sky Minds wrote: This should give you an idea. It's modified from existing code so I haven't tested it. I've decided to use a collection of NumberFormat's. You could use any string - decimal conversion technique you like. This can be used to an action by created a actionname-conversion.properties will in the same directory as the class, with an entry: propertyName=example.DecimalConverter where propertyName is the name of the property name that needs custom conversion and actionName is the short class name of your action - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem in validating optiontransferselect element
I'm not sure if the validators can be applied to collections. You can validate it yourself: - either implement Validateable in your action and check the property in the corresponding method; or - check the collection in your execute method and return input if its invalid If you action extends ActionSupport you can raise a field error directly from your action using addFieldError or addActionError. Prashant Khanal wrote: Hello Jeromy, I do have getters for this property as well. I am not been able to find a way out on this. I have to check whether or not the selected list is empty. I could not get any hints from the mailing list archive too. On 2/15/08, Jeromy Evans [EMAIL PROTECTED] wrote: Prashant Khanal wrote: @RequiredFieldValidator(key=sequence.selectedLevelsNotEmpty, message = one or more levels must be selected) public void setSelectedLevels(ListLong selectedLevels) { this.selectedLevels = selectedLevels; } As i have to validate the right select element of the optiontransferselect so i used the setter property of the selectedLevels. Hope i am missing something as upon submit no validation error is thrown. Try including a getter for this property as well. Validation is performed on the action instance so it will need to call getSelectedLevel() to validate this property I also can't recall whether these validators work on collections or not. regards, Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.5/1279 - Release Date: 14/02/2008 6:35 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem in validating optiontransferselect element
Thanks, I will give it a try. On 2/15/08, Jeromy Evans [EMAIL PROTECTED] wrote: I'm not sure if the validators can be applied to collections. You can validate it yourself: - either implement Validateable in your action and check the property in the corresponding method; or - check the collection in your execute method and return input if its invalid If you action extends ActionSupport you can raise a field error directly from your action using addFieldError or addActionError. Prashant Khanal wrote: Hello Jeromy, I do have getters for this property as well. I am not been able to find a way out on this. I have to check whether or not the selected list is empty. I could not get any hints from the mailing list archive too. On 2/15/08, Jeromy Evans [EMAIL PROTECTED] wrote: Prashant Khanal wrote: @RequiredFieldValidator(key=sequence.selectedLevelsNotEmpty, message = one or more levels must be selected) public void setSelectedLevels(ListLong selectedLevels) { this.selectedLevels = selectedLevels; } As i have to validate the right select element of the optiontransferselect so i used the setter property of the selectedLevels. Hope i am missing something as upon submit no validation error is thrown. Try including a getter for this property as well. Validation is performed on the action instance so it will need to call getSelectedLevel() to validate this property I also can't recall whether these validators work on collections or not. regards, Jeromy Evans - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.5/1279 - Release Date: 14/02/2008 6:35 PM - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Prashant Khanal
Re: German/Turkey etc decimal use comma in input fields.
It needs to be big decimal as I use other numbers that have no currency information associated. I've fixed it - I was not coverting Number to BigDecimal explicitly at the end of the method, so somewhere in the middle of the OgnlRuntime class it was swallowing up the illegal args or invalid param or something. Stupid mistake really :). Thanks for your time. Should something like this be in the core? its a couple of lines and ensures internationalisation for BigDecimals (which you should be using for any monetary stuff). Jeromy Evans - Blue Sky Minds wrote: Sounds great. Nothing stands out to me. Maybe turn on developer mode to see if there's any errors logged when trying to set the value (struts.devMode=true) Is it possible it can't instantiate an AmountDTO object or call the corresponding getter before setting the BigDecimal value? Also try to set a BigDecimal in your action directly rather than the property of your AmountDTO. Another solution is to provide an AmountDTO converter rather than a BigDecimal converter.. -- View this message in context: http://www.nabble.com/German-Turkey-etc-decimal-use-comma-in-input-fields.-tp15473083p15495541.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]