Name Resolution

2002-07-25 Thread Peter Schwenke


In Tomcat 4.x I've seen an enableLookups attribute on some of the
connectors can set in server.xml. Setting it to false would stop what
you're seeing.  I've had a look in my old 3.2.1 config and don't see
anything similar.

A longshot and probably not the correct approach...The DNS timeouts
might be configurable at a JVM level.  There used to be (maybe still
is ?) an issue where the JVM would cache the results of DNS lookups
and I know there was a switch (i.e. java property) to stop that behaviour.

...Peter
[EMAIL PROTECTED] writes:
  Hello guys,
  
  we are using cocoon 2.0.2 in a prototype and love the results. Implementation
  was fast and very efficient. However, there is one problem (or should I say
  challenge):
  whenever someone accesses cocoon over the internet from a client that does not
  have a DNS-entry (e.g. a client before a firewall at a IP-adress that has no
  name associated), cocoon is terribly slow The reason seems to be that cocoon
  performs reverse DNS-queries. If the nameserver does not find the right
  hostname, it takes a very long until a timeout is received by cocoon. Is there a
  way to turn that off? 
  
  It seems like RequestSessionContext.buildMiscXML() calls Request.getRemoteHost()
  that calls InetAddress.getHostName() that triggers the host name lookup.
  OOur Config:
  Apache
  Tomcat 3.2
  Linux 
  
  Thanks a lot for your help
  
  Ernst Nusterer
  
  
  
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail:   [EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Barf on JSPGenerator on Hello.jsp (HELP!)

2002-06-05 Thread Peter Schwenke


You'll probably find more info in the log files in
cocoon/WEB-INF/logs or, if the JSP has actually run, in your usual
catalina.out or wherever your JSP logs are going.

...Peter
Rob Kelley writes:
  
  Hi:
  
  I'm running cocoon 2.0.2 on Tomcat  4.0.1 (Windows).  I've been trying to run the 
 hello example for the jsp:
  
  http://127.0.0.1:8080/cocoon/jsp/hello
  
  I get the same error (stack trace at end of email):
  
  SAXException JspGenerator.generate() 
  
  My sitemap entry is:
  
 map:match pattern=jsp/*
  map:generate src=/docs/samples/jsp/{1}.jsp type=jsp/
  map:transform src=stylesheets/page/simple-page2html.xsl/
  map:serialize type=html/
 /map:match
  
  
  My cocoon.xconf jsp-engine is:
jsp-engine logger=core.jsp-engine
  parameter name=servlet-class value=org.apache.jasper.servlet.JspServlet/
  parameter name=servlet-name value=*.jsp/
/jsp-engine
  
  And I'm at wit's end. How do I get JSPs to work?
  
  Please help!
  
  Rob
  
  Stack Trace:
  org.apache.cocoon.ProcessingException: SAXException JspGenerator.generate() 
  at org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:132) 
  at 
 org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:251)
  
  at 
 org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:399)
  
  at org.apache.cocoon.www.sitemap_xmap.matchN105B4(C:\Program Files\Apache Tomcat 
 4.0\work\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:7741) 
  at org.apache.cocoon.www.sitemap_xmap.process(C:\Program Files\Apache Tomcat 
 4.0\work\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:3119) 
  at org.apache.cocoon.www.sitemap_xmap.process(C:\Program Files\Apache Tomcat 
 4.0\work\localhost\cocoon\cocoon-files\org/apache/cocoon/www\sitemap_xmap.java:2617) 
  at org.apache.cocoon.sitemap.Handler.process(Handler.java:222) 
  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) 
  at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154) 
  at org.apache.cocoon.Cocoon.process(Cocoon.java:575) 
  at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998) 
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
  at 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
  
  at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
  
  at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) 
  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
  at 
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) 
  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
  at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) 
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) 
  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
  at 
 org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) 
 
  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) 
  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) 
  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) 
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) 
 
  at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) 
  at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
  at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011) 
 
  at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) 
  at java.lang.Thread.run(Unknown Source) 
  
   
  
  
  --
  
  
  
  -
  Do You Yahoo!?
  Sign-up for Video Highlights of 2002 FIFA World CupPHi:/P
  PI'm running cocoon 2.0.2 

Re: Barf on JSPGenerator on Hello.jsp (HELP!)

2002-06-05 Thread Peter Schwenke


Nothing springs to mind in that.  There is an exception somewhere
which is not displaying.

You might need to make sure that you have DEBUG level logging on the
JspGenerator. To do so make sure that there is a logger entry in
sitemap.xmap for the JspGenerator

like in this

   map:generator label=content,data logger=sitemap.generator.jsp name=jsp 
src=org.apache.cocoon.generation.JspGenerator/

and then make sure DEBUG is on for the sitemap  in /cocoon/WEB-INF/logkit.xconf 

category name=sitemap log-level=DEBUG
  log-target id-ref=sitemap/
  log-target id-ref=error/
/category

...Peter

Rob Kelley writes:
  
   Dear Peter:
  Thanks for the tip. Here are my log entries (ERROR, CORE, SITEMAP, ACCESS) when I 
 try to access /jsp/hello.  I don't understand what they're trying to tell me.
  Any help much appreciated. 
  ***ERROR.LOG***
  empty
   
  ***ACCESS.LOG***
 

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Very Important: Deploy Servlets in the Cocoon Context

2002-05-22 Thread Peter Schwenke


If you want to run the servlets in your cocoon webapp but not be
handled by cocoon just set them up in your web.xml and call them in
the usual way.   That is just a normal servlet container issue.  They
are just additional servlets to the cocoon servlet that way.  In the
system I've been developing on I use an MVC architecture where
servlets forward to JSPs which are processed by cocoon. 

If you want to process the servlets from cocoon the thread  you are
thinking of could have been Servlets to XSL and Servlet to XSL possible.

   ...Peter

Chitharanjan Das writes:
  IIRC, There was an email thread depicting the issue of invoking servlets
  in 
  Cocoon 2.0. I tried in the mailing lists and could not get my hands on
  them.
  
  There are a lot of utilities which are developed in servlet framework
  out there. It would be a shame if we cannot use them inside Cocoon.
  
  .
  
  
  
  
  
  
  
  
  
  
  -Original Message-
  From: William Brogden [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, May 22, 2002 12:58 PM
  To: [EMAIL PROTECTED]
  Subject: RE: Very Important: Deploy Servlets in the Cocoon Context
  
   -Original Message-
   From: Chitharanjan Das [mailto:[EMAIL PROTECTED]] 
   Sent: Wednesday, May 22, 2002 1:47 PM
   To: [EMAIL PROTECTED]
   Subject: RE: Very Important: Deploy Servlets in the Cocoon Context
   
   
   
   I am posting it again ..
   
   Is there a way to invoke a servlet in the same context of cocoon.
   
   i.e if the servlet were to be called from an XSP (say..) they should
   share the same session...
   
   regds,
   Chiths
  
   Since Cocoon runs in the servlet container environment
  you theoretically could do a 
   RequestDispatcher.include( request, response )
  if you can get the ServletContext.
  
  WBB
  
  
  
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: How to clear the jar_cache files ?

2002-04-17 Thread Peter Schwenke


I've seen it, as well.  In fact, having a look, I see it on one of my
machines at the moment.

[peter@epiphone peter]$ ls -l /opt/tomcat/temp/
total 578
-rw-rw-r--1 root root   587776 Apr 16 12:44 jar_cache62255.tmp

I very clearly remember coming across it.  My /tmp is small on that
machine.  I kept running out of disk space.  

I needed to put

 -Djava.io.tmpdir=/opt/tomcat/temp

in my CATALINA_OPTS (and create that directory).  The stuff is created
in your temporary directory.

I think there is some other stuff that ends up in that directory, but it
doesn't appear when you do a listing in *nix systems. The numbers
weren't adding up for me.  Probably the old trick where you create a
temporary file and unlink it straight away (or whatever, it's been a
while since I've done that). 

I'm on build 1.3.1_03-b03 on Linux.

...Peter

Luca Morandini writes:
  Vadim,
  
  I've found evidence of a bug like this under JRE 1.2... but I'm using 1.3.1
  and those files are still there :(
  
  Anyway, I'm wondering if I'm the only one with this problem
  
  Best regards,
  
  -
 Luca Morandini
 GIS Consultant
[EMAIL PROTECTED]
  http://utenti.tripod.it/lmorandini/index.html
  -
  
  
   -Original Message-
   From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, April 16, 2002 9:53 PM
   To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Subject: RE: How to clear the jar_cache files ?
  
  
From: Luca Morandini [mailto:[EMAIL PROTECTED]]
   
 -Original Message-
 From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, April 16, 2002 9:08 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: RE: How to clear the jar_cache files ?


   
  They're located in the temp directory of my server and have names
 like:
  jar_cache35350.tmp, jar_cache35354.tmp... and so on at the tune of
 about 50
  a day.

 I have some files named like this, but in totally different
   directory:
 %USERPROFILE%\Local Settings\Temp\jar_cache14163.tmp

 I'm 90% sure that they were created neither by Tomcat, nor by JDK.

   
I beg to differ, since I removed Cocoon and they 're still produced
   (though
in much smaller numbers).
Regarding the different location in the file system, it dependes on
   the
different setting of the $TEMP directory.
   
Any other clue ?
  
   :-/
  
   Yes. I have got one. Here it is: rt.jar has string jar_cache inside. I
   don't think it is coincidence. This means, JRE is responsible for
   creating these files.
  
   Vadim
  
  
Best regards,
   
-
   Luca Morandini
   GIS Consultant
  [EMAIL PROTECTED]
http://utenti.tripod.it/lmorandini/index.html
-
   
  
  
   -
   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: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: [HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1

2002-03-21 Thread Peter Schwenke
(StandardEngineValve.
  java:163)
   at
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
  va:566)
   at
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
  72)
   at
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at
  org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.j
  ava:1011)
   at
  org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:
  1106)
   at java.lang.Thread.run(Thread.java:484)
  DEBUG   (2002-03-21) 17:21.32:200   [sitemap](/accordiadev/jsp/hello)
  HttpProcessor[8080][4]/s
  
  
  
  The exception is occuring in this function at the SiteMap
  
/**
 * Process to producing the output to the specified
  codeOutputStream/code.
 */
public final boolean process(Environment environment) throws
  Exception{
  /* the codeEventPipeline/code is used to collect the xml
  producing sitemap
 components and the codeStreamPipeline/code to produce the
  requested resource */
  EventPipeline eventPipeline = null;
  StreamPipeline pipeline = null;
  boolean result = false;
  try {
try {
  eventPipeline =
  (EventPipeline)this.manager.lookup(EventPipeline.ROLE);
  pipeline =
  (StreamPipeline)this.manager.lookup(StreamPipeline.ROLE);
  pipeline.setEventPipeline(eventPipeline);
} catch (Exception e) {
  getLogger().error(Processing of resource failed, e);
  throw e;
}
  //The exception occurs here ..
result = process (environment, pipeline, eventPipeline,
  false);
  
  } finally {
if(eventPipeline != null) this.manager.release(eventPipeline);
if(pipeline != null) this.manager.release(pipeline);
  }
  return result;
}
  -Original Message-
  From: Peter Schwenke [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, March 20, 2002 10:19 PM
  To: [EMAIL PROTECTED]
  Subject: [HELP]SAXException JspGenerator.generate() - Using Tom Cat
  4.0.1 and latest Cocoon build JDK 1.3.1
  
  Check your cocoon log.  They'll be an exception thrown when when your
  JSP was running.
  
  ...Peter
  
  Chitharanjan Das writes:
Hello all,
  I just synchronized the latest source from archive and deployed
the cocoon and upon invocation of the JSP files, I am getting a SAX
error.
Has anybody faced this and if yes, is there any remedy for this..

Thanks in advance.
Chiths
Description:org.apache.cocoon.ProcessingException: SAXException
JspGenerator.generate() 

org.apache.cocoon.ProcessingException: SAXException
JspGenerator.generate() 
at
   
  org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:132
) 
at
   
  org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
ngEventPipeline.java:251) 
at
   
  org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
