Re: [c1] java.lang.NoClassDefFoundError with custom class?

2001-12-17 Thread Brent L Johnson

Sorry for the delay ... I do have loose classes in WEB-INF/classes.  That's
the problem. I've got a simple Globals object I created - still in the
same place as it was when it was working under Tomcat3.x
(webapps/myapp/WEB-INF/classes/com/mycomp/globals/Globals.class).

- Brent

- Original Message -
From: David Rosenstrauch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 14, 2001 12:39 PM
Subject: Re: [c1] java.lang.NoClassDefFoundError with custom class?


 Loose classes go in WEB-INF/classes.  Jar files go in WEB-INF/lib.

 If your code is in a jar file then you put it in the wrong place.


 DR


 At 12:29 PM 12/14/01 -0500, you wrote:
 I'm running Cocoon 1.8.2 and I've just upgraded from Tomcat3.x to
Tomcat4.0.1.  According to Tomcat's documentation, anything in
WEB-INF/classes is available (so I dont have to put it in my classpath).
I've got my own com.blah.globals package in
WEB-INF/classes/com/blah/globals.  When I try and import this in my cocoon
logicsheet I get a NoClassDefFoundError:
 
 java.lang.NoClassDefFoundError: com/rrp/globals/Globals
 at
_home._reedy._docs._production._pcteachit_com._temp.init(_temp.java:33)
 at java.lang.Class.newInstance0(Native Method)
 at java.lang.Class.newInstance(Class.java:237)
 If anyone has any ideas on this I would really appreciate it.  I tried
adding it to my classpath and restarting everything and I still get the same
error.
 
 Thanks!
 
 - Brent


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




[c1] java.lang.NoClassDefFoundError with custom class?

2001-12-14 Thread Brent L Johnson



I'm running Cocoon 1.8.2 and I've just upgraded 
from Tomcat3.x to Tomcat4.0.1. According to Tomcat's documentation, 
anything in WEB-INF/classes is available (so I dont have to put it in my 
classpath).I've got my own com.blah.globals package in 
WEB-INF/classes/com/blah/globals. When I try and import this in my cocoon 
logicsheet I geta NoClassDefFoundError:

java.lang.NoClassDefFoundError: com/rrp/globals/Globals	at 
_home._reedy._docs._production._pcteachit_com._temp.init(_temp.java:33)	at 
java.lang.Class.newInstance0(Native Method)	at 
java.lang.Class.newInstance(Class.java:237)
If anyone has any ideas on this I would really 
appreciate it. I tried adding it to my classpath and restarting everything 
and I still get the same error.

Thanks!

- Brent


[C1] NumberFormatException / parseInt

2001-11-28 Thread Brent L Johnson

I've already asked about this before - but I'm getting the exact same errors
again.  If everytime I put some files into production I get lots of
NumberFormatExceptions for no apparent reason (I'm not using parseInt, I
checked the java file in the repository and its not using parseInt,
something else in the cocoon library or something must be) - that pretty
much makes it really pointless to use Cocoon in a production environment.

I'm becoming quite discouraged now (see previous posts about
numberformatexceptions and parseint).  Basically, it seems to have something
to do with ESQL.  Here is my esql tag...  I've found if I delete the first
trtd.../td/tr inside the row-results it works fine and gives no
error.  If I put that in.. bam.. error.  This only happens on our production
FreeBSD machine running jdk1.2.2 - same code on our Linux dev box running
jdk1.2.2 works fine.

  esql:connection
  esql:driverorg.gjt.mm.mysql.Driver/esql:driver

esql:dburljdbc:mysql://xsp:exprglobals.getProp(dbhost)/xsp:expr/xsp
:exprglobals.getProp(dbname)/xsp:expr/esql:dburl

esql:usernamexsp:exprglobals.getProp(dbuser)/xsp:expr/esql:username

  esql:password/
  esql:execute-query
esql:queryselect ps.*, Projects.ID projID, Projects.Title title,
Projects.Objective objective from ProjectSchedule ps, Projects where
week(ps.PublishDate) = week(sysdate()) and Projects.ID = ps.ProjectID order
by ps.PublishDate/esql:query
esql:results
  esql:row-results
xsp:logic
if ((curr % 2) == 0) {
bgcolor = #B0C4E6;
} else {
bgcolor = #E7EEF8;
}
/xsp:logic
xsp:content
  tr valign=middlexsp:attribute
name=bgcolorxsp:exprbgcolor/xsp:expr/xsp:attributetd
width=20bxsp:exprcurr/xsp:expr./b/tdtd
colspan=2besql:get-date column=PublishDate format= d/ -
redTextaxsp:attribute
name=href/projectLibrary/projectDetails.xml?aic=1amp;ID=esql:get-string
column=projID//xsp:attributeesql:get-xml column=title
root=fragment//a/redText/b/td/tr
  trtd colspan=3xsp:attribute
name=bgcolorxsp:exprbgcolor/xsp:expr/xsp:attributeimg
src=../images/ltbluepix.gif height=1 width=560//td/tr
  trtd width=10xsp:attribute
name=bgcolorxsp:exprbgcolor/xsp:expr/xsp:attributeimg
src=../images/spacer.gif//tdtd width=470
valign=middlexsp:attribute
name=bgcolorxsp:exprbgcolor/xsp:expr/xsp:attributeesql:get-string
column=objective//td/tr
/xsp:content
xsp:logic
  curr++;
/xsp:logic
  /esql:row-results
/esql:results
  /esql:execute-query
  /esql:connection

Thanks,

- Brent


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




Stylesheets using Logicsheets

2001-10-18 Thread Brent L Johnson

