zoukankan      html  css  js  c++  java
  • 用Myeclipse 编写struts.xml时,自动提示

    之所以不自动提示,是因为这个xml它不知道自己的xml格式是什么有哪些标签,所以不知道该怎么提示

    所以就要给它引入格式,所以要引入XSD或者DTD文件

    1、首先打开MyEclipse的窗口,选择“Window”菜单下的“Preferences”选项

    2.  打开的“Preferences”对话框中,选择左边的“XML”选项下的“XML Catalog”选项,然后选择右边的“Add”按钮

    3.  在打开的对话框中,在“location”中输入struts.xml文件所对应的dtd文件的所在位置,在“Key type”的地方选择类型为“URI”,在“Key”的地方输入http://struts.apache.org/dtds/struts-2.3.dtd

    4.保存退出

    如果上面不行

    首先打开MyEclipse的窗口,选择“Window”菜单下的“Preferences”选项,选择“General”下的“File Associations”选项,在右边的页面中在“File types”里选择“*.xml”,在下方的关联编辑器处选择“MyEclipse XML Editor”,单击“default”按钮将之设置为默认,单击OK按钮保存退出

    如果上面还不行

    可能是你的eclipse装的插件太多,你此时打开xml时用的是默认某一个插件打开的,你应该在你的xml上点击右键——Open With——XML EDITOR

  • 相关阅读:
    62. Unique Paths
    24. Swap Nodes in Pairs
    83. Remove Duplicates from Sorted List
    21. Merge Two Sorted Lists
    141. Linked List Cycle
    268. Missing Number
    191. Number of 1 Bits
    231. Power of Two
    9. Palindrome Number
    88. Merge Sorted Array
  • 原文地址:https://www.cnblogs.com/tech-bird/p/4141492.html
Copyright © 2011-2022 走看看