You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Simon Waddington <Si...@ZapNetworks.com> on 2000/02/29 02:08:48 UTC

RE: Cocoon 1.7 with WebLogic 4.5.1 - still busted

Does anyone have a working startWebLogic.bat/cmd file that they can send me?
No amount of fiddling with JAVACLASSPATH, WEBLOGICCLASSPATH, changing to
JDK1.1, moving files to the current disk etc. etc. seems to help.   

If I don't have cocoon.jar on the JAVACLASSPATH I get the unable to load
stylesheet exception, if I do I get a NoClassDefFound exception for one of
the servlet classes and if I add the servlet Jar shipped with Cocoon 1.7 to
either the claspath or WEBLOGICCLASSPATH the server fails to start at all.
Maybe WebLogic 4.5.1 and Cocoon don't work at all?

-----Original Message-----
From: Simon Waddington [mailto:Simon@ZapNetworks.com]
Sent: Monday, February 28, 2000 2:15 PM
To: 'cocoon-users@xml.apache.org'
Subject: RE: Cocoon 1.7 with WebLogic 4.5.1


> Did you upgrade your cocoon.propererties file?

Yes I did - I used a completely new Cocoon 1.7 tree.

Since it looked like a class path problem I just tried adding all the cocoon
related jars to the JAVACLASSPATH in my startWebLogic.bat as well as the
WEBLOGICCLASSPATH.  Now I get a different exception which I'm not sure means
I got further or have a different problem altogether...

Mon Feb 28 14:07:47 PST 2000:<I> <ServletContext-Servlets>
weblogic.servlet.File
Servlet: init
Mon Feb 28 14:07:50 PST 2000:<I> <ServletContext-Servlets>
org.apache.cocoon.Coc
oon: init
Mon Feb 28 14:07:50 PST 2000:<E> <HTTP> Servlet request terminiated with
Error:

Mon Feb 28 14:07:50 PST 2000:<E> <HTTP> java.lang.NoClassDefFoundError:
javax/servlet/ServletRequest
        at org.apache.cocoon.Cocoon.init(Cocoon.java:119)


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Best approach to display calendar

Posted by Phil Lanch <ph...@aldigital.co.uk>.
Steve Belt wrote:
> 
> I am trying to use Cocoon to display a calendar using an XML provided by my
> database. I would like to display the events, in HTML, formatted as you see
> in most scheduling applications (Table listing all hours of the day, then
> showing events, if any, in the adjoining cell). I can create an XSL which
> will create a table row for each event, however, I do not know how I can
> display hours and cells which have no events to them. The XSL examples I can
> find, in a manner of speaking, are "triggered" by elements in the XML; I, on
> the other hand, need to display tags
> 
> As I read through the documentation on Cocoon, I see several possible
> choices:
> 
>  I could manipulate my XML to match my calendar - ie, include nodes for
> hours that do not have events. However, this makes my XML less generic.

just so.

> I could use XSP to manipulate the original XML to insert the empty nodes,
> but I am not fluent in XSP, and am having trouble seeing how to do this.

me too - but i don't know much about XSP.

> Finally, perhaps this can all be handled by the XSL. However, as you can no
> doubt tell, I still have much to learn, and I cannot find any examples which
> show me how to accomplish this. Also, I want to be able to change my time
> intervals - ie 1-cell/hour, or 1-cell/half-hour, etc

i'd do it this way.

to "iterate" over 0 to 23 hrs (or 9 to 17 ...) when not all those
numbers are in the source doc, XSL has to use a tail-recursive named
template.  when the <event>s are children of the current node, you can
say-

<xsl:call-template name="calendar"/>

-to call something like this template-

<xsl:template name="calendar">
  <!-- declare "iterator": -->
  <xsl:param name="hour" select="0"/>
  <!-- do this row: -->
  <tr>
    <td><xsl:value-of select="$hour"/> hrs</td>
    <td><xsl:apply-templates select="event[time/hour = $hour]"/></td>
  </tr>
  <!-- if not finished, recurse: -->
  <xsl:if test="$hour &lt; 23>
    <xsl:call-template name="calendar">
      <xsl:with-param name="hour" select="$hour + 1"/>
    </xsl:call-template>
  </xsl:if>
