我的JSP页面在目录\GuestBoot\form下面,配置文件如下:<action
attribute="levwForm"
input="/form/post.jsp"
name="levwForm"
path="/levw"
scope="request"
validate="false"
type="com.yourcompany.struts.action.LevwAction">
<forward name="Wsuccess" path="/form/guestbook.jsp" />
<forward name="Wfailure" path="/form/error.jsp" />
</action>页面代码如下:<html:form action="/levw.do" method="post" >
action : <html:hidden property="action"/><html:errors property="action"/><br/>
ifShow : <html:checkbox property="ifShow"/><html:errors property="ifShow"/><br/>
levwContent : <html:textarea property="levwContent"/><html:errors property="levwContent"/><br/>
levwHome : <html:text property="levwHome"/><html:errors property="levwHome"/><br/>
levwName : <html:text property="levwName"/><html:errors property="levwName"/><br/>
levwTitle : <html:text property="levwTitle"/><html:errors property="levwTitle"/><br/>
<html:submit/><html:cancel/>
</html:form>在点提交是提示
Status reportmessage /GuestBoot/levw.dodescription The requested resource (/GuestBoot/levw.do) is not available.
我找了很就都没找到,我在这先谢谢了,解决后马上给分
attribute="levwForm"
input="/form/post.jsp"
name="levwForm"
path="/levw"
scope="request"
validate="false"
type="com.yourcompany.struts.action.LevwAction">
<forward name="Wsuccess" path="/form/guestbook.jsp" />
<forward name="Wfailure" path="/form/error.jsp" />
</action>页面代码如下:<html:form action="/levw.do" method="post" >
action : <html:hidden property="action"/><html:errors property="action"/><br/>
ifShow : <html:checkbox property="ifShow"/><html:errors property="ifShow"/><br/>
levwContent : <html:textarea property="levwContent"/><html:errors property="levwContent"/><br/>
levwHome : <html:text property="levwHome"/><html:errors property="levwHome"/><br/>
levwName : <html:text property="levwName"/><html:errors property="levwName"/><br/>
levwTitle : <html:text property="levwTitle"/><html:errors property="levwTitle"/><br/>
<html:submit/><html:cancel/>
</html:form>在点提交是提示
Status reportmessage /GuestBoot/levw.dodescription The requested resource (/GuestBoot/levw.do) is not available.
我找了很就都没找到,我在这先谢谢了,解决后马上给分
attribute="levwForm"
input="/form/post.jsp"
name="levwForm"
path="/GuestBoot/levw"
scope="request"
validate="false"
type="com.yourcompany.struts.action.LevwAction">
<forward name="Wsuccess" path="/form/guestbook.jsp" />
<forward name="Wfailure" path="/form/error.jsp" />
</action>PATH换了看看
Status reportmessage GuestBoot/GuestBoot/levw.dodescription The requested resource (/GuestBoot/levw.do) is not available.
请问web.xml如何配置呀,我那只有
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</servlet>
<forward name="Wsuccess" path="/form/guestbook.jsp" />
<forward name="Wfailure" path="/form/error.jsp" />
看看你的web.xml下这个配置对吗?
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>