0

在MyEclipse6.5下解决zk studio0.9可视化编辑器不工作的办法!!!

asked 2008-11-14 03:36:36 +0800

ljgrich5 gravatar image ljgrich5
27

1、必须保证MyEclipse6.5的安装路径中不包含空格,否则可视化编辑器会出现404错误。(感谢RyanWu )
2、新建一个Web项目(假设名为hello),将zk 3.5.1的所有jar包复制到项目的WEB-INF/lib文件夹下。
3、新建一个zul文件,打开,在可视化编辑器中会出现找不到jar包的提示。这时,做第4步。
4、修改项目中的3个文件:
1)修改.classpath文件,加入以下两行:
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
2)修改.project文件,在<natures>中加入以下三行:
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
3)修改.settings文件夹,在其中建立2个文件:
a)、新建org.eclipse.wst.common.component文件(注意,这是包含后缀名的文件名,不要再加上.xml),内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="hello">
<wb-resource deploy-path="/" source-path="/WebRoot"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="context-root" value="hello"/>
</wb-module>
</project-modules>
注意:如果你的web应用的web root folder默认是WebContent,就把上面的source-path="/WebRoot"改为source-path="/WebContent"

b)、新建org.eclipse.wst.common.project.facet.core.xml文件(注意,这是包含后缀名的文件名),内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="jst.java"/>
<fixed facet="jst.web"/>
<installed facet="jst.java" version="6.0"/>
<installed facet="jst.web" version="2.4"/>
</faceted-project>
5、做完以上修改后,可视化编辑器就可以正常工作了。

delete flag offensive retag edit
Be the first one to reply this discussion!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2008-11-14 03:36:36 +0800

Seen: 786 times

Last updated: Nov 14 '08

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More