How to submit form to Java Servlet

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

How to submit form to Java Servlet

Bill Moo
Hello All,

I'm confused, which I know may well be easy but all I want to do is
post an XForms form to my Servlet for processing, but I simply cannot
get it to work as expected.

This is my submission:
<xforms:submission id="login-submit" ref="instance('login-instance')"
resource="/Login/login/" method="post" replace="none">
</xforms:submission>

And this is defined within my model like this ;

<xforms:model>
  <xforms:instance id='login-instance'>
        ...
  </xforms:instance>
  <xforms:bind ... />
  <xforms:submission ... />
</xforms:model>

And a Submit button defined like this :

<xforms:submit submission="login-submit">
      <xforms:label>Login</xforms:label>
</xforms:submit>

My form displays and I can enter the details but when I click the
Login button I get nothing! I know it is something I've done or not
done as the Servlet works with a standard HTML form, so your comments
would be appreciated.

P.S. This is my very first form based on the tutorial.

--
Bill


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: How to submit form to Java Servlet

mactwixs
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: RE: How to submit form to Java Servlet

Bill Moo
Hello Ian,

I am not to sure what you mean by enabled for PUT/POST, but I am using
Tomcat 7.0.32 and the method defined in login.java is doPost(...)

So I hope this helps.
--
Bill

On 10/19/12, MCGRAW Ian <[hidden email]> wrote:

> Hi Bill
>
> Is your server enabled for PUT/POST? Had a similar thing myself with
> Tomcat.
>
> -----Original Message-----
> From: Bill Moo [mailto:[hidden email]]
> Sent: 19 October 2012 09:41
> To: ops-users
> Subject: [ops-users] How to submit form to Java Servlet
>
> Hello All,
>
> I'm confused, which I know may well be easy but all I want to do is post an
> XForms form to my Servlet for processing, but I simply cannot get it to work
> as expected.
>
> This is my submission:
> <xforms:submission id="login-submit" ref="instance('login-instance')"
> resource="/Login/login/" method="post" replace="none"> </xforms:submission>
>
> And this is defined within my model like this ;
>
> <xforms:model>
>   <xforms:instance id='login-instance'>
> ...
>   </xforms:instance>
>   <xforms:bind ... />
>   <xforms:submission ... />
> </xforms:model>
>
> And a Submit button defined like this :
>
> <xforms:submit submission="login-submit">
>       <xforms:label>Login</xforms:label>
> </xforms:submit>
>
> My form displays and I can enter the details but when I click the Login
> button I get nothing! I know it is something I've done or not done as the
> Servlet works with a standard HTML form, so your comments would be
> appreciated.
>
> P.S. This is my very first form based on the tutorial.
>
> --
> Bill
>

--
Bill


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: How to submit form to Java Servlet

Bill Moo
Update :

I have changed the replace attribute of the submission element to
"all" and now when I click the Login button the page goes blank and
the URL in the browser changes to :

http://test/Login/orbeon/xforms-server-submit

Needless to say this is is not what I want, I've tried changing the method to :
urlencoded-post and I get the same result.

Can anyone help me here?

--
Bill

On 10/19/12, Bill Moo <[hidden email]> wrote:

> Hello Ian,
>
> I am not to sure what you mean by enabled for PUT/POST, but I am using
> Tomcat 7.0.32 and the method defined in login.java is doPost(...)
>
> So I hope this helps.
> --
> Bill
>
> On 10/19/12, MCGRAW Ian <[hidden email]> wrote:
>> Hi Bill
>>
>> Is your server enabled for PUT/POST? Had a similar thing myself with
>> Tomcat.
>>
>> -----Original Message-----
>> From: Bill Moo [mailto:[hidden email]]
>> Sent: 19 October 2012 09:41
>> To: ops-users
>> Subject: [ops-users] How to submit form to Java Servlet
>>
>> Hello All,
>>
>> I'm confused, which I know may well be easy but all I want to do is post
>> an
>> XForms form to my Servlet for processing, but I simply cannot get it to
>> work
>> as expected.
>>
>> This is my submission:
>> <xforms:submission id="login-submit" ref="instance('login-instance')"
>> resource="/Login/login/" method="post" replace="none">
>> </xforms:submission>
>>
>> And this is defined within my model like this ;
>>
>> <xforms:model>
>>   <xforms:instance id='login-instance'>
>> ...
>>   </xforms:instance>
>>   <xforms:bind ... />
>>   <xforms:submission ... />
>> </xforms:model>
>>
>> And a Submit button defined like this :
>>
>> <xforms:submit submission="login-submit">
>>       <xforms:label>Login</xforms:label>
>> </xforms:submit>
>>
>> My form displays and I can enter the details but when I click the Login
>> button I get nothing! I know it is something I've done or not done as the
>> Servlet works with a standard HTML form, so your comments would be
>> appreciated.
>>
>> P.S. This is my very first form based on the tutorial.
>>
>> --
>> Bill
>>
>
>
> --
> Bill
>

