在提交表单时,我在网址http://localhost:8090/StrutsApp//JSPS/registration.action中获得双斜杠 我猜struts.xml配置存在一些问题。 文件夹结构WebContent / JSPS / welcm.jsp和WebContent / JSPS / error.jsp。 提交表单后,我希望相应地显示成功/错误页面
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<constant name="struts.custom.i18n.resources" value="myapp" />
<package name="JSPS" extends="struts-default" namespace="/JSPS">
<action name="registration" class="com.action.RegistrationAction">
<result name="success">/welcm.jsp</result>
<result name="error">/error.jsp</result>
</action>
</package>
</struts>