TeamCity:此处不允许使用脚本元素jsp:declaration,jsp:expression,jsp:scriptlet [英] TeamCity: Scripting elements jsp:declaration, jsp:expression, jsp:scriptlet are disallowed here

查看:146
本文介绍了TeamCity:此处不允许使用脚本元素jsp:declaration,jsp:expression,jsp:scriptlet的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定从何处开始出现此错误消息.我曾尝试使用谷歌搜索功能,但始终无法确定收到此消息的可靠原因.

I am not sure where to begin with this error message. I have tried googling, but I was never able to nail down a solid reason why I am getting this message.

我看过各种jsp教程,它们看起来都相对简单,所以我看不出问题所在.

I have looked at various jsp tutorials and they all seem relatively simple so I don't see the problem.

我正在为JetBrains TeamCity编写另一个插件,并且一直在使用以下参数在Java代码和jsp代码之间来回传递值:

I am writing another plugin for JetBrains TeamCity and have been passing values back and forth between my java code and jsp code with parameters like this:

${parameterName}

每当我尝试使用

<%= new java.util.Date() %> 

这将引发此错误.

<%!, <jsp:declaration, <%=, <jsp:expression, <%, <jsp:scriptlet ) are disallowed here

任何帮助或建议都将受到赞赏.

Any help or suggestions are appreciated.

推荐答案

应用程序中是否禁止脚本?在web.xml文件中查找<scripting-invalid>true</scripting-invalid>.

Are scriptlets disallowed in the application? Look for <scripting-invalid>true</scripting-invalid> in your web.xml file.

小脚本是一个错误.它们使混合表示和逻辑变得太容易了.因此,添加此标志是为了防止开发人员在应用程序中使用它们,而是鼓励使用表达语言和标记库.

Scriptlets were a mistake. They make it too easy to mingle presentation and logic. So this flag was added to prevent developers from using them in an application and encourage Expression Language and tag libraries instead.

这篇关于TeamCity:此处不允许使用脚本元素jsp:declaration,jsp:expression,jsp:scriptlet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