ingStreamPipeline.java:399) 
at
   
  org.apache.cocoon.www.sitemap_xmap.matchN107D2(C:\Products\WebServers\To
   
  mCat40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sit
emap_xmap.java:9727) 
at
   
  org.apache.cocoon.www.sitemap_xmap.process(C:\Products\WebServers\TomCat
   
  40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sitemap
_xmap.java:3710) 
at
   
  org.apache.cocoon.www.sitemap_xmap.process(C:\Products\WebServers\TomCat
   
  40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sitemap
_xmap.java:3127) 
at org.apache.cocoon.sitemap.Handler.process(Handler.java:222) 
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) 
at
   
  org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154
) 
at org.apache.cocoon.Cocoon.process(Cocoon.java:575) 
at
   
  org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:991) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
at
   
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247) 
at
   
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193) 
at
   
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243) 
at
   
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566) 
at
   
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72) 
at
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at
   
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:201) 
at
   
  org.apache.catalina.core.StandardPipeline.invokeNext

[HELP]SAXException JspGenerator.generate() - Using Tom Cat 4.0.1 and latest Cocoon build JDK 1.3.1

2002-03-20 Thread Peter Schwenke

Check your cocoon log.  They'll be an exception thrown when when your
JSP was running.

...Peter

Chitharanjan Das writes:
  Hello all,
   I just synchronized the latest source from archive and deployed
  the cocoon and upon invocation of the JSP files, I am getting a SAX
  error.
  Has anybody faced this and if yes, is there any remedy for this..
  
  Thanks in advance.
  Chiths
  Description:org.apache.cocoon.ProcessingException: SAXException
  JspGenerator.generate() 
  
  org.apache.cocoon.ProcessingException: SAXException
  JspGenerator.generate() 
  at
  org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:132
  ) 
  at
  org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
  ngEventPipeline.java:251) 
  at
  org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
  ingStreamPipeline.java:399) 
  at
  org.apache.cocoon.www.sitemap_xmap.matchN107D2(C:\Products\WebServers\To
  mCat40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sit
  emap_xmap.java:9727) 
  at
  org.apache.cocoon.www.sitemap_xmap.process(C:\Products\WebServers\TomCat
  40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sitemap
  _xmap.java:3710) 
  at
  org.apache.cocoon.www.sitemap_xmap.process(C:\Products\WebServers\TomCat
  40\work\localhost\accordiadev\cocoon-files\org/apache/cocoon/www\sitemap
  _xmap.java:3127) 
  at org.apache.cocoon.sitemap.Handler.process(Handler.java:222) 
  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) 
  at
  org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154
  ) 
  at org.apache.cocoon.Cocoon.process(Cocoon.java:575) 
  at
  org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:991) 
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
  at
  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
  tionFilterChain.java:247) 
  at
  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
  erChain.java:193) 
  at
  org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
  e.java:243) 
  at
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
  va:566) 
  at
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
  72) 
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  
  at
  org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
  e.java:201) 
  at
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
  va:566) 
  at
  org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.ja
  va:246) 
  at
  org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
  va:564) 
  at
  org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
  72) 
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  
  
  
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[HELP]Exception JspGenerator.generate()

2002-03-19 Thread Peter Schwenke

I haven't played with this, but I see you can set your JSP Engine in
cocoon.xconf. 

  !-- JSP Engine:
The JspGenerator selects a JSPEngine component. The JSPEngine component
launches a JSP servlet engine of your servlet container, feeds the
HttpRequest into the JSP servlet engine, and pipes the jsp response as
SAX events into Cocoon2. The JSP page is specified by the HttpRequest.
This way you can continue to use your JSP pages. Your migration from JSP
to XSP may be done step by step. You may specify your JSP pages either as
JSP scriptlets or as JSP-XML. But keep in mind that your JSP output should
be valid XML.
  --
  jsp-engine logger=core.jsp-engine
parameter name=servlet-class value=org.apache.jasper.servlet.JspServlet/
parameter name=servlet-name value=*.jsp/
  /jsp-engine

I checked the source and this is used by JSPEngineImpl.java.

 ...Peter
[EMAIL PROTECTED] writes:
  Description:org.apache.cocoon.ProcessingException: Exception
  JspGenerator.generate(): java.lang.ClassNotFoundException:
  org.apache.jasper.servlet.JspServlet
  
  Hi,
  
  I am trying to produce XML out of using JSP with Cocoon 2 and
  JspGenerator. It works with tomcat 3.2 but when i try to do this with
  visual age, i have the following error : 
  Original exception : java.lang.ClassNotFoundException:
  org.apache.jasper.servlet.JspServlet 
  java.lang.Throwable(java.lang.String) 
  java.lang.Exception(java.lang.String) 
  java.lang.ClassNotFoundException(java.lang.String) 
  java.lang.Class java.net.URLClassLoader.findClass(java.lang.String) 
  java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String,
  boolean) 
  java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) 
  byte []
  org.apache.cocoon.components.jsp.JSPEngineImpl.executeJSP(java.lang.Stri
  ng, javax.servlet.http.HttpServletRequest,
  javax.servlet.http.HttpServletResponse, javax.servlet.ServletContext) 
  void org.apache.cocoon.generation.JspGenerator.generate() 
  boolean
  org.apache.cocoon.components.pipeline.CachingEventPipeline.process(org.a
  pache.cocoon.environment.Environment) 
  boolean
  org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(org.
  apache.cocoon.environment.Environment) 
  boolean
  org.apache.cocoon.www.sitemap_xmap.matchN10452(org.apache.cocoon.sitemap
  .SitemapRedirector, org.apache.cocoon.environment.Environment,
  org.apache.cocoon.components.pipeline.StreamPipeline,
  org.apache.cocoon.components.pipeline.EventPipeline, boolean,
  java.util.List) 
  boolean
  org.apache.cocoon.www.sitemap_xmap.process(org.apache.cocoon.environment
  .Environment, org.apache.cocoon.components.pipeline.StreamPipeline,
  org.apache.cocoon.components.pipeline.EventPipeline, boolean) 
  boolean
  org.apache.cocoon.www.sitemap_xmap.process(org.apache.cocoon.environment
  .Environment) 
  boolean
  org.apache.cocoon.sitemap.Handler.process(org.apache.cocoon.environment.
  Environment) 
  boolean
  org.apache.cocoon.sitemap.Manager.invoke(org.apache.avalon.framework.com
  ponent.ComponentManager, org.apache.cocoon.environment.Environment,
  java.lang.String, java.lang.String, boolean, boolean) 
  boolean
  org.apache.cocoon.sitemap.SitemapManager.process(org.apache.cocoon.envir
  onment.Environment) 
  boolean
  org.apache.cocoon.Cocoon.process(org.apache.cocoon.environment.Environme
  nt) 
  void
  org.apache.cocoon.servlet.CocoonServlet.service(javax.servlet.http.HttpS
  ervletRequest, javax.servlet.http.HttpServletResponse) 
  void
  javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
  javax.servlet.ServletResponse) 
  void
  org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.co
  re.Request, org.apache.tomcat.core.Response) 
  void
  org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Req
  uest, org.apache.tomcat.core.Response) 
  void
  org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(o
  rg.apache.tomcat.service.TcpConnection, java.lang.Object []) 
  void org.apache.tomcat.service.TcpConnectionThread.run() 
  void java.lang.Thread.run() 
  
  after a hard  work, i installed the library in Visual age without
  success.
  Now i just the servlet.jar, webserver.jar, xml.jar, xml-apis.jar,
  jasper.jar in the library of tomcat 3.2 and the other jar are in the
  webapps of cocoon (Cf. cocoon.war 2)
  
  Thanks in advance for any advice!
  Loic Gourmelon 
  
  
   
  __
  ifrance.com, l'email gratuit le plus complet de l'Internet !
  vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
  http://www.ifrance.com/_reloc/email.emailif
  
  
  
  -
  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
  
  To 

