You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by sylviat <sy...@yahoo.com> on 2002/07/26 16:48:05 UTC

mutual exclusion on a page

Hello -

I am writing a database application where I want to
restrict update access to a particular table to one
user at a time.  What I want to do is implement some
sort of 'lock' that would be, in java servlets terms,
saved on the ServletContext level.  I am thinking that
I will write an action which checks and sets this
'lock' (probably just a boolean variable) to control
the pipeline which delivers the page containing update
capabilities.  

Here's the question: where/how in cocoon do I save a
'global setting', ie equivalent level to java 
ServletContext?  And/or is there a better way to
achieve mutual exclusion on the delivery of a
particular page than what I've described?

I'd be glad to read documentation on this subject if
someone could please point it out to me.  All of your
suggestions are appreciated.  Thanks.

Sylvia

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


xsp generating xml

Posted by Abhishek Goel <Ab...@morganstanley.com>.
hi,
i am generating my xml through xsp.
xml generated is like this(it's an examle of that tpe as original xml is
very large)

<?xml version="1.0" encoding="UTF-8" ?>
- <message xmlns:xsp="http://apache.org/xsp">
  <name>Hello</name>
  </message>

when i am passing this to sitemap  i am getting the error

"org.xml.sax.SAXParseException: The markup in the document preceding the
root element must be well-formed."
this is because of the "-" sign before <message> element.because as soon
as i remove that manually it works fine.

my xsp is

<?xml version="1.0"?>

<xsp:page language="java" xmlns:xsp="http://apache.org/xsp" >
        <message>
 <name>Hello in !</name></message>
 </xsp:page>

could any one suggest me how to get rid of this error.
Thanks and regards
Abhishek







RE: mutual exclusion on a page

Posted by sylviat <sy...@yahoo.com>.
Vadim, thanks very much.  Sylvia

--- Vadim Gritsenko <va...@verizon.net>
wrote:
> > From: sylviat [mailto:sylviat84@yahoo.com]
> > 
> > Hello -
> > 
> > I am writing a database application where I want
> to
> > restrict update access to a particular table to
> one
> > user at a time.  What I want to do is implement
> some
> > sort of 'lock' that would be, in java servlets
> terms,
> > saved on the ServletContext level.  I am thinking
> that
> > I will write an action which checks and sets this
> > 'lock' (probably just a boolean variable) to
> control
> > the pipeline which delivers the page containing
> update
> > capabilities.
> > 
> > Here's the question: where/how in cocoon do I save
> a
> > 'global setting', ie equivalent level to java
> > ServletContext? 
> 
>     public Map act(Redirector redirector,
> SourceResolver resolver,
>                    Map objectModel, String source,
> Parameters
> parameters)
>     throws Exception { 
>         Context context =
>            
> ObjectModelHelper.getContext(objectModel);
> 
> 
> 
> Vadim
> 
> 
> 
> > And/or is there a better way to
> > achieve mutual exclusion on the delivery of a
> > particular page than what I've described?
> > 
> > I'd be glad to read documentation on this subject
> if
> > someone could please point it out to me.  All of
> your
> > suggestions are appreciated.  Thanks.
> > 
> > Sylvia
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Health - Feel better, live better
> > http://health.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:    
> <co...@xml.apache.org>
> > For additional commands, e-mail:  
> <co...@xml.apache.org>
> 
> 
>
---------------------------------------------------------------------
> 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:    
> <co...@xml.apache.org>
> For additional commands, e-mail:  
> <co...@xml.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: mutual exclusion on a page

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: sylviat [mailto:sylviat84@yahoo.com]
> 
> Hello -
> 
> I am writing a database application where I want to
> restrict update access to a particular table to one
> user at a time.  What I want to do is implement some
> sort of 'lock' that would be, in java servlets terms,
> saved on the ServletContext level.  I am thinking that
> I will write an action which checks and sets this
> 'lock' (probably just a boolean variable) to control
> the pipeline which delivers the page containing update
> capabilities.
> 
> Here's the question: where/how in cocoon do I save a
> 'global setting', ie equivalent level to java
> ServletContext? 

    public Map act(Redirector redirector, SourceResolver resolver,
                   Map objectModel, String source, Parameters
parameters)
    throws Exception { 
        Context context =
            ObjectModelHelper.getContext(objectModel);



Vadim



> And/or is there a better way to
> achieve mutual exclusion on the delivery of a
> particular page than what I've described?
> 
> I'd be glad to read documentation on this subject if
> someone could please point it out to me.  All of your
> suggestions are appreciated.  Thanks.
> 
> Sylvia
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.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:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>