This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Websphere and the fly likes Japanese Charachter not Working in JSP in WAS 4.0.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Japanese Charachter not Working in JSP in WAS 4.0.3" Watch "Japanese Charachter not Working in JSP in WAS 4.0.3" New topic
Author

Japanese Charachter not Working in JSP in WAS 4.0.3

pani_pani2000
Greenhorn

Joined: Dec 07, 2001
Posts: 7
Hi All ,
I have one input.jsp and corresponding output.jsp .
I want to send data using response.sendRedirect from input.jsp to output.jsp
When I entered Japanese Character in input.jsp on WAS 4.0.3 , the our put JSP is showing some garbage .but same is working perfectly TOMCAT . Its working fine .
1. Is there any additional setting I need to do WAS 4.0.3 ??
Note : I am not writing complete code here as this site is not allowing me post the complete JSP code with HTML tags
Here is code
-------------------------------------------
input.jsp

@ page contentType="text/html;charset=UTF-8"
@ page import="java.sql.*"
@ page import="java.net.*"

String reqStr = request.getParameter("dbName");
if(reqStr != null) { String redirectUrl = "output.jsp?dbName="+reqStr;
redirectUrl = response.encodeRedirectURL(redirectUrl);
redirectUrl = URLEncoder.encode(redirectUrl, "UTF-8");
response.sendRedirect(redirectUrl);
<form name="input" method="GET" action="testRedirect.jsp">
<INPUT type="TEXT" name="dbName" value=""/>
<INPUT type="submit" name="submit" value="Redirect">
</body>
</html>
------------------------------------------
==========================================
output.jsp
@ page contentType="text/html;charset=UTF-8"
@ page import="java.sql.*"
try}
String reqStr = request.getParameter("dbName");
response.getWriter().println("Response returned: '"+reqStr+"'"); }
}catch(Exception e) {
e.printStackTrace(response.getWriter());

==========================================
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Japanese Charachter not Working in JSP in WAS 4.0.3
 
Similar Threads
core java communicates with servlet or jsp?
How to insert arabic letters in MySql through jsp
Statelessness of stateless session bean
can anyone tell me how to make a authentication with jsp & servlet
Problem updating access database from jsp