Can someone help me on this.
I am building a search page (
jsp) using weblogic and contains a simple text field which takes the user's query
string and outputs the results. Once the page is loaded with the hits, I am displaying the user's query string in the text field. How ever, when a user enters the query string in quotes (ex: "test"), I have a problem displaying the string. Obviously, the value for the text filed is interpreted as ""test"" by html and is ignored completely.
I have tried using the html to display the string and also out.println with the appropriate html but with out success. In either case, the page works fine as long as the query string is not in quotes. Only when the query string is in quotes, the field is displayed as blank. If I do a view source on the page, I can see that the value is ""test"".
Here is the syntax that I used.
String savedQuery = (String) session.getValue("QUERY");
<INPUT TYPE="text" NAME="QSTR" SIZE=54 VALUE="<%= savedQuery %>">
*****************
String savedQuery = (String) session.getValue("SQUERYTYPE");
<% out.println("<INPUT TYPE=\"text\" NAME=\"QSTR\" SIZE=54 VALUE=\"" + savedQueryString + "\">";%>
Would appreciate any help on this.
kishore