Hello struts-users,

I am having problems passing a Japanese text as a GET
parameter from one JSP to another. I am using struts 1.0
with resin 2.0.0 on redhat linux 6.2.

I have the following JSP file:
    -----------
  :
<%@ page contentType="text/html; charset=UTF-8" %>
   :
<bean:define id="jText" name="someBean"
                    property="japaneseText"/>
<jsp:useBean id="params" class="java.util.Hashtable"/>
<%
  params.put("p1",  jText);  // a Japanese text parameter
  params.put("p2", 1234);   // a numeric parameter
%>
<html:link page="/receiving.jsp" name="params">
  ...</html:link>
   :
    -----------
someBean.getJapaneseText() returns a piece of Japanese
text. Doing <bean:write name="jText"/> in this JSP correctly
produces this text string encoded in UTF-8. So far so good.

Here is the receiving.jsp. I want to capture these GET
parameters.
    -----------
  :
<%@ page contentType="text/html; charset=UTF-8" %>
  :
<bean:parameter id="jText" name="p1"/>
<bean:parameter id="aNum" name="p2"/>
  :
    -----------

When receiving.jsp is evaluated, I get the error:

  500 Servlet Exception
  javax.servlet.jsp.JspException:No parameter p2 was
                                                included in this request
    at org.apaceh.struts.taglib.bean.ParameterTag.doStartTag
                                              (ParameterTag.java:174)
      :

What is going on?


One more thing. If I remove <%@ page contentType="..."%>
from receiving.jsp, the above error disappears, but the captured
jText turns out to be all garbage when doing 
<bean:write name="jText"/> in this page. Weird.

I appreciate any info on this matter.

Regards,

- kazumi iwane

Reply via email to