Struts taglib uri problem with non-IE browser: Define tag cannot set a null value

Hello, I am running a java-based web app on JBoss. In IE on a PC, these are not a problem:

<%@ taglib uri="struts-logic" prefix="logic" %>
<%@ taglib uri="struts-bean" prefix="bean" %>
<%@ taglib uri="struts-html" prefix="html" %>

In Mozilla/Firefox, Safari and IE on a MAC, I get this JSP exception:
"javax.servlet.ServletException: Define tag cannot set a null value."

The corresponding exception line in the compiled output:
"if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);"

JSP using include file:
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="747" height="367" border="0">
  <tr>
    <td width="9%" height="84%"><img src="../images/MC_head.gif" width="86" height="80">
      </td>
    <td width="91%">
      <!--------- BEGIN JSP INCLUDE --------->
            <%@ include file="../common/IncludeTop.jsp" %>
            <bean:define id="category" name="catalogBean" property="category"/>
            <bean:define id="productList" name="catalogBean" property="productList"/>      
      <!---------- END JSP INCLUDE ---------->
      </td>
  </tr>. . .

IncludeTop.jsp contains the taglib calls:
<%@ page contentType="text/html" %>

<%@ taglib uri="struts-logic" prefix="logic" %>
<%@ taglib uri="struts-bean" prefix="bean" %>
<%@ taglib uri="struts-html" prefix="html" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link rel="StyleSheet" href="../css/mcstore.css" type="text/css" media="screen"/>
<head>
  <meta name="generator"
        content="HTML Tidy for Linux/x86 (vers 1st November 2002), see www.w3.org"/>
  <title>MC Store</title>
  <meta content="text/html; charset=windows-1252" http-equiv="Content-Type"/>
  <meta http-equiv="Cache-Control" content="max-age=0"/>
  <meta http-equiv="Cache-Control" content="no-cache"/>
  <meta http-equiv="expires" content="0"/>
  <meta http-equiv="Expires" content="Tue, 01 Jan 1980 1:00:00 GMT"/>
  <meta http-equiv="Pragma" content="no-cache"/>
</head>
<body>
. . .

Here is the web.xml:
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

  <display-name>Testapp</display-name>
  <description>Test Application</description>

  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.shtml</url-pattern>
  </servlet-mapping>

  <session-config>
    <session-timeout>90</session-timeout>
  </session-config>

  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>

  <taglib>
    <taglib-uri>struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>struts-html</taglib-uri>
    <taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>struts-logic</taglib-uri>
    <taglib-location>/WEB-INF/tld/struts-logic.tld</taglib-location>
  </taglib>

  <resource-ref>
    <description>
      Testapp DataSource
    </description>
    <res-ref-name>testapp</res-ref-name>
    <res-type>
      javax.sql.DataSource
    </res-type>
    <res-auth>
      Container
    </res-auth>
  </resource-ref>

  <security-constraint>
    <web-resource-collection>
      <web-resource-name>
        Restrict access to JSP pages
      </web-resource-name>
      <url-pattern>*.jsp</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <description>
        With no roles defined, no access granted
      </description>
    </auth-constraint>
  </security-constraint>

</web-app>

I've searched through Google, groups, sourceforge/Struts, tried every possible thing I can think of, made sure I had the current struts tag lib in the WEB-INF(JSP 1.2), Struts.jsp is dated 5/6/2005, tried different file/url paths, etc. Seems to be an issue with Firefox not being able to read/interpret/process the tag libraries and it seems that no one has the solution to this. So, I'm hoping someone can share some wisdom on the subject that might lead to a solution. It would be greatly appreciated.

Thanks,
KP
RickJaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

objectsCommented:
> "if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);"

thats not where the error is occurring, thats where the exception gets handled
post the complete stack trace from the server logs

> Seems to be an issue with Firefox not being able to read/interpret/process the tag libraries

firefox has nothing to do with it, they are handled on the server
0
RickJaAuthor Commented:
If Firefox has nothing to do with it, then how come IE has no problem with it but Firefox does? How can that be a server problem?
0
objectsCommented:
I was wondering the same thing, could be something to do with difference in the request being sent.
Whats in the server log.

