jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ingo Richter <Ingo.Rich...@Adobe.COM>
Subject Re: Is it a toolkit bug or what?
Date Thu, 27 Jul 2000 10:25:48 GMT
Hi Marco,

the problem is the scope where the xslfile variable is defined.
You defined it in the upper block
<%
         String xslfile = null;
         ...
%>

and you try to use it in the lower block but it isn't visible.

I think that's it.

Ingo


>hi all,
>         i wrote a custom tag that, depending on the User Agent, transforms
>the xml file contained in it into either HTML or WML.
>In doing that i have encountered a problem, especially when i loaded the jsp
>page from the Nokia Toolkit:
>if the page is like this
>
>  <%@ page import="java.util.*"  %>
>  <%   String xslfile=null;
>          String format = request.getHeader("User-Agent");
>          System.out.println("the user agent is " + format);
>          if(format.startsWith("Nokia")) {
>              response.setContentType("text/vnd.wap.wml");
>              xslfile = "file:///c:\\marcodev\\provawml.xsl";
>          } else {
>              xslfile="file:///c:\\marcodev\\prova.xsl";
>          }
>            session.putValue("xslfile", xslfile);
>   %>
>
>  <%@ taglib uri="http://www.nokia.com/marcotag" prefix="marco" %>
>  <?xml version="1.0"?>
>  <marco:trialxmltag xsl="<%= xslfile %>">
>  <document>
>     <scope></scope>
>  </document>
>  </marco:trialxmltag>
>
>
>i continue to get errors from the Toolkit, and in fact if i look at the
>source output i see
><?xml version="1.0"?>
><?xml version="1.0" encoding="UTF...." ?>
>.......
>
>now, if i load the jsp page from the web browser i got no errors at all!!
>
>so, as a solution i tried to skip the <?xml version="1.0" ?>
>
>and in doing like that it worked fine......
>i am using the latest version of Xalan as XSLT engine, tomcat 3.1 and the
>Nokia wap Server 2.0
>
>can anybody pls comment???
>
>thanx in advance & regards
>         marco

__________________________________________________________________
Ingo Richter                                    Adobe Systems GmbH
Software Engineer                             Grosse Elbstrasse 39
                                                      22767 Hamburg
                                                            Germany
Tel: ++49.40.306.36.200
Fax: ++49.40.306.36.333

<mailto:Ingo.Richter@Adobe.com>
<http://www.adobe.com>
<http://www.adobe.de>

PGP Fingerprint: 5E3C FE53 C05A FDD8 3EBE 1D34 348B 2F88 49F3 9F7B
__________________________________________________________________
Mime
View raw message