Cliquez ici.
Accueil
 chercher             Plan du site             Info (English version) 
L'histoire de XML s'écrit en ce moment même. XMLfr vous aide à la suivre et à en dégager les tendances.Les listes de discussions XMLfr sont à votre disposition pour réagir sur nos articles ou simplement poser une question.Si vous ètes passionnée(e) par XML, pourquoi ne pas en faire votre métier ?XMLfr n'est heureusement pas le seul site où l'on parle de XML. Découvrez les autres grâce à XMLfr et à l'ODP.Les partenaires grâce auxquels XMLfr peut se développer.Pour tout savoir sur XMLfr.XMLfr sans fil, c'est possible !Pour ceux qui veulent vraiment en savoir plus sur XML.L'index du site.
 Commentaires et questions non techniques.Commentaires et questions techniques.

 
Cliquez ici.

From: Deheul, Xavier (xavier.deheul@creditlyonnais.fr)
Date: 02/11/2001 - 17:23


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)



Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:06 UTC

webmaster@xmlfr.org

 

xml tech

Discussions techniques au sujet de XML.

Cette liste est à votre disposition pour discuter en français de tout sujet technique lié à XML.



Devenez rédacteur <XML>fr et contribuez au développement du xml francophone !
Les documents publiés sur ce site le sont sous licence "Open Content"
Conception graphique
  l.henriot@online.fr  

Conception, réalisation et hébergement