--
Bill


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: How to submit form to Java Servlet

mactwixs
In reply to this post by Bill Moo
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: RE: How to submit form to Java Servlet

Bill Moo
Thanks for that Ian, but are you telling me that orbeon does not support post?

To be honest I don't want to change this I want to use post.

--
Bill

On 10/19/12, MCGRAW Ian <[hidden email]> wrote:

> See
> http://www.codereye.com/2010/12/configure-tomcat-to-accept-http-put.html
>
> -----Original Message-----
> From: Bill Moo [mailto:[hidden email]]
> Sent: 19 October 2012 09:55
> To: [hidden email]
> Subject: [ops-users] Re: RE: How to submit form to Java Servlet
>
> Hello Ian,
>
> I am not to sure what you mean by enabled for PUT/POST, but I am using
> Tomcat 7.0.32 and the method defined in login.java is doPost(...)
>
> So I hope this helps.
> --
> Bill
>
> On 10/19/12, MCGRAW Ian <[hidden email]> wrote:
>> Hi Bill
>>
>> Is your server enabled for PUT/POST? Had a similar thing myself with
>> Tomcat.
>>
>> -----Original Message-----
>> From: Bill Moo [mailto:[hidden email]]
>> Sent: 19 October 2012 09:41
>> To: ops-users
>> Subject: [ops-users] How to submit form to Java Servlet
>>
>> Hello All,
>>
>> I'm confused, which I know may well be easy but all I want to do is
>> post an XForms form to my Servlet for processing, but I simply cannot
>> get it to work as expected.
>>
>> This is my submission:
>> <xforms:submission id="login-submit" ref="instance('login-instance')"
>> resource="/Login/login/" method="post" replace="none">
>> </xforms:submission>
>>
>> And this is defined within my model like this ;
>>
>> <xforms:model>
>>   <xforms:instance id='login-instance'>
>> ...
>>   </xforms:instance>
>>   <xforms:bind ... />
>>   <xforms:submission ... />
>> </xforms:model>
>>
>> And a Submit button defined like this :
>>
>> <xforms:submit submission="login-submit">
>>       <xforms:label>Login</xforms:label>
>> </xforms:submit>
>>
>> My form displays and I can enter the details but when I click the
>> Login button I get nothing! I know it is something I've done or not
>> done as the Servlet works with a standard HTML form, so your comments
>> would be appreciated.
>>
>> P.S. This is my very first form based on the tutorial.
>>
>> --
>> Bill
>>
>
>
> --
> Bill
>

--
Bill


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Re: RE: How to submit form to Java Servlet

mactwixs
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: RE: Re: RE: Re: RE: How to submit form to Java Servlet

Bill Moo
Hello again, thanks for your time but I'm not going to be using Orbeon
as for the moment I don't have the time to deal with it.

--
Bill

On 10/22/12, MCGRAW Ian <[hidden email]> wrote:

> No put and post are both supported. This is Tomcat's settings - default is
> for readonly
>
> -----Original Message-----
> From: Bill Moo [mailto:[hidden email]]
> Sent: 19 October 2012 12:32
> To: [hidden email]
> Subject: [ops-users] Re: RE: Re: RE: How to submit form to Java Servlet
>
> Thanks for that Ian, but are you telling me that orbeon does not support
> post?
>
> To be honest I don't want to change this I want to use post.
>
> --
> Bill
>
> On 10/19/12, MCGRAW Ian <[hidden email]> wrote:
>> See
>> http://www.codereye.com/2010/12/configure-tomcat-to-accept-http-put.ht
>> ml
>>
>> -----Original Message-----
>> From: Bill Moo [mailto:[hidden email]]
>> Sent: 19 October 2012 09:55
>> To: [hidden email]
>> Subject: [ops-users] Re: RE: How to submit form to Java Servlet
>>
>> Hello Ian,
>>
>> I am not to sure what you mean by enabled for PUT/POST, but I am using
>> Tomcat 7.0.32 and the method defined in login.java is doPost(...)
>>
>> So I hope this helps.
>> --
>> Bill
>>
>> On 10/19/12, MCGRAW Ian <[hidden email]> wrote:
>>> Hi Bill
>>>
>>> Is your server enabled for PUT/POST? Had a similar thing myself with
>>> Tomcat.
>>>
>>> -----Original Message-----
>>> From: Bill Moo [mailto:[hidden email]]
>>> Sent: 19 October 2012 09:41
>>> To: ops-users
>>> Subject: [ops-users] How to submit form to Java Servlet
>>>
>>> Hello All,
>>>
>>> I'm confused, which I know may well be easy but all I want to do is
>>> post an XForms form to my Servlet for processing, but I simply cannot
>>> get it to work as expected.
>>>
>>> This is my submission:
>>> <xforms:submission id="login-submit" ref="instance('login-instance')"
>>> resource="/Login/login/" method="post" replace="none">
>>> </xforms:submission>
>>>
>>> And this is defined within my model like this ;
>>>
>>> <xforms:model>
>>>   <xforms:instance id='login-instance'>
>>> ...
>>>   </xforms:instance>
>>>   <xforms:bind ... />
>>>   <xforms:submission ... />
>>> </xforms:model>
>>>
>>> And a Submit button defined like this :
>>>
>>> <xforms:submit submission="login-submit">
>>>       <xforms:label>Login</xforms:label>
>>> </xforms:submit>
>>>
>>> My form displays and I can enter the details but when I click the
>>> Login button I get nothing! I know it is something I've done or not
>>> done as the Servlet works with a standard HTML form, so your comments
>>> would be appreciated.
>>>
>>> P.S. This is my very first form based on the tutorial.
>>>
>>> --
>>> Bill
>>>
>>
>>
>> --
>> Bill
>>
>
>
> --
> Bill
>

--
Bill


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: Re: RE: Re: RE: Re: RE: How to submit form to Java Servlet

mactwixs
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Re: RE: Re: RE: How to submit form to Java Servlet

Erik Bruchez
Administrator
In reply to this post by Bill Moo
No, of course Orbeon supports POST! -Erik

On Fri, Oct 19, 2012 at 4:31 AM, Bill Moo <[hidden email]> wrote:

> Thanks for that Ian, but are you telling me that orbeon does not support post?
>
> To be honest I don't want to change this I want to use post.
>
> --
> Bill
>
> On 10/19/12, MCGRAW Ian <[hidden email]> wrote:
>> See
>> http://www.codereye.com/2010/12/configure-tomcat-to-accept-http-put.html
>>
>> -----Original Message-----
>> From: Bill Moo [mailto:[hidden email]]
>> Sent: 19 October 2012 09:55
>> To: [hidden email]
>> Subject: [ops-users] Re: RE: How to submit form to Java Servlet
>>
>> Hello Ian,
>>
>> I am not to sure what you mean by enabled for PUT/POST, but I am using
>> Tomcat 7.0.32 and the method defined in login.java is doPost(...)
>>
>> So I hope this helps.
>> --
>> Bill
>>
>> On 10/19/12, MCGRAW Ian <[hidden email]> wrote:
>>> Hi Bill
>>>
>>> Is your server enabled for PUT/POST? Had a similar thing myself with
>>> Tomcat.
>>>
>>> -----Original Message-----
>>> From: Bill Moo [mailto:[hidden email]]
>>> Sent: 19 October 2012 09:41
>>> To: ops-users
>>> Subject: [ops-users] How to submit form to Java Servlet
>>>
>>> Hello All,
>>>
>>> I'm confused, which I know may well be easy but all I want to do is
>>> post an XForms form to my Servlet for processing, but I simply cannot
>>> get it to work as expected.
>>>
>>> This is my submission:
>>> <xforms:submission id="login-submit" ref="instance('login-instance')"
>>> resource="/Login/login/" method="post" replace="none">
>>> </xforms:submission>
>>>
>>> And this is defined within my model like this ;
>>>
>>> <xforms:model>
>>>   <xforms:instance id='login-instance'>
>>>      ...
>>>   </xforms:instance>
>>>   <xforms:bind ... />
>>>   <xforms:submission ... />
>>> </xforms:model>
>>>
>>> And a Submit button defined like this :
>>>
>>> <xforms:submit submission="login-submit">
>>>              <xforms:label>Login</xforms:label>
>>> </xforms:submit>
>>>
>>> My form displays and I can enter the details but when I click the
>>> Login button I get nothing! I know it is something I've done or not
>>> done as the Servlet works with a standard HTML form, so your comments
>>> would be appreciated.
>>>
>>> P.S. This is my very first form based on the tutorial.
>>>
>>> --
>>> Bill
>>>
>>
>>
>> --
>> Bill
>>
>
>
> --
> Bill
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: RE: Re: RE: Re: RE: How to submit form to Java Servlet

