You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by JS <sm...@dcs.kcl.ac.uk> on 2003/04/04 18:04:16 UTC

RE: XSL Stylesheet transformation in a servlet

Hi Yoav,
Much appreciated for your analysis. Many thanks.
I have a few questions.....
(1) When u say overide the init() method with the version with the config
parameter, which version is this. public void init(ServletConfig config)
is the only signiature I can find.(2)All the System.out.println commands
in my servlet go to catalina.out in the logs directory. I dont actualy
have a console output.(3) xOutputter.output(doc, System.out); Do you get
any output to System.out? This does come, it was the xmlfile that was in
my original mail, again, it also went to catalina.out. Does the WEB-INF
ile have to be capatilised. I actually have it on my system as
"Web-inf".(4)Correct!, TransformerConfigurationException is the root
cause. The only refernece to my program in the stack trace is "at
JDOMServlet.init(JDOMServlet.java:35)" which is the line I highlighted
below.>
> Howdy,
>
>>Not sure if anyone can help me with this here, but worth a shot.
>
> This sort of thing should be marked as [OFF-TOPIC] in the subject if
> you're going to post if to the list at all.
>
>>        public void init(ServletConfig config) throws ServletException
> {
>
> Override the init() method, the version with the config parameter,
> instead of this version.
>
>>                        xsltSource = new
>>                        StreamSource(context.getResourceAsStream("/Web-
>>Inf/viewStudentDetails.xsl"));//-------I think this is the problem
> line, it
>>is LINE 35 ----------//
>
> Print out what getResourceAsStream() produces.  Make WEB-INF
> capitalized in the argument, as this is case sensitive.
>
>>                        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>
> Yikes ;)  I dislike JdbcOdbc bridges but we'll leave that for now.
>
>>                        ResultSetBuilder(rs);
>
> Print out the result set contents just to verify them.
>
>>xOutputter.output(doc, System.out);
>
> Do you get any output to System.out?
>
>>java.net.MalformedURLException
>>        at java.net.URL.<init>(URL.java:613)
>>        at java.net.URL.<init>(URL.java:476)
>>        at java.net.URL.<init>(URL.java:425)
>
> But the root causes was a TransformerConfigurationException it appears,
> from the bottom of your output, right?
>
> Yoav Shapira
> Millennium ChemInformatics
>
>
>
> This e-mail, including any attachments, is a confidential business
> communication, and may contain information that is confidential,
> proprietary and/or privileged.  This e-mail is intended only for the
> individual(s) to whom it is addressed, and may not be saved, copied,
> printed, disclosed or used by anyone else.  If you are not the(an)
> intended recipient, please immediately delete this e-mail from your
> computer system and notify the sender.  Thank you.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For
> additional commands, e-mail: tomcat-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org