我正在尝试在同一页面中显示结果,但它在单独的页面中显示结果。操作是向会话添加属性,我想显示该属性的值。
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ taglib prefix="sjg" uri="/struts-jquery-grid-tags"%>
<html>
<head>
<sx:head/>
<sj:head/>
</head>
<body>
<%@include file="menu.jsp" %> `
<sj:tabbedpanel id="localtabs" cssStyle="content-left">
<sj:tab id="tab1" target="tone" label="Recommend Tests"/>
<sj:tab id="tab2" target="ttwo" label="Recommend Dose"/>
<div id="tone">
<s:form action="saveSuggestedTests" theme="xhtml">
<s:optiontransferselect
label="Select Tests"
name="leftNumber"
list="%{activeTestsMap}"
doubleName="rightNumber"
doubleList="returnMap"
labelposition="top"
/>
<sj:submit name="submit" value="Submit" indicator="indicator" targets="result"/>
</s:form>
<div id="result" class="result ui-widget-content ui-corner-all"></div>
</div>
struts.xml
具有以下配置
<action name="saveSuggestedTests" class="org.arshiya.struts.action.tests.TestsManagerHelper" method="saveSuggestedTests">
<result name="success">/WEB-INF/result.jsp</result>
<result name="error">/WEB-INF/login.jsp</result>
<result name="login">/WEB-INF/login.jsp</result>
<result name="input">/WEB-INF/createUser.jsp</result>
</action>