struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Riccardo Mollame <rmoll...@yahoo.it>
Subject Struts 2 - incompatibility between JSTL xml taglibs and Struts 2 ?????
Date Fri, 07 Sep 2007 07:30:32 GMT
Could any one explain why this piece of code works
fine:

<%@ taglib prefix="c"
uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="x"
uri="http://java.sun.com/jsp/jstl/xml"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<c:import url="/WEB-INF/classes/PageList.xml"
var="pagelist" scope="application" />
<x:parse var="document" doc="${pagelist}"/>
<html>
  <head>
  </head>
  <body>
    <br>
    <h1><x:out
select="$document/pages/page[@code='P001']/title"/></h1>
  </body>
</html>

while this one:

<%@ taglib prefix="c"
uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="x"
uri="http://java.sun.com/jsp/jstl/xml"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<c:import url="/WEB-INF/classes/PageList.xml"
var="pagelist" scope="application" />
<x:parse var="document" doc="${pagelist}"/>
<html>
  <head>
  </head>
  <body>
    <br>
    <center>
<!-- BEGIN of new code -->
    <s:form action="userauth">
      <s:textfield label="User Name" key="username"/>
      <s:password label="Password" key="password"/>
      <s:submit/>
    </s:form>
<!-- END of new code -->
    </center>
  </body>
</html>

gives the following error:

XXXX-web-main: Servlet error 
java.lang.NullPointerException 
    at
org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)

    at
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)

    at
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)

    at _jsps._Login._jspService(_Login.java:103) 
    at com.orionserver[Oracle Containers for J2EE 10g
(10.1.3.3.0)
].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)

    at
oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:724)

    at
oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)

    at
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)

    at
oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)

    at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

    at com.evermind[Oracle Containers for J2EE 10g
(10.1.3.3.0)
].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java
    :65) 
    at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413)

    at com.evermind[Oracle Containers for J2EE 10g
(10.1.3.3.0)
].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher
    .java:623) 
    at com.evermind[Oracle Containers for J2EE 10g
(10.1.3.3.0)
].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher
    .java:370) 
    at com.evermind[Oracle Containers for J2EE 10g
(10.1.3.3.0)
].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler
    .java:871) 
    at com.evermind[Oracle Containers for J2EE 10g
(10.1.3.3.0)
].server.http.HttpRequestHandler.processRequest(HttpRequestHandler
    .java:453) 
    at com.evermind[Oracle Containers for J2EE 10g
(10.1.3.3.0)
].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler
    .java:221) 
    at com.evermind[Oracle Containers for J2EE 10g
(10.1.3.3.0)
].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)

    at com.evermind[Oracle Containers for J2EE 10g
(10.1.3.3.0)
].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)

    at
oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)

    at
oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)

    at
oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
 
    at
oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
 
    at com.evermind[Oracle Containers for J2EE 10g
(10.1.3.3.0)
].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor
    .java:303)  
    at java.lang.Thread.run(Thread.java:595) 


I'm stuck. It has no explanation to me. 
Any help deeply appreciated. 
Thanks in advance.

        Ric


      ___________________________________ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message