Big5 character Problem in JSP.

Platform: Mandrake Linux 9.1
XWindows: Gnome
Browser: Galeon, Mozilla
Locale: ZH_tw
Server: Tomcat 4.1
=============================
Problem 1: the parameter receive and decode incorrectly
When I use "post" in form, to post "How are you" or Ni Hao Ma(3 characters), the JSP will decode them into 6 different chinese characters.
Probably, it breaks the Big5 code into 2 different bytes before it decode as Big5 characters
I don't know, is it browser fault or JSP fault?
Problem 2: the static chinese output incorrectly
If the chinese character directly insert into a String variable before it sent (output) to client, it works fine. But when I just put it together with static html tags, the JSP translate the Big5 characters as English (ISO) format and the browser display ???A???F
===============================
<%@ page contentType = "text/html; charset=utf-8"%>
<%@ page isThreadSafe="false" %>
<%request.setCharacterEncoding("utf-8");%>
<!--- even the request encoding set to Big5, the same problem occur --->
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=Big5">
</head>
<body>
<!---This portion display 6 characters--->
<!---"Test" value is "Ni Hao Ma"--->
<%=request.getParameter("Test")%>
<!---This portion display ??????? words --->
<!---Below is the chinese "Ni Hao Ma" I typed --->
?A?n??
<!---This is the example when the static Big5 text being processed-->
</body>
</html>
====================================
Anybody could help me, urgent...
I would appreciate any suggestion.

one thing that looks odd is that you have specified both UTF-8 and BIG-5 as the encoding in 2 places. I'm not sure what the browser will use. However, here is my JSP page that I've used before to make sure what I'm doing for multiple language support. You should be able to use it as is, I would think.
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
     <title></title>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body bgcolor="#ffffff" background="" text="#000000" link="#ff0000" vlink="#800000" alink="#ff00ff">
