create_PaperAction.java
package Actions;
import Beans.create_paperBean;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class create_paperAction extends org.apache.struts.action.Action {
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
create_paperBean val = (create_paperBean)form;
String result = val.createDB();
request.setAttribute("table_name", val.getTable_name());
return mapping.findForward(result);
}
}
我正在使用 struts,这是页面被转发到 createQues.jsp 我想要做的是将 setAttribute 的值放入 createQues.jsp 上的输入文本框中。我怎么做?