把你的访问jsp的代码和你的配置文件贴出来看看

解决方案 »

  1.   


    配置文件struts-config.xml:<?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE struts-config PUBLIC
                     "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
             "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
    <struts-config>
        <!--配置表单bean-->
        <form-beans>
         <form-bean
        name="empForm"
    type="com.example.EmployeeForm"/>
    </form-beans>
    <!--配置ActionMapping-->
    <action-mappings>
        <action path="/validateEmployee"
      type="com.example.ValidateEmployeeAction"
      name="empForm"
      scope="request"
      intput="/inputContent.jsp">
      <forward name="success" path="/outputContent.jsp"/>
     </action>
    </action-mappings>
    </struts-config>
    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
    inputContent.jsp文件:<%@ taglib uri="/bean" prefix="bean"%>
    <%@ taglib uri="/html" prefix="html"%>
    <%@ taglib uri="/logic" prefix="logic"%>
    <%@ taglib uri="/app" prefix="app"%>
    <html>
       <head>
          <title></title>
       </head>
       <body>
          <html:errors/>
          <app:departmentList/>
          <app:skillsList/>
          <html:form action="validateEmployee.do">
             <table>
                <tr>
                    <td align="right">
                        <bean:message key="prompt.emloyee.name"/>
                    </td>
                    <td>
                      <html:text property="name"/>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                       <bean:message key="prompt.emloyee.department"/>
                    </td>
                    <td>
                       <html:select property="department">
                         <html:options name="departmentList"/>
                       </html:select> 
                    </td>
                </tr>
                <tr>
                    <td align="right" valign="top">
                        <bean:message key="prompt.employee.skills"/>
                    </td>
                    <td>
                       <logic:interate id="currentSkill" name="skillsList">
                          <html:multibox property="skills">
                             <%=currentSkill%>
                          </html:multibox>
                             <%=currentSkill%>
                          <br/>
                       </logic:iterate>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                       <html:submit value="Validate"/>
                    </td>
                </tr>
             </table>     
           </html:form>      
       </body>
    </html>
      

  2.   

    g感觉不象是程序问题,还是看一下tomcat的log吧,
      

  3.   

    <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>  <!-- Action Servlet Configuration -->
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
      </servlet>  <!-- Action Servlet Mapping -->
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>  <!-- The Welcome File List -->
      <welcome-file-list>
        <welcome-file>login.jsp</welcome-file>
      </welcome-file-list></web-app>
     
    这是另一个例子中的web.xml
    这个  <!-- The Welcome File List -->
      <welcome-file-list>
        <welcome-file>login.jsp</welcome-file>
      </welcome-file-list>
    还象没用吧,我去掉以后依然,能成功
    是不是这样啊?
      

  4.   

    还有struts中,从那个配置中能看到我进入的第一个页面,比如:login.jsp
    就是整个程序的入口在哪里?
    请高手解疑!谢谢
      

  5.   

    是不是你没把STRUTS的环境配起来或少导入包了
      

  6.   

    waf框架用mapping.xml来配置动作,可以看到整个程序的入口,可是我在struts里找不到
    另外顺便问一下,还有人用waf吗?
      

  7.   

    你有outputContent.jsp这个页面么,只看到你的inputContent.jsp
      

  8.   

    <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>
    -------------------------
      

  9.   

    一个简单而比较完整的Struts,应包括哪些东西啊?