<%
request.setCharacterEncoding("UTF-8");
String str = "\u7528\u6237\u540d";
String name = request.getParameter("name");
if(name != null) {
     // instead of setCharacterEncoding...
     //name = new String(name.getBytes("ISO8859_1"), "UTF8");
System.out.println(application.getRealPath("/"));
System.out.println(application.getRealPath("/src"));
%>
req enc: <%= request.getCharacterEncoding() %><br />
rsp enc: <%= response.getCharacterEncoding() %><br />
str: <%= str %><br />
name: <%= name %><br />
<form method="GET" action="_lang.jsp" encoding="UTF-8">
Name: <input type="text" name="name" value="" >
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>

Similar Messages

  • Character encoding in JSP

    hi all.
    my problem is about character encoding in JSP.
    my project is based on struts framework & mysql database. as a servlet container i have the Tomcat absolutely.
    i have correctly set the mysql db. when i insert data by hand, usin' INSERT INTO bla bla, it works with Turkish Characters.
    After that, i have checked, my jsp page correctly loads data from db and displays on browser. all the special Turkish characters appears well.
    The problem starts with posting!
    I want some data from the user, and i have simple wysiwyg javascript editor. the editor correctly process the text, after posting data and saving into db, some how it corrupts.
    (whatever, i have tried it with a simple textarea, it does not work)
    simply my problem is: the data somehow corrupts while it is being posted.
    thanx.

    on the form processing page, you probably need to call request.setCharacterEncoding("UTF-8") (or whatever encoding you're using) before reading any values.
    Reply #14 of this post has some test page with Chinese which should work as is...
    http://forum.java.sun.com/thread.jspa?forumID=513&threadID=546863

  • Language problem in JSP please help

    Hi all java guru;
    Altough I tried all different way I can not solve the my problem.
    My problem is Turkish language problem in JSP.
    If my jsp page use database applications such as push or pull data to my SQL 2000 database or call some datas from database, some data which contains turkish caracter are seen wrong. suc as ����� is to ??????
    what is the problem?
    But important point is that; this is only Database data which come from sql database. But I can see JSP data or HTML data truly.
    I try different method to solve in JSP page;
    1-request.setEncoding("iso-8859-9");
    or
    request.setCharacterEncoding( "windows-1250" );
    2-
    @contentType="text/html; charset=iso-8859-9"
    @page pageEncoding="iso-8859-9"
    3-
    <meta http-equiv="Content-Language" content="tr">
    <META http-equiv="Content-Style-Type" content="text/css">
    4-
    ISO-8859-9 is turkish charecter spefications
    String TR_tlp = new String(NEW_TALEP.getBytes(),"ISO-8859-9"); // this parm is inserting database but problem is go on.
    5-
    for the database...
    Properties props = new Properties();
    props.put("user","login");
    props.put("password","password");
    props.put("charSet","UNICODE");
    6-
    url= "jdbc:microsoft:sqlserver://IP_NO:1433;databasename=database;TRUSTED_CONNECTION = true;CHARSET="+sun.io.ByteToCharConverter.getDefault().getCharacterEncoding();
    or
    url= "jdbc:microsoft:sqlserver://IP_NO:1433;databasename=database;TRUSTED_CONNECTION = true;CHARSET=ISO-8859-9"
    con= DriverManager.getConnection(url, kulad, sifre);
    I am using tomcat 5.0.19,
    is there any way to solve this problem... Please help......

    Were you ever able to solve your problem?
    I have a similar problem.
    My database is storing the characters correctly and they can be viewed in Java, but when I try to convert them to unicode using:
    String inputUtf8 = new String(input.getBytes(),charset);
    it works for almost all characters, but some come through as noncharacter "boxes."
    The characters that come through as boxes in iso8859-1 are the ones that are in the "supplementary" character range of that set, such as:
    - curved left and right quotes
    - "TM" symbol
    - bullets
    - m dash and n dash
    (see this table: http://www.csgnetwork.com/htmlchrset.html for a more complete list of the supplementary characters )
    Any idea what I need to do to have these characters show up properly?

  • Problem in jsp with container(JEUS)

    Hi I am a developer in Korea
    Nowadays I have a problem in jsp pages which have contained some pakage directive in a library path
    so my problem is changing some of the classes in the package during service time.
    Error result is
    -Root Exception stack trace :
    -jeus.servlet.jsp.compiler.JspCompileException: fail to compile : source = C:\TmaxSoft\JEUS6.0\webhome\epims_container1\_generated_\j2ee-modules\harweb\jeus_jspwork\_custermg\_html\_mypage\_600_MyReqJob_5fjsp.java, -error msg = C:\TmaxSoft\JEUS6.0\webhome\epims_container1\_generated_\j2ee-modules\harweb\jeus_jspwork\_custermg\_html\_mypage\_600_MyReqJob_5fjsp.java:76: cannot access custermg.MyPageQuery
    bad class file: C:\epims\harweb\WEB-INF\classes\custermg\MyPageQuery.class
    -class file has wrong version 8241.8224, should be 49.0
    -Please remove or make sure it appears in the correct subdirectory of the classpath.
    -     MyPageQuery myquery = null;
    I don't know why this could be happed in random period of time It happens nearly each 10 hours . after this failure, the same error happen in other classes.
    Before ten hours?.... No problem with the jsp pages
    The number 8241.8224 tells me that it is not generated by java compiler but I don't have any clue but the above error
    my run time environment is
    - HP Server, Windows Server 2003, 64bit
    - Jeus, jdk1.5.0_15
    so any help from you will be appreciated...
    thanks

    Mr. Ahmed,
    Excuse-me by my bad english.
    I experienced the same problem when surrounded my scripts with comment caracters:
    <!--
    < SCRIPT ...
    -->
    If this is your case, simply uncomment it and the script will work fine.

  • Problem using jsp:include from inside a custom tag

    Hi, All !
              I have a problem using <jsp:include> from inside a custom tag. Exception is:
              "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              could not do this. Is it a bug, since in the 1.1 spec is said: "The
              BodyContent is a subclass of JspWriter that can be used to process body
              evaluations so they can retrieved later on."
              My code is:
              <wfmklist:items>
              <jsp:include page="item.jsp" flush="true"/>
              </wfmklist:items>
              

    This is an area of contention with WL. It is not so tolerant with regards to
              the spec. I spent several days recently trying to convince it to accept the
              specification in regards to bodies and includes and it appears to have
              successfully rebuffed my efforts.
              Frankly, this is very disappointing. It appears that some shortcuts were
              taken on the way to JSP 1.1 support, and the result is a very hard-coded,
              inflexible implementation. As I have not seen the implementation myself, I
              hate to assume this, however one could posit that the term "interface" was a
              foreign concept during the implementation, other than as some annoying
              intermediary reference requiring an immediate cast to a specific Weblogic
              class, which in turn is apparently required to be final or have many final
              methods, as if being optimized for a JDK 1.02 JIT.
              I am sorry that I don't have any positive suggestions other than to use a
              URL object to come back in an execute the necessary "include" directly. You
              lose all context (other than session) and that can cause its own problems.
              However, you can generally get the URL approach to work, and you will
              hopefully avoid further frustration.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              Tangosol: How Weblogic applications are customized
              "Denis" <[email protected]> wrote in message
              news:[email protected]...
              > Hi, All !
              > I have a problem using <jsp:include> from inside a custom tag. Exception
              is:
              > "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              >
              > Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              > could not do this. Is it a bug, since in the 1.1 spec is said: "The
              > BodyContent is a subclass of JspWriter that can be used to process body
              > evaluations so they can retrieved later on."
              >
              > My code is:
              > ...
              > <wfmklist:items>
              > <jsp:include page="item.jsp" flush="true"/>
              > </wfmklist:items>
              > ...
              

  • Urgent Solution needed--Problem in JSP compilation with JDK 1.5 and JDK 1.6

    Hi,
    I m using JDK 1.5 and Tomcat 5.0 the problem is that after starting server when I m going to access my application at that time instead of displaying HomePage it directly display the blank page on screen.
    After analyzing tomcat log I have found that there was a problem with JSP page compilation.
    The exception logged in Tomcat Log is given below
    An error occurred at line: 1 in the generated java file
    The type Collection is not generic; it cannot be parameterized with arguments <? extends E>
    Stacktrace:
    *     at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)*
    *     at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)*
    *     at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)*
    *     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)*
    *     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)*
    *     at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)*
    *     at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)*
    *     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)*
    *     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)*
    *     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)*
    *     at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)*
    *     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)*
    *     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)*
    *     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)*
    *     at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:447)*
    *     at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)*
    *     at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)*
    *     at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:424)*
    *     at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:343)*
    *     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:144)*
    *     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)*
    *     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)*
    *     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)*
    *     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)*
    *     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)*
    *     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)*
    *     at java.lang.Thread.run(Thread.java:619)*
    After getting this kind of error I have analyzed my code furhter then I came to know that there was problem with static include tag.
    In my jsp page I have used following line which is the main cause of error
    <%@ include file="top.jsp" %>If I ommit this line then it is working properly.
    Instead of static include I have used jsp:include also.
    Still I m getting same problem.
    We have to migrated from JDK 1.5 to 1.6 and Tomcat 5.0.28 to 6.0.14, still same problem is there.
    We have tried a lot but didnt get success to overcome this problem.
    If anybody having any solution then ur each reply will be appreciated.
    Thanks in advance..........!!!!!!!
    Edited by: JBOSS2000 on Jan 15, 2008 9:29 AM

    Hi "mshanu" and "amit" Thanks for ur replies Here I m posting the code of "top.jsp"........!!!!
    <%@ page errorPage="errordisplay.jsp"%>
    <table cellpadding="0"
           cellspacing="0"  height=50 width=780>
           <tbody>
             <tr class="header">
               <td class="logo"><IMG SRC="assets/Logo.gif" BORDER=0 ALIGN=top></td>
               <td align="right"><span class="applicationtitle"><%@ include file="/contents/logo.htm" %></span><br>
               <span class="companyname"><%@ include file="/contents/companyname.htm" %></span></td>
             </tr>
            </tbody>
    </table>To include top.jsp I have tried
    <jsp:include page="top.jsp" flush="true">
    </jsp:include>
             AND       
    <%@ include file="top.jsp"%>but none of this worked.
    If I remove the include then It is working properly.
    But I need inluded file too so that I am wondoring for the solution.
    This problem seems very wiered to me. I dont know why it is happening.
    This problem is started only when I used the TOMCAT 6.14.
    Is it the bug of TOMCAT 6.14 or What somebody Plz help.
    I got stuck here.........!!!!!!!!!!
    It doesn't seem any problem with top.jsp. As per my thinking the problem is there in include due to that it doesn't compile the JSP page in Tomcat 6.0.
    Earlier I am having same code running on the Tomcat 5.0.28 and JDK 1.5.0.
    But problem occured when I have used Tomcat 6.x...!!

  • BI JDBC character problem

    I tried to write  multiple data to database by using  BI JDBC connection.I wrote "insert" statement in the SQL_STATEMENT on the line(event) from table to BI query.It works.I select multiple records in the table and write these records to database.But there is a problem about some Turkish Characters such as  ü,&#351;,&#287;...There is no character problem when using stored procedures(JDBC connection) instead of BI JDBC.But I cannot write multiple records by using stored procedures.I select multiple records in the table, it onlys writes the first record when using stored procedures.Can I write a stored procedures which takes multiple records from VC? Or, how can I solve Turkish character problem when using BI JDBC connection?
    Thanks,
    Nihat

    Hi Nihat,
    I think it depends on your JDBC Driver, which character set it supports. Your database supports turkish characters, when it works with a stored procedure. Maybe you can try to use a conversion for using JDBC. Did you check the manual of the jdbc driver? Did you contact the the jdbc driver vendor?
    Best Regards,
    Marcel

  • HR_ESS_PAYSLIP_TO_PDF pdf converter character problem

    Hi,
    I have a problem regarding to HR_ESS_PAYSLIP_TO_PDF.I done every customizing about Employee Self-Service to see my salary statement at ESS.I see it at ESS but I have a character problem with Turkish capital characters and some Turkish letter(Ş,İ).at the smartform my Language Attiribute is TR(Turkish) and thats not change anything.
    Thanks...

    Can I up this question?
    I have the same problem with Russian characters, what's wrong?

  • Bizarre thread problem with JSP

    I'm having a strange problem using JSPs whereby a single method call to a
              bean results in 2 execute threads being created each executing the method
              called.
              I have a bean reference in the jsp that has session scope declared like this
              (package names left off):
              <jsp:useBean id="deployment" class="Deployment" scope="session">
              <% deployment.init(application); %>
              </jsp:useBean>
              I've also set the isThreadSafe value to "false" (since I'm trying to
              prevent/figure out what's going on):
              <%@ page isThreadSafe="false" %>
              Within the JSP body I have code that makes the method call on the deployment
              bean:
              if (action.equals("Send"))
              int status = deployment.send();
              Then, within my form I have:
              <INPUT TYPE="image" SRC="../images/Deploy.gif"
              onClick="confirmAndSubmit('Send',
              'Deploying Application to server <%=
              deployment.getServer() %>')"/>
              Where the functions called are:
              function setActionSubmit(action) {
              document.deployForm.actionPerformed.value = action;
              document.deployForm.submit();
              function confirmAndSubmit(action, promptString) {
              if (confirm(promptString)) {
              setActionSubmit(action);
              Tracing, thread dumping, et al, have confirmed that although I have a single
              session, I end up with two threads each executing the deployment.send()
              method.
              Any ideas? I'm stumped.
              Thanks,
              Jim
              

    I found the problem, although I don't completely understand the behavior:
              The FORM was not handling the submit event, leaving it to the whim of the
              browser to have its way with the event. Although it sometime ended up
              having two threads serving the request, it didn't always.
              The solution was to put an onSubmit=="return false;" in the <form>
              Hope this helps someone else.
              Jim
              "Jim Gish" <[email protected]> wrote in message
              news:[email protected]...
              > I'm having a strange problem using JSPs whereby a single method call to a
              > bean results in 2 execute threads being created each executing the method
              > called.
              >
              > I have a bean reference in the jsp that has session scope declared like
              this
              > (package names left off):
              >
              > <jsp:useBean id="deployment" class="Deployment" scope="session">
              > <% deployment.init(application); %>
              > </jsp:useBean>
              >
              > I've also set the isThreadSafe value to "false" (since I'm trying to
              > prevent/figure out what's going on):
              > <%@ page isThreadSafe="false" %>
              >
              > Within the JSP body I have code that makes the method call on the
              deployment
              > bean:
              > if (action.equals("Send"))
              > {
              > int status = deployment.send();
              > }
              >
              > Then, within my form I have:
              > <INPUT TYPE="image" SRC="../images/Deploy.gif"
              > onClick="confirmAndSubmit('Send',
              > 'Deploying Application to server <%=
              > deployment.getServer() %>')"/>
              >
              > Where the functions called are:
              > function setActionSubmit(action) {
              > document.deployForm.actionPerformed.value = action;
              > document.deployForm.submit();
              > }
              >
              > function confirmAndSubmit(action, promptString) {
              > if (confirm(promptString)) {
              > setActionSubmit(action);
              > }
              > }
              >
              > Tracing, thread dumping, et al, have confirmed that although I have a
              single
              > session, I end up with two threads each executing the deployment.send()
              > method.
              >
              > Any ideas? I'm stumped.
              >
              > Thanks,
              > Jim
              >
              >
              >
              >
              >
              

  • Apache/Jserv Config Problem with JSP

    Problem: Any JSP that contains a bean reference is not being loaded correctly.
    The first thing I did was to create a softlink from the ".../Apache/Apache/htdocs" directory to
    the directory which contains my *.html and *.jsp files (as instructed in the httpd.conf file).
    Then, I followed the instructions on page A-9 of "OracleJSP Developer's Guide and
    Reference, Release 1.1.0.0.0". They instruct you to add a wrapper.classpath entry into
    jserv.properties that points at your directory that contains the .class files for your bean
    classes. I did this too.
    I then attempted to load my JSP file from the browser URL entry line. If my JSP does not contain
    a reference to a bean, then the page loads fine. If it contains a reference to a bean, then I
    get the following message:
    Request URI:/webdocs/vps/hellouser/hellouser.jsp
    Exception:
    oracle.jsp.parse.JspParseException: Line # 4, Error: Unable to find class for bean: myBean defined
    by tag with class: hello.NameHandler
    I cannot for the life of me get Apache to look in one directory for the .jsp file and another for
    the .class file(s). Any suggestions would be greatly appreciated!
    MORE BACKGROUND:
    If it matters..... My first venture was servlets and I've managed to workt that just fine: I
    successfully modified "jserv.conf" to add a mount point (ApJServMount) for my new servlet zone
    which I have specified in "jserv.properties". I have also created an associated properties file
    for my new servlet zone. I've tested this configuration and all works fine for servlets, just not
    JSP.
    Once again, thanks in advance for any help regarding a solution to this problem!!!
    Dave

    Problem: Any JSP that contains a bean reference is not being loaded correctly.
    The first thing I did was to create a softlink from the ".../Apache/Apache/htdocs" directory to
    the directory which contains my *.html and *.jsp files (as instructed in the httpd.conf file).
    Then, I followed the instructions on page A-9 of "OracleJSP Developer's Guide and
    Reference, Release 1.1.0.0.0". They instruct you to add a wrapper.classpath entry into
    jserv.properties that points at your directory that contains the .class files for your bean
    classes. I did this too.
    I then attempted to load my JSP file from the browser URL entry line. If my JSP does not contain
    a reference to a bean, then the page loads fine. If it contains a reference to a bean, then I
    get the following message:
    Request URI:/webdocs/vps/hellouser/hellouser.jsp
    Exception:
    oracle.jsp.parse.JspParseException: Line # 4, Error: Unable to find class for bean: myBean defined
    by tag with class: hello.NameHandler
    I cannot for the life of me get Apache to look in one directory for the .jsp file and another for
    the .class file(s). Any suggestions would be greatly appreciated!
    MORE BACKGROUND:
    If it matters..... My first venture was servlets and I've managed to workt that just fine: I
    successfully modified "jserv.conf" to add a mount point (ApJServMount) for my new servlet zone
    which I have specified in "jserv.properties". I have also created an associated properties file
    for my new servlet zone. I've tested this configuration and all works fine for servlets, just not
    JSP.
    Once again, thanks in advance for any help regarding a solution to this problem!!!
    Dave

  • (JSP/SERVLET) File upload Character problem form enctype="multipart.....

    Hi,
    When i upload a file from <form> ( jsp page ) and send it to my object class(struts,servlet) , the filename �����.doc are replaced by ?????.doc. in the database.
    I make few test by adding UTF-8 charset and content type to the jsp but still doesn't work...
    Ex :
    String encod = request.getCharacterEncoding();
    if (encod == null || !encod.equals("UTF-8"))
    try
    request.setCharacterEncoding("UTF-8");
    catch (UnsupportedEncodingException e)
    System.err.println("HttpMultipartRequest - : " + e);
    It's not a charset problem in the database because i try to do with an input type="text" and its working. It's just not working with the input type="file".
    And i also add directly ��� character into the database and its working.
    it's will be a pleasure if someone could response to me .
    thanks
    Jonathan

    warnerja,
    Not sure why you always play the part of the
    cross-post police... Seems like waste of effort to
    me.To each his own. I'm not sure why you feel the need
    to question my motives. Also not sure why you have
    posted requests to Sun regarding forum features...
    "Seems like a waste of effort to me.". But I wasn't
    going to call you on it.touch�
    :-)

  • Problem Configuring JSPs

              I'd be grateful for any help with this one:
              I'm trying run WebLogic's jsp examples but am unable to.
              I have set up weblogic.properties thus:
              weblogic.httpd.register.*.jsp=weblogic.servlet.JSPServlet
              weblogic.httpd.initArgs.*.jsp=pageCheckSeconds=60, compileCommand=c:/jdk1.2.2/bin/javac.exe,
              workingDir=c:/weblogic/myserver/classfiles,
              verbose=true,
              keepgenerated=true
              But when I try and hit one of the example JSPs I get the following exception:
              javax.servlet.UnavailableException: Couldn't find init param: compileCommand
              at weblogic.servlet.jhtmlc.PageCompileServlet.init(PageCompileServlet.java:83)
              So it seems that the property "compileCommand=c:/jdk1.2.2/bin/javac.exe" is causing
              problems, but that's the correct path, checked it a dozen times.
              Any ideas?
              Thanks
              Terrance
              

    oop... sorry Terrance... made a mistake in my correction....
              should read....
              weblogic.httpd.register.*.jsp=weblogic.servlet.JSPServlet
              weblogic.httpd.initArgs.*.jsp=pageCheckSeconds=60, \
              compileCommand=c:/jdk1.2.2/bin/javac.exe, \
              workingDir=c:/weblogic/myserver/classfiles, \
              verbose=true, \
              keepgenerated=true
              "Michael Kovacs" <[email protected]> wrote in message
              news:[email protected]...
              >
              > "Terrance Goldman" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > I'd be grateful for any help with this one:
              > >
              > > I'm trying run WebLogic's jsp examples but am unable to.
              > >
              > > I have set up weblogic.properties thus:
              > >
              > > weblogic.httpd.register.*.jsp=weblogic.servlet.JSPServlet
              > > weblogic.httpd.initArgs.*.jsp=pageCheckSeconds=60,
              > compileCommand=c:/jdk1.2.2/bin/javac.exe,
              > > workingDir=c:/weblogic/myserver/classfiles,
              > > verbose=true,
              > > keepgenerated=true
              > >
              > > But when I try and hit one of the example JSPs I get the following
              > exception:
              > >
              > > javax.servlet.UnavailableException: Couldn't find init param:
              > compileCommand
              > > at
              >
              weblogic.servlet.jhtmlc.PageCompileServlet.init(PageCompileServlet.java:83)
              > >
              > > So it seems that the property "compileCommand=c:/jdk1.2.2/bin/javac.exe"
              > is causing
              > > problems, but that's the correct path, checked it a dozen times.
              > >
              > > Any ideas?
              > >
              > > Thanks
              > >
              > > Terrance
              > Terrance,
              >
              > You need to have a \ character at the end of each continuing line, like
              > shown below
              >
              > weblogic.httpd.register.*.jsp=weblogic.servlet.JSPServlet
              > weblogic.httpd.initArgs.*.jsp=pageCheckSeconds=60,
              > compileCommand=c:/jdk1.2.2/bin/javac.exe, \
              > workingDir=c:/weblogic/myserver/classfiles, \
              > verbose=true, \
              > keepgenerated=true
              >
              > -Michael
              >
              >
              >
              

  • Character Encoding for JSPs and HTML forms

    After having read loads of postings on character encoding problems I'm still puzzled about the following problem:
    I have an instance (A) of WL 8.1 SP3 on a WinXP machine and another instance (B) of WL 8.1 without any SP on a Win2K machine. The underlying Windows locale is english(US) in both cases.
    The same application deployed as a war file to these instances does not behave in the same way when it comes to displaying non-Latin1-characters like the Euro symbol: Whereas (A) shows and accepts these characters as request-parameters, (B) does not.
    Since the war file is the same (weblogic.xml, jsps and everything), the reason for this must either be the service-pack-level or some other configuration setting I overlooked.
    Any hints are appreciated!

    Try this:
    Prefrences -> Content -> Fonts & Color -> Advanced
    At the bottom, choose your Encoding.

  • Over-riding Character encoding in JSP

    I have JSP which was precompiled under weblogic with no encoding.I want to change the encoding during run time using response or request Object.I am using filters before JSP's so the response encoding is not getting to JSP even though i try to set in the response by
              response.setContentType("text/html;SJIS") it is getting lost.So i tried to set in the request as an attribute and retreived in the JSP page directive.It did not work.
              The browser is not detecting my character encoding why?.Is there anything called static encoding from weblogic that is causing problem?.If it is, how would I turn off the static encoding from the weblogic programmatically in JSP so that browser detects correct encoding in the page directive dynamically.I even tried
              request.setCharacterEncoding("SJIS") which is japenese but it did not work.Any help would be appreciated.The encoding it shows in the browser by default is "UTF-8" even i though i send "SJIS" encoding in the request

    on the form processing page, you probably need to call request.setCharacterEncoding("UTF-8") (or whatever encoding you're using) before reading any values.
    Reply #14 of this post has some test page with Chinese which should work as is...
    http://forum.java.sun.com/thread.jspa?forumID=513&threadID=546863

  • Problem of JSP internationalization

    Hi,
    I am using tomcat3.x as web server and try to display multibyte characters in JSP page.
    I tried the following two methods:
    1. at the begiinging of the jsp file I added :
    <%response.setContentType="charset=xxx"%>
    2. added <meta charset="xxx"> into JSP file
    The first method can display correct characters in Tradtional Chinese, Simplified Chinese or Korean if I changed the "xxx" to "big5", "gb2312" or korean charset
    But it can't display Japanese characters correctly even if I already changed "xxx" to "shift_jis"
    However, if I use the method 2, then all the double byte characters can be displayed correctly.
    Does somebody see this problem before? Would you please let me know why the first method doen't work for Japanese? Are there any setting wrong in web server ?
    Thanks,
    Ping

    I used the following page directive and it seemed to do the trick. It didn't work in Netscape 4x but I know that's a whole different ball game. I'm using iPlanet as my web/app server...
    <%@ page contentType="text/html; charset=Shift_JIS">
    - Billy -

Maybe you are looking for