Which framework's validate if preferred? Struts - JSTL
Dear all, Struts and JSTL both have validator framework, which one is preferred if I'm using struts and JSTL in one web application? Thanks. bruce
Re: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/5
dear all, I went to http://www.theserverside.com/events/library.jsp#mcclanahan and clicked DSL to watch the video, but no video there, only one picture. Did you find the video? Could you please tell me how to find watch it? Thanks - Original Message - From: Steve Raeburn [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, October 23, 2003 11:27 PM Subject: RE: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/5 Craig's just being modest. He's *already* an Internet TV star :-) http://www.theserverside.com/events/library.jsp#mcclanahan Steve -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: October 22, 2003 10:58 PM To: Struts Users Mailing List Cc: 'Ruth, Brice' Subject: Re: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/5 Van Riper, Mike wrote: -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 12:31 PM To: Struts Users Mailing List Subject: Re: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/5 Any chance that someone could setup a DV camera, record the presentation, then post it somewhere as a small Quicktime movie? That would be excellent, too. I found a volunteer to record Craig's talk with a DV camera as you suggested. Assuming Craig gives us his permission to record the talk, we'll do that and make it available online afterwards. Oh my! I'm going to be on Internet TV! My parents will be *so* proud!!! :-) Yes, you definitely have my permission to record and broadcast this talk. Considering that this is the #1 question I have been asked by people over the last year or so, it will be very nice to be able to point them at a link that gives a comprehensive answer. FYI, Van Craig Van Riper, Mike wrote: -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 7:20 PM To: Struts Users Mailing List Subject: Re: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/ 5 Ruth, Brice wrote: Any chance of getting a webcast setup for this? For those of us not fortunate enough to be local to the 'Valley? :) You'll have to ask Van about broadcast facilities :-), I'll look into this, but, it will most likely not be happening. At my day job, I am on the critical path for completing and shipping a new product right now. So, it is not going to happen unless they have the facilities required for this at Netscape *and* I can find a volunteer with more free time than myself to set it up. Sorry, Van but I do plan to make my slides available after the talk. Craig Van Riper, Mike wrote: The next meeting of the Silicon Valley Struts User BOF will be held at Netscape in Mountain View on Wednesday, November 5th. Craig McClanahan, a senior staff engineer for Sun Microsystems, will make a presentation on this topic: Struts and JavaServer Faces -- Competition or Coexistence? Craig is uniquely qualified to give this talk, because he is both the original creator of the Struts Framework and co-specification lead for JavaServer Faces (JSR-127). You will find the full announcement including directions to Netscape here: http://www.baychi.org/bof/struts/20031105a/ (Please note the change of venue from VeriSign to Netscape for November) This meeting is being co-hosted by the Silicon Valley Java User Group (SVJUG) and the Java SIG of the East Bay I.T. Group (eBIG). Special thanks goes to SVJUG President Venki Seshaadri for arranging the meeting space at Netscape. SVJUG http://www.svjug.org/ eBIG http://www.ebig.org/sig/sig.aspx?SIGid=21 That's all folks, Van Mike Van Riper mailto:[EMAIL PROTECTED] http://www.baychi.org/bof/struts/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/5
Thanks Georg! - Original Message - From: Georg M. Meyer [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 11:16 PM Subject: Re: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/5 You have to click a question on the right side to see his answer... Am Mittwoch, 26.11.03 um 03:12 Uhr schrieb ZYD: dear all, I went to http://www.theserverside.com/events/library.jsp#mcclanahan and clicked DSL to watch the video, but no video there, only one picture. Did you find the video? Could you please tell me how to find watch it? Thanks - Original Message - From: Steve Raeburn [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, October 23, 2003 11:27 PM Subject: RE: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/5 Craig's just being modest. He's *already* an Internet TV star :-) http://www.theserverside.com/events/library.jsp#mcclanahan Steve -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: October 22, 2003 10:58 PM To: Struts Users Mailing List Cc: 'Ruth, Brice' Subject: Re: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/5 Van Riper, Mike wrote: -Original Message- From: Ruth, Brice [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 22, 2003 12:31 PM To: Struts Users Mailing List Subject: Re: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/5 Any chance that someone could setup a DV camera, record the presentation, then post it somewhere as a small Quicktime movie? That would be excellent, too. I found a volunteer to record Craig's talk with a DV camera as you suggested. Assuming Craig gives us his permission to record the talk, we'll do that and make it available online afterwards. Oh my! I'm going to be on Internet TV! My parents will be *so* proud!!! :-) Yes, you definitely have my permission to record and broadcast this talk. Considering that this is the #1 question I have been asked by people over the last year or so, it will be very nice to be able to point them at a link that gives a comprehensive answer. FYI, Van Craig Van Riper, Mike wrote: -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 7:20 PM To: Struts Users Mailing List Subject: Re: [ANN] Struts and JavaServer Faces talk by Craig McClanahan on 11/ 5 Ruth, Brice wrote: Any chance of getting a webcast setup for this? For those of us not fortunate enough to be local to the 'Valley? :) You'll have to ask Van about broadcast facilities :-), I'll look into this, but, it will most likely not be happening. At my day job, I am on the critical path for completing and shipping a new product right now. So, it is not going to happen unless they have the facilities required for this at Netscape *and* I can find a volunteer with more free time than myself to set it up. Sorry, Van but I do plan to make my slides available after the talk. Craig Van Riper, Mike wrote: The next meeting of the Silicon Valley Struts User BOF will be held at Netscape in Mountain View on Wednesday, November 5th. Craig McClanahan, a senior staff engineer for Sun Microsystems, will make a presentation on this topic: Struts and JavaServer Faces -- Competition or Coexistence? Craig is uniquely qualified to give this talk, because he is both the original creator of the Struts Framework and co-specification lead for JavaServer Faces (JSR-127). You will find the full announcement including directions to Netscape here: http://www.baychi.org/bof/struts/20031105a/ (Please note the change of venue from VeriSign to Netscape for November) This meeting is being co-hosted by the Silicon Valley Java User Group (SVJUG) and the Java SIG of the East Bay I.T. Group (eBIG). Special thanks goes to SVJUG President Venki Seshaadri for arranging the meeting space at Netscape. SVJUG http://www.svjug.org/ eBIG http://www.ebig.org/sig/sig.aspx?SIGid=21 That's all folks, Van Mike Van Riper mailto:[EMAIL PROTECTED] http://www.baychi.org/bof/struts/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- --- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail
Iterate problem
Hi, I hava a userForm that has a ArrayList of User objects, each User object has several properties: fistname, lastname, age. How can I get all User's firstname, lastname, age in an iterate? Thanks. bruce
Re: Problem of nested logic:iterate
I have a similiar problem. I hava a userForm that has a ArrayList of User objects, each User object has several properties: fistname, lastname, age. How can I get all User's firstname, lastname, age in an iterate? - Original Message - From: Sumit S. [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 13, 2003 6:35 PM Subject: RE: Problem of nested logic:iterate Here u go...I have a userForm that has a list of users. Each User further has a list of orders...here's the logic:iterate code to do what u want to do ... logic:iterate name=userForm property=users id=user bean:write name=user property=firstname/ logic:iterate name=user property=orders id=order bean:write name=order property=orderdesc/ /logic:iterate /logic:iterate Sumit -Original Message- From: Raman Garg [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 2:46 PM To: Struts Users Mailing List Subject: Problem of nested logic:iterate Hi, I have a problem regarding struts logic:iterate I need to show category wise listing of products. so can anybody advice me how to create nested logic iterate loops to accomplish this. what i need is there will be two nested logic iterates logic:iterate !--this is for listing of catergory-- logic:iterate !--this is for products under a catergory-- /logic:iterate /logic:iterate How can populate the inner loop variable??? Thanks in advance, Raman Garg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Where to get the latest Scaffold jar and documentation?
Thanks Caoilte. - Original Message - From: Caoilte O'Connor [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 16, 2003 10:04 PM Subject: Re: Where to get the latest Scaffold jar and documentation? The Scaffold in Struts in Action book is very different from the version included with the Artimus example app in Struts 1.1 contrib. I wouldn't advise using those chapters as anything more than a general introduction to the framework. and AFAIK ted considers the framework finished. c On Saturday 15 November 2003 09:20, ZYD wrote: I downloaded a file called scaffold-lib_1_1_b1.zip, there are two jar files inside: commons-scaffold.jar and struts-scaffold.jar In Struts in Action, page 434, org.apache.scaffold.text.MessageUtils is metioned. Does anybody knows where is it? It's not in the two jar files above. I cannot find it anywhere. Even jakarta.apache.org . I also searched the net using google, still no answer. If you are using Scaffold, please give me some help, thanks in advance. bruce BTW: Is Scaffold still being actively maintained and updated? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Where to get the latest Scaffold jar and documentation?
I downloaded a file called scaffold-lib_1_1_b1.zip, there are two jar files inside: commons-scaffold.jar and struts-scaffold.jar In Struts in Action, page 434, org.apache.scaffold.text.MessageUtils is metioned. Does anybody knows where is it? It's not in the two jar files above. I cannot find it anywhere. Even jakarta.apache.org . I also searched the net using google, still no answer. If you are using Scaffold, please give me some help, thanks in advance. bruce BTW: Is Scaffold still being actively maintained and updated?
Multibox + iterate + design question
Dear all I have a design question: there are three columns in a database table: category_id, category_description, is_main_category I want to iterate all the records in this table in a jsp page using one check box for each record. category_id is the checkbox's value, category_description is the label. If the is_main_category is true, then I want to display the label in bold font. What's the good approach to this scenario? Thanks in advance. -bruce
multibox - Null attribute name ServletException
I tried to use multibox. I copied the code snippet from Struts in Action, but I got: [ServletException in:/WEB-INF/jsp/form/multiboxTest.jsp] Null attribute name' --- This is my multiboxTest.jsp: %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html:form action=/Multibox table border=0 width=100% logic:iterate id=item property=items html:multibox property=selectedItems bean:write name=item/ /html:multibox bean:write name=item/ /logic:iterate !-- Buttons -- tr td html:submit property=ok onclick=bCancel=false; bean:message key=button.ok/ /html:submit nbsp; html:submit property=cancel onclick=bCancel=true; bean:message key=button.cancel/ /html:submit /td /tr /table /html:form --- This is my ActionForm: MultiboxForm .java public class MultiboxForm extends ActionForm { private String[] selectedItems = {}; private String[] items = { UPS, FedEx, Airborne }; public String[] getSelectedItems() { return this.selectedItems; } public void setSelectedItems(String[] selectedItems) { this.selectedItems = selectedItems; } public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); return errors; } }
Can the name attribute be omitted form html:iterate tag ?
Hi The following two code snippets are from Struts in Action, I copied them to my JSP page and ActionForm. but I cannot get it work. I got : [ServletException in:/WEB-INF/jsp/form/multiboxTestSubmit.jsp] Null attribute name' What's wrong with it? What do I need to pay attention to? Please help me out of this, I have been puzzled by it for several days. Thanks in advance. bruce logic:iterate id=item property=items html:multibox property=selectedItems bean:write name=item/ /html:multibox bean:write name=item/ /logic:iterate -- private String[] selectedItems = {}; private String[] items = { UPS, FedEx, Airborne }; public String[] getSelectedItems() { return this.selectedItems; } public void setSelectedItems(String[] selectedItems) { this.selectedItems = selectedItems; }
Re: multibox - Null attribute name ServletException
Thanks for your response. Could you give me some hint? I'm a struts newbie. Thanks a lot. - Original Message - From: Firat TIRYAKI [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 06, 2003 11:04 PM Subject: Re: multibox - Null attribute name ServletException store the properties in a bean and recall them in your action. F. - Original Message - From: ZYD [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 06, 2003 3:52 AM Subject: multibox - Null attribute name ServletException I tried to use multibox. I copied the code snippet from Struts in Action, but I got: [ServletException in:/WEB-INF/jsp/form/multiboxTest.jsp] Null attribute name' --- This is my multiboxTest.jsp: %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html:form action=/Multibox table border=0 width=100% logic:iterate id=item property=items html:multibox property=selectedItems bean:write name=item/ /html:multibox bean:write name=item/ /logic:iterate !-- Buttons -- tr td html:submit property=ok onclick=bCancel=false; bean:message key=button.ok/ /html:submit nbsp; html:submit property=cancel onclick=bCancel=true; bean:message key=button.cancel/ /html:submit /td /tr /table /html:form --- This is my ActionForm: MultiboxForm .java public class MultiboxForm extends ActionForm { private String[] selectedItems = {}; private String[] items = { UPS, FedEx, Airborne }; public String[] getSelectedItems() { return this.selectedItems; } public void setSelectedItems(String[] selectedItems) { this.selectedItems = selectedItems; } public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); return errors; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: multibox - Null attribute name ServletException - SOLVED
I change html:iterate tag to: logic:iterate id=item name=multiboxTest property=items the =multiboxTest is the ActionForm bean's name in struts-config.xml. and add getter/setter for items, now it works. Thanks. bruce - Original Message - From: ZYD [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 06, 2003 10:23 AM Subject: Re: multibox - Null attribute name ServletException Thanks for your response. Could you give me some hint? I'm a struts newbie. Thanks a lot. - Original Message - From: Firat TIRYAKI [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 06, 2003 11:04 PM Subject: Re: multibox - Null attribute name ServletException store the properties in a bean and recall them in your action. F. - Original Message - From: ZYD [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, November 06, 2003 3:52 AM Subject: multibox - Null attribute name ServletException I tried to use multibox. I copied the code snippet from Struts in Action, but I got: [ServletException in:/WEB-INF/jsp/form/multiboxTest.jsp] Null attribute name' --- This is my multiboxTest.jsp: %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html:form action=/Multibox table border=0 width=100% logic:iterate id=item property=items html:multibox property=selectedItems bean:write name=item/ /html:multibox bean:write name=item/ /logic:iterate !-- Buttons -- tr td html:submit property=ok onclick=bCancel=false; bean:message key=button.ok/ /html:submit nbsp; html:submit property=cancel onclick=bCancel=true; bean:message key=button.cancel/ /html:submit /td /tr /table /html:form --- This is my ActionForm: MultiboxForm .java public class MultiboxForm extends ActionForm { private String[] selectedItems = {}; private String[] items = { UPS, FedEx, Airborne }; public String[] getSelectedItems() { return this.selectedItems; } public void setSelectedItems(String[] selectedItems) { this.selectedItems = selectedItems; } public ActionErrors validate( ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); return errors; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to get the latest Scaffold jar and documentation?
This question puzzled me for a long time, hope can get some help from you. I downloaded a file called scaffold-lib_1_1_b1.zip, there are two jar files inside: commons-scaffold.jar and struts-scaffold.jar In Struts in Action, page 434, org.apache.scaffold.text.MessageUtils is metioned. Does anybody knows where is it? It's not in the two jar files above. I cannot find it anywhere. Even jakarta.apache.org . I also searched the net using google, still no answer. If you are using Scaffold, please give me some help, thanks in advance. bruce BTW: Is Scaffold still being actively maintained and updated?
Re: [OT] Re: What's the best choice for connection pooling with Struts and PostgreSQL
I found something at http://www.postgresql.org/docs/7.3/static/jdbc-datasource.html Your suggestion is similar to what Struts In Action suggests, on page 125: If your database management system provides its own DataSource that can be used with Struts, you should consider using that implementation instead. - Original Message - From: David Graham [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, November 03, 2003 3:10 AM Subject: [OT] Re: What's the best choice for connection pooling with Struts and PostgreSQL --- ZYD [EMAIL PROTECTED] wrote: Dear all, I'm writing my Struts application using PostgreSQL as the backend database. Could you give me some advice on choosing the connection pooling framework/methods? I wrote my own connection pooling classes, but if there are some good frameworks from jakarta, it definitely worth a try. Postgres provides its own implementation of the DataSource interface. You can find it here: http://jdbc.postgresql.org/ David Any response is greatly appreciated. bruce
Re: What's the best choice for connection pooling with Struts and PostgreSQL
I tried to use Tomcat's datasource pool via JNDI, but things not going well. I got the following exception when I tried to get connection: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null', cause: java.lang.NullPointerException at java.util.StringTokenizer.init(StringTokenizer.java:146) at org.postgresql.Driver.parseURL(Driver.java:251) at org.postgresql.Driver.acceptsURL(Driver.java:159) at java.sql.DriverManager.getDriver(DriverManager.java:232) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:518) at cpool.struts.action.LogonAction.testJNDI(LogonAction.java:185) at cpool.struts.action.LogonAction.execute(LogonAction.java:60) In struts-config.xml, I added the following: data-source set-property property=autoCommit value=false/ set-property property=description value=Data Source Configuration/ set-property property=driverClass value=org.postgresql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=/ set-property property=url value=jdbc:postgresql:cpool/ set-property property=user value=cpool/ /data-source In server.xml: Resource name=jdbc/CPool auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/CPool parameter nameusername/name valuecpool/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valueorg.postgresql.Driver/value /parameter parameter nameurl/name valuejdbc:postgresql:cpool/value /parameter parameter namemaxActive/name value8/value /parameter parameter namemaxIdle/name value4/value /parameter /ResourceParams Then, I wrote the following method in an Action to test the connection: public void testJNDI() { try { Context initCtx = new InitialContext(); Context envCtx = (Context)initCtx.lookup(java:comp/env); if (envCtx != null) { TTools.consolePrint(LogonAction, envCtx, envCtx.toString()); } //DataSource ds = (DataSource)envCtx.lookup(jdbc/CPool); DataSource ds = (DataSource)initCtx.lookup(java:comp/env/jdbc/CPool); Connection conn = ds.getConnection(); if (conn != null) { TTools.consolePrint(conn, Conn, conn.toString()); } conn.close(); } catch (NamingException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } Does this problem sounds familiar to you ? Please give some advice on this, thanks in advance. bruce - Original Message - From: Vic Cekvenich [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 03, 2003 3:18 AM Subject: Re: What's the best choice for connection pooling with Struts and PostgreSQL 1. It is a good practice to use the containers data source pool via JNDI. Application servers like Tomcat, Resin, OrionServer, etc all provide a service to the web app of a connection pool. You should not code one, but use one. Ex: Context ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(java:comp/env/mypool); conn = ds.getConnection(); And you configure the pool in the container. Ex in Resin 3.03: database jndi-namemypool/jndi-name driver type=org.postgresql.jdbc3.Jdbc3ConnectionPool userbpuser/user passwordchangeme/password serverName3.3.3.3/serverName databaseNamedbname/databaseName /driver max-connections3/max-connections /database The idea here is that you deploy same web app to staging or production, without changing the app. 2. You do not need to do #1 above either. Just like you use Struts and not code to servlets, you should not code to JDBC. You should use a DAO, such as iBatis.com (SQL based and my favorite) or Hibrenate. Ex in iBatis: List _resList; _sqlMap.startTransaction(); _resList = _sqlMap.executeQueryForList(xmlNamedSQLquerry); And you have a List of results. The JNDI, pool open and close it done for you, you just work on your result list (that you can pass on to display tag for example) J2EE designed real nice and you should leverage it, not fight it. hth, ZYD wrote: Dear all, I'm writing my Struts application using PostgreSQL as the backend database. Could you give me some advice on choosing the connection pooling framework/methods? I wrote my own connection pooling classes, but if there are some good frameworks from jakarta, it definitely worth a try. Any response is greatly appreciated. bruce -- Victor
Re: What's the best choice for connection pooling with Struts and PostgreSQL
Thanks Paul, Could you please give me some code snippet about that factory parameter from the server.xml ? Thanks again. bruce You're mising the factory parameter from your server.xml ResourceParams section. BTW, you don't need that stuff in your struts config file if you're using JNDI. - Original Message - From: Paul Thomas [EMAIL PROTECTED] To: ZYD [EMAIL PROTECTED] Cc: struts-user [EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 3:10 AM Subject: Re: What's the best choice for connection pooling with Struts and PostgreSQL On 04/11/2003 02:43 ZYD wrote: I tried to use Tomcat's datasource pool via JNDI, but things not going well. I got the following exception when I tried to get connection: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null', cause: java.lang.NullPointerException at java.util.StringTokenizer.init(StringTokenizer.java:146) at org.postgresql.Driver.parseURL(Driver.java:251) at org.postgresql.Driver.acceptsURL(Driver.java:159) at java.sql.DriverManager.getDriver(DriverManager.java:232) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:743) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:518) at cpool.struts.action.LogonAction.testJNDI(LogonAction.java:185) at cpool.struts.action.LogonAction.execute(LogonAction.java:60) In struts-config.xml, I added the following: data-source set-property property=autoCommit value=false/ set-property property=description value=Data Source Configuration/ set-property property=driverClass value=org.postgresql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=/ set-property property=url value=jdbc:postgresql:cpool/ set-property property=user value=cpool/ /data-source In server.xml: Resource name=jdbc/CPool auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/CPool parameter nameusername/name valuecpool/value /parameter parameter namepassword/name value/value /parameter parameter namedriverClassName/name valueorg.postgresql.Driver/value /parameter parameter nameurl/name valuejdbc:postgresql:cpool/value /parameter parameter namemaxActive/name value8/value /parameter parameter namemaxIdle/name value4/value /parameter /ResourceParams Then, I wrote the following method in an Action to test the connection: public void testJNDI() { try { Context initCtx = new InitialContext(); Context envCtx = (Context)initCtx.lookup(java:comp/env); if (envCtx != null) { TTools.consolePrint(LogonAction, envCtx, envCtx.toString()); } //DataSource ds = (DataSource)envCtx.lookup(jdbc/CPool); DataSource ds = (DataSource)initCtx.lookup(java:comp/env/jdbc/CPool); Connection conn = ds.getConnection(); if (conn != null) { TTools.consolePrint(conn, Conn, conn.toString()); } conn.close(); } catch (NamingException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } Does this problem sounds familiar to you ? Please give some advice on this, thanks in advance. You're mising the factory parameter from your server.xml ResourceParams section. BTW, you don't need that stuff in your struts config file if you're using JNDI. -- Paul Thomas +--+-+ | Thomas Micro Systems Limited | Software Solutions for the Smaller Business | | Computer Consultants | http://www.thomas-micro-systems-ltd.co.uk | +--+-+ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setting DataSource
Did you solved this problem? what's wrong with it? I didn't get load exceptions - Original Message - From: Funicelli Aldo [EMAIL PROTECTED] To: 'struts user' [EMAIL PROTECTED] Sent: Monday, October 13, 2003 10:41 PM Subject: setting DataSource Using struts 1.1 I'm able to set a DataSource correctly. In struts-config.xml I use: data-sources data-source set-property property= autoCommit value= false/ set-property value=true property=autoCommit / set-property value=Alnitak Data Source property=description / set-property value=oracle.jdbc.driver.OracleDriver property=driverClass / set-property value=10 property=maxCount / set-property value=2 property=minCount / set-property value=GL_DYNAMO property=user / set-property value=GL_DYNAMO property=password / set-property value=jdbc:oracle:thin:@ALNITAK:1521:GL property=url / /data-source /data-sources With struts 1.1. el, I get a startup configuration error (which blocks the application): StandardContext[/rr_lesson_3]: Servlet /rr_lesson_3 threw load() exception: javax.servlet.ServletException: Servlet.init() for servlet action threw exception javax.servlet.ServletException: Servlet.init() for servlet action threw exception Does anyone know why? Thanks Aldo Funicelli
What's the best choice for connection pooling with Struts and PostgreSQL
Dear all, I'm writing my Struts application using PostgreSQL as the backend database. Could you give me some advice on choosing the connection pooling framework/methods? I wrote my own connection pooling classes, but if there are some good frameworks from jakarta, it definitely worth a try. Any response is greatly appreciated. bruce
Re: What's the best choice for connection pooling with Struts and PostgreSQL
Thanks Nick. What problem did you have with DBCP? bruce - Original Message - From: Nick Heudecker [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, November 02, 2003 11:26 PM Subject: Re: What's the best choice for connection pooling with Struts and PostgreSQL Hi Bruce, I personally prefer C3P0 over DBCP. I've had problems with DBCP in the past, and the support for C3P0 seems to be better. You can find it on Sourceforge. On Sun, Nov 02, 2003 at 08:56:43AM +0800, ZYD wrote: Dear all, I'm writing my Struts application using PostgreSQL as the backend database. Could you give me some advice on choosing the connection pooling framework/methods? I wrote my own connection pooling classes, but if there are some good frameworks from jakarta, it definitely worth a try. Any response is greatly appreciated. bruce -- Nick Heudecker SystemMobile, Inc. Email: [EMAIL PROTECTED] Web: http://www.systemmobile.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help please -- How to provide a Back button?
Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce
Re: Help please -- How to provide a Back button?
Thanks for your fast response, it's of GREAT help, thanks a lot my friend. bruce - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, October 30, 2003 4:24 AM Subject: Re: Help please -- How to provide a Back button? for ur question 2: you can use javascript function to call two different action: function faddpurpose() { document.editform.methodtocall.value = addpurpose; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } function fcalculatepaypd() { document.editform.methodtocall.value = calculatepaypd; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } html:form name=editform method=post action=adjrecordsdispatch.do type=aaa.ers.struts.forms.RecordsForm so U can create a dispatch action and call two different action changing value for methodtocall.If you are not using dispatch action then just set your forms action to whatever action U want to go to.. ZYD [EMAIL PROTECTED] 10/29/2003 01:18 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Help please -- How to provide a Back button? Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce
Re: Help please -- How to provide a Back button?
Hi my friend, you solve my problem, thanks!! bruce - Original Message - From: ishmael riles [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Cc: ZYD [EMAIL PROTECTED] Sent: Thursday, October 30, 2003 5:11 AM Subject: Re: Help please -- How to provide a Back button? Another solution if you don't want to use javascript, is to rely on the fact that the name and value atrributes of the submit button that was pressed are passed through the http request. The values for the other submit buttons aren't sent. So in your action you check for the existance of each submit buttons name to figure out which button the user pushed. So if you have the following submit buttons in your jsp file html:submit property=saveSAVE/html:submit html:submit property=cancelCANCEL/html:submit Then in your action you can do something like this: String saveAction = request.getParameter(save); String cancelAction = request.getParameter(cancel); if (saveAction != null) { doSave(); } else if (cancelAction != null) { doCancel(); } On Wed, 29 Oct 2003 14:24:54 -0600, [EMAIL PROTECTED] said: for ur question 2: you can use javascript function to call two different action: function faddpurpose() { document.editform.methodtocall.value = addpurpose; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } function fcalculatepaypd() { document.editform.methodtocall.value = calculatepaypd; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } html:form name=editform method=post action=adjrecordsdispatch.do type=aaa.ers.struts.forms.RecordsForm so U can create a dispatch action and call two different action changing value for methodtocall.If you are not using dispatch action then just set your forms action to whatever action U want to go to.. ZYD [EMAIL PROTECTED] 10/29/2003 01:18 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Help please -- How to provide a Back button? Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce -o- -o- -o- -o- -o- ishmael.riles brnr.tech 510.543.6109 -o- -o- -o- -o- -o- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Reset button not always working
Dear all, I have a Reset button on a Jsp page: html:reset bean:message key=button.reset/ /html:reset It works at first load. But when I forward to this page from other pages, this Reset button does nothing, it does not reset anything. Does this problem sound familiar to you guys? cheers bruce
Re: Help please -- How to provide a Back button?
thanks buddy! - Original Message - From: Jimmy Emmanual [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, October 30, 2003 4:44 AM Subject: RE: Help please -- How to provide a Back button? a href=javascript:history.go(-1)Back/a -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 29, 2003 3:25 PM To: Struts Users Mailing List Subject: Re: Help please -- How to provide a Back button? for ur question 2: you can use javascript function to call two different action: function faddpurpose() { document.editform.methodtocall.value = addpurpose; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } function fcalculatepaypd() { document.editform.methodtocall.value = calculatepaypd; document.editform.forwardpage.value = totalsuccess; document.editform.target=_self; document.editform.submit(); } html:form name=editform method=post action=adjrecordsdispatch.do type=aaa.ers.struts.forms.RecordsForm so U can create a dispatch action and call two different action changing value for methodtocall.If you are not using dispatch action then just set your forms action to whatever action U want to go to.. ZYD [EMAIL PROTECTED] 10/29/2003 01:18 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Help please -- How to provide a Back button? Dear all, Question 1: How to provide a Back button on a page? Is there a html tag like the one for Cancel button: html:cancel ? Question 2: How to provide two submit buttons on one JSP page, when click on the 1st button, the page is submitted to 1st action, when click on the 2nd button, it's submitted to 2nd action? Any response will be appreciated. Thanks. bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to validate html:radio is selected on a JSP page?
I found this: http://www.mail-archive.com/[EMAIL PROTECTED]/msg79778.html but it seem the problem is still not solved, right? - Original Message - From: Rajat Pandit [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Sunday, October 26, 2003 3:01 PM Subject: RE: How to validate html:radio is selected on a JSP page? Lets hope for someone to reply to this! :D -Original Message- From: ZYD [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 10:50 AM To: Struts Users Mailing List Subject: Re: How to validate html:radio is selected on a JSP page? Yes, that works. But that's not decent like you said. Is there really no way to do a client-side validation using validator framework? - Original Message - From: Rajat Pandit [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Sunday, October 26, 2003 1:37 PM Subject: RE: How to validate html:radio is selected on a JSP page? I couldn't find a workaround for that so far. I use the validate() method of the actionform. Pretty lame! Eh! -Original Message- From: ZYD [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 10:33 AM To: Struts Users Mailing List Subject: How to validate html:radio is selected on a JSP page? Hi friends, How to make sure a radiobox is selected on a JSP page using validator? I cannot use: field property=prjType depends=required arg0 key=newProject.label.prjType/ /field Thanks -bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to validate html:radio is selected on a JSP page?
Hi friends, How to make sure a radiobox is selected on a JSP page using validator? I cannot use: field property=prjType depends=required arg0 key=newProject.label.prjType/ /field Thanks -bruce
Re: How to validate html:radio is selected on a JSP page?
Yes, that works. But that's not decent like you said. Is there really no way to do a client-side validation using validator framework? - Original Message - From: Rajat Pandit [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Sunday, October 26, 2003 1:37 PM Subject: RE: How to validate html:radio is selected on a JSP page? I couldn't find a workaround for that so far. I use the validate() method of the actionform. Pretty lame! Eh! -Original Message- From: ZYD [mailto:[EMAIL PROTECTED] Sent: Saturday, October 25, 2003 10:33 AM To: Struts Users Mailing List Subject: How to validate html:radio is selected on a JSP page? Hi friends, How to make sure a radiobox is selected on a JSP page using validator? I cannot use: field property=prjType depends=required arg0 key=newProject.label.prjType/ /field Thanks -bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to write a multi steps wizard web application?
Hi, I'm wondering how to write a multi-step wizard web app. In Struts in Action, it's mentioned that ActionForm should be set to scope session when writing a wizard. no more. Does any body have some advice on how to achive it? bruce
Re: i18n - Chinese charactor problem
MySQL version: 4.1.0-alpha-max-nt, connection url is: drivers=org.gjt.mm.mysql.Driver mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=UTF-8 mysql-connector-java-3.0.9-stable-bin.jar is in F:\Program Files\Apache Group\Tomcat 4.1\common\lib When I write chinese charactor to MySQL, it's not working properly. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 20, 2003 12:09 AM Subject: Re: i18n - Chinese charactor problem What version of mySQL do you have? I believe that complete unicode support is only present in the latest perhaps even beta versions. Adam On 10/18/2003 07:43 PM ZYD wrote: No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
I use mysql-connector-java-3.0.9-stable-bin.jar, it is in F:\Program Files\Apache Group\Tomcat 4.1\common\lib MySQL version: 4.1.0-alpha-max-nt, connection url is: drivers=org.gjt.mm.mysql.Driver mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=UTF-8 Not works fine. - Original Message - From: Jim Theodoridis [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 20, 2003 12:27 AM Subject: Re: i18n - Chinese charactor problem Wich jdbc driver for mySQL are U using? It works fine to me mysql-connector-java-3.0.8 for Greeks - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Sunday, October 19, 2003 7:09 PM Subject: Re: i18n - Chinese charactor problem What version of mySQL do you have? I believe that complete unicode support is only present in the latest perhaps even beta versions. Adam On 10/18/2003 07:43 PM ZYD wrote: No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUn icode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - 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: i18n - Chinese charactor problem
It's said version4.1 supports unicode, my MySQL version: 4.1.0-alpha-max-nt, but I cannot execute the following: CREATE TABLE unicodetable ( myrow VARCHAR(200) ) CHARACTER SET UTF8; ERROR 1115: Unknown character set: 'UTF8' connection url is: drivers=org.gjt.mm.mysql.Driver mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=UTF-8 mysql-connector-java-3.0.9-stable-bin.jar is in F:\Program Files\Apache Group\Tomcat 4.1\common\lib When I write chinese charactor to MySQL, it's not working properly. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, October 20, 2003 12:09 AM Subject: Re: i18n - Chinese charactor problem What version of mySQL do you have? I believe that complete unicode support is only present in the latest perhaps even beta versions. Adam On 10/18/2003 07:43 PM ZYD wrote: No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
No, UTF-8 does not work. - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:49 PM Subject: Re: i18n - Chinese charactor problem UTF-8 On 10/16/2003 07:25 PM ZYD wrote: Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
i18n - Chinese charactor problem
Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. --bruce
Re: i18n - Chinese charactor problem
Hi Greg, Thank you for your fast response. I do write a filter to set the encoding to GB2312, but if I set the encoding to gb2312 on every page, because this disallow my pages to accept other language charactors, right? Can I set the encoding dynamicly according to user's locale? This is my filter in my web.xml filter filter-nameSet Character Encoding/filter-name filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value /init-param init-param param-nameignore/param-name param-valuetrue/param-value /init-param /filter filter-mapping filter-nameSet Character Encoding/filter-name servlet-nameaction/servlet-name /filter-mapping Thanks again. --bruce - Original Message - From: Greg Reddin [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 2:48 AM Subject: Re: i18n - Chinese charactor problem I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. --bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. --bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: i18n - Chinese charactor problem
Now I use UTF-8 everywhere instead of gb2312, this problem is gone. Thanks for your help. I have another problem, hope can get some advice from you: I used the following url to connect to MySQL: mysql.url=jdbc:mysql://localhost:3306/CoderPool?user=rootpassword=useUnicode=truecharacterEncoding=GB2312 use GB2312 in this string is not a good idea I think. Then what should the characterEncoding be? -bruce - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 11:34 AM Subject: Re: i18n - Chinese charactor problem If you are using UTF-8 everywhere it should work - I use it for english Japanese and it works. You mentioned in another message you had this: filter-classSetCharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueGB2312/param-value Are you still using that? or UTF-8? Everything has to match. ZYD wrote: Hi Jason, Thank you for your response. I did exactly the same thing as the article said, but still, not working properly. Chinese can be displayed, but not in the text box. If I change %@ page contentType=text/html; charset=UTF-8 % to %@ page contentType=text/html; charset=GBK % then the Chinese charactors are handled properly. Why is that? - Original Message - From: Jason Lea [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, October 17, 2003 5:51 AM Subject: Re: i18n - Chinese charactor problem Here is a link that explains what is needed and a filter to do it... http://www.anassina.com/struts/i18n/i18n.html Greg Reddin wrote: I don't remember the exact code, but a looong time ago we had to write a Filter that created a request wrapper that properly set the character encoding on request parameters. Maybe googling that would turn up something. Greg ZYD wrote: Hi, I have a problem in getting the Chinese charactors from html:text, The following is my jsp file: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html:html html:form action=/submit focus=email head/head body html:text property=email/ html:submitbean:message key=button.logon//html:submit /body /html:form /html:html - I have two property files, one is for englisn, the other is for chinese. Both english and chinese can be displayed properly on the page, except in the text box. When I input chinese charactors in the text box and submit, I cannot get the chinese charactor in the form bean correctly. The chinese charactors become some unreadable charactors like . There are no special process in the getEmail and setEmail method in the form bean. Does anybody have similar problem? I need your advice. Any response is appreciated. --bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jason Lea - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hi Ted, where is scaffold.ExistsAttributeAction??
Hi Ted, I'm studying your artimus_1_1 codes. I'm confused by some scaffold classes, such as org.apache.struts.scaffold.ExistsAttributeAction. I cannot find it's source code, compiled class file and it's documentation anywhere. There are some other classes like this one. I noticed that scaffold's last update was about one year ago. Is scaffold still being working on? Sincerely, Bruce.