</xsl:template>

-and that calls an <xsl:template match="event"> when an event with the
right time is found - assuming <event>s contain <time>s which contain
<hour>s.

half hours, etc are more difficult; something with minute & interval
params would do it ...

you may find the XSL FAQ - http://freespace.virgin.net/b.pawson/ -
helpful if you haven't seen it, though afaik it doesn't cover exactly
this question.

-- 

cheers

phil

"I have remarked very clearly that I am often of one opinion
when I am lying down and of another when I am standing up ..."

Re: Best approach to display calendar

Posted by Thomas Poe <to...@peoplepc.com>.
Hello Steve:  On your Calendar project, it seems to me, each cell in the
table receives an "event", even if no "content" is present.  Is it too
awkward to show the entire day with each view?  If not, maybe you could
create your own  "empty" tags as a default.  Just a thought, Tom
----- Original Message -----
From: "Steve Belt" <sb...@velos.com>
To: <co...@xml.apache.org>
Sent: Tuesday, February 29, 2000 11:28 AM
Subject: Best approach to display calendar


> Hello:
>
> First, I'd like to say how much I am impressed with Cocoon. I really wowed
> some people in my company when I showed them how Cocoon could feed the
same
> XML to both a web browser and a WAP device (Nokia Emulator), reformatted
for
> each.
>
> I am trying to use Cocoon to display a calendar using an XML provided by
my
> database. I would like to display the events, in HTML, formatted as you
see
> in most scheduling applications (Table listing all hours of the day, then
> showing events, if any, in the adjoining cell). I can create an XSL which
> will create a table row for each event, however, I do not know how I can
> display hours and cells which have no events to them. The XSL examples I
can
> find, in a manner of speaking, are "triggered" by elements in the XML; I,
on
> the other hand, need to display tags
>
> As I read through the documentation on Cocoon, I see several possible
> choices:
>
>  I could manipulate my XML to match my calendar - ie, include nodes for
> hours that do not have events. However, this makes my XML less generic.
>
> I could use XSP to manipulate the original XML to insert the empty nodes,
> but I am not fluent in XSP, and am having trouble seeing how to do this.
>
> Finally, perhaps this can all be handled by the XSL. However, as you can
no
> doubt tell, I still have much to learn, and I cannot find any examples
which
> show me how to accomplish this. Also, I want to be able to change my time
> intervals - ie 1-cell/hour, or 1-cell/half-hour, etc
>
> So, as I started out saying, I want to use Cocoon to provide this page.
> Anybody have any suggestions on how I should proceed? Which of Cocoon's
> technologies should I be concentrating on? Any example source code (I saw
> Jetspeed, but They are using Turbine)?
>
> Thanks in Advance,
>
> Steve
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>


Best approach to display calendar

Posted by Steve Belt <sb...@velos.com>.
Hello:

First, I'd like to say how much I am impressed with Cocoon. I really wowed
some people in my company when I showed them how Cocoon could feed the same
XML to both a web browser and a WAP device (Nokia Emulator), reformatted for
each.

I am trying to use Cocoon to display a calendar using an XML provided by my
database. I would like to display the events, in HTML, formatted as you see
in most scheduling applications (Table listing all hours of the day, then
showing events, if any, in the adjoining cell). I can create an XSL which
will create a table row for each event, however, I do not know how I can
display hours and cells which have no events to them. The XSL examples I can
find, in a manner of speaking, are "triggered" by elements in the XML; I, on
the other hand, need to display tags

As I read through the documentation on Cocoon, I see several possible
choices:

 I could manipulate my XML to match my calendar - ie, include nodes for
hours that do not have events. However, this makes my XML less generic.

I could use XSP to manipulate the original XML to insert the empty nodes,
but I am not fluent in XSP, and am having trouble seeing how to do this.

Finally, perhaps this can all be handled by the XSL. However, as you can no
doubt tell, I still have much to learn, and I cannot find any examples which
show me how to accomplish this. Also, I want to be able to change my time
intervals - ie 1-cell/hour, or 1-cell/half-hour, etc

So, as I started out saying, I want to use Cocoon to provide this page.
Anybody have any suggestions on how I should proceed? Which of Cocoon's
technologies should I be concentrating on? Any example source code (I saw
Jetspeed, but They are using Turbine)?

Thanks in Advance,

Steve


Re: Cocoon 1.7 with WebLogic 4.5.1 - still busted

Posted by Russell Castagnaro <ru...@synctank.com>.
I may have had an extra semicolon in there simon!

set DRIVE=c:
set JDK=%DRIVE%\jdk1.2
set WL=%DRIVE%\weblogic
set COCOON=%DRIVE%\downloads\xml-apache\cocoon\

set PATH=.;%JDK%\bin;%WL%\bin;C:\orawin95\BIN

set CLASSPATH=.;%WL%\classes\boot;%WL%\eval\cloudscape\lib\cloudscape.jar
set
WEBLOGICCLASSPATH=%STUDENT%;C:\java\javamail-1.1.3ea\mail.jar;C:\java\jaf\activation.jar;%WL%\classes;%WL%\license;%WL%\lib\weblogicaux.jar;%WL%\myserver\serverclasses;c:\development\castagnaro\classes

set
WEBLOGICCLASSPATH=%WEBLOGICCLASSPATH%;%COCOON%bin\Cocoon.jar;%COCOON%lib\fop_0_12_1.jar;%COCOON%bin\;C:\java\gnu.regexp-1.0.8\lib\gnu-regexp-1.0.8.jar;%COCOON%lib\xalan_0_19_4.jar;%COCOON%lib\xerces_1_0_1.jar;%COCOON%lib\xml.jar;%CLASSPATH%



%DRIVE%
cd %WL%
java -ms64m -mx64m -classpath %CLASSPATH%
-Dweblogic.class.path=%WEBLOGICCLASSPATH% -Djava.security.manager
-Djava.security.policy=%WL%\weblogic.policy weblogic.Server


Simon Waddington wrote:

> Does anyone have a working startWebLogic.bat/cmd file that they can send me?
> No amount of fiddling with JAVACLASSPATH, WEBLOGICCLASSPATH, changing to
> JDK1.1, moving files to the current disk etc. etc. seems to help.
>
> If I don't have cocoon.jar on the JAVACLASSPATH I get the unable to load
> stylesheet exception, if I do I get a NoClassDefFound exception for one of
> the servlet classes and if I add the servlet Jar shipped with Cocoon 1.7 to
> either the claspath or WEBLOGICCLASSPATH the server fails to start at all.
> Maybe WebLogic 4.5.1 and Cocoon don't work at all?
>
> -----Original Message-----
> From: Simon Waddington [mailto:Simon@ZapNetworks.com]
> Sent: Monday, February 28, 2000 2:15 PM
> To: 'cocoon-users@xml.apache.org'
> Subject: RE: Cocoon 1.7 with WebLogic 4.5.1
>
> > Did you upgrade your cocoon.propererties file?
>
> Yes I did - I used a completely new Cocoon 1.7 tree.
>
> Since it looked like a class path problem I just tried adding all the cocoon
> related jars to the JAVACLASSPATH in my startWebLogic.bat as well as the
> WEBLOGICCLASSPATH.  Now I get a different exception which I'm not sure means
> I got further or have a different problem altogether...
>
> Mon Feb 28 14:07:47 PST 2000:<I> <ServletContext-Servlets>
> weblogic.servlet.File
> Servlet: init
> Mon Feb 28 14:07:50 PST 2000:<I> <ServletContext-Servlets>
> org.apache.cocoon.Coc
> oon: init
> Mon Feb 28 14:07:50 PST 2000:<E> <HTTP> Servlet request terminiated with
> Error:
>
> Mon Feb 28 14:07:50 PST 2000:<E> <HTTP> java.lang.NoClassDefFoundError:
> javax/servlet/ServletRequest
>         at org.apache.cocoon.Cocoon.init(Cocoon.java:119)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

