|
Probably the simplest way is to have your servlet create an HttpSession
and store your string in it. Then you can get it back out.
in the
servlet:
HttpSession session =
request.getSession();
session.setAttribute("myString", myString); // might be setValue depending on your version of the JSDK in the
jsp:
<%
// do this part if theres a possibility your string could be null, else page will print null String myString =
"";
if (session.getAttribute("myString") != null) { myString = (String)session.getAttribute("myString"); } %>
<%=myMessage%>
|