From: Thierry GAGNAIRE (thgalist@natapassion.com)
Date: 03/11/2001 - 16:32
Normalement (j'en suis resté à Xerces et Xalan en v1),
c'est le chemin complet sur le disque (RealPath).
J'utilise aussi Resin et je n'ai pas eu de problème,
aussi bien sous Window que sous Unix.
Néanmoins, il faut éviter que ne se retrouve indiqué le nom du drive
sur Windows. J'avais ce problème en utilisant Xerces/Xalan
sous Tomcat (en ajoutant file:/// cela peut être mieux).
Autrement, j'ai entendu dire (fin Août)
qu'il y avait un bug sur une version récente de Xerces/Xalan
en version 2 , à ce sujet justement.
Cordialement,
Thierry GAGNAIRE
"Internet est le nouveau monde que vous construisez"
mailto:thga@natapassion.com
http://tgagnaire.com
http://www.natapassion.com
[hébergements gratuits, mise à disposition d'outils puissants,
mailing listes, générations automatisées de sites, ...]
****************************************
Retrouvez les résultats complets
des dernières compétitions
sur votre téléphone portable-wap
http://wap.natapassion.com
****************************************
----- Message d'origine -----
De : Deheul, Xavier <xavier.deheul@creditlyonnais.fr>
À : <xml-tech@xmlfr.org>
Envoyé : vendredi 2 novembre 2001 18:23
Objet : [xml-tech] Problème de processeur XSL (xalan) avec une servlet
> J'ai un code tout bête qui marche dans une classe Test.java standard, mais
> quand je mets le même code dans une servlet je récupère tout plein
d'erreurs
> au moment de la création du processeur XSL.
>
> TransformerFactory tFactory = TransformerFactory.newInstance();
> Source src=new StreamSource(xsl);
> Transformer transformer =tFactory.newTransformer(src);
> transformer.transform( new StreamSource(xml), new StreamResult(out));
>
> xsl est une String et ca ne marche pas quelque soit le lien :
> chemin windows complet, url relative par rapport au serveur .... j'ai
essayé
> de passer par la classe java.net.URL et rien n'y fait !!! je ne sais plus
> trop quoi faire !!!
>
>
> java.lang.ClassCastException: javax.xml.transform.stream.StreamSource
> at
> javax.xml.transform.sax.SAXSource.sourceToInputSource(SAXSource.java:154)
> at
>
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFa
> ctoryImpl.java:877)
> at
>
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transformer
> FactoryImpl.java:747)
> at _xsl._jspSample__jsp._jspService(/At/xsl/jspSample.jsp:83)
> at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
> at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
> at com.caucho.jsp.Page.service(Page.java:398)
> at
> com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:166)
> at com.caucho.server.http.Invocation.service(Invocation.java:272)
> at
> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:128)
> at
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
> at
> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
> at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
> at java.lang.Thread.run(Thread.java:484)
> javax.xml.transform.TransformerException
> at
>
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFa
> ctoryImpl.java:955)
> at
>
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transformer
> FactoryImpl.java:747)
> at _xsl._jspSample__jsp._jspService(/At/xsl/jspSample.jsp:83)
> at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
> at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
> at com.caucho.jsp.Page.service(Page.java:398)
> at
> com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:166)
> at com.caucho.server.http.Invocation.service(Invocation.java:272)
> at
> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:128)
> at
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
> at
> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
> at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
> at java.lang.Thread.run(Thread.java:484)
> javax.xml.transform.TransformerConfigurationException
> at
>
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFa
> ctoryImpl.java:961)
> at
>
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transformer
> FactoryImpl.java:747)
> at _xsl._jspSample__jsp._jspService(/At/xsl/jspSample.jsp:83)
> at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
> at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
> at com.caucho.jsp.Page.service(Page.java:398)
> at
> com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:166)
> at com.caucho.server.http.Invocation.service(Invocation.java:272)
> at
> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:128)
> at
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
> at
> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
> at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
> at java.lang.Thread.run(Thread.java:484)
> javax.xml.transform.TransformerConfigurationException
> at
>
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transformer
> FactoryImpl.java:764)
> at _xsl._jspSample__jsp._jspService(/At/xsl/jspSample.jsp:83)
> at com.caucho.jsp.JavaPage.service(JavaPage.java:87)
> at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81)
> at com.caucho.jsp.Page.service(Page.java:398)
> at
> com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:166)
> at com.caucho.server.http.Invocation.service(Invocation.java:272)
> at
> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:128)
> at
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216)
> at
> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
> at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
> at java.lang.Thread.run(Thread.java:484)
>
> -- Attached file included as plaintext by Listar --
>
>
>
> Ce message contient des informations confidentielles ou appartenant au
> Crédit Lyonnais et est établi à l'intention exclusive de ses
> destinataires. Toute divulgation, utilisation, diffusion ou reproduction
> (totale ou partielle) de ce message, ou des informations qu'il contient,
> doit être préalablement autorisée. Tout message électronique est
> susceptible d'altération et son intégrité ne peut être assurée.
> Le Crédit Lyonnais décline toute responsabilité au titre de ce
> message s'il a été modifié ou falsifié. Si vous n'êtes pas
> destinataire de ce message, merci de le détruire immédiatement et
> d'avertir l'expéditeur de l'erreur de distribution et de la destruction
> du message.
>
> This e-mail contains confidential information or information belonging
> to Crédit Lyonnais and is intended solely for the addressees.
> The unauthorised disclosure, use, dissemination or copying (either whole
> or partial) of this e-mail, or any information it contains, is prohibited.
> E-mails are susceptible to alteration and their integrity cannot be
guaranteed.
> Crédit Lyonnais shall not be liable for this e-mail if modified or
falsified.
> If you are not the intended recipient of this e-mail, please delete it
> immediately from your system and notify the sender of the wrong delivery
> and the mail deletion.
>
> --
> Devenez redacteur <XML>fr et contribuez au developpement du
> xml francophone (http://xmlfr.org/infos/redacteurs/) !
>
> Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
>
> Cette liste est a votre disposition pour discuter en francais de
> tout sujet technique lie a XML.
>
> Pour resilier votre abonnement, envoyez un message contenant
> la commande "unsubscribe" a xml-tech-request@xmlfr.org
> (mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
>
>
>
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:06 UTC
webmaster@xmlfr.org
|