Grokbase
Topics Posts Groups | in
x
[ help ]

??? (peiqian...@nextenso.com)

Profile | Posts (1)

User Information

Display Name:???
Partial Email Address:peiqian...@nextenso.com
Posts:
1 total
1 in tomcat-user@jakarta.apache.org

2 Most Recent

1) ??? Re: National characters don't reach Action class correctly
| +1 vote
Turgay, If you use Tomcat 4.0 (servlet spec 2.3), you can just wirte:...
struts-user@jakarta.apache.org
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Turgay,

If you use Tomcat 4.0 (servlet spec 2.3), you can just wirte:

request.setCharacterEncoding("ISO-8895-9");
System.out.println(request.getParameter("filename"));

If you use Tomcat 3.2 (Servlet spec 2.2),

String data = request.getParameter("filename");
byte[] raw = data.getBytes("ISO-8859-1");
System.out.println(new String(raw, "ISO-8859-9"));

hope this helps,
Peiqiang Han





Turgay Zengin wrote:

> Hi,
> I need help on this:
> Problem is, I can see national characters on jsp pages correctly, but when I
> post data to an Action, the string gets messed up. I couldn't find related
> info in the archive.
>
> Related lines on my jsp page:
>
> <%@ page contentType="text/html; charset=ISO-8859-9" %>
> <html:html locale="true">
> <FORM METHOD="POST" ACTION="UpdateWoplan.do">
> <INPUT TYPE="text" NAME="fieldname" size="5"
> value="<bean:write name="wpl" property="laborhrs"/>">
> </FORM>
> (I had to use the FORM tag because I have indexed fieldnames)
>
> And my Action class looks like:
> public class UpdateWoplanAction extends Action {
>    .......
> System.out.println(request.getParameter("fieldname");
> }
>
> I cannot get the correct string here. Instead I get ????s for national
> characters like ÐÞðþ.
>
> I couldn't figure out where the problem is - in Struts or in Tomcat. But I
> did a test without using Struts, and the correct string is recognized by a
> servlet then.
>
> Any help will be very much appreciated.
>
> Thanks,
> Turgay.
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
2) ??? Re: CLASSPATH precedence
| +1 vote
David, For tomcat 3.2 (tomcat 4.0 is different), the classes from...
tomcat-user@jakarta.apache.org
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
David,

For tomcat 3.2 (tomcat 4.0 is different), the classes from $TOMCAT_HOME/webapps/WEBAPP_A/WEB-INF/lib and $TOMCAT_HOME/webapps/WEBAPP_A/WEB-INF/classes sont loaded by a custome classloader. The classes from system CLASSPATH sont loaded by the system classloader. The class loading is in the following order: 1) BootStrap; 2)Extension; 3) System Classpath; 4) special directories known by the custom classloader, so

1) the classes in $TOMCAT_HOME/webapps/WEBAPP_A/WEB-INF/lib
and in $TOMCAT_HOME/webapps/WEBAPP_B/WEB-INF/lib sont completly different.

2) The classes in the system CLASSPATH take precedence.

Regards

-Peiqiang




----- Original Message -----
From: "David Miller" <dmiller@smart911.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, December 19, 2000 4:19 AM
Subject: CLASSPATH precedence



> Hi,
>
> Two related questions regarding CLASSPATH precedence:
>
> (A) If I place the same *.jar files (same names but different versions)
> in both
> $TOMCAT_HOME/webapps/WEBAPP_A/WEB-INF/lib
> and in $TOMCAT_HOME/webapps/WEBAPP_B/WEB-INF/lib
>
> does the version of the *.jar files in WEBAPP_A or in WEBAPP_B take
> precedence? Or does it depend on which context I am in (i.e., which
> webapp tomcat is running). How does tomcat figure out which version of
> the *.jar files to use? Do classes loaded from one *.jar file get
> unloaded if I am running in a different context?
>
> (B) (similar question but for system *.jar files vs tomcat *.jar files):
>
> If I place the same *.jar files (same names but different versions) in
> both
> $TOMCAT_HOME/webapps/WEBAPP_A/WEB-INF/lib
> and in my system CLASSPATH
>
> which version of the *.jar files take precedence when I am running ?
>
> Any answers/information regarding these two questions is greatly
> appreciated, especially ones which shed some light on how tomcat figures
> out which version of classes to load. Thanks,
>
> -David-
>
>

spacer
Profile | Posts (1)
Home > People > ???