Erik Bruchez
Administrator
In reply to this post by Bill Moo
Bill,

Sorry to hear that. Anyway, you might have tried an absolute URL to
post to your servlet, to see if that's part of the problem:

resource="http://my.server/Login/login/"

-Erik

On Mon, Oct 22, 2012 at 8:46 AM, Bill Moo <[hidden email]> wrote:

> Hello again, thanks for your time but I'm not going to be using Orbeon
> as for the moment I don't have the time to deal with it.
>
> --
> Bill
>
> On 10/22/12, MCGRAW Ian <[hidden email]> wrote:
>> No put and post are both supported. This is Tomcat's settings - default is
>> for readonly
>>
>> -----Original Message-----
>> From: Bill Moo [mailto:[hidden email]]
>> Sent: 19 October 2012 12:32
>> To: [hidden email]
>> Subject: [ops-users] Re: RE: Re: RE: How to submit form to Java Servlet
>>
>> Thanks for that Ian, but are you telling me that orbeon does not support
>> post?
>>
>> To be honest I don't want to change this I want to use post.
>>
>> --
>> Bill
>>
>> On 10/19/12, MCGRAW Ian <[hidden email]> wrote:
>>> See
>>> http://www.codereye.com/2010/12/configure-tomcat-to-accept-http-put.ht
>>> ml
>>>
>>> -----Original Message-----
>>> From: Bill Moo [mailto:[hidden email]]
>>> Sent: 19 October 2012 09:55
>>> To: [hidden email]
>>> Subject: [ops-users] Re: RE: How to submit form to Java Servlet
>>>
>>> Hello Ian,
>>>
>>> I am not to sure what you mean by enabled for PUT/POST, but I am using
>>> Tomcat 7.0.32 and the method defined in login.java is doPost(...)
>>>
>>> So I hope this helps.
>>> --
>>> Bill
>>>
>>> On 10/19/12, MCGRAW Ian <[hidden email]> wrote:
>>>> Hi Bill
>>>>
>>>> Is your server enabled for PUT/POST? Had a similar thing myself with
>>>> Tomcat.
>>>>
>>>> -----Original Message-----
>>>> From: Bill Moo [mailto:[hidden email]]
>>>> Sent: 19 October 2012 09:41
>>>> To: ops-users
>>>> Subject: [ops-users] How to submit form to Java Servlet
>>>>
>>>> Hello All,
>>>>
>>>> I'm confused, which I know may well be easy but all I want to do is
>>>> post an XForms form to my Servlet for processing, but I simply cannot
>>>> get it to work as expected.
>>>>
>>>> This is my submission:
>>>> <xforms:submission id="login-submit" ref="instance('login-instance')"
>>>> resource="/Login/login/" method="post" replace="none">
>>>> </xforms:submission>
>>>>
>>>> And this is defined within my model like this ;
>>>>
>>>> <xforms:model>
>>>>   <xforms:instance id='login-instance'>
>>>>     ...
>>>>   </xforms:instance>
>>>>   <xforms:bind ... />
>>>>   <xforms:submission ... />
>>>> </xforms:model>
>>>>
>>>> And a Submit button defined like this :
>>>>
>>>> <xforms:submit submission="login-submit">
>>>>             <xforms:label>Login</xforms:label>
>>>> </xforms:submit>
>>>>
>>>> My form displays and I can enter the details but when I click the
>>>> Login button I get nothing! I know it is something I've done or not
>>>> done as the Servlet works with a standard HTML form, so your comments
>>>> would be appreciated.
>>>>
>>>> P.S. This is my very first form based on the tutorial.
>>>>
>>>> --
>>>> Bill
>>>>
>>>
>>>
>>> --
>>> Bill
>>>
>>
>>
>> --
>> Bill
>>
>
>
> --
> Bill
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws