日期:2014-05-20  浏览次数:20716 次

struts-helloapp web.xml的错误 请高手指点
hello.jsp
<%@   page   contentType= "text/heml;charset-UTF-8 "   language= "java "   %>
<%@   taglib   uri= "/WEB-INF/struts-bean.tld "   prefix= "bean "   %>
<%@   taglib   uri= "/WEB-INF/struts-html.tld "   prefix= "html "   %>
<%@   taglib   uri= "/WEB-INF/struts-logic.tld "   prefix= "logic "   %>
<html>
    <head>
     
       
        <title> <bean:message   key= "hello.jsp.title "/> </title>
        <html:base/>
       
  </head>    
    <body   bgcolor= "white "> <p>
    <h2> <bean:message   key= "hello.jsp.page.heading "/> <h2> <p>
    <heml:errors/> <p>
   
    <logic:present   name= "personbean "   scope= "request ">
    <h2>
    <bean:message   key= "hello.jsp.page.hello "/>
    <bean:write   name= "personbean "   property= "username "/> ! <p>
    </h2>
    </logic:present>
      <heml:form   action= "/helloworld.do "   focus= "username ">
      <bean:message   key= "hello.jsp.prompt.person "/>
      <heml:text   property= "username "   seze=16 "   maxlength= "16 "/> <br>
      <html:submit   property= "submit "   value= "submit "/>
      <html:reset/>
      </heml:form> <br>
      <html:img   page= "/struts-powear.gif "   alt= "powered   by   struts "/>
     
    </body>
</html>


web.xml
<?xml   version= "1.0 "   encoding= "UTF-8 "?>
<web-app   xmlns= "http://java.sun.com/xml/ns/j2ee "   xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance "   version= "2.4 "   xsi:schemaLocation= "http://java.sun.com/xml/ns/j2ee       http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd ">
    <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>