JSP 2.2 Spec
JSP 1.3.10.1 EBNF Grammar for JSP Syntax
ScriptlessBody ::= ( ( ‘<%--’ JSPCommentBody )
| ( ‘<%@’ DirectiveBody )
| ( ‘<jsp:directive.’ XMLDirectiveBody )
| ( ‘<%!’ <TRANSLATION_ERROR> )
| ( ‘<jsp:declaration’ <TRANSLATION_ERROR> )
| ( ‘<%=’ <TRANSLATION_ERROR> )
| ( ‘<jsp:expression’ <TRANSLATION_ERROR> )
| ( ‘<%’ <TRANSLATION_ERROR> )
| ( ‘<jsp:scriptlet’ <TRANSLATION_ERROR> )
| ( ‘${‘ ELExpressionBody )
| ( ‘#{‘ ELExpressionBody )
| ( ‘<jsp:text’ XMLTemplateText )
| ( ‘<jsp:’ StandardAction )
( ( ‘</’ ExtraClosingTag )
| ( ‘<‘ CustomAction CustomActionBody )
| TemplateText
)*
So, when scripting-invalid=true
:
Illegal
<%
<%!
<%=
<jsp:scriptlet
<jsp:declaration
<jsp:expression
Legal
<%@
<jsp:directive.
<jsp:
The following is legal:
<%@ taglib prefix="utils" uri="/tags-utils" %>
As long as the "app context uri" + "/tags-utils" (the taglib's context-relative path) maps to "taglib absolute uri".
Alternatively, you can try:
<%@ taglib prefix="utils" uri="http://www.mycorp/utiltags" %> // use your absolute taglib URI
OR
<%@ taglib prefix="utils" uri="uri_path_relative_to_jsp_uri" %> // no leading "/"
OR
<%@ taglib prefix="utils" tagdir="/WEB-INF/tags" %> // include subdir if approp
The following is invented. There's no jsp:directive.tagLib
tag defined. Don't use.
<jsp:directive.tagLib prefix="s" uri="struts-tags" />
Instead of:
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
Try:
<%@ page contentType="text/html; charset=UTF-8" %> // language is for scriptlets