Re: AW: Problem with characters
Martin and Luke, are you using different databases on the two environments? You might want to be sure you have MySQL configured to use unicode, and add the useUnicode and characterEncoding options to your database connect URL. You may also find that you need to set the character encoding property in the ContentType header in your Actions with response.setContentType(text/html;charset=UTF-8). I found on some browsers that the meta tag in the HTML won't override the value in the HTTP header. Just suggestions. I haven't actually dealt with this problem for quite a while. Mojo Martin Kindler wrote: David, could you please be a bit more specific? Just now I have a very similar problem as LuKe. I am using MySQl 4.1.10 and all tables are UTF-8. Struts is configured to use UTF 8 (i. e. the controller element in struts-config.xml says contentType=text/html;charset=UTF-8). This seems to work. My browsers (Firefox and IE6) decode the pages as UTF-8. BUT: when I enter text using a form (this is configured using the charSet-attribute to html:form to accept ISO-8859-1) IE6 garbles it while Firefox seems to work OK. Any hints? Martin -Ursprüngliche Nachricht- Von: Harland, David [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 7. September 2005 10:35 An: Struts Users Mailing List Betreff: RE: Problem with characters Change you encoding to UTF-8. What database are you using? Dave. -Original Message- From: lk [mailto:[EMAIL PROTECTED] Sent: 07 September 2005 09:23 To: user@struts.apache.org Subject: Problem with characters Hi, I have a problem with some characters. My application reads some forms and writes them in a db. On my test and developing environment everything works well. The problem comes out when I deploy the application on the production server. When I fill in the form non English characters (for example the typical characters of the Italian language) they are read as ?. The strange thing is that in the same tomcat context there is an old no-struts application that works well. On this server Apache and Tomcat work together and this is the only difference from my test server. In both struts-config.xml and web.xml I put this encoding ?xml version=1.0 encoding=ISO-8859-1 ? Furthermore I use a tiles layout and in it I put: meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 What could be the problem? LuKe -- Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Vuoi risparmiare sino al 70% sugli acquisti? Oliviero non teme confronti! Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3849d=7-9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e mail is from DLA Piper Rudnick Gray Cary UK LLP. The contents of this email and any attachments are confidential to the intended recipient. They may not be disclosed to or used by or copied in any way by anyone other than the intended recipient. If this email is received in error, please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 quoting the name of the sender and the email address to which it has been sent and then delete it. Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender accept any responsibility for viruses and it is your responsibility to scan or otherwise check this email and any attachments. DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership registered in England and Wales (registered number OC307847) which provides services from offices in England, Belgium, Germany and the People's Republic of China. A list of members is open for inspection at its registered office and principal place of business 3 Noble Street, London EC2V 7EE. Partner denotes member of a limited liability partnership. DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a member of DLA Piper Rudnick Gray Cary, a global legal services organisation, the members of which are separate and distinct legal entities. For further information, please refer to www.dlapiper.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:form not generating name= attribute
Don Brown wrote: You probably enabled xhtml output rendering, which renders an id attribute instead. Unfortunately, client-side validation in xhtml is currently broken in Struts 1.2.7, so you can either checkout and build commons-validator or wait until the next release. Thanks Don, yes I enabled xhtml. Interestingly, it's not generating an id attribute either, so there must be another trigger, like having an entry for the from in the validation.xml file (which I don't have). Perhaps I can use the styleId attribute on html:form to get a handle on a form. Today my app is failing at startup when the Validation plug-in reads its config xml files, unexpected end of file. Yet the XML files have nothing in them at this point -- they're just copied from struts-blank. So something odd is going on. Just another odd puzzle ... I probably will checkout and build commons-validator. Cheers, Mojo -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
html:form not generating name= attribute
This is an odd problem I haven't run into before ... The form tags in my HTML are coming out without a name=formName attribute. I haven't yet looked at the source code for the html:form tag to see what might cause the name attribute to be excluded, but I've triple checked my struts-config to be sure there's a name=... attribute in the action element, and that the path and the tags all match. I hadn't needed to reference a form until I'd written several forms in this current app. All my other forms are working fine, but none of my forms have the name= attribute in the form element of the HTML. This is my first application mapped by path instead of extension, if that makes a difference. I found it odd that extension mapping had to use the form html:form action=/action.do but in the path mapping, I don't use html:form action=/do/action. Something seems disconnected here. Thoughts very much appreciated! Mojo -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot find global ActionForward for name
Daniel Kies wrote: Greetings. I am getting this error on an App and I can't seem to find out why. Any suggestions? Struts-Config: !-- Global Forwards -- global-forwards forward name=start path=Index.do /forward /global-forwards !-- Action Mappings -- action-mappings action path=/Index type=com.xxx.xxx.xxx /action /action-mappings [...] Result: Error 500: Cannot find global ActionForward for name start Try: forward name=start path=/Index.do Mojo -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts-config data-source c
Anindya Bandyopadhyay wrote: I've developed one small application which will be used in different area using different database connection. I want to make properties file which will say all the value of *data-source* in *struts-config* and put the value in *struts-config* when tomcat starts and that's how we can get the right database connection every time. I'm looking for something like this: [...] set-property property=driverClassName value=$(DRIVERNAME) / I do this in the Ant build by filtering the properties file when you build the .war file or copy to the webapps directory. Here's an example from my build.xml: !-- Copy any resource or configuration files -- target name=resources filter token=TOMCATHOME value=${tomcat.home}/ filter token=TESTHOST value=${test.host}/ filter token=SOAPHOST value=${soap.host}/ copy todir=WEB-INF/classes includeEmptyDirs=no filtering=true fileset dir=WEB-INF/src patternset include name=**/*.conf/ include name=**/*.properties/ include name=**/*.xml/ /patternset /fileset /copy /target And in the properties file: # Host name part of SOAP server URL soap.server:@SOAPHOST@ etc. Mojo -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts-el webapp NullPointerException
I can't find any record in the bugzilla of this being a known problem, but maybe the struts-el libraries aren't tracked in the bugzilla: Tomcat 5.0.28 Struts 1.2.4 Windows 2000 I installed the strutsel-exercise-taglib webapp from contrib/struts-el/webapp. The index page gives a NullPointerException: java.lang.NullPointerException org.apache.struts.taglib.TagUtils.pageURL(TagUtils.java:1114) rg.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:466) org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:329) org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:475) org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:334) org.apache.strutsel.taglib.html.ELLinkTag.doStartTag(ELLinkTag.java:666) org.apache.jsp.index_jsp._jspx_meth_html$1el_link_0(index_jsp.java:146) org.apache.jsp.index_jsp._jspService(index_jsp.java:118) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Is this webapp DOA, or just not useful in this environment? Mojo -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts-el webapp NullPointerException
Hmmm! I must have missed that in the docs. Thanks! So for the same functionality, I should include the JSTL _and_ Struts taglibs in my JSPs and write expressions with abandon? And perhaps that explains why the struts-el webapp doesn't work with Tomcat 5 ... Mojo Woodchuck wrote: hihi Morris, sorry but i have to ask, why do you need the struts-el library when you are using Tomcat 5.0.28? Tomcat 5 already has EL capability built-in. woodchuck --- Morris Jones [EMAIL PROTECTED] wrote: I can't find any record in the bugzilla of this being a known problem, but maybe the struts-el libraries aren't tracked in the bugzilla: Tomcat 5.0.28 Struts 1.2.4 Windows 2000 I installed the strutsel-exercise-taglib webapp from contrib/struts-el/webapp. The index page gives a NullPointerException: java.lang.NullPointerException org.apache.struts.taglib.TagUtils.pageURL(TagUtils.java:1114) rg.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:466) org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:329) org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:475) org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:334) org.apache.strutsel.taglib.html.ELLinkTag.doStartTag(ELLinkTag.java:666) org.apache.jsp.index_jsp._jspx_meth_html$1el_link_0(index_jsp.java:146) org.apache.jsp.index_jsp._jspService(index_jsp.java:118) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Is this webapp DOA, or just not useful in this environment? Mojo -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Morris Jones Monrovia, CA http://www.whiteoaks.com Old Town Astronomers: http://www.otastro.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]