Re: JspGenerator Problem

2002-06-24 Thread Cenk Uysal

I tried it but I still get the same error. What about JSP file? is it
valid JSP that returns XML? I'm not sure. Interesting point is
Cocoon's own JSP Generator examples run correctly. Here is my JSP:

%@ page contentType=text/xml %
?xml version=1.0?
page
  title
%
out.println(With help from JSP);
%
  /title
/page



__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]





Re: JspGenerator Problem

2002-06-24 Thread yuryx

Cenk Uysal wrote:

I tried it but I still get the same error. What about JSP file? is it
valid JSP that returns XML? I'm not sure. Interesting point is
Cocoon's own JSP Generator examples run correctly. Here is my JSP:
  

try %@ page language=java %

instead of

%@ page contentType=text/xml %
  

Regards.
Yury.



-
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]




RE: JspGenerator Problem

2002-06-24 Thread Piroumian Konstantin

 -Original Message-
 From: Cenk Uysal [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, June 24, 2002 2:42 PM
 To: [EMAIL PROTECTED]
 Subject: Re: JspGenerator Problem
 
 
 I tried it but I still get the same error. What about JSP file? is it
 valid JSP that returns XML? I'm not sure. Interesting point is
 Cocoon's own JSP Generator examples run correctly. Here is my JSP:
 
 %@ page contentType=text/xml %
 ?xml version=1.0?
 page
   title
 %
 out.println(With help from JSP);
 %
   /title
 /page

A hint: run your JSP through the JSPReader to see what is the pure output of
your page. This can give you an idea on what is wrong (there can be an empty
line before the ?xml ...? - this causes problems in Xerces).

Also, see JSP examples in CVS HEAD branch to see how to setup a sitemap for
testing the pages (you can run the same JSP either a JSPReader or
JspGenerator at the same time). The samples are in webapp/samples/jsp/.

--
Konstantin Piroumian 
[EMAIL PROTECTED]

 
 
 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.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: [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]




Re: JspGenerator Problem

2002-06-24 Thread Cenk Uysal

Nothing changed. Same error again. Can you try them in your system
for me? I want to learn is it my fault or Cocoon's fault?

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: JspGenerator Problem

2002-06-24 Thread Piroumian Konstantin

 From: Cenk Uysal [mailto:[EMAIL PROTECTED]] 
 
 Nothing changed. Same error again. Can you try them in your system
 for me? I want to learn is it my fault or Cocoon's fault?

If this was addressed to me, then yes, send your page.

Konstantin

 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.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: [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]




RE: JspGenerator Problem

2002-06-24 Thread Cenk Uysal

I tried JSPreader but now error is much more interesting. It returns
nothing. My sitemap entry is: 

  map:pipeline
map:match pattern=*.*
 map:read mime-type=text/html src=/welcome.jsp type=jsp/
/map:match
   /map:pipeline

Here the welcome.jsp is the Cocoon's own example for JSPReader.

But it runs in examples directory.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: JspGenerator Problem

2002-06-24 Thread Piroumian Konstantin

 From: Cenk Uysal [mailto:[EMAIL PROTECTED]] 
 
 I tried JSPreader but now error is much more interesting. It returns
 nothing. My sitemap entry is: 

Have you looked at the log? Is there any relevant information? What do you
really get: 404 error or a blank page?

 
   map:pipeline
 map:match pattern=*.*
  map:read mime-type=text/html src=/welcome.jsp type=jsp/
 /map:match
/map:pipeline

Change src attribute like this: src=welcome.jsp.

 
 Here the welcome.jsp is the Cocoon's own example for JSPReader.
 
 But it runs in examples directory.

Sorry, don't understand the above two sentences.

What is your Cocoon version? Would you send your page to me so I could check
what is wrong with it?

Konstantin

 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.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: [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]




RE: JspGenerator Problem

2002-06-24 Thread Cenk Uysal

I found out the problem. I use a subsitemap and so my files are in a
folder like Cocoon_Home/myfolder

In the subsitemap, you have to enter full path of JSP file in
generator source. For example if there is a xxx.xsl file in myfolder,
in subsitemap only giving the name of file for XSL source is enough.
But you have to enter /myfolder/xxx.jsp as your JSP source.

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




RE: JspGenerator Problem

2002-06-24 Thread Piroumian Konstantin

 From: Cenk Uysal [mailto:[EMAIL PROTECTED]] 
 
 I found out the problem. I use a subsitemap and so my files are in a
 folder like Cocoon_Home/myfolder
 

You should have said that earlier. Seems that you've hit a known problem in
JSP(Generator | Reader). 

 In the subsitemap, you have to enter full path of JSP file in
 generator source. For example if there is a xxx.xsl file in myfolder,
 in subsitemap only giving the name of file for XSL source is enough.
 But you have to enter /myfolder/xxx.jsp as your JSP source.

The problem is that a relative (to app context) path should be used to pass
to the JSPEngine and currently it's not implemented, so patches are welcome.
I'll also have a look at it as time allows. (The real problem is that there
is no a good way to resolve relative links - relatively to the current
sitemap directory).

