spring struts 整合不了。急急急急
配置如下:
struts-config.xml
<action-mappings >
<action path="/test" type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="head" path="/head.jsp" />
<forward name="error" path="/error.jsp" />
</action>
</action-mappings>
<controller>
<set-property property="processorClass"
value="org.springframework.web.struts.DelegatingRequestProcessor" />
</controller>
<message-resources parameter="netstore.ApplicationResources" />
<plug-in
className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation"
value="/WEB-INF/applicationContext.xml" />
</plug-in>
applicationContext.xml
<bean name="/test" class="action.TestAction">
</bean>
head.jsp
<form name="login" action="test.do">
<table>
<tr class="logintitle1">
<td>用户名<font color="red">*</font><input type="text" name="username"/></td>
<td><input type="submit" value="登录" onclick="return validate()"/></td>
</tr>
</form>
testAction
public class TestAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
return mapping.findForward("error");
}