Hi,

last week, I was having fun with trivial examples accessing a
datasource with the standard taglibs with success.
Since everything was working perfectly in jsp form and morale was high,
I decided to precompile my web app with TCD and deploy it again in tomcat 7.0.6

I installed ant, fetched dependencies, installed TCD set up the
project's properties and fired "ant compile" away.

2 questions:

A small problem appeared with addWebXmlMappings="true". apparently ant reported:

\build.xml:67: jasper doesn't support the "addWebXmlMappings" attribute

Apparently ant 1.8.2 with all dependencies fetched *today* isn't enough?

Bypassing this problem by manually merging the servlet mappings from
generated_web.xml to web.xml and deploying, I get an exception when
accessing my page:

java.lang.NullPointerException
    at org.apache.jasper.runtime.
TagHandlerPool.get(TagHandlerPool.java:106)
    at index_jsp._jspx_meth_sql_query_0(Unknown Source)
    at index_jsp._jspService(Unknown Source)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:550)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:380)
    at 
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:284)
    at 
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:322)
    at 
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1684)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

I'm using:

apache-ant-1.8.2
jakarta-taglibs-standard-1.1.2
apache-tomcat-7.0.6-deployer
apache-tomcat-7.0.6

2 libs for the tags: in \WEB-INF\lib
jstl.jar
standard.jar

my toned down index.jsp is very simple:


<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>

<head>
<title>Zend page.</title>
</head>
<body>
<p align="center"><font color="#FF0000" size="6"><%="Zend"%></font></p>

<sql:query var = "users" dataSource="zoomla">
select * from zend_users;
</sql:query>

<table border=1>
<c:forEach var="row" items="${users.rows}">
<tr>
<td><c:out value="${row.idkp}"/></td>
<td><c:out value="${row.login}"/></td>
<td><c:out value="${row.password}"/></td>
</tr>
</c:forEach>
</table>
</body>
</html>

the web.xml is pretty spartan as well:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app version="3.0">

  <display-name>datasource fun</display-name>
  <description>
    datasource fun
  </description>

    <servlet>
        <servlet-name>index_jsp</servlet-name>
        <servlet-class>index_jsp</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>index_jsp</servlet-name>
        <url-pattern>/index.jsp</url-pattern>
    </servlet-mapping>

<resource-ref>
 <description>postgreSQL Datasource fun</description>
 <res-ref-name>jdbc/postgres</res-ref-name>
 <res-type>javax.sql.DataSource</res-type>
 <res-auth>Container</res-auth>
</resource-ref>
</web-app>

so what's going on here? any pointers? looks like google is my enemy
on this one :(

Your input and help is much appreciated,

John

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to