Can a stylesheet use tags from a custom logicsheet?  I'm still having the
problem with Cocoon generating a NumberFormatException for no apparent
reason.  To get around this, I'm keeping my HTML tags for the header in the
stylesheet (by keeping it there instead of copying it into the logicsheet, I
won't get the exception).

Problem is, the header should look different depending on some Java logic
(i.e. a logicsheet).  Here's a sample of the top portion of my stylesheet...

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

  xsl:template match=header
table width=760 border=0 cellpadding=0
cellspacing=0
  tr
td
  img src=/images/head_01.gif width=263 height=66 /
/td
 
   tdheader:loginButton//td
 
  /xsl:template
/xsl:stylesheet

This generates a namespace error, of course.  I noticed this and added my
custom namespace for my header logicsheet and I no longer got the error.
But, the stylesheet isn't actually making the header:loginButton call to my
logicsheet.  It's simply printing out
header:loginButton/header:loginButton in the generated HTML.  In my XML
document I do have that logicsheet specified - heres a quick sample:

?xml version=1.0?
?cocoon-process type=xsp?
?xml-logicsheet href=aolSchool.xsl/?
?xml-logicsheet href=/common/header-new.xsl/?
?xml-logicsheet href=/common/rightbar.xsl/?
?cocoon-process type=xslt?
?xml-stylesheet href=/common/main2.xsl type=text/xsl?
xsp:page language=java
xmlns:xsp=http://www.apache.org/1999/XSP/Core;
xmlns:esql=http://apache.org/cocoon/SQL/v2;
xmlns:rightbar=http://www.whatever.com/rightbar;
xmlns:header=http://www.whatever.com/header;

page
titleTest Doc/title
header/
content

/content
/page

Is there a way I can accomplish this without having to put the logic in the
XML doc?

Thanks,

- Brent


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




XSP Processing with Logic

2001-10-05 Thread Brent L Johnson

I'm creating a logicsheet which I'm going to use to send email.  An example
of the usage is:

email:sendEmail
to[EMAIL PROTECTED]/to
subjectDoh!/subject
messageQuantity is xsp:exprquantity/xsp:expr/message
/email:sendEmail

I've got everything working fine except for getting the xsp tags working
within the message.  Is there a way I can process what's inside the
message tag but not display it to the web?  Does that make any sense?
Basically, in the logicsheet that processes this I'm doing a:

xsp:logic
String to = xsl:value-of select=to/;
String from = xsl:value-of select=from/;
String subject = xsl:value-of select=subject/;
String message = xsl:value-of select=message/;
... then use javamail to process and send an email message
/xsp:logic

I see that xsl:value-of returns a string representation or something - but
is there a way I can process the xsp tags inside the message and set a
string to the result?  Or something similar to accomplish what I'm trying to
do?

Thanks,

- Brent


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




iMac and IE4.5

2001-10-04 Thread Brent L Johnson

I'm having a serious issue with iMac's running IE4.5.  I just put a new site
into production which uses Cocoon.  It's been great, and we've gotten a lot
of great response (not to mention the fact that since I designed it using
Cocoon it's really easy to make content modification).

But, the only negative feedback I've received is that iMac's running IE4.5
only see the HTML code.  When the person goes to our website, the page does
not get displayed (like I said, just all the HTML code - so it's getting
transformed).  We have some macs internally, and we've tested the site and
it runs fine on regular Mac's (G4's).  It seems to be limited to just iMacs,
and just IE4.5.

Here are my formatter settings in cocoon.properties (I'm convinced it HAS to
have something to do with this).

I had it set to this:
formatter.text/html.doctype-public = -//W3C//DTD HTML 4.0//EN
formatter.text/html.doctype-system = Transitional

In an attempt to fix the iMac problem I set it to this:
formatter.text/html.doctype-public = -//W3C//DTD HTML 4.0 Transitional//EN
formatter.text/html.doctype-system =
http://www.w3.org/TR/REC-html40/loose.dtd

But neither one seemed to help.  This is a serious problem (since our site
is aimed at teachers and a lot of schools use iMacs) that I've been unable
to resolve.  Has anyone had this problem?  Does anyone have ANY ideas on how
I can fix this?  I really need some help on this.

Thanks,

- Brent


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




[c1] Cocoon / Tomcat / XSL Files

2001-09-25 Thread Brent L Johnson

I'm not sure this is really the best mailing list to direct this to - but
since it is directly related to Cocoon I'll try anyways.

I'm using ESQL in many different documents for reading info out of a
database.  The problem is, the database username and passwords are stored in
cleartext in the XSL document, and someone could simply read the HTML source
and pick out the namespaces and read the XSL documents (thus getting access
to not only the code used to create most of the dynamic pages, but DB
usernames and passwords).

Does anyone know if I can restrict access to .xsl files using Apache +
Tomcat + Cocoon1 ??

Thanks,

- Brent


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




[c1] HTML Output and xmlns

2001-09-07 Thread Brent L Johnson

Quick question - probably easy to answer - but why when I view the source of
the transformed HTML document in my browser, why do I see xmlns tags in the
HTML document (along with some other xml related code).  Can I restrict it
to only HTML compliant that will work for most all browsers?  Here are the
first 3 lines of my source document:

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0//EN Transitional
?xml-stylesheet href=/common/main.xsl type=text/xsl?
html xmlns:rightbar=http://www.reedyriverpress.com/rightbar;

Obviously I dont want that xml-stylesheet tag in there - but I'm not sure
WHY it is there.

This isn't causing me a problem with IE or later versions of Netscape, but
I'm putting a site into production using Cocoon 1.8.2 (which should get
fairly heavily traffic) - and I've already got a support call from someone
who is actually SEEING the HTML source code (maybe because of the DOCTYPE
tag or something).  I remember reading somewhere that Cocoon 1.8.2 was
production quality, but Cocoon2 was still in beta (correct?).  There other
people using Cocoon for higher traffic commercial sites?

Thanks,

- Brent


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




Error Messaging

2001-09-07 Thread Brent L Johnson

