You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Paul Spencer <pa...@mikon.com> on 2001/09/07 23:10:02 UTC

[C2b2] Getting "java.io.IOException: Protocol not supported" using JSP generator.

Getting "java.io.IOException: Protocol not supported" using JSP
generator.

The problem is related to the how the src attribute is used.  You must 
include the path relative to webapps/cocoon, regardless of current
directory.

Path to the JSP file:
  <TOMCAT-HOME>/webapps/cocoon/Mikon/DaySummary.jsp 

Current directory, i.e. where the sitemap.xmap is located:
  <TOMCAT-HOME>/webapps/cocoon/Mikon

I would expect the following to work.
    <map:generate type="jsp" src="DaySummary.jsp"/>

The file generator does not require a path in the src attribute.

**
** Example of a JSP that FAILS!
**
>From sitemap located in cocoon/Mikon/sitemap.xmap
   <map:match pattern="DaySummary1">
    <map:generate type="jsp" src="DaySummary.jsp"/>
    <map:transform src="stylesheets/simple-page2html.xsl"/>
    <map:serialize type="html"/>
   </map:match>

DEBUG   99989   [cocoon  ] (HttpProcessor[8080][4]): Resolving
'DaySummary.jsp'
DEBUG   99989   [cocoon  ] (HttpProcessor[8080][4]): Making URL from
file:E:\apache\jakarta-tomcat-4.0-b8-dev\webapps\cocoon\Mikon\DaySummary.jsp
DEBUG   99989   [cocoon  ] (HttpProcessor[8080][4]): Resolved to
'file:E:/apache/jakarta-tomcat-4.0-b8-dev/webapps/cocoon/Mikon/DaySummary.jsp'
DEBUG   99989   [cocoon  ] (HttpProcessor[8080][4]): IOException in
JspGenerator.generate()
java.io.IOException: Protocol not supported:
file:E:/apache/jakarta-tomcat-4.0-b8-dev/webapps/cocoon/Mikon/DaySummary.jsp

**
** Example of a JSP that works
**
>From sitemap located in cocoon/Mikon/sitemap.xmap
   <map:match pattern="DaySummary">
    <map:generate type="jsp" src="/Mikon/DaySummary.jsp"/>
    <map:transform src="stylesheets/simple-page2html.xsl"/>
    <map:serialize type="html"/>
   </map:match>

DEBUG   99989   [cocoon  ] (HttpProcessor[8080][4]): Resolving
'/Mikon/DaySummary.jsp'
DEBUG   99989   [cocoon  ] (HttpProcessor[8080][4]): Making URL from
file:/Mikon/DaySummary.jsp
DEBUG   99989   [cocoon  ] (HttpProcessor[8080][4]): Resolved to
'file:/Mikon/DaySummary.jsp'
DEBUG   99989   [cocoon  ] (HttpProcessor[8080][4]): JspGenerator
executing JSP:/Mikon/DaySummary.jsp

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

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