补充一下:浏览器里输入的是:http://192.168.0.88:8080/mystruts/test1.jsp反正我觉得拼写是没错的了,也不用怀疑断口,IP这些的,都是正确的!!谢谢!!!

解决方案 »

  1.   

    看看下面两个的路径对不对
    WEB-INF/tld/struts-logic.tld
    uri="struts-logic"
    感觉你的uri有问题
      

  2.   

    我也是初学 struts. 嗬嗬!建议你看一下我昨天刚找我的一个struts的关系图!
    http://www.chengjun.net/
    看一下,就可以深入的理解struts的流程了!
      

  3.   

    TO:lywater1980(雨燕) 
    是对的!!!好象是虚拟目录的问题,但我又没发现哪错,再帮我看看啊!TO:NeverFear(无畏者) 
    谢谢,但眼下,是解决这个问题!!1
      

  4.   

    你看一下struts-logic.tld的位置。必需。你现在把它们放到 WEB-INF/tld/目录下,那么,在jsp里边应该写 WEB-INF/tld/struts-logic.tld
      

  5.   

    还有。struts的lib你都copy过去了么?
      

  6.   

    <!DOCTYPE struts-config PUBLIC
            "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
            "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
            
            
       <struts-config>
          <form-beans>
          </form-beans>
          <global-forwards>
          </global-forwards>
          <action-mapping>
          </action-mapping>
       </struts-config>
    你的这一段有问题  删除中间一段 
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config />
    注意<>。 </  >
      和<      />匹配
      

  7.   

    <              />  是表示里边没有内容吧!
    如果标签里边没有内容,可以用 <struts-config /> ,
    也可以用 <struts-config> </struts_config>
      

  8.   

    我是简写的 差不多是你说的意思
     
    建议写完struts-config.xml之后 validate一把 楼主的这个xml jbuilder就报了错 
          Element type "action-mapping" must be declared.
          The content of element type "struts-config" must match "(data-sources?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
      

  9.   

    谢谢楼上的各位,我都说了是虚拟目录的问题,结果经过我测试,确实是我说的但是不明白
    错误在于web.xml的配置,我把其中一段修改如下:错误的:
    <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems,Inc.//DTD Web Application 2.2//EN"
      "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
      
    <web-app>
       <display-name>Struts Blank Application</display-name>
       ...............
    <web-app>
            
    正确的:
    <?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>
    <display-name>My Web Application</display-name>
    <description>
    A application for test.
    </description>
    .......
    </web-app>
    因为之前在mystructs目录下还有其他简单文件,还是说找不到!我这样修改以后,其他文件正确了,现在不是路径问题了!!出现这样的505错误:org.apache.jasper.JasperException: File "/struts-logic" not found请教,又是哪的问题!!
      

  10.   

    也就是
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">这段什么意思???还有为什么又找不到标签了,再次申明,所有用到的tld到拷贝过去了的
    WEB-INF/tld/下
      

  11.   

    是不是因为我修改了
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    这个,虚拟目录好了,还标签库却有问题了谢谢!!