Re: Correction: [SOLUTION] Cocoon with the Tomcat 4.0.3

2002-03-03 Thread Peter Schwenke


I've also seen this on Cocoon 2.0.1, TC 4.0.1 on RH7.1 kernel 2.4.2-2
and JDK 1.3.1_01.  Browser is mozilla is 0.9.7.  We all have
sufficiently different setups.  I didn't see it with  TC3.2.1 and
Cocoon 2RC2 on the same machine. It will either be Cocoon or Tomcat.   

I'll try to work it out next time it happens.

...Peter


Nicola Ken Barozzi writes:
  From: Bud Gibson [EMAIL PROTECTED]
  
   I will note that I got some hangs.  In those places, if I hit the stop
   button and and then resubmitted the url, that worked.
  [...]
   PS  cocoon was running under RH 6.2 with jdk 1.3.1_02.  The kernel is
   2.2.18 with VA Linux smp hacks.
  
  I get this behaviour too with Tomcat 4b7, W2000, JDK 1.4, Explorer 6.0! :-o
  
  I used to think it was due to resource contention, since the browser and the
  server are on the same machine, but now that you have such a different
  configuration, i wonder...
  
  --
  Nicola Ken Barozzi [EMAIL PROTECTED]
  - verba volant, scripta manent -
 (discussions get forgotten, just code remains)
  -
  
  
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: RE: XML -- CSV file download to client

2002-02-17 Thread Peter Schwenke


That approach looks like it would work, well.  Another way I have done
this in the past on non-cocoon systems is with extra path information
in the URL.

That is,

http://yourhost/somescript/theFile.csv

Where some somescript is the servlet, JSP, CGI script or whatever.

Internet Explorer And Windows loves to have that filename suffix!  MIME types
aren't enough some of the time.

The question is timely for me, because I am about to work on this and will
report how I did it.

   ...Peter



