You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Pratik Das <Pr...@skytechsolutions.co.in> on 2004/08/20 16:21:28 UTC

submitting forms in Lenya

I have a form in my page as given below:
  <form  action="send-a-mail" method="post" enctype="multipart/form-data">
       <input name="cl"/>
       <input name="cl1"/>
       <input type="submit" name="submit" value="submit"/>
     </form>

I have defined the following pipeline with a matcher for send-a-mail. But 
when I submit I always get a error message as "
The requested document '/contact/send-a-mail' with document-id 
'/contact/send-a-mail' does not exist." I want to send the request to an 
xsp page which will capture the form parameters and send out a mail. Can 
anyone tell me where I am going wrong?
"
     <map:pipeline>
      <map:match pattern="**send-a-mail">
         <map:generate 
src="cocoon:/lenyabody-view/{page-envelope:publication-id}/{page-envelope:area}/sendmail.xsp" 
type="serverpages"/>
         <map:serialize/>
      </map:match>
    </map:pipeline>

AW: submitting forms in Lenya

Posted by Torsten Schlabach <ts...@gmx.net>.
Hi!

 

I in fact solved my problem over the weekend. I am not sure to what extent
it will be applicable to your situation. What I was trying to finish was
using Cocoon Forms and Flowscript in Lenya. (See:
http://wiki.apache.org/cocoon-lenya/CFormsInLenyaHowto; yet unfinished.)

 

Andreas Hartmann wrote:

 

>> > You should disable error handling

 

After having spent three days on this subject I found that this seems to be
impossible. The whole framework gets entirely confused as soon as you try to
render anything that does no match the original URI. I am not sure if this
is a bug or a feature.

 

I got around it by simple using a <map:redirect-to uri= "cocoon:/ ."/ >.
This de-couples the original URI from the stuff you try to render.

 

Reading your original mail again I am not sure your problem is comparable,
but just let me know:

 

Does the mail get send and you get the error message afterwards?

 

Is you pipeline matched at all? If you are not sure, set the debug level for
sitemap to DEBUG in WEB-INF/logkit.xconf and grep for Matcher.*matched.

 

Torsten

 

  _____  

Von: Pratik Das [mailto:PratikD@skytechsolutions.co.in] 
Gesendet: Montag, 23. August 2004 10:15
An: Lenya Users List
Betreff: Re: submitting forms in Lenya

 


Let me know if you manage to solve ypur problem I am still wondering why it
is looking for a document_id on form submission. 




"Torsten Schlabach" <TS...@gmx.net> 

08/20/2004 10:17 PM 


Please respond to
"Lenya Users List" <le...@cocoon.apache.org>


To

"Lenya Users List" <le...@cocoon.apache.org> 


cc

 


Subject

Re: submitting forms in Lenya

 


 

 




>> You should disable error handling

And how can that easily be done?
I tried to do that in a similar context but I kept getting the error pages.

Torsten

> Pratik Das wrote:
> 
> > 
> > I have a form in my page as given below:
> >   <form  action="send-a-mail" method="post"
> enctype="multipart/form-data">
> >        <input name="cl"/>
> >        <input name="cl1"/>
> >        <input type="submit" name="submit" value="submit"/>
> >      </form>
> > 
> > I have defined the following pipeline with a matcher for send-a-mail. 
> > But when I submit I always get a error message as "
> > The requested document '/contact/send-a-mail' with document-id 
> > '/contact/send-a-mail' does not exist." I want to send the request to an
> > xsp page which will capture the form parameters and send out a mail. Can
> > anyone tell me where I am going wrong?
> 
> You should disable error handling, the screen you get is just an
> exception handler. Alternatively, you could consult the log files.
> 
> -- Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
> 


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




Re: submitting forms in Lenya

Posted by Pratik Das <Pr...@skytechsolutions.co.in>.
Let me know if you manage to solve ypur problem I am still wondering why 
it is looking for a document_id on form submission.



"Torsten Schlabach" <TS...@gmx.net> 
08/20/2004 10:17 PM
Please respond to
"Lenya Users List" <le...@cocoon.apache.org>


To
"Lenya Users List" <le...@cocoon.apache.org>
cc

Subject
Re: submitting forms in Lenya






>> You should disable error handling

And how can that easily be done?
I tried to do that in a similar context but I kept getting the error 
pages.

Torsten

> Pratik Das wrote:
> 
> > 
> > I have a form in my page as given below:
> >   <form  action="send-a-mail" method="post"
> enctype="multipart/form-data">
> >        <input name="cl"/>
> >        <input name="cl1"/>
> >        <input type="submit" name="submit" value="submit"/>
> >      </form>
> > 
> > I have defined the following pipeline with a matcher for send-a-mail. 
> > But when I submit I always get a error message as "
> > The requested document '/contact/send-a-mail' with document-id 
> > '/contact/send-a-mail' does not exist." I want to send the request to 
an
> > xsp page which will capture the form parameters and send out a mail. 
Can
> > anyone tell me where I am going wrong?
> 
> You should disable error handling, the screen you get is just an
> exception handler. Alternatively, you could consult the log files.
> 
> -- Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
> 


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



Re: submitting forms in Lenya

Posted by Torsten Schlabach <TS...@gmx.net>.
>> You should disable error handling

And how can that easily be done?
I tried to do that in a similar context but I kept getting the error pages.

Torsten

> Pratik Das wrote:
> 
> > 
> > I have a form in my page as given below:
> >   <form  action="send-a-mail" method="post"
> enctype="multipart/form-data">
> >        <input name="cl"/>
> >        <input name="cl1"/>
> >        <input type="submit" name="submit" value="submit"/>
> >      </form>
> > 
> > I have defined the following pipeline with a matcher for send-a-mail. 
> > But when I submit I always get a error message as "
> > The requested document '/contact/send-a-mail' with document-id 
> > '/contact/send-a-mail' does not exist." I want to send the request to an
> > xsp page which will capture the form parameters and send out a mail. Can
> > anyone tell me where I am going wrong?
> 
> You should disable error handling, the screen you get is just an
> exception handler. Alternatively, you could consult the log files.
> 
> -- Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
> 


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


Re: submitting forms in Lenya

Posted by Andreas Hartmann <an...@apache.org>.
Pratik Das wrote:

> 
> I have a form in my page as given below:
>   <form  action="send-a-mail" method="post" enctype="multipart/form-data">
>        <input name="cl"/>
>        <input name="cl1"/>
>        <input type="submit" name="submit" value="submit"/>
>      </form>
> 
> I have defined the following pipeline with a matcher for send-a-mail. 
> But when I submit I always get a error message as "
> The requested document '/contact/send-a-mail' with document-id 
> '/contact/send-a-mail' does not exist." I want to send the request to an 
> xsp page which will capture the form parameters and send out a mail. Can 
> anyone tell me where I am going wrong?

You should disable error handling, the screen you get is just an
exception handler. Alternatively, you could consult the log files.

-- Andreas


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