Since I'm using cocoon in a production environment I'd rather not have the
nasty Cocoon error message (I'd like a nice conforming error page).  Is
there a way to implement this in Cocoon 1.8.2 (I'm using it under Tomcat
3.2.2).

Thanks,

- Brent


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




Validating XML from DB

2001-08-23 Thread Brent L Johnson

Is there a way to test possible XML data from a database prior to doing an
esql:get-xml column=DESC/ ?

The problem is, if someone else (non-technical) enters the data in the
database and they forget to close off a tag or something, is there a way I
can intercept that - or tell that it's not valid prior to inserting in the
database - or prior to the esql:get-xml?  Also, is there a way to intercept
a cocoon error and do a redirect or show some page other than the standard
grey error box?

Thanks,

- Brent


-
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: esql, get-xml and xsp:logic

2001-08-21 Thread Brent L Johnson

Maybe - if someone could suggest a better way to do this I'd really
appreciate it.

I've created a logicsheet - inside the xsp:page template match, I've
created some String variables which represent the different string columns
in the database table (for a particular row).  When the XML page is called,
I use esql to select the values out of the database (returns one row based
on an ID passed in).  I then set these variables to their respective values
from the table.  Here is an example from the logicsheet:

  xsl:template match=xsp:page
xsp:page
  xsl:copy
xsl:apply-templates select=@*/
  /xsl:copy

  xsp:structure
xsp:includejava.sql.*/xsp:include
xsp:includecom.rrp.globals.*/xsp:include
  /xsp:structure

  xsp:logic
private static String projID = 0;
private static String projTitle = Project Title;
 /xsp:logic

  xsl:apply-templates/

/xsp:page
  /xsl:template

  xsl:template match=projects:loadDetails

esql:connection
esql:driverorg.gjt.mm.mysql.Driver/esql:driver

   esql:row-results
  xsp:logic
projTitle = esql:get-string column=Title/;
  /xsp:logic
/esql:row-results

  /xsl:template

I then created different templates which returned the values so I could
basically create a detail level XML file which showed info for that row in
the database.

E.g.


  xsl:template match=projects:Title
bxsp:exprprojTitle/xsp:expr/b
  /xsl:template

I could always just put all the HTML/XML that I want to use to print out the
details inside the esql:row-results and have all the formatting for the
details page in the logicsheet - but I would rather keep the content (info
other than DB data) inside the XML file and use tags that return the data.

Any other ways of accomplishing this?

Thanks,

- Brent

 -Original Message-
 From: Stefan Seifert [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 20, 2001 5:05 PM
 To: [EMAIL PROTECTED]
 Subject: AW: esql, get-xml and xsp:logic


 Take a look at the generate Java class behind the XSP page - and you
 will see the problem. get-xml does not an xml string, but a xml dom
 element object (or sax events in cocoon 2). In your second case there
 was just the .toString()-Method of org.w3c.dom.Element called.

 I can see not much sense in putting the xml fragment in a string (i
 think you had some misleading thinking here), but if you really need it,
 just use get-string instead of get-xml, this returns the plain text of
 the column.

 Stefan

  -Ursprüngliche Nachricht-
  Von: Brent L Johnson [mailto:[EMAIL PROTECTED]]
  Gesendet: Dienstag, 21. August 2001 01:16
  An: Cocoon-Users
  Betreff: esql, get-xml and xsp:logic
 
 
  I've been using esql:get-xml column=COLNAME
  root=fragment/ and it's
  been working perfectly.  But, I've found a problem when
  trying to set a
  String inside an xsp:logic tag to that.  Make any sense?
  Here's the code
  that works...
 
  esql:row-results
  TEST: esql:get-xml column=mycol root=fragment/
  /esql:row-results
 
  But, I want to set a string to that value.. e.g.
  xsp:logic
  String myval = esql:get-xml column=mycol root=fragment/;
  /xsp:logic
 
  Doing this I get the following error:
  Incompatible type for =. Can't convert org.w3c.dom.Element to
  java.lang.String.
 
  Then I tried this (which ALMOST works):
  xsp:logic
  String myval =  + esql:get-xml column=mycol root=fragment/;
  /xsp:logic
 
  Unfortunately - this only gives me the string [fragment:
  null].  Does this
  have something to do with the order that the XSP and XSL is
  processed???
 
  Thanks,
 
  - Brent

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




esql, get-xml and xsp:logic

2001-08-20 Thread Brent L Johnson

I've been using esql:get-xml column=COLNAME root=fragment/ and it's
been working perfectly.  But, I've found a problem when trying to set a
String inside an xsp:logic tag to that.  Make any sense?  Here's the code
that works...

esql:row-results
TEST: esql:get-xml column=mycol root=fragment/
/esql:row-results

But, I want to set a string to that value.. e.g.
xsp:logic
String myval = esql:get-xml column=mycol root=fragment/;
/xsp:logic

Doing this I get the following error:
Incompatible type for =. Can't convert org.w3c.dom.Element to
java.lang.String.

Then I tried this (which ALMOST works):
xsp:logic
String myval =  + esql:get-xml column=mycol root=fragment/;
/xsp:logic

Unfortunately - this only gives me the string [fragment: null].  Does this
have something to do with the order that the XSP and XSL is processed???

Thanks,

- Brent


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




esql database results and XSL

2001-08-16 Thread Brent L Johnson

Is it possible to process XML that comes from database results?  I'm not
sure this would be possible or not - but here's an example...
select Title from MyInfo order by Title;

The resulting titles could be like:
The Cocoon Mailing List myImage name=blah/

Is there some XSLT tag or something that could process that esql results?
Some like:
xsl:processesql:get-string column=Title//xsl:process

That way it would return the actual HTML results from the myImage XSL
template.

Thanks,

- Brent


-
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: esql database results and XSL

2001-08-16 Thread Brent L Johnson

Sorry about that - just ran across it on the newsgroups :)  Thanks for the
help!

- Brent

- Original Message -
From: Christian Haul [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 16, 2001 11:56 AM
Subject: Re: esql database results and XSL


 On 16.Aug.2001 -- 11:15 AM, Brent L Johnson wrote:
  Is it possible to process XML that comes from database results?  I'm not
  sure this would be possible or not - but here's an example...
  select Title from MyInfo order by Title;
 
  The resulting titles could be like:
  The Cocoon Mailing List myImage name=blah/
 
  Is there some XSLT tag or something that could process that esql
results?
  Some like:
  xsl:processesql:get-string column=Title//xsl:process

 Try
 esql:get-xml column=Title/


 Chris.

 --
 C h r i s t i a n   H a u l
 [EMAIL PROTECTED]
 fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

 -
 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: [c1] xsp:logic compiling

2001-08-06 Thread Brent L Johnson

OK - I think I see where my problem is.  I've been reading through Cocoon1
docs this whole time and didn't really see much information about
logicsheets (until following the link you sent).

Basically, what I'm trying to do is keep all database queries, all dynamic
code, everything development related out of the XML document (which is
pretty much my purpose of using Cocoon in the first place).  Right now, I've
got my own logicsheet (intranet-logic.xsl) and stylesheet (intranet.xsl).
Im doing an import in my logicsheet and importing the authentication
logicsheet (since I assume you can't refer to multiple logicsheets in a
single XML file).

So - as I understand it from a concept point of view:
* xml document - holds all the content that will be displayed on the web
(using tags defined in intranet.xsl and intranet-logic.xsl)
* xsl stylesheet - defines the custom tags (like page) by transforming the
page into html
* xsl logicsheet - contains all programatic information - all dynamic xsp
code (and functions similar to the stylesheet)

The problem with this though - is I'm not sure I understand the relationship
of the logicsheet to the stylesheet.  If I want to do something simple like
check a parameter in the stylesheet to decide what HTML to show, it becomes
a bit of a pain.  I can't seem to use the request logicsheet from inside my
stylesheet document (i can, but it never returns anything)... so I have to
create a special tag in my logicsheet which then uses the request logicsheet
to read the value.

But even with this, I've noticed something strange when doing this inside my
logicsheet... here is the code:
xsl:variable name=screenrequest:get-parameter
name=screen//xsl:variable

If I do this, then attempt to do an xsl:choose on it, it never works and
always falls to the otherwise...
xsl:choose
  xsl:when test=$screen='whatever'
Print some stuff here
  /xsl:when
  xsl:otherwise
I always get here
  /xsl:otherwise
/xsl:choose

It also does this if I do an
xsp:exprrequest.getParameter(screen)/xsp:expr instead of the
request:get-parameter.  But, if I print out the value of $screen using
xsl:copy-of select=screen/ it is 'whatever' (or whatever string should
make the test true).

Anways - it's all starting to get a little clearer now (at least I think it
is), thanks for all the help!

- Brent

 -Original Message-
 From: Christopher Painter-Wakefield [mailto:[EMAIL PROTECTED]]
 Sent: Friday, August 03, 2001 7:05 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [c1] xsp:logic compiling



 Brent,

 is the code you've submitted from a logicsheet?  What does your XML file
 look like?  If you are trying to run your XML through a stylesheet, and
 then through the XSP processor, as it appears you might be doing, then you
 need to rethink your approach.  For more info on logicsheets and how they
 work in 1.8.2, see
 http://xml.apache.org/cocoon2/logicsheet-guide.html (yes
 it is in the Cocoon 2 docs, but it was really written for Cocoon 1).

 Based on your current code, the main thing I would suggest is putting
 xsp:content.../xsp:content around your html nodes.

 -Christopher




 Please respond to [EMAIL PROTECTED]

 To:   [EMAIL PROTECTED]
 cc:

 Subject:  [c1] xsp:logic compiling


 I'm fairly new to Cocoon - but I've been muddling through it now for a few
 days.  But I'm hoping this isn't too big of a newbie question,
 but I didn't
 find any answers in the mailing list archives, the newsgroups, or the web.

 * Cocoon 1.8.2 with Tomcat

 I've created an XSL file which is working fine so far (it's a basic login)
 with it's XML instance document counterpart.  When the user submit a
 login/pw form, it submits back to the same XML file (which in my case is
 index.xml).  Here's a quick snip of the XSL code:

   xsl:template match=page
 xsl:processing-instruction
 name=cocoon-processtype=xsp/xsl:processing-instruction
 xsl:processing-instruction
 name=cocoon-formattype=text/html/xsl:processing-instruction
 xsp:page language=java
 xmlns:xsp=http://www.apache.org/1999/XSP/Core;
 html
 

 What I want to do is fairly simple.  Check to see if the form has been
 submitted, by checking for the login parameter.  So here is what I
 changed
 the code to:

   xsl:template match=page
 xsl:processing-instruction
 name=cocoon-processtype=xsp/xsl:processing-instruction
 xsl:processing-instruction
 name=cocoon-formattype=text/html/xsl:processing-instruction
 xsp:page language=java
 xmlns:xsp=http://www.apache.org/1999/XSP/Core;
 xsp:logic
 if (request.getParameter(login.x) == null) {
 html
  the rest of the HTML which shows the login form 
 /html
 } else {
 ... check username exists, etc
 response.sendRedirect(main.xml);
 }
 /xsp:logic

 The problem seems to be how Cocoon is generating the java code.  It seems
 as
 though if I put the xsp:logic tags before the html tag it
 puts the code
 outside of any method in the /* User Class Declarations */ 

[C1] ESQL in XSL

2001-08-03 Thread Brent L Johnson

I've read through the ESQL docs and looked at many ESQL examples but I
havent found an example which uses ESQL in the stylesheet instead of the XML
document.  I added the XML namespace for ESQL in my stylesheet tag:

xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
 xmlns:esql=http://apache.org/cocoon/SQL/v2;
 xmlns:xsp=http://www.apache.org/1999/XSP/Core;

...

When I simply run esql tags in one of my templates it ignores those tags and
just prints out the data (like XSP isn't processing the ESQL tags).

I think it may have something to do with the xsp:page tags or something.
I poked around in some of the sample code, in the newsgroups and the mailing
list to try and find where someone used esql in their stylesheet but couldnt
find anything.

Any help would be appreciated!  Oh, and Olivier Jeulin, thanks for the
pointer to the auth taglib - that works great!

- Brent


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