Hi,

   I am currently using JSP to write a HTML page. I am encountering a string
problem. Here is my code.

--------test.htm ----------------
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
        <title>Untitled</title>
</head>

<body>
<form name=test method=post action="test1.jsp">
<input type=text name=txt>
<input type=submit value="Submit">
</form>
</body>
</html>
----------------------------------------

---------- test1.jsp --------------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
        <title>Untitled</title>
</head>

<body>
<% String test=request.getParameter("txt");
   System.out.println(test);

   %>
<form name="test1">
<input type=text name="txttest1" value="<%=test%>">
</form>


</body>
</html>


If user entered a string like this:
   He said:"I saw you yesterday."

Then when user clicks the submit button, only He said: is displayed in the
test1.jsp page. Can anyone tell me how to make the string contains with
white space, double quote and single quote work?
Thank you in advance.

Juan


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to