=?iso-8859-1?Q?Karl_=D8ie?= writes:
  if i get this right, the easiest way would be to put up a new match in the
  pipeline;
  
   map:match pattern=**.cvs
   dostuff/
   map:serialize type=text/
   /map:match
  
   map:match pattern=**.html
   dostuff/
   map:serialize type=html/
   /map:match
  
   map:match pattern=**.xml
   dostuff/
   map:serialize type=xml/
   /map:match
  
  then the cvs file would get the name some-page.cvs ?!?
  
  mvh karl
  
  
  -Original Message-
  From: Baer Peter [mailto:[EMAIL PROTECTED]]
  Sent: 15. februar 2002 11:31
  To: [EMAIL PROTECTED]
  Subject: Re: RE: XML -- CSV file download to client
  
  
  
  text/plain works, but I still have the file name problem...
  
  [EMAIL PROTECTED] wrote:
   you could just try test/plain for csv ...
  
  
  Peter Christoph Alexander Bär wrote:
   Thanks for the quick response. Although the two of us are German,
   obviously, let's stick to English with respect to the other users of
   this mailing list. ;-)
  
   I have this...
  
   xsl:processing-instruction name=cocoon-format
 type=text/x-csv
   /xsl:processing-instruction
  
   and get that...
  
   java.lang.Exception: No formatter for type text/x-csv
  
   That's why I wonder, if this MIME type is supported, at all, by C1.
  
   Unfortunately we were so far unable to get C2 running the way we need
   it, which probably means that we cannot use the sitemap trick suggested
   in the thread on xml writing to a file.
  
  
   Kubanek, Petr wrote:
  
   (1)
   When a user clicks on a specific hyperlink, a CSV file should be
   created and sent to him. The file should not have the name of the
   page called. Instead of .xml the file extension must be .csv.
  
   For the moment, it is good enough to have the user right-click on
   the hyperlink in order to get the file downloaded instead having it
   displayed in their browser. But the filename is the name of the page,
   which is not what we want...
  
   I've read the thread writing xml to file and others on this list.
   Do I really have to change the sitemap, here? Or is there any other
   way to change the file name? Is changing the sitemap the only means
   to avoid having the content of the file enclosed in XML tags?
  
  
   You have to change mime type. How browser save file is browser
   dependinding
   - are you serving dynamic or static CVS files?
  
  
   (2)
   There's a MIME type for CSV (x-csv). What is the exact syntax to
   set this MIME type?
  
   type=text/x-csv
  
   results in an error message. Can it be that the type is not supported
   by Cocoon?
  
  
   Most probably type=text/x-csv. Hochkomas sind wichtig!
  
  
   Environment:
   Cocoon 1.8.2 (sorry, despite all the gentle support on
   the list we couldn't get C2 running with X, and we don't have the time
   for experiments, right now)
   Tomcat 3.2.4
   SuSE Linux 7.3.
   Xfree86 4.1
   Blackdown J2SDK 1.3.1-02a
  
   Thanks!
  
   --
   +---+-
   +
   |mailto:[EMAIL PROTECTED]  |
   +-
   +
  
  
   -
   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: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  --
  +---+-+
  |Peter C. A. Bär| Siemens Business Services  Co. OHG |
  |Fon  +49.911.654-2387  | Von-der-Tann-Str. 30-31 |
  |Fax  +49.911.654-2108  | 90439 Nürnberg  |
  |   | Deutschland |
  +---+-+
  |mailto:[EMAIL PROTECTED]   |
  +-+
  
  
  -
  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
  
  To 

Re: Newbie FAQ (was Re: Just starting COCOON

2002-02-17 Thread Peter Schwenke


There has been discussions on the list that it is better to stick with
Tomcat 4.0.2 for now.
(http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=101363193404329w=2)

That was an error after it started, though.  

Is the war file OK - Can you do a jar tvf on it? Permissions OK etc

 ...Peter
Jessica Perry Hekman writes:
  On Fri, 15 Feb 2002, Peter Flynn wrote:
  
  Apache Tomcat/4.0.2 - HTTP Status 404 - /cocoon
  type Status report
  message /cocoon
  description The requested resource (/cocoon) is not available.
   
   Cocoon.war is still sitting there in /var/tomcat4/webapps and nothing
   I can find to do will persuade tomcat to recognise it or do anything
   with it. From what I can glean from the docs, something (tomcat?) is
  
  I and some co-workers have also been trying to get Cocoon running. I was
  recently put on a different project, but my co-workers report that
  downgrading to Tomcat 4.0.1 made things work. You might try that.
  
  j
  
  
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




jsp:forward in jsp causeing error

2002-02-14 Thread Peter Schwenke


I had a similar error calling RequestDispatcher.forward from a servlet
and traced it back. I ended up replacing the servlet.jar
which came with cocoon by the servlet.jar from Tomcat. Works fine.

That was with Tomcat 3.2.1 and Cocoon2.0rc2.

 ...Peter
Gasper writes:
  Hello
  
  I'm building a site using cocoon 2.0 and jsp's for dynamic content In my jsp
  I'm trying to forward to a page using a simple jsp:forward tag but this
  causes an error below. I'm using tomcat 3.2.3
  
  Does anybody know a solution?
  Is this a bug?
  
  Thanks
  
  Gasper
  
  The error:
  
  org.apache.cocoon.ProcessingException: ServletException in
  JspGenerator.generate(): java.lang.ClassCastException:
  org.apache.cocoon.components.jsp.JSPEngineImpl$MyServletRequest
   at org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:87)
   at
  org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
  entPipeline.java:210)
   at
  org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
  treamPipeline.java:359)
   at
  org.apache.cocoon.www.sitemap_xmap.wildcardMatchN40058D(sitemap_xmap.java:90
  80)
   at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:3026)
   at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2500)
   at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
   at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
   at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
   at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:664)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
   at org.apache.tomcat.core.Handler.service(Handler.java:287)
   at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
   at
  org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
  2)
   at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
   at
  org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
  onnectionHandler.java:213)
   at
  org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
   at
  org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
   at java.lang.Thread.run(Unknown Source)
  java.lang.ClassCastException:
  org.apache.cocoon.components.jsp.JSPEngineImpl$MyServletRequest
   at
  org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherIm
  pl.java:172)
   at
  org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
  .java:162)
   at
  org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:421)
   at
  admin._0002fadmin_0002fsumniki_0002ejspsumniki_jsp_3._jspService(_0002fadmin
  _0002fsumniki_0002ejspsumniki_jsp_3.java:72)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
  org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
  va:130)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
  org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
  va:282)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at
  org.apache.cocoon.components.jsp.JSPEngineImpl.executeJSP(JSPEngineImpl.java
  :107)
   at org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:74)
   at
  org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
  entPipeline.java:210)
   at
  org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
  treamPipeline.java:359)
   at
  org.apache.cocoon.www.sitemap_xmap.wildcardMatchN40058D(sitemap_xmap.java:90
  80)
   at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:3026)
   at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2500)
   at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
   at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
   at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
   at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:664)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
   at org.apache.tomcat.core.Handler.service(Handler.java:287)
   at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
   at
  org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
  2)
   at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
   at
  org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
  onnectionHandler.java:213)
   at
  

RE: jsp:forward in jsp causeing error

2002-02-14 Thread Peter Schwenke


That could be bad. No, I'd put some cocoon jars in
$TOMCAT_HOME/lib. It might have been a hangover from cocoon 1.8. 

...Peter

Vadim Gritsenko writes:
  If you have servlet.jar in the WEB-INF/lib, this is (IIRC) *bad*, and
  you should delete it right away. Servlet.jar provided in the Cocoon with
  the only purpose to compile sources.
  
  Vadim
  
   -Original Message-
   From: Peter Schwenke [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, February 14, 2002 6:15 PM
   To: [EMAIL PROTECTED]
   Subject: jsp:forward in jsp causeing error
   
   
   I had a similar error calling RequestDispatcher.forward from a servlet
   and traced it back. I ended up replacing the servlet.jar
   which came with cocoon by the servlet.jar from Tomcat. Works fine.
   
   That was with Tomcat 3.2.1 and Cocoon2.0rc2.
   
...Peter
   Gasper writes:
 Hello

 I'm building a site using cocoon 2.0 and jsp's for dynamic content
  In my
   jsp
 I'm trying to forward to a page using a simple jsp:forward tag
  but this
 causes an error below. I'm using tomcat 3.2.3

 Does anybody know a solution?
 Is this a bug?

 Thanks

 Gasper

 The error:

 org.apache.cocoon.ProcessingException: ServletException in
 JspGenerator.generate(): java.lang.ClassCastException:
 org.apache.cocoon.components.jsp.JSPEngineImpl$MyServletRequest
  at
  
  org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:87)
  at

  
  org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
  ngEv
 entPipeline.java:210)
  at

  
  org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
  ingS
 treamPipeline.java:359)
  at

  
  org.apache.cocoon.www.sitemap_xmap.wildcardMatchN40058D(sitemap_xmap.jav
  a:90
 80)
  at
  org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:3026)
  at
  org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2500)
  at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
  at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
  at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
  at
  org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:664)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
  
  org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
  at org.apache.tomcat.core.Handler.service(Handler.java:287)
  at
  org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
  at

  
  org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav
  a:81
 2)
  at
  org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
  at

  
  org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
  ttpC
 onnectionHandler.java:213)
  at

  org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
  )
  at

  org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:50
  1)
  at java.lang.Thread.run(Unknown Source)
 java.lang.ClassCastException:
 org.apache.cocoon.components.jsp.JSPEngineImpl$MyServletRequest
  at

  
  org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatch
  erIm
 pl.java:172)
  at

  
  org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher
  Impl
 .java:162)
  at

  org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:4
  21)
  at

  
  admin._0002fadmin_0002fsumniki_0002ejspsumniki_jsp_3._jspService(_0002fa
  dmin
 _0002fsumniki_0002ejspsumniki_jsp_3.java:72)
  at
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at

  
  org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServle
  t.ja
 va:130)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at

  
  org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServle
  t.ja
 va:282)
  at
  
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
  at
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at

  
  org.apache.cocoon.components.jsp.JSPEngineImpl.executeJSP(JSPEngineImpl.
  java
 :107)
  at
  
  org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:74)
  at

  
  org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
  ngEv
 entPipeline.java:210)
  at

  
  org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
  ingS
 treamPipeline.java:359

OutOfMemoryError and xsp file size

2002-02-14 Thread Peter Schwenke


If the size of the XSP isn't that big that it is a design issue you
might just want to increase the heap size of your JVM.  

You can set the min/max heap sizes using parameters such as 

-ms128m -mx256m

(depending on your JVM)

...Peter
Steve Switzer writes:
  I'm getting the following error when I execute my
  xsp:
  
  500 Servlet Exception
  java.lang.OutOfMemoryError
  no stack trace available
  
  I'm using Resin 2.0.5 and Cocoon 2.0
  
  A former co-worker told me, at one time, that my problem
  was that my xsp file was too big.  By reducing it's size I used
  to be able to get past the out of memory error -- the error was
  always intermittent, depending on the data being picked up by
  the sql in the xsp.  Well now the error is back, and the users
  actually want to start using this xsp!! (They didn't care before.)
  
  The former co-worker at the time suggested that the real solution
  was not to keep reducing the size of the xsp file, but that it was
  an architectural issue.
  
  Any comments or solutions?
  
  Thanks, Steve Switzer.
  
  
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: JSP Include and Forward problem

2002-01-31 Thread Peter Schwenke


Hi Vadim

Vadim Gritsenko writes:
   From: Peter Schwenke [mailto:[EMAIL PROTECTED]]
   
   
   I've had no problem with including other pages.  I've been using the
   old style includes - mainly because we never updated the JSPs to the
   XML syntax because of an old servlet runner. (I've spent the last few
   weeks reworking to Cocoon and that is on the list)
  
  Peter,
  
  IIRC, these two - %@ include file=  % and jsp:include page=  / -
  have different semantics. One is compile-time, another is run-time.

You're right there.  I'd never looked into jsp:include.

That makes the problem interesting:

JSPGenerator invokes the JSPEngine which runs the JSP page and expects
to get the output back to parse it.  But when interpreting the JSP
page the JSP Engine needs to run another page - is that when the
IllegalStateException occurs (because it sees the output stream is already
being used)?  Makes sense.

...Peter



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




JSP Include and Forward problem

2002-01-30 Thread Peter Schwenke


I've had no problem with including other pages.  I've been using the
old style includes - mainly because we never updated the JSPs to the
XML syntax because of an old servlet runner. (I've spent the last few
weeks reworking to Cocoon and that is on the list)

eg

%@ include file=include/StandardDefs.jsp %

My included JSPs are in an include subdirectory of the main JSPs.

Is your include path correct (/jsp/test2) ?  If you are including from
the current directory, you should just be able to do 

jsp:include page=test2.jsp flush=true /


...Peter
Chitharanjan Das writes:
  Hello,
  The JSP Generator problem.
   
  Has anybody tried jsp:include and made it work.
  The standalone JSP's work (without includes).
   
   
  With inclusion of jsp:include, I get the IllegalStateException  with 
  Both the flush variable set to true or false.
   
  Calling jsp
  Test.jsp
   
  %@ page language='java' session='false' %
  page
titleHello/title
content
  paraThis is my first Cocoon2 page!/para
  paraWith help from JSP/para
  jsp:include page=/jsp/test2 flush=true /
/content
  /page
   
   
  Included jsp
  test2.jsp
   
  %@ page language='java' session='false' %
  paraThis is my first Cocoon2 page!/para
  paraWith help from JSP/para
  
   
   
  I am using cocoon ver2.0, Tom Cat 4.0. I am guessing that the servlet
  version is servlet 2.3 and JSP version 1.2.
   
  Could any of You please help me out, I am in a fix out Here ?
   
  Thanks in advance,
  Chiths
   
   
   
   
  accordia, inc 
  34347 Maybird Circle
  Fremont, CA 94555
  650 279 1137
  [EMAIL PROTECTED]
   
  The information contained in this communication is intended solely for
  the use of the individual or entity to whom it is addressed and others
  authorized to receive it. It may contain confidential or legally
  privileged information. If you are not the intended recipient you are
  hereby notified that any disclosure, copying, distribution or taking any
  action in reliance on the contents of this information is strictly
  prohibited and may be unlawful. If you have received this communication
  in error, please notify us immediately by responding to this email and
  then delete it from your system. Accordia Inc. is neither liable for the
  proper and incomplete transmission of the information contained in this
  communication nor for any delay in its receipt
   
  html xmlns:o=urn:schemas-microsoft-com:office:office 
 xmlns:w=urn:schemas-microsoft-com:office:word 
 xmlns=http://www.w3.org/TR/REC-html40;
  
  head
  META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=us-ascii
  
  
  meta name=ProgId content=Word.Document
  meta name=Generator content=Microsoft Word 10
  meta name=Originator content=Microsoft Word 10
  link rel=File-List href=cid:[EMAIL PROTECTED];
  !--[if gte mso 9]xml
   o:OfficeDocumentSettings
o:DoNotRelyOnCSS/
   /o:OfficeDocumentSettings
  /xml![endif]--!--[if gte mso 9]xml
   w:WordDocument
w:SpellingStateClean/w:SpellingState
w:GrammarStateClean/w:GrammarState
w:DocumentKindDocumentEmail/w:DocumentKind
w:EnvelopeVis/
w:Compatibility
 w:BreakWrappedTables/
 w:SnapToGridInCell/
 w:WrapTextWithPunct/
 w:UseAsianBreakRules/
/w:Compatibility
w:BrowserLevelMicrosoftInternetExplorer4/w:BrowserLevel
   /w:WordDocument
  /xml![endif]--
  style
  !--
   /* Style Definitions */
   p.MsoNormal, li.MsoNormal, div.MsoNormal
   {mso-style-parent:;
   margin:0in;
   margin-bottom:.0001pt;
   mso-pagination:widow-orphan;
   font-size:12.0pt;
   font-family:Times New Roman;
   mso-fareast-font-family:Times New Roman;}
  a:link, span.MsoHyperlink
   {color:blue;
   text-decoration:underline;
   text-underline:single;}
  a:visited, span.MsoHyperlinkFollowed
   {color:purple;
   text-decoration:underline;
   text-underline:single;}
  span.EmailStyle17
   {mso-style-type:personal-compose;
   mso-style-noshow:yes;
   mso-ansi-font-size:10.0pt;
   mso-bidi-font-size:10.0pt;
   font-family:Arial;
   mso-ascii-font-family:Arial;
   mso-hansi-font-family:Arial;
   mso-bidi-font-family:Arial;
   color:windowtext;}
  span.SpellE
   {mso-style-name:;
   mso-spl-e:yes;}
  span.GramE
   {mso-style-name:;
   mso-gram-e:yes;}
  @page Section1
   {size:8.5in 11.0in;
   margin:1.0in 1.25in 1.0in 1.25in;
   mso-header-margin:.5in;
   mso-footer-margin:.5in;
   mso-paper-source:0;}
  div.Section1
   {page:Section1;}
  --
  /style
  !--[if gte mso 10]
  style
   /* Style Definitions */ 
   table.MsoNormalTable
   {mso-style-name:Table Normal;
   mso-tstyle-rowband-size:0;
   mso-tstyle-colband-size:0;
   mso-style-noshow:yes;
   mso-style-parent:;
   mso-padding-alt:0in 5.4pt 0in 5.4pt;
 

RE: Cocoon2 and non-English characters in jsp

2002-01-23 Thread Peter Schwenke


Have you put the following in your JSP as the first line of output?

?xml version=1.0 encoding=iso-8859-2?

  ...Peter


Vadim Gritsenko writes:
   From: Gasper [mailto:[EMAIL PROTECTED]]
   
   Hello
   
   If I use non-English characters in my jsp's, they appear in the
  browser as
   question marks.
   
   How can I specify the encoding for my page served by cocoon2?
  
  First you have to define encoding in your JSP source file. Look into JSP
  spec for a way to do this (I don't remember)
  
  Vadim
  
  
  
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




JSPGenerator and redirects

2002-01-21 Thread Peter Schwenke


Hi,

I was wondering if anyone has any ideas on handling redirects from JSP
pages which are processed by JSPGenerator.  JSPGenerator, as expected,
parses the output from the JSP.  When the result is a redirect,
intermittent behaviour - sometimes the redirect gets back to the
browser (surprisingly), other times the resulting output is parsed
from within JSPGenerator.  (There is a return statement after the
redirect in the JSP). 

Thanks
...Peter

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Cocoon and servlets (MVC)

2002-01-20 Thread Peter Schwenke


Hi,

I currently have part of a system working under cocoon.  I have some
servlets which are called by those pages, working in a different
Tomcat context. I would like to bring the two together - mainly for the
reason that they use the same session id from tomcat.

Since cocoon is a webapp on it's own I can forsee some difficulties
(classloaders etc) in trying to get them to run in the same
context. I'd thought of trying do it in the ROOT context.

I was wondering if anybody has managed to get servlets working under
Cocoon as well as transformed XML pages, or has any advice.  Or am I
wasting time and could just put the servlets into cocoon/WEB-INF/web.xml.

Thanks
...Peter




-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Ant: JspGenerator and Encoding

2001-12-11 Thread Peter Schwenke


I found the problem.  I wasn't actually outputing the 
?xml version=1.0 encoding=iso-8859-1? from my JSP. Fool!

 ...Peter

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




JspGenerator and Encoding

2001-12-10 Thread Peter Schwenke


If I save the following in a file as iso-8859-1

?xml version=1.0 encoding=iso-8859-1?

page
test
T-t testing 1-2-3!
Günther
check 1-2
/test
/page

and run it through xerces using a sample test program where the guts
contains 


 SAXParserFactory factory = SAXParserFactory.newInstance();
 SAXParser parser = factory.newSAXParser();
 DefaultHandler handler = new DefaultHandler()/* custom handler class */;
 parser.parse(xmlFile, handler);

I don't have any problems.  If I remove the encoding I get 

An invalid XML character (Unicode: 0xfc) was found in the element content of the 
document.
org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0xfc) was found in 
the element content of the document.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1016)
at 
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:643)
at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1355)
at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:380)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:908)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:374)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:264)
at DoParse.main(DoParse.java:18)

as expected


I have the following entry in my sitemap

   map:match pattern=newcec/*
map:generate type=jsp-with-params src=/docs/samples/newcec/{1}.jsp/
map:transform src=stylesheets/newcec.xsl/
map:serialize type=html/
map:handle-errors
  map:transform src=stylesheets/system/error2html.xsl/
  map:serialize status-code=500/
/map:handle-errors
   /map:match

where

   map:generator  name=jsp-with-params 
src=org.apache.cocoon.generation.JspGenerator
use-request-parameterstrue/use-request-parameters
encodingiso-8859-1/encoding
   /map:generator

I tried with and without this.

In the stylesheet I do

?xml version=1.0 encoding=iso-8859-1?

JSP pages work fine with this until the data has a character with an
umlaut or something.  The error is

Original exception : org.xml.sax.SAXParseException: An invalid XML character (Unicode: 
0xfc) was found in the element content of the document.
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196)
at 
org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:588)
at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1304)
at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081)
at org.apache.cocoon.components.parser.JaxpParser.parse(JaxpParser.java:100)
at org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:80)
at 
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:210)
at 
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:359)
at 
org.apache.cocoon.www.sitemap_xmap.wildcardMatchN4003E0(sitemap_xmap.java:5325)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2779)
at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java:2420)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:163)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:114)
at org.apache.cocoon.Cocoon.process(Cocoon.java:514)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:592)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)


Very similar to that generated by removing the encoding in the xerces
example.  It is as if the encoding in the xml statement is not getting
through.  I have tried many different things like the encoding tag I
saw in one message, putting in the appropriate META tag etc etc

Does anyone have any ideas on how I can resolve this?

I have searched and searched through the archives and can't resolve
this issue.


   

JspGenerator and Encoding

2001-12-10 Thread Peter Schwenke


I omitted a detail...I'm on Cocoon 2.0rc2.

Thanks
...Peter

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]