on 03-16-2006 12:47 PM
Hello and thanks in advance for any help. I am trying to deploy a war (that worked with Tomcat 4.1) on SAP Web Application Server.
In this war I have a JSP that says
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:jsp="http://java.sun.com/products/JSP/Page"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:trx="http://www.highdeal.com/taglib">
<jsp:directive.include file="jspf/doctype.jspf"/>
<html>
<jsp:directive.include file="jspf/Imports.jspf"/>
<jsp:include page="include/Variables.jsp" flush="true" />
<head>
<title><c:out value="$"/></title>
<jsp:directive.include file="jspf/Style.jspf"/>
</head>
(...)
In my web.xml, I have:
<taglib>
<taglib-uri>http://www.highdeal.com/taglib</taglib-uri>
<taglib-location>WEB-INF/trx.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>WEB-INF/c.tld</taglib-location>
</taglib>
I am becoming crazy because of the exception I keep having in the logfile:
#1.5#0013CEDA9E4F00380000000800000DDC00040F1A970A7F6A#1142506784439#com.sap.engine.services.servlets_jsp.server.jsp.JSPParser#sap.com/csrui.war#com.sap.engine.services.servlets_jsp.server.jsp.JSPParser#Guest#2####f9b076e0b4db11da96df0013ceda9e4f#SAPEngine_Application_Thread[impl:3]_7##0#0#Error#1#/System/Server#Plain###Runtime error in compiling of the JSP file <D:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/csrui.war/servlet_jsp/csrui/root/WEB-INF/jsp/Logon.jsp> ! The error is: TagLibValidator returns error(s) for taglib ( http://java.sun.com/jstl/core 😞
com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: Prefix 'c' is not mapped to a namespace(:main:, row:818, col:1)(:main:, row=818, col=1) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: Prefix 'c' is not mapped to a namespace(:main:, row:818, col:1)
.#
#1.5#0013CEDA9E4F00380000000900000DDC00040F1A970A834A#1142506784439#com.sap.engine.services.servlets_jsp.Deploy#sap.com/csrui.war#com.sap.engine.services.servlets_jsp.Deploy#Guest#2####f9b076e0b4db11da96df0013ceda9e4f#SAPEngine_Application_Thread[impl:3]_7##0#0#Error##Plain###Runtime error in compiling of the JSP file <D:/usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/csrui.war/servlet_jsp/csrui/root/WEB-INF/jsp/Logon.jsp> ! The error is: com.sap.engine.services.servlets_jsp.server.jsp.exceptions.ParseException: TagLibValidator returns error(s) for taglib ( http://java.sun.com/jstl/core 😞
com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: Prefix 'c' is not mapped to a namespace(:main:, row:818, col:1)(:main:, row=818, col=1) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: Prefix 'c' is not mapped to a namespace(:main:, row:818, col:1)
.
at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.validate(JSPParser.java:243)
at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.initParser(JSPParser.java:348)
at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:105)
at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.getClassName(JSPServlet.java:238)
at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.compileAndGetClassName(JSPServlet.java:428)
at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:169)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:290)
at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:346)
at com.highdeal.wui.base.WForwardFactory.forwardPage(WForwardFactory.java:89)
at com.highdeal.wui.base.WForwardFactory.forward(WForwardFactory.java:128)
at com.highdeal.wui.base.HighdealSession.forward(HighdealSession.java:245)
at com.highdeal.wui.base.ControllerServlet.performAction(ControllerServlet.java:568)
at com.highdeal.wui.base.ControllerServlet.perform(ControllerServlet.java:913)
at com.highdeal.wui.base.ControllerServlet.doPost(ControllerServlet.java:482)
at com.highdeal.wui.base.ControllerServlet.doGet(ControllerServlet.java:476)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:391)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:265)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
What am I doing wrong here??
Tangi
Hi Tangi,
A small mistake in your web.xml
<taglib>
<taglib-uri>http://www.highdeal.com/taglib</taglib-uri>
<taglib-location><b>/</b>WEB-INF/trx.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location><b>/</b>WEB-INF/c.tld</taglib-location>
</taglib>
You have missed a / before WEB-INF.
Also, the order of entries in web.xml matters. Refer <a href="http://www.pchighway.com/helpdesk/index.php?page=index_v2&id=1694&c=135">here</a> for more info about JSTL.
Hope this solve your problem.
Regards,
Uma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks again for your help, but the pb is still there. I tried several things, and the problem doesn't seem to be in the location of the tld files (to test, i put a wrong entry, and it put a File not found exception). The pb really seems to be about namespace declaration. Do I have to declare them elsewhere? Any other clue?
Hi Tangi,
There are few steps to follow for installing JSTL support.
1. Download the JSTL archive (binaries not source) from the Jakarta Website. Unzip/untar the file.
2. Add the neccesary jar files to your Web Module Project.
3. Copy the .tld files to the WEB-INF directory in your Web Module.
4. In your jsp page, before head elemnet add <%@ taglib prefix="c" uri=http://java.sun.com/jstl/core %>
5. JSTL requires a JSP 1.2 Web container. ( Tomcat 4.1 supports this).
Hope this helps.
Regards,
Uma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.