• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with Tomcat4.0.3+jstl for xml transformation

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
I,m trying to use jstl with Tomcat4.0.3 for transforming xml to html using xslt. The problem is while i load the page to transform i get the error which says uri http://java.sun.com/jstl/xml cannot be resolved either by web.xml or standard.jar but actually iuse all the required jars(xalan.jar, standard.jar, jstl.jar, serialization.jar).
how to resolve this problem?

Thanks in Advance..
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat 4 supports Servlet Spec 2.3 and JSP 1.2.

Are you sure you're using the right version of JSTL for this container (version 1.0)?

In the JSP FAQ, there is a page with links to all the correct versions for each version of the Servlet/JSP specs.
 
K.Suresh Kumar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ben thanks for your reply. i have resolved the issue. the problem is, the jstl 1.0 works fine with tomcat4.0.4 and higher versions but not with the Tomcat4.0.3 due to a bug. the way around is according to jstl 1.0 readme document you have to download the jakarta-taglibs-standard-oldxml-compat.zip and put the jar files inside WEB-INF/lib directory.

But now i have another issue to solve. the jsp page which has the transformation jstl implementation loaded but doe's not display any html. insted it display's a empty page. what is this problem and could you help me again?

once again Thanks a lot..
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by K.Suresh Kumar:
transformation jstl implementation loaded but doe's not display any html. insted it display's a empty page. what is this problem and could you help me again?



The first thing I do when I see an empty browser window is use the "view source" feature to look at the HTML. Often the problem is just a mistake in the HTML.

If there really isn't any source going to the browser, then I look at the server's logs to see what if anything blew up. If I still didn't find anything then I would start stepping through the code to try to figure out what the problem is.
 
K.Suresh Kumar
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ben as you mention in the reply i found that the problem is in xslt file which has <script/> part inside it. if remove that then it displays html page correctly.

again i need that <script> part also in my xslt i have given both the xslt files snippet here check it out.

==========================================================================
the on which does not diplay html but if i use the view source i can see that it is writing to the browser but not displayed as html,
==========================================================================

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/clients/client[@id]">
<xsl:if test="@id = 088115">
<html>
<body>
<table bgcolor="#FFFFFF" border="0" cellpadding="3" cellspacing="0" width="133%">
<tbody>
<tr>
<td>
<script language="JavaScript" src="../common/demoedit.js"/>
</td>
</tr>
<tr>
<td>
<b>Owner:</b>
<xsl:if test="data/owner/@show = 'true'">
<xsl:value-of select="data/owner"/>
</xsl:if>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

=======================================================
the one which works fine,
=======================================================

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/clients/client[@id]">
<xsl:if test="@id = 088115">
<html>
<body>
<table bgcolor="#FFFFFF" border="0" cellpadding="3" cellspacing="0" width="133%">
<tbody>
<tr>
<td>
<b>Owner:</b>
<xsl:if test="data/owner/@show = 'true'">
<xsl:value-of select="data/owner"/>
</xsl:if>
</td>
</tr>
</tbody>
</table>
</body>
</html>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

Thanks..
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic