在action中,
String aa = "123";
request.setAttribute("test", aa);
然后到jsp上:
<%
String test = (String)request.getAttribute("test");
%>
String aa = "123";
request.setAttribute("test", aa);
然后到jsp上:
<%
String test = (String)request.getAttribute("test");
%>
title = cs.getDBstr(title);
request.setAttribute("title", title);
String content = "内容";
content = cs.getDBstr(content);
request.setAttribute("content", content); return (mapping.findForward("setValue"));