Custom JSP Tag Attribute Case Insensitivity
Our team is migrating from Web Logic 12 to Tomcat 9; we are noticing that our custom JSP tags are having issues with attributes. The attributes are not properly cased (e.g. "myattribute" vs. "myAttribute"). This causes JSP compile errors in Tomcat 9, but not Web Logic 12. I cannot share the exact code, but the following is the same pattern as what we are encountering.
Is there a setting in Tomcat that allows for the JSP engine to allow for custom tag attributes to be case insensitive?
Tag Library
<tag>
<name>myTag</name>
<tagclass>com.foo.MyTag</tagclass>
<bodycontent>JSP</bodycontent>
<info> This Tag defines a form.</info>
<attribute>
<name>myVar</name>
<required>false</required>
</attribute>
</tag>
Class
public class MyTag {
private String myVar = "";
public void setMyVar(String myVar) {
this.myVar = myVar;
}
public String getMyVar()
{
return this.myVar;
}
}
JSP
<customTag:myTag myvar="bar"/>
Error Message (or similar to)
org.apache.jasper.JasperException: /jsp/mypage.jsp
(line: [###], column: [0])
Attribute [myvar] invalid for tag [myTag] according to TLD
jsp tags case-sensitive
add a comment |
Our team is migrating from Web Logic 12 to Tomcat 9; we are noticing that our custom JSP tags are having issues with attributes. The attributes are not properly cased (e.g. "myattribute" vs. "myAttribute"). This causes JSP compile errors in Tomcat 9, but not Web Logic 12. I cannot share the exact code, but the following is the same pattern as what we are encountering.
Is there a setting in Tomcat that allows for the JSP engine to allow for custom tag attributes to be case insensitive?
Tag Library
<tag>
<name>myTag</name>
<tagclass>com.foo.MyTag</tagclass>
<bodycontent>JSP</bodycontent>
<info> This Tag defines a form.</info>
<attribute>
<name>myVar</name>
<required>false</required>
</attribute>
</tag>
Class
public class MyTag {
private String myVar = "";
public void setMyVar(String myVar) {
this.myVar = myVar;
}
public String getMyVar()
{
return this.myVar;
}
}
JSP
<customTag:myTag myvar="bar"/>
Error Message (or similar to)
org.apache.jasper.JasperException: /jsp/mypage.jsp
(line: [###], column: [0])
Attribute [myvar] invalid for tag [myTag] according to TLD
jsp tags case-sensitive
add a comment |
Our team is migrating from Web Logic 12 to Tomcat 9; we are noticing that our custom JSP tags are having issues with attributes. The attributes are not properly cased (e.g. "myattribute" vs. "myAttribute"). This causes JSP compile errors in Tomcat 9, but not Web Logic 12. I cannot share the exact code, but the following is the same pattern as what we are encountering.
Is there a setting in Tomcat that allows for the JSP engine to allow for custom tag attributes to be case insensitive?
Tag Library
<tag>
<name>myTag</name>
<tagclass>com.foo.MyTag</tagclass>
<bodycontent>JSP</bodycontent>
<info> This Tag defines a form.</info>
<attribute>
<name>myVar</name>
<required>false</required>
</attribute>
</tag>
Class
public class MyTag {
private String myVar = "";
public void setMyVar(String myVar) {
this.myVar = myVar;
}
public String getMyVar()
{
return this.myVar;
}
}
JSP
<customTag:myTag myvar="bar"/>
Error Message (or similar to)
org.apache.jasper.JasperException: /jsp/mypage.jsp
(line: [###], column: [0])
Attribute [myvar] invalid for tag [myTag] according to TLD
jsp tags case-sensitive
Our team is migrating from Web Logic 12 to Tomcat 9; we are noticing that our custom JSP tags are having issues with attributes. The attributes are not properly cased (e.g. "myattribute" vs. "myAttribute"). This causes JSP compile errors in Tomcat 9, but not Web Logic 12. I cannot share the exact code, but the following is the same pattern as what we are encountering.
Is there a setting in Tomcat that allows for the JSP engine to allow for custom tag attributes to be case insensitive?
Tag Library
<tag>
<name>myTag</name>
<tagclass>com.foo.MyTag</tagclass>
<bodycontent>JSP</bodycontent>
<info> This Tag defines a form.</info>
<attribute>
<name>myVar</name>
<required>false</required>
</attribute>
</tag>
Class
public class MyTag {
private String myVar = "";
public void setMyVar(String myVar) {
this.myVar = myVar;
}
public String getMyVar()
{
return this.myVar;
}
}
JSP
<customTag:myTag myvar="bar"/>
Error Message (or similar to)
org.apache.jasper.JasperException: /jsp/mypage.jsp
(line: [###], column: [0])
Attribute [myvar] invalid for tag [myTag] according to TLD
jsp tags case-sensitive
jsp tags case-sensitive
edited Jan 7 at 14:30


user7294900
23.5k113464
23.5k113464
asked Jan 2 at 13:07
xeraltixeralti
32
32
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Tag attribute is case-sensitive, as Java variable
Tag attributes must be declared inside the tag element by means of an attribute element. The attribute element has three nested elements that can appear between and .
name. This is a required element that defines the case-sensitive attribute name.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54006940%2fcustom-jsp-tag-attribute-case-insensitivity%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Tag attribute is case-sensitive, as Java variable
Tag attributes must be declared inside the tag element by means of an attribute element. The attribute element has three nested elements that can appear between and .
name. This is a required element that defines the case-sensitive attribute name.
add a comment |
Tag attribute is case-sensitive, as Java variable
Tag attributes must be declared inside the tag element by means of an attribute element. The attribute element has three nested elements that can appear between and .
name. This is a required element that defines the case-sensitive attribute name.
add a comment |
Tag attribute is case-sensitive, as Java variable
Tag attributes must be declared inside the tag element by means of an attribute element. The attribute element has three nested elements that can appear between and .
name. This is a required element that defines the case-sensitive attribute name.
Tag attribute is case-sensitive, as Java variable
Tag attributes must be declared inside the tag element by means of an attribute element. The attribute element has three nested elements that can appear between and .
name. This is a required element that defines the case-sensitive attribute name.
answered Jan 2 at 13:15


user7294900user7294900
23.5k113464
23.5k113464
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54006940%2fcustom-jsp-tag-attribute-case-insensitivity%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown