Eclipse 中 Stuts2 appfuse 应用程序中的错误 [英] Errors in Stuts2 appfuse app in Eclipse
问题描述
我使用 Eclipse Juno 的 Appfuse 原型构建了一个 Stuts2 多模块应用程序.
I have build a Stuts2 multimodule app using Appfuse archetype from Eclipse Juno.
通过 MVN Jetty:run
运行时效果很好.
It works fine when ran through MVN Jetty:run
.
但是当我尝试在 Eclipse 中验证项目时,它给了我很多错误,我将在此处复制错误,有人可以帮我解决吗?
But When I try to validate the project in Eclipse , it is giving me so many errors I am going to copy the errors here can someone please help me resolve them?
出现错误:
Syntax error on token ""><s:param><s:text name="", ; expected in src/main/webapp/scripts/login.js
Syntax error on token "<", invalid MultiplicativeExpression line 34 in src/main/webapp/scripts/login.js
有人可以帮忙解决这些错误吗?
Can someone please help with these errors?
推荐答案
没关系,因为它不是 javascript 代码,它具有 <script type="text/javascript">
标记代码所在的位置.该文件是一个 JSP 文件.JSP 文件通常具有扩展名.jsp
,但没有限制使用扩展名作为文件名.包含在主 JSP 文件中的 JSP 文件或片段不需要验证,但如果您希望 IDE 识别标记,则应在文件顶部使用 JSP taglib
指令
It's ok, because it's not a javascript code it has <script type="text/javascript">
tag where the code is. The file is a JSP file. JSP files usually have extension .jsp
but there's no restriction to use extension for file name. JSP files or fragments being included to the main JSP file doesn't need to be validated, but if you want the tags to be recognized by IDE you should use JSP taglib
directive at the top of the file
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
也可能是其他人.它不会更改应用程序本身,但允许您像普通 JSP 一样验证片段.
and may be others. It doesn't change the application itself but allows you to validate fragments like a normal JSP.
这篇关于Eclipse 中 Stuts2 appfuse 应用程序中的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!