You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Galbayar Dorjgotov <ga...@mobinet.mn> on 2002/12/15 09:23:16 UTC
Cahrset problem
hi all.
i have one problem. My JSP's enconding is windows-1251 and have a form.
i'm wrote cyrillic characters and submit
when i reading textfield value use getParameter() method it returns ????????
what's the matter?
MY JSP is
<%@ page contentType="text/html; charset=windows-1251" language="java"
import="java.io.*" errorPage="" %>
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<%
String a1=request.getParameter("textfield");
out.println(a1);
if (a1!=null){
InputStreamReader a=new InputStreamReader(new
ByteArrayInputStream(a1.getBytes()),"windows-1251");
int gg=0;
gg=a.read();
out.println((char)gg);
a.close();
}
%>
<form name="form1" method="post" action="">
<input type="text" name="textfield">
<input type="submit" name="Submit" value="Submit">
</form>
</body>
</html>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
java.util.MissingResourceException: Can't find bundle for base name Messages
Posted by Bernd Prager <be...@prager.ws>.
Hi everybody,
I'm almost certain this is answered before. I just can't find it.
I want to pull some message strings from a RessourceBundle.
Works fine when I test the class locally. As soon as I use it
inside a JSP I get the error message:
java.lang.InstantiationException: class mypackage.MyBean :
java.util.MissingResourceException: Can't find bundle for base name
Messages, locale en_US.
Where do I put the file 'Messages_en_US.properties'?
I tried it in the JSP directory, in WEB-INF/classes and in
WEB-INF/classes/mypackage
without success.
Please help.
Thanks,
-- Bernd
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Cahrset problem
Posted by Torsten Fohrer <TF...@t-online.de>.
some tips from me
1. mask non standart characters with html entitys like that you display
in html pages, if there exist some one.
2. setting response contentType, with <%@ page contentType=
3. adding to the head of your html page
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
4. test different browsers
5. does the browser have fonts with the characters?
which browser you use?
On Sunday 15 December 2002 09:23, Galbayar Dorjgotov wrote:
> hi all.
> i have one problem. My JSP's enconding is windows-1251 and have a form.
> i'm wrote cyrillic characters and submit
> when i reading textfield value use getParameter() method it returns
> ???????? what's the matter?
> MY JSP is
>
> <%@ page contentType="text/html; charset=windows-1251" language="java"
> import="java.io.*" errorPage="" %>
> <html>
> <head>
> <title>Untitled Document</title>
> </head>
>
> <body>
> <%
> String a1=request.getParameter("textfield");
> out.println(a1);
> if (a1!=null){
> InputStreamReader a=new InputStreamReader(new
> ByteArrayInputStream(a1.getBytes()),"windows-1251");
> int gg=0;
> gg=a.read();
> out.println((char)gg);
> a.close();
> }
> %>
>
> <form name="form1" method="post" action="">
> <input type="text" name="textfield">
> <input type="submit" name="Submit" value="Submit">
> </form>
> </body>
> </html>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org> For additional
> commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>