cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: dynamic XMl
Date Sun, 19 Nov 2000 19:45:40 GMT
ProducerFromRequest is a bit of a security risk - don't use it, and take it 
out of your cocoon.properties. Instead use the suggestion in the website FAQ 
under site architecture issues.

Tobias Kraft <ut43@rz.uni-karlsruhe.de> wrote:
>I want to create a dynamic XML-Stream by a Servlet and convert this
>created XML-Stream to HTML by using Cocoon. I make a Forward to the
>Cocoon Servlet with the getRequestDispatcher method from the
>ServletContext class.
>When I call the Servlet with
> >   http://localhost/cocoon/MyServlet?producer=request
>I get always an error like:
> > You must specify a root element
>
>My Servlet looks like:
> >  public class MyServlet extends HttpServlet {
> >  ........
> >    response.setContentType("text/html");
> >    PrintWriter out = response.getWriter();
> >
> >    out.println ("<?xml version=\"1.0\"?>");
> >    out.println ("<?xml-stylesheet href=\"NameStyle.xsl\" 
>type=\"text/xsl\"?>");
> >    out.println ("<?cocoon-process type=\"xslt\"?>");
> >    out.println ("<names>");
> >    out.println ("<name>");
> >    out.println(getFirstName());
> >    out.println ("</name>");
> >    out.println ("</names>");
> >
> >    ServletContext context = new ServletContext();
> >    //Forwarding to the Cocoon-Servlet
> >    context.getRequestDispatcher(Cocoon).forward(request, response);
>
>Has anyone an idea for solving this problem?

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message