小女子求个高手帮忙看看,不甚感谢啊!!
The requested resource (/demo) is not available.
login.jsp//////////////////
<%@ page language="java" contentType="text/html;charset=gb2312"%><%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %><html:html lang="true">
  <head>
    <title>login.jsp</title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->  </head>
  
  <body>
  <h2>用户登陆</h2>
  <html:form action="login.do" method="post">
   用户名:<html:text property="name"></html:text><br>
   密码:<html:password property="password"></html:password>
   <html:submit value="登陆"></html:submit>
   <html:reset value="重置"></html:reset>
  </html:form>
  </body>
</html:html>
errors.jsp/////////////////////////////
<%@ page language="java" contentType="text/html;charset=gb2312"%><%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %><html:html lang="true">
  <head>
    <title>login.jsp</title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->  </head>
  
  <body>
  <h3>登陆时发生了以下错误:</h3>
  <html:errors/>
  </body>
</html:html>
在C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf中修改了server.xml
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
     <Content path="/demo" docBase="F:\strutsdemo\strutsProject\WebRoot"/>
      </Host>
在C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf中修改了web.xml
 <servlet>
        <servlet-name>default</servlet-name>
        <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>0</param-value>
        </init-param>
        <init-param>
            <param-name>listings</param-name>
            <param-value>true</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
大侠们帮忙看看把!!!!让我有勇气学下去

解决方案 »

  1.   

    开看toncat启动报什么错?应该有报错的
      

  2.   

    在struts.xml里面有个关于action的配置
    你看看action的指向和result的指向有没有问题,大致如下上网找了一段<struts>
        <package name="wwfy" extends="struts-default">
            <!-- 指定默认class为Test -->
            <default-class-ref class="wwfy.action.DefaultClassRef"/>
            <action name="test1">
                <result>/index.jsp</result>
            </action>
        </package>
    </struts>
      

  3.   

    http://localhost:8080/demo这是我输入的就跳到404错误了(http://localhost:8080/时能够显示页面内容)路劲我设到了项目的Content path="/demo" docBase="F:\strutsdemo\strutsProject\WebRoot"/>
    应该没错啊
      

  4.   

    HTTP Status 404 - /demo--------------------------------------------------------------------------------type Status reportmessage /demodescription The requested resource (/demo) is not available.
    --------------------------------------------------------------------------------Apache Tomcat/6.0.13
      

  5.   

    美女的说的是启动tomcat的时候
      

  6.   

    不是访问的时候,是点击tomcat的start以后
      

  7.   

    http://localhost:8080/demo/你访问的页面
      

  8.   

    服务器启动时就报错 首先看一下你的 web.xml 文件位置是否真确 我以前报这个错误就是用myeclipse的时候一不小心把 web.xml 拖到WEB-INF 的lib下去了 
      

  9.   

    输入http://localhost:8080/出现正常页面:
    Directory Listing For /--------------------------------------------------------------------------------
    Filename Size Last Modified 
       RELEASE-NOTES.txt 6.4 kb Sat, 05 May 2007 01:42:24 GMT 
       admin/   Thu, 12 Apr 2012 00:36:06 GMT 
       asf-logo-wide.gif 5.7 kb Sat, 05 May 2007 01:42:24 GMT 
       build.xml 2.5 kb Sat, 05 May 2007 01:42:24 GMT 
       favicon.ico 21.1 kb Sat, 05 May 2007 01:42:24 GMT 
       index.html 7.1 kb Sat, 05 May 2007 01:42:24 GMT 
       index.jsp 7.6 kb Sat, 05 May 2007 01:42:22 GMT 
       tomcat-power.gif 2.2 kb Sat, 05 May 2007 01:42:24 GMT 
       tomcat.gif 1.8 kb Sat, 05 May 2007 01:42:24 GMT 
       tomcat.svg 63.8 kb Sat, 05 May 2007 01:42:22 GMT --------------------------------------------------------------------------------Apache Tomcat/6.0.13
    输入http://localhost:8080/demo
    出现页面错误HTTP Status 404 - /demo--------------------------------------------------------------------------------type Status reportmessage /demodescription The requested resource (/demo) is not available.
    --------------------------------------------------------------------------------Apache Tomcat/6.0.13
      

  10.   

    web.xml所在位置是F:\strutsdemo\strutsProject\WebRoot\WEB-INF,lib下面是空的
      

  11.   

    你web.xml里没有配置struts的serlvet,你struts.xml配置了吗
      

  12.   

    <?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>
          <param-value>3</param-value>
        </init-param>
        <load-on-startup>0</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
    </web-app>
    这是我项目里的web.xml需要怎么配?求指导
      

  13.   

    1.首先确定你的tomcat里面什么都没有时启动是否报错?
    2.项目是否部署到tomcat的webapp目录下了?
    3./demo前的‘/’去掉试试。
      

  14.   

    谢谢各位的帮忙,我直接用MyEclipse自带的tomcat解决了!!