You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Krassimir Dimov <kr...@yahoo.com> on 2000/09/17 20:19:17 UTC
Setting Tomcat to use Cocoon for *.xml requests
Hello,
I am trying to set up Tomcat to use Cocoon for .xml
handling. I built cocoon, set up the classpath for
Tomcat to reference cocoon.jar, xalan.jar, xerces.jar
& fop.jar files. The only problem I'm having is the
cocoon.properties file - for initialization of cocoon.
Tomcat can not find it. I coppied the
cocoon.properties file in the C:\tomcat\conf
directory, and editted the web.xml file, located in
the same directory with the following entry:
<!-- Cocoon Settings -->
<servlet>
<servlet-name>
org.apache.cocoon.Cocoon
</servlet-name>
<servlet-class>
org.apache.cocoon.Cocoon
</servlet-class>
<init-param>
<param-name>
properties
</param-name>
<param-value>
..\conf\cocoon.properties
</param-value>
</init-param>
</servlet>
<!-- End of Servlet Cocoon settings -->
<servlet-mapping>
<servlet-name>
org.apache.cocoon.Cocoon
</servlet-name>
<url-pattern>
*.xml
</url-pattern>
</servlet-mapping>
This is what I am getting when I try to run Cocoon.xml
(http://localhost:8080/Cocoon.xml)
I know that my problem is in referencing the
cocoon.properties file.
Unable to open resource: ..\conf\cocoon.properties
java.lang.NullPointerException
at org.apache.cocoon.Cocoon.init(Cocoon.java:123)
at
org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:445)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Unknown Source)
Any suggestions? Your help will be appreciated.
Krassimir
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
Re: Setting Tomcat to use Cocoon for *.xml requests
Posted by Peter Donald <do...@mad.scientist.com>.
At 11:19 17/9/00 -0700, you wrote:
>Hello,
>
>I am trying to set up Tomcat to use Cocoon for .xml
>handling. I built cocoon, set up the classpath for
>Tomcat to reference cocoon.jar, xalan.jar, xerces.jar
>& fop.jar files. The only problem I'm having is the
>cocoon.properties file - for initialization of cocoon.
>Tomcat can not find it. I coppied the
>cocoon.properties file in the C:\tomcat\conf
>directory, and editted the web.xml file, located in
>the same directory with the following entry:
Is this via a webapp ? A webapp theoretically shouldn't be able to read out
of it's own directory so try including web.xml and the properties inside
webapp directory ?
Try making a webapp instead
..\conf\cocoon.properties
>
>
><!-- Cocoon Settings -->
> <servlet>
> <servlet-name>
> org.apache.cocoon.Cocoon
> </servlet-name>
> <servlet-class>
> org.apache.cocoon.Cocoon
> </servlet-class>
> <init-param>
> <param-name>
> properties
> </param-name>
> <param-value>
> </param-value>
> </init-param>
> </servlet>
><!-- End of Servlet Cocoon settings -->
> <servlet-mapping>
> <servlet-name>
> org.apache.cocoon.Cocoon
> </servlet-name>
> <url-pattern>
> *.xml
> </url-pattern>
> </servlet-mapping>
>
>This is what I am getting when I try to run Cocoon.xml
>(http://localhost:8080/Cocoon.xml)
>I know that my problem is in referencing the
>cocoon.properties file.
>
>
>Unable to open resource: ..\conf\cocoon.properties
>java.lang.NullPointerException
> at org.apache.cocoon.Cocoon.init(Cocoon.java:123)
> at
>org.apache.tomcat.core.ServletWrapper.initServlet(ServletWrapper.java:315)
> at
>org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:445)
> at
>org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> at
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Http
ConnectionHandler.java:160)
> at
>org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
> at java.lang.Thread.run(Unknown Source)
>
>
>
>Any suggestions? Your help will be appreciated.
>
>
>Krassimir
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Mail - Free email you can access from anywhere!
>http://mail.yahoo.com/
>
>---------------------------------------------------------------------
>In case of troubles, e-mail: webmaster@xml.apache.org
>To unsubscribe, e-mail: general-unsubscribe@xml.apache.org
>For additional commands, e-mail: general-help@xml.apache.org
>
>
Cheers,
Pete
*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power." |
| -Abraham Lincoln |
*------------------------------------------------------*