A simple solutions is to use absolute links (absolute to app context, not
the file system), e.g.: /myapp/jsp/page.jsp, or to mount the sub-sitemap in
a directory that has the same name is the uri-prefix.

Konstantin

 
 __
 Do You Yahoo!?
 Yahoo! - Official partner of 2002 FIFA World Cup
 http://fifaworldcup.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: [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]




JspGenerator Problem

2002-06-23 Thread Cenk Uysal

I try to use JspGenerator with following sitemap entry:

   map:pipeline

 
   map:match pattern=cenk/*.*
map:generate src=jspxml.jsp type=jsp/
map:transform src=jspxml.xsl/
map:serialize type=html/
   /map:match
   
/map:pipeline

Jsp file is just like this:

%@ page contentType=text/xml %
?xml version=1.0?
page
  title
%
out.println(With help from JSP);
%
  /title
/page

And my XSL is as follows:

?xml version=1.0?
xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
version='1.0'

xsl:template match=/
html
body
xsl:for-each select=page

xsl:value-of select=title/
 

/xsl:for-each

  /body
  /html
/xsl:template



/xsl:stylesheet

When I try to run this application Cocoon gives SAXException
JspGenerator.generate() error?

What is wrong? Cocoon's own JSP examples run without problem. I use
Cocoon 2.0.2

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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: [EMAIL PROTECTED]
For additional commands, e-mail:   [EMAIL PROTECTED]




Re: JspGenerator Problem

2002-06-23 Thread yuryx

Cenk Uysal wrote:

I try to use JspGenerator with following sitemap entry:

   map:pipeline

 
   map:match pattern=cenk/*.*
map:generate src=jspxml.jsp type=jsp/
map:transform src=jspxml.xsl/
map:serialize type=html/
   /map:match
   
/map:pipeline
  

try define in sitemap map:generate src=/jspxml.jsp type=jsp/
instead the map:generate src=jspxml.jsp type=jsp/

Regard.
Yury.



-
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]




RE: JSPGenerator problem

2002-02-07 Thread Chitharanjan Das

Hello,
Shouldn't your generator point to JSP pages
map:generate type=jsp src=../../{1}.jsp/

Regds,
Chiths

-Original Message-
From: MOODAD (Shadi LB Soft) [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 06, 2002 10:55 PM
To: cocoon-dev; [EMAIL PROTECTED]
Subject: JSPGenerator problem

Hi, 
I'm trying to execute a jsp file under cocoon but I have a small porblem
that i didn't found a solution. 
I'm using this configuration: 
  map:pipeline 
   map:match pattern=**.jsp 
    map:generate type=jsp src=../../{1}.xml/ 
    !--map:transform src=../../xml2fo.xsl/-- 
    map:serialize/ 
   /map:match 
  /map:pipeline 
so when executing a jsp I got the following error: 
org.xml.sax.SAXParseException: Document root element is missing. 
    at
org.apache.cocoon.components.parser.JaxpParser.fatalError(JaxpParser.jav
a:182) 
    at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3038) 
    at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3023) 
but the jsp is a well formed xml and it execute from the tomcat. 
so i trace the error in the code of the JSPGenerator.class and I found
that the request URI is correct but the size of the
httpRequest.getInputStream().available() is = 0.? strange. 
I'll be very thanxfull if someone have an ideas on that problem or could
give me some hints to the solution. 
thanx in advance 
-- 
Soft Solutions, Liban 
Net Developper 
Moodad Shadi 
www.softsolutions.fr 
 


-
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: JSPGenerator problem

2002-02-07 Thread MOODAD (Shadi LB Soft)

Hi
in fact yes it points to the jsp pages but this is an typing error.
until now i didn't find the solution

Chitharanjan Das wrote:

 Hello,
     Shouldn't your generator point to JSP pages
 map:generate type=jsp src=../../{1}.jsp/

 Regds,
 Chiths

 -Original Message-
 From: MOODAD (Shadi LB Soft) [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 06, 2002 10:55 PM
 To: cocoon-dev; [EMAIL PROTECTED]
 Subject: JSPGenerator problem

 Hi,
 I'm trying to execute a jsp file under cocoon but I have a small porblem
 that i didn't found a solution.
 I'm using this configuration:
   map:pipeline
    map:match pattern=**.jsp
     map:generate type=jsp src=../../{1}.xml/
     !--map:transform src=../../xml2fo.xsl/--
     map:serialize/
    /map:match
   /map:pipeline
 so when executing a jsp I got the following error:
 org.xml.sax.SAXParseException: Document root element is missing.
     at
 org.apache.cocoon.components.parser.JaxpParser.fatalError(JaxpParser.jav
 a:182)
     at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3038)
     at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3023)
 but the jsp is a well formed xml and it execute from the tomcat.
 so i trace the error in the code of the JSPGenerator.class and I found
 that the request URI is correct but the size of the
 httpRequest.getInputStream().available() is = 0.? strange.
 I'll be very thanxfull if someone have an ideas on that problem or could
 give me some hints to the solution.
 thanx in advance
 --
 Soft Solutions, Liban
 Net Developper
 Moodad Shadi
 www.softsolutions.fr
  

 -
 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]

--
Soft Solutions, Liban
Net Developper
Moodad Shadi

www.softsolutions.fr
 


-
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 problem

2002-02-06 Thread MOODAD (Shadi LB Soft)


Hi,
I'm trying to execute a jsp file under cocoon but I have a small porblem
that i didn't found a solution.
I'm using this configuration:
 map:pipeline>
 map:match pattern="**.jsp">
 map:generate type="jsp" src="../../{1}.xml"/>
 !--map:transform src="../../xml2fo.xsl"/-->
 map:serialize/>
 /map:match>
 /map:pipeline>
so when executing a jsp I got the following error:
org.xml.sax.SAXParseException: Document root element is missing.
 at org.apache.cocoon.components.parser.JaxpParser.fatalError(JaxpParser.java:182)
 at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3038)
 at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3023)
but the jsp is a well formed xml and it execute from the tomcat.
so i trace the error in the code of the JSPGenerator.class and I found
that the request URI is correct but the size of the httpRequest.getInputStream().available()
is = 0.? strange.
I'll be very thanxfull if someone have an ideas on that problem or could
give me some hints to the solution.
thanx in advance
--
Soft Solutions, Liban
Net Developper
Moodad Shadi
www.softsolutions.fr



AW: JSPGenerator problem

2002-02-06 Thread Bucholdt, Christian



Hi,

You need at the 
beginning of the "src"-attribute a "/", and the JSP should be under a directory 
is called "jsp".
example:

map:match pattern="jsp/*" 
 map:generate type="jsp" 
src="/test/jsp/{1}.jsp"/...
 
map:serialize/  /map:match 


by
christian


  -Ursprüngliche Nachricht-Von: MOODAD (Shadi LB Soft) 
  [mailto:[EMAIL PROTECTED]]Gesendet: Donnerstag, 7. 
  Februar 2002 07:55An: cocoon-dev; 
  [EMAIL PROTECTED]Betreff: JSPGenerator 
  problemHi, I'm trying to execute a jsp file under 
  cocoon but I have a small porblem that i didn't found a solution. I'm 
  using this configuration:  map:pipeline 
   map:match pattern="**.jsp" 
   map:generate type="jsp" 
  src="../../{1}.xml"/  !--map:transform 
  src="../../xml2fo.xsl"/--  
  map:serialize/  /map:match 
   /map:pipeline 
  so when executing a jsp I got the following error: 
  org.xml.sax.SAXParseException: Document root element is missing. 
   at 
  org.apache.cocoon.components.parser.JaxpParser.fatalError(JaxpParser.java:182) 
   at 
  org.apache.crimson.parser.Parser2.fatal(Parser2.java:3038) 
   at 
  org.apache.crimson.parser.Parser2.fatal(Parser2.java:3023) 
  but the jsp is a well formed xml and it execute from the tomcat. so i 
  trace the error in the code of the JSPGenerator.class and I found that the 
  request URI is correct but the size of the 
  httpRequest.getInputStream().available() is = 0.? strange. 
  I'll be very thanxfull if someone have an ideas on that problem or could 
  give me some hints to the solution. 
  thanx in advance -- Soft Solutions, Liban Net Developper 
  Moodad Shadi 
  www.softsolutions.fr