--

Russell Castagnaro
Chief Mentor
SyncTank Solutions
http://www.synctank.com

Earth is the cradle of mankind; one does not remain in the cradle forever
-Tsiolkovsky



Re: Cocoon 1.7 with WebLogic 4.5.1 - still busted

Posted by Russell Castagnaro <ru...@synctank.com>.
Simon,

Here you go

set DRIVE=c:
set JDK=%DRIVE%\jdk1.2
set WL=%DRIVE%\weblogic
set COCOON=%DRIVE%\downloads\xml-apache\cocoon\

set PATH=.;%JDK%\bin;%WL%\bin;C:\orawin95\BIN

set CLASSPATH=.;%WL%\classes\boot;%WL%\eval\cloudscape\lib\cloudscape.jar;
set
WEBLOGICCLASSPATH=C:\java\javamail-1.1.3ea\mail.jar;C:\java\jaf\activation.jar;%WL%\classes;%WL%\license;%WL%\lib\weblogicaux.jar;%WL%\myserver\serverclasses;c:\development\castagnaro\classes

set
WEBLOGICCLASSPATH=%WEBLOGICCLASSPATH%;%COCOON%bin\Cocoon.jar;%COCOON%lib\fop_0_12_1.jar;%COCOON%bin\;C:\java\gnu.regexp-1.0.8\lib\gnu-regexp-1.0.8.jar;%COCOON%lib\xalan_0_19_4.jar;%COCOON%lib\xerces_1_0_1.jar;%COCOON%lib\xml.jar;%CLASSPATH%

%DRIVE%
cd %WL%
java -ms64m -mx64m -classpath %CLASSPATH%
-Dweblogic.class.path=%WEBLOGICCLASSPATH% -Djava.security.manager
-Djava.security.policy=%WL%\weblogic.policy weblogic.Server


That should do it.

-russell

Simon Waddington wrote:

> Does anyone have a working startWebLogic.bat/cmd file that they can send me?
> No amount of fiddling with JAVACLASSPATH, WEBLOGICCLASSPATH, changing to
> JDK1.1, moving files to the current disk etc. etc. seems to help.
>
> If I don't have cocoon.jar on the JAVACLASSPATH I get the unable to load
> stylesheet exception, if I do I get a NoClassDefFound exception for one of
> the servlet classes and if I add the servlet Jar shipped with Cocoon 1.7 to
> either the claspath or WEBLOGICCLASSPATH the server fails to start at all.
> Maybe WebLogic 4.5.1 and Cocoon don't work at all?
>
> -----Original Message-----
> From: Simon Waddington [mailto:Simon@ZapNetworks.com]
> Sent: Monday, February 28, 2000 2:15 PM
> To: 'cocoon-users@xml.apache.org'
> Subject: RE: Cocoon 1.7 with WebLogic 4.5.1
>
> > Did you upgrade your cocoon.propererties file?
>
> Yes I did - I used a completely new Cocoon 1.7 tree.
>
> Since it looked like a class path problem I just tried adding all the cocoon
> related jars to the JAVACLASSPATH in my startWebLogic.bat as well as the
> WEBLOGICCLASSPATH.  Now I get a different exception which I'm not sure means
> I got further or have a different problem altogether...
>
> Mon Feb 28 14:07:47 PST 2000:<I> <ServletContext-Servlets>
> weblogic.servlet.File
> Servlet: init
> Mon Feb 28 14:07:50 PST 2000:<I> <ServletContext-Servlets>
> org.apache.cocoon.Coc
> oon: init
> Mon Feb 28 14:07:50 PST 2000:<E> <HTTP> Servlet request terminiated with
> Error:
>
> Mon Feb 28 14:07:50 PST 2000:<E> <HTTP> java.lang.NoClassDefFoundError:
> javax/servlet/ServletRequest
>         at org.apache.cocoon.Cocoon.init(Cocoon.java:119)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

--

Russell Castagnaro
Chief Mentor
SyncTank Solutions
http://www.synctank.com

Earth is the cradle of mankind; one does not remain in the cradle forever
-Tsiolkovsky