No Cookies using 'Action'

2003-03-10 Thread Cassandra Bonner
Hi,

I've read through all the postings, and I don't see this issue
covered (except for one that's potentially related which i noted
later).  Hopefully that means this is a silly user-error on my part
and someone can quickly sort me out. :-)

We recently moved

FROM:

Solaris 2.6 server running apache 1.3.26, jdk1.3.1-b24, cocoon 2.0.3,
Tomcat 3.2.1

TO:

Solaris 2.7 (don't ask why - 9 is in the pipeline (-:), jdk1.3.1_07,
cocoon 2.0.3 (ie same version), and Catalina 4.1.18


Everything has gone smoothly for the most part, except one issue.

We have written an action which dynamically determines the name of
the stylesheet to apply.  This action looks at the cookies within the
request to determine if the cookie exists to display this tylesheet.
 
This was (and still is) working fine on our old server; but does not
work in the new environment because there are no cookies returned. 
Example snippet of relevant code from our action class :

 public Map act (Redirector redirector,
  SourceResolver resolver,
  Map objectModel,
  String source,
  Parameters params) {

//Get the request component from sitemap components
// NOTE: Tried ObjectModelHelper and objectModel.get

/* Request request = (Request)
   objectModel.get(Constants.REQUEST_OBJECT);
   Request request = (Request) objectModel.get(request);*/
   
Request request = ObjectModelHelper.getRequest(objectModel);

//Get an array of the client cookies 
Cookie[] cArr = request.getCookies();

Cookie c = null;
String VAL_RID = ;
   
if (cArr != null) {
  for (int q=0;qcArr.length;q ++) {
c = (Cookie) cArr[q];
 //cookie found so set contain user to true
 //check is it user cookie or not
 if (c.getName().equals(RESELLER_COOKIE)) {
   VAL_RID = c.getValue();
 }
   }
 }


For some reason, the array of cookies (cArr in this example) is
coming back null.  We do not see the cookies even though they are
there.

We use this exact same code from within our xsp page, except as you
are aware, the request is available from within the xsp page so we
don't have to retrieve the request.

The cookies are available from within the xsp (on both the old and
the new server) but not from within the
action code.  For a given request, both code sets are called, and the
cookies are seen in the xsp page but not in the action.

The only post I saw remotely related to this was around catalina
sessions. We are not using sessions, but the post said that if the
session is picked up by catalina before the cookies, the cookies are
dropped.  This wouldn't explain why the cookies are available from
within the xsp but not the action, but just thought I'd make a
mention.

Any ideas you might have will be greatly appreciated.

tia,
cass

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cocoon2: BrowserImpl, filtering bytes

2001-09-05 Thread Cassandra Bonner

Hi,

Does anyone know where I can get a little more info on the browser
categories implementation for cocoon2?  We're using media types to
write different stylesheets to various media types with no issues,
but I'm looking for a scalable way to filter the number of bytes
sent to a particular device (particularly in the wap realm).  

I was looking at the rdf in
org.apache.cocoon.components.browser.BrowserImpl.xml, and found the
following particularly interesting line in the phone.com browser
category: 

prf:WmlDeckSize1400/prf:WmlDeckSize

Anyone know if this should actually limit the deck size for a
response to a phone.com user-agent (I don't think it will, but that'd
be cool!) Or- is it just a parameter available so that we can write
code to limit based on the device.  If the latter is the case, how do
we access this parameter from an xsp page, and how do we add
additional parameters?

According the dtd for the sitemap, it doesn't look like we can add
anything in that.  If anyone has any info on these or links to info,
it'd be greatly appreciated.

I've cc'd the author on this message in case he/she (sorry, not sure
if ovidiu is feminine/masculine) does not check this list (apologies
in advance if itis not appropriate to cc authors).

thanks in advance,
cass




__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

-
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: Cocoon2 and logicsheets

2001-09-02 Thread Cassandra Bonner

Has anyone found a detailed answer to these questions?  There was a
similar question a while back...


http://mailman.real-time.com/pipermail/cocoon-users/2001-June/016332.html


If anyone can detail how to setup a logicsheet within cocoon2, that'd
be great.  I can't even get the built-in logicsheets to work.  If i
add the following into my cocoon.xconf (print.xsl is a simple test
that prints to stdout), I get the error below.  I've tried it both as
a resource and file.  I've also tried combinations of the posting
above, but to no avail.  

builtin-logicsheet
  parameter name=prefix value=print/
  parameter name=uri value=http://cwo.com.au/mid/print/
  parameter name=href
value=resource://content/cocoon/tomcat/java/au/com/optus/core/util/print.xsl/
  !--
  parameter name=href
value=file:///content/cocoon/tomcat/java/au/com/optus/core/util/print.xsl/
  --
/builtin-logicsheet


ERROR MESSAGE:
===

2001-09-03 09:42:28 - path=/cocoon :ERROR   99947   [cocoon  ]
(Thread-28): processing of resource failed
org.apache.cocoon.ResourceNotFoundException: markup-languages:
ComponentSelector could not access the Component for hint: xsp:
org.apache.avalon.framework.component.ComponentException:
markup-languages: ComponentSelector could not access the Component f
or hint: xsp


thanks in advance,
cass


--- Uwe Reimann [EMAIL PROTECTED] wrote:
 Hi there.
 I found out that writing a logicsheet and defining it as
 builtin-logicsheet in cocoon.xconf works fine. Is that the only way
 logicsheets work?
 
 CU, Uwe
 
 Philip Doyle wrote:
  
  Hi
  
  I've been struggling with logisheets in C2 also and would be
 grateful for
  any help or pointers to making them work.
  
  I want to add a new tag library and am presuming that the ref to
 this goes
  into cocoon.xconf but don't know how to make my xsp page use my
 new custom
  tags.
  
  many thanks
  Phil
  
  -Original Message-
  From: Uwe Reimann [mailto:[EMAIL PROTECTED]]
  Sent: 25 July 2001 16:24
  To: [EMAIL PROTECTED]
  Subject: Cocoon2 and logicsheets
  
  Hi there,
  
  did anybody figure out how to use a logicsheet with cocoon 2? I
 tried to
  get greeting3.xml from the xsp-guide to work, but I got a
  IllegalAccessException.
  
  CU, Uwe
  
 

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


__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

-
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: C2 request object

2001-08-14 Thread Cassandra Bonner

Hmmm,

we hit this as well while migrating, but i assumed from the posting
below that there is no way to get to the
javax.servlet.HttpServletReq/Resp.?.  

I've moved to the cocoon req,resp (which according to this posting is
more generic), but I don't understand how this will be portable.  As
you, I have java code called outside my xsp pages (not beans, but
manager classes) that uses the req and resp, which now has to be
coded with cocoon req resp.

Anyways, the posting might offer some consolation.?.  If you find a
way to use javax.servlet.*, pls post to group.

http://mailman.real-time.com/pipermail/cocoon-users/2001-April/013154.html

thanks!
cass


--- Paul Lamb [EMAIL PROTECTED] wrote:
 I'm porting some c1 code over and need to get the actual
 javax.servlet.http.HttpServletRequest object in a xsp page so that
 it
 can be passed to another bean. 
 
 Casting the request object doesn't work and I can't find a
 getRequest()
 method.
 
 Any suggesting are appreciated.
 
 Paul Lamb
 

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


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-
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: Now you see ant, Now you don't

2001-07-29 Thread Cassandra Bonner

this is likely because the files delivered in the release are in DOS
ormat.  I was receiving this same message.

Just run dos2unix on the file (you'll also need to do this to antRun)

e.g. (from within the bin directory)
dos2unix ant ant
dos2unix antRun antRun

This will update the files from DOS format to ISO format.  

thanks,
cass


--- Ryan Worley [EMAIL PROTECTED] wrote:
 I'm trying to build cocoon.war from Cocoon 2.0b2 and keep getting
 the error:
 /usr/local/src/Cocoon/bin/ant - No such file or directory.  So I
 went
 directly to the bin directory, `cat ant` - displays the file,
 `./ant` - No
 such file or directory  what's going on?  When I `vi ant` there
 is a
 '[dos]' at the bottom of the screen.  Might the dos formatted file
 have
 something to do with bash not finding and executing it?
 
 Thanks for any help,
 
 Ryan
 
 

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


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-
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: [C2] with Tomcat 3.2.1 under Solaris 2.6

2001-07-29 Thread Cassandra Bonner

Hi Tim,
 
Not sure if this will be useful as you may have tried this.

 No - as per my previous post, I'm laying off 'til I know the OS is
 set up
 properly for Java.

Sorry bout that.  This probably isn't a bad idea.

 Yeah - I thought I'd covered that in the original mail.  They're in
 the
 right place, and they're compiling - apparently correctly.  I
 thought about
 Write permissions early on, but they seem fine.

Must have missed your note about that.  I think this is your key to
solving the problem.  Set your classpath to the classpath in your
cocoon.log (i don't see it in your logfile snippet so it must be
above that or have been removed to reduce size).  Then go to where
the java files are generated and compile them.  Theoretically, it
should give you a compile error that will help you debug.

Another thing, whenever you make a change, blow away the
$TOMCAT_HOME/work/* to eliminate the potential that the changes
aren't getting picked up.  (you might be doing this already).  

 Yeah - I've done the same.  This isn't the problem I have at the
 moment, but
 I figured it would be the next one if I could get past this
 one.

 Thanks for the info.  Do you know _which_ of these changes fixed
 the
 original problem?  It shouldn't have been the graphics stuff, as
 the log
 messages for that problem are different.

good point.  unfortunately i can't say for sure, but i think you'll
debug it by trying to compile the files command line (at least that's
how i did).

cheers,
cass


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

-
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: [C2] with Tomcat 3.2.1 under Solaris 2.6

2001-07-27 Thread Cassandra Bonner

Hi Tim,

Not sure if you've already figured out your problem, but I finally
got mine running (sort of) :-), so i thought i'd suggest a couple of
things...

1.  Are your org.apache.cocoon.www.sitemap_xmap classes actually
getting created under...

/local/jakarta-tomcat-3.2.2/work/localhost_8080%2Fcocoon

If so, see if they're compiling.  It sounds like these might not be
getting created.  Might be a write permission??  It doesn't complain
about not being able to compile the sitemap.

2. There was probably another was to solve this, but I ended up
having to remove the following lines from my main sitemap.xmap.  It
was complaining about missing classes.  I had my DISPLAY set and that
didn't help.

map:serializer name=vrml   mime-type=model/vrml  
src=org.apache.cocoon.serialization.TextSerializer/

map:serializer name=svgxml mime-type=image/svg-xml   
src=org.apache.cocoon.serialization.XMLSerializer
doctype-public-//W3C//DTD SVG 2303
Stylable//EN/doctype-public
doctype-systemhttp://www.w3.org/TR/2000/03/WD-SVG-2303//doctype-system
/map:serializer
map:serializer name=svg2jpeg mime-type=image/jpeg
src=org.apache.cocoon.serialization.SVGSerializer
!-- example parameter - background colour is bright green
parameter name=background_color type=color value=#00FF00/
--
/map:serializer
map:serializer name=svg2png mime-type=image/png  
src=org.apache.cocoon.serialization.SVGSerializer
/map:serializer
map:serializer name=fo2pdf
src=org.apache.cocoon.serialization.FOPSerializer
mime-type=application/pdf/


3.  As you probably know, ignore the ibm error, that's a weblogic's
thing, and beta1 has this listed in the cocoon.xconf.  You can also
remove this line from your conf file as well.  Just didn't want you
chasing that one up as i did until i saw a posting about it.

thanks,
cass




--- Bentley, Tim [EMAIL PROTECTED] wrote:
 Christophe -
 
 Thanks for the reply.
 
  You should try with JDK 1.3.1, I am also running C2 on 
  Solaris 7 and it works.
 
 Hmm.  Unfortunately others have reported the same symptoms with
 1.3.1, so I
 don't think that is the issue (although I will try it at some
 stage).
 
  Also, don't forget to set the DISPLAY environment variable to 
  localhost:0.0
  Christophe
 
 That's related to the batik library wanting an X server, right?  I
 have
 tried to follow Berin's suggestions about removing references which
 will
 trigger this.  From what I understand, though, you get different
 log
 messages with this problem to the ones I have been seeing.  The
 references
 to it in the archive show specific messages from the batik (I
 think)
 library, which I don't get.
 
 When I started on this, I was told that Java was properly installed
 on the
 machine in question, however, after temporarily exhausting all the
 other
 possibilities I checked this out for myself this morning, and
 discovered
 that the appropriate Solaris patches mandated by Sun for JDK1.3
 were not
 installed.  I doubt that this is the issue, but I am going to wait
 for the
 Sysadmin to update the OS before I do any more testing, just to be
 on the
 safe side.
 
 
 Thanks :-)
 
 
 Tim
 
 
 
  Bentley, Tim a écrit :
  
   After successfully running C2 for some time under NT, I 
  recently had to get
   it going on Solaris 2.7.  I have been running into a 
  problem which is
   mentioned a few times in the archives as occurring with 
  various versions of
   Solaris.  Unfortunately I have not been able to find any 
  posts detailing a
   solution.
  
   Has anyone successfully got C2 going with Tomcat 3.2 on
 Solaris?
  
   The problem I'm getting is the old faithful Could not load 
  class for
   program 'org/apache/cocoon/www/sitemap_xmap' , but the 
  sitemap _is_ being
   compiled and written to the repository.
  
   The log file is attached, and matches the log files on the 
  posts I found
   about problems on solaris.  maybe I have just failed to 
  find the posts with
   the answer, so if anyone can point me in the right direction
 I'd be
   obliged
  
   Setup:
  
   Solaris 1.7, Sun JDK 1.3.0, Tomcat 3.2.2, C2 beta 1 (also 
  tried current dev
   release).
  
   Regards,
  
   Tim Bentley
  
   
 

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