- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的系统:Ubuntu 9.10。带有Java EE 1.2.1的Eclipse 3.5.1(手动安装-不是来自synaptic)。 Web开发人员工具3.1.1
我最近采用了别人的代码(动态Web项目),并且在Eclipse中遇到了许多错误,警告和不正确的语法突出显示。我将其范围缩小为以下4行代码(创建一个新的Dynamic Web Project,然后一个新的JSP页面,并将其放在正文中):
${(1<2)? "" : "no"}
<%for (int i = 0; i < 5; i++) {%>
<div>${5}</div>
<%}%>
line1: yellow warning line under '<': Invalid character used in text string (${(1<2)? "yes" : "no"}).
line2: red error line under 'f': Multiple annotations found at this line: 1) Syntax error, insert "Finally" to complete TryStatement. 2) Syntax error, insert "}" to complete ClassBody
line2: red error line under ')': Syntax error on token ")", try expected after this token
line3: yellow warning line under 'div': No end tag (/div).
line3: yellow warning line under '<' of closing div: Multiple annotations found at this line: 1) Invalid character used in text string (${5} <%}%>). 2) Invalid character used in text string (${5} <%}%>).
line3: '/div' is black and purple (for scriptlet code?) instead of green for HTML code
line4: The opening and closing scriplet tags '<%' and '%>' are black instead of orange
最佳答案
Eclipse WTP很棒,但是对我来说,这个问题恰恰也是Eclipse WTP中的epic fail。他们似乎正在努力解决这个问题,但是直到那之前,我只是通过“Web”>“JSP文件”>“验证”>“滚动列表”禁用/设置以忽略工作空间首选项中与此内容相关的所有验证,并将滚动列表设置为最底部,并设置所有EL验证设置以忽略。同样,在主要Validation首选项中,取消选中与JSP相关的所有复选框。但是,这似乎并不能消除所有警告/错误,但至少可以将烦恼降到最低。
IntelliJ IDEA处理JSP/EL验证要好得多。
对我来说,这些症状使我认为WTP正在使用regexp而不是基于堆栈的解析器来验证HTML/JSP/EL。在结构化标记的情况下,这是big no-no。
关于eclipse - JSP EL(表达语言)在Eclipse中引起问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1790749/
我升级了 Java EE Web 应用程序以使用较新的 PrimeFaces 版本,突然在 PrimeFaces commandlink 的操作属性中调用重载 bean 方法不再起作用。我尝试使用 J
考虑以下代码片段。 var SomeView = Backbone.View.extend({ collection: new SomeCollection(), render: fu
很难说出这里问的是什么。这个问题是含糊的、模糊的、不完整的、过于宽泛的或修辞性的,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开它,visit the help center 。 已关
我的 JSP 在 Tomcat 7 中运行良好,但在 Tomcat 6 中不起作用,我认为这是因为您不能从 EL 2.1 调用方法(getter/setter 除外)。 我需要调用的方法不能命名为ge
这个问题在这里已经有了答案: How to nest an EL expression in another EL expression (2 个答案) 关闭 5 年前。 我有 Java 枚举类型,
为什么会这样? ....Some Code 在我的 profielForm 中,我只有一个 getCityOptions() 方法,没有 cityO
我正在关注 backbone.js tutorial并遇到了 2 个函数 initialize() 和 render()。 initialize() 在附加一些 html 时使用了 $(self.el
对于给定的示例,this.el 和 this.$el 之间有什么区别? 我知道 this.$el 指向 this.el 的 jQuery 对象,在本例中是 'li'。 当我呈现 View 时,我可以在
我一直在我的主干应用程序中使用 this.$el,如下所示: render: function() { this.$el.html(this.template); }, 然后我在网上看到代码使
我想使用 EL 在 jsp 中调用一个传递给它的参数的 bean 函数。问题是它不允许这样的事情:“${teacherBean.certificationFor(${particularField})
有没有办法可以在 EL 中获取 ServletContext 中设置的属性,使其最终成为 JavaScript 变量? 我将其设置为 context.setAttribute("testing.por
我正在编写 JSP/JSTL,并且我正在尝试遍历数据库中的几个项目。 我目前在数据库中有三列,${image1} , ${image2}和 ${image3} .我正在尝试使用以下代码为他们打印信息:
this.$el.html 和 this.$el.append 在渲染模板时有区别吗?我对 js、backbone 等完全陌生。在我正在从事的当前项目中,我看到类似 this.$el.append(P
我刚刚学习了一些主干教程,我有一个一般的 jQuery 问题,我实际上已经想知道了一段时间。 有时我会在 jQuery 选择器中看到带有第二个参数的调用,例如 $('ul', this.el)。 选择
有没有办法在 SpEL 中调用静态接口(interface)方法?例如: T(java.util.stream.IntStream).of(new Integer[]{1,2,3}).sum() 当我
这个问题已经有答案了: If a DOM Element is removed, are its listeners also removed from memory? (6 个回答) 已关闭 5 年
JBoss EL resolver online documentation中有这句话: It's important to fully understand how this extension t
使用 JSF 2.0 和 EL,我试图在 POJO 上调用一个方法,它是一个 viewscoped bean 的一个属性。该代码实际上与 @BalusC 非常相似的教程here .当我调用一个不带参数
所以我整个下午都在 this problem 上卡住了我最终解决了。原来我分配的是 el 而不是 $el。 两者有什么区别,我应该在什么时候使用它们? 最佳答案 直接来自 the documentat
我正在努力学习 Backbone 。我知道 el 是正在执行的元素。如果未指定,则为空 div。我正在我的 View 中创建一个模板并返回 View 对象。然后我正在渲染 View ,但我不明白为什么
我是一名优秀的程序员,十分优秀!