cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kavitha ramesh <kavitha_...@yahoo.co.in>
Subject Re: Servlet generating an XML--->How to write the pipeline?
Date Fri, 02 Aug 2002 10:13:35 GMT
Hi Skip,

I have the class, Servlet.class and I have placed it
in the Web-Inf folder.Now my main sitemap is as
follows:

<map:match pattern="Servlet/*">(what should be there
in the Servlet folder?)
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:generate src=" " />(what should be the source?)
<map:transform src="stylesheets/servlet.xsl"/>
</map:act>
<map:serialize type="html"/>
</map:match> 

My servlet generates an xml file as an output stream.

and is the following URL be used to see the result?

http://localhost:8080/cocoon/Servlet

Kavitha




I dont have a folder called

--- Skip Carter <skip@taygeta.com> wrote: > 
> > I have a servlet which generates an xml file which
> in
> > turn should be transformed using xslt.How do I
> write
> > the pipeline for the same?
> > 
> > Say the name of the servlet is check.class(where
> > should I place the class, in web-inf?), the name
> of
> > the xml file generated by the pipeline is test.xml
> and
> > the stylesheet used is test.xsl.How should my
> pipeline
> > look like?
> 
>   I handle this with any entry like the following in
> the main pipeline in 
> sitemap.xmap:
> 
> 
>       <!-- chain a servlet from tomcat -->
>       <!-- note: using the request action only works
> for GET not for POST -->
>        <map:match pattern="Servlet/*">
>            <map:act type="request">
>                <map:parameter name="parameters"
> value="true"/>
>                <map:generate
> src="http://myserver.com:8080{requestURI}{requestQ
> uery}" />
>                <map:transform
> src="stylesheets/servlets.xsl" />
>            </map:act>
>            <map:serialize type="html"/>
>       </map:match>
> 
> 
>   (If somebody has a good solution for POST I'd be
> interested in seeing it)
> 
>   My servlets are handled directly by tomcat (which
> is listening on port 
> 8080), that way I can easily control
>   access to the "raw" servlet.  But you can have
> cocoon handle the servlet 
> instead by making the proper
>   entries in the cocoon WEB-INF/web.xml file, for
> example:
> 
>    <!-- after the normal cocoon <servlet> entry -->
>    <servlet>
>       <servlet-name>check</servlet-name>
>       <servlet-class>check</servlet-class>
>    </servlet>
> 
>   <!-- before the normal cocoon <servlet-mapping>
> entry -->
>   <servlet-mapping>
>     <servlet-name>check</servlet-name>
>     <url-pattern>/check</url-pattern>            
>   </servlet-mapping>
> 	
> 
> 	Your classes can go in WEB-INF/classes
> 
> 
> 
> 
> 
> Skip
> 
> 
> 
> -- 
>  Dr. Everett (Skip) Carter      Phone: 831-641-0645
> FAX:  831-641-0647
>  Taygeta Scientific Inc.        INTERNET:
> skip@taygeta.com
>  1340 Munras Ave., Suite 314    WWW:
> http://www.taygeta.com
>  Monterey, CA. 93940            
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> Please check that your question  has not already
> been answered in the
> FAQ before posting.    
> <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:    
> <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:  
> <cocoon-users-help@xml.apache.org>
>  

________________________________________________________________________
Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!!
       visit http://in.autos.yahoo.com

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message