Weblogic to JBOSS/Wildfly AS migration JSP tag-lib directives case sensitive issues
viswanath.somanchi Sep 22, 2014 12:33 PMI have been facing JSP tag-lib directives case sensitivity issue while migration application from Weblogic to JBOSS. I see that below JSP code works in weblogic and throws exception is JBOSS.
Index.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>Count to 10 Example(using JSTL)</title>
</head>
<body>
<c:forEach var="i" begin="1" end="10" step="1">
<c:out value="${i} " />
<br />
</c:forEach>
<c:choose>
<c:when Test="${true}">
<p><b>Setting: </b></p>
Yes
</c:when>
<c:otherwise>
<p><b>Setting: </b></p>No</c:otherwise>
</c:choose>
</body>
</html>
In Weblogic output is as below
1
2
3
4
5
6
7
8
9
10
Setting:
Yes
In Jboss
Servlet Path:/index.jsp
Path Info:null
Query String:null
Stack Trace
org.apache.jasper.JasperException: /index.jsp(18,2) JBWEB004090: when: Mandatory attribute test missing
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:145)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:96)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:828)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:862)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2433)
org.apache.jasper.compiler.Node$Root.accept(Node.java:495)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2377)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1768)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:211)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:359)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:339)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:326)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:604)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:309)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
io.undertow.server.Connectors.executeRootHandler(Connectors.java:168)
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)
I know issue is we should use test instead of Test inside c:when directive. I wanted to know why the same code is working in weblogic and not in Jboss?
I know tag lib is case sensitive in that case I wanted to understand why there is difference in behavior between weblogic and Jboss?