eclipse中添加了struts和hibernate 但是在写配置文件*.xml时没有标签提示??
web.xml中有提示Struts中没有
比如:当敲写了<form 就会有下拉提示<form-beans>
直接按回车就完成输入<form-beans>了
写上<global就有<global-exceptions>下拉项提示,敲回车就<global-exceptions怎么设置才能让它有提示呢?

解决方案 »

  1.   

    <%@taglib prefix="s" uri="/struts-tags" %>
    这个引用加了吗?
      

  2.   

    我说的xml配置文件没有提示信息,你说的不是
      

  3.   

    window ---preferences 找到XML Catoalog  点击add 添加注意,key Type 选择URI,location:选择struts的jar包里面的 一个.xsd结尾的文件
    例如:struts-2.0.xsd 
    并将该名称(struts-2.0.xsd )添加到界面中key的结尾,点击确定。
      

  4.   

    在struts.xml的最前面加上<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd" >,这个是struts2.0的,<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">这个是struts1.X的。
      

  5.   

    解决办法:
    打开Myeclipse,window->preferences->XML->XML Catoalog,单击add添加;
    这里有两个注意的地方:location:选择file system,Type选择URI;
    (Key值的查找方法)然后找到hibernate-3.2.0.ga(其他版本类似)目录下的核心jar包,解压后打开文件夹,org->hibernate,找到hibernate-configuration-3.0.dtd和hibernate-mapping-3.0.dtd两个文件,两个文件的配置顺序任意,比如先用UltraEdit打开hibernate-configuration-3.0.dtd,找到里面的一个URL:http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd,把这个URL填到Key里,单击OK,就可以了。另外一个文件的配置类似,下次使用时就有提示了。