0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

RickJaAuthor Commented:
Here is the console output, same as that which displays in the server log:

16:46:12,931 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Define tag cannot set a null value
        at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:236)
        at org.apache.jsp.catalog.Category_jsp._jspService(org.apache.jsp.catalog.Category_jsp:302)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:
463)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
        at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)

        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
        at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.ja
va:153)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11P
rotocol.java:744)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:534)
0
objectsCommented:
can you post the code where u actuall use the define tag?
0
RickJaAuthor Commented:
This might also help, I just picked this up in the server.log:

2006-04-03 16:46:00,056 DEBUG [com.ibatis.common.jdbc.SimpleDataSource] Returned connection 86176 to pool.
2006-04-03 16:46:00,385 DEBUG [org.jboss.web.tomcat.tc5.jasper.TagLibCache] Scanning for tlds in: file:/C:/jboss2/server/default/deploy/jbossweb-tomcat55.sar/jsf-libs/myfaces-impl.jar
2006-04-03 16:46:00,385 DEBUG [org.jboss.web.tomcat.tc5.jasper.TagLibCache] Failed to scan: jsf-libs/myfaces-impl.jar
java.io.FileNotFoundException: C:\jboss2\server\default\deploy\jbossweb-tomcat55.sar\jsf-libs\myfaces-impl.jar
      at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:80)
      at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:89)
      at org.jboss.web.tomcat.tc5.jasper.TagLibCache.scanJar(TagLibCache.java:309)
      at org.jboss.web.tomcat.tc5.jasper.TagLibCache.loadStandardTlds(TagLibCache.java:229)
      at org.jboss.web.tomcat.tc5.jasper.TagLibCache.init(TagLibCache.java:99)
      at org.jboss.web.tomcat.tc5.jasper.TagLibCache.getLocation(TagLibCache.java:88)
      at org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:519)
      at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:417)
      at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
      at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
      at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
      at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
      at org.apache.jasper.compiler.ParserController.parse(ParserController.java:116)
      at org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:335)
      at org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java:372)
      at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)
      at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
      at org.apache.jasper.compiler.Parser.parse(Parser.java:126)
      at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
      at org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
      at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
      at org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
      at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
      at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:534)

avax.servlet.jsp.JspException: Define tag cannot set a null value
      at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:236)
      at org.apache.jsp.catalog.Category_jsp._jspService(org.apache.jsp.catalog.Category_jsp:302)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
      at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:534)
0
fargoCommented:
Hi,

jboss is scanning wrong file for tlds. Try commenting out the following from  <jboss_home>/server/<server config>/deploy/jbossweb-tomcat55.sar/conf/web.xml

comment it out...
<init-param>
         <description>MyFaces tlds</description>
         <param-name>tagLibJar0</param-name>
         <param-value>jsf-libs/myfaces-impl.jar</param-value>
</init-param>       

fargo
0
RickJaAuthor Commented:
That didn't work.
0
objectsCommented:
Don't think thats related.
It seems more retated to your use of the tag
0
RickJaAuthor Commented:
I also tried:

<logic:notEmpty name="fooForm" property="fooList">
<bean:define id="fooList" name="fooForm" property="fooList" />
</logic:notEmpty>

which didn't work. Seems it's something Firefox can't handle that IE can, can't figure it out though. Two days now and I'm pulling what little hair I have left out.
0
fargoCommented:
check directly putting the tags directive in the jsp instead of using the includeTop.jsp...may be this file is not getting included at all.
0
RickJaAuthor Commented:
I had already tried that, but it's defnitely something to do with the syntax of these lines, which IE can handle because IE is more lenient as far as handling syntax than the other browsers:

<%@ taglib uri="struts-logic" prefix="logic" %>
<%@ taglib uri="struts-bean" prefix="bean" %>
<%@ taglib uri="struts-html" prefix="html" %>
0
RickJaAuthor Commented:
After trying MANY syntax variations, now I'm leaning towards having to alter the actual tld files to work with non-IE browsers.
0
RickJaAuthor Commented:
I figured it out, it was a syntax issue.
0
GranModCommented:
PAQed with points refunded (500)

GranMod
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.