A very small problem with login

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

A very small problem with login

masjab-2
Hey all, 

I have a small problem:

My login.xhtml  that I got from an example was like this:
<p> Please enter your login and password </p>
                    <form action="/j_security_check" method="post">
                        <table>
                            <tr>
                                <td align="right">Login:</td>
                                <td><input name="j_username"/></td>
                            </tr>
                            <tr>
                                <td align="right">Password:</td>
                                <td><input type="password" name="j_password"/></td>
                            </tr>
                            <tr>
                                <td/><td>
                                    <input type="submit" value="Login"/></td>
                            </tr>
                        </table>
                    </form>

Now when I add a model:
<head>
        <title>Login</title>
        <xi:include href="oxf:/apps/2604/homepage/common/r-model.xml" xxi:omit-xml-base="true"/>
    </head>

my "login button" does not work anymore...=(

What am I doing wrong?
THX!!!!



--
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: A very small problem with login

Erik Bruchez
Administrator
I suspect the following: adding the XForms model causes the page to go  
through the XForms engine. This causes <form> elements to go around  
your existing <form> element, which causes things to break. You can  
check that by viewing the HTML source in your browser.

I would try to avoid mixing XForms and HTML forms here, especially for  
the login page.

-Erik

On Jun 25, 2008, at 3:50 AM, Masen J wrote:

> Hey all,
>
> I have a small problem:
>
> My login.xhtml  that I got from an example was like this:
> <p> Please enter your login and password </p>
>                     <form action="/j_security_check" method="post">
>                         <table>
>                             <tr>
>                                 <td align="right">Login:</td>
>                                 <td><input name="j_username"/></td>
>                             </tr>
>                             <tr>
>                                 <td align="right">Password:</td>
>                                 <td><input type="password"  
> name="j_password"/></td>
>                             </tr>
>                             <tr>
>                                 <td/><td>
>                                     <input type="submit"  
> value="Login"/></td>
>                             </tr>
>                         </table>
>                     </form>
>
> Now when I add a model:
> <head>
>         <title>Login</title>
>         <xi:include href="oxf:/apps/2604/homepage/common/r-
> model.xml" xxi:omit-xml-base="true"/>
>     </head>
>
> my "login button" does not work anymore...=(
>
> What am I doing wrong?
> THX!!!!
>
>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: A very small problem with login

Erik Bruchez
Administrator
In reply to this post by masjab-2
I suspect the following: adding the XForms model causes the page to go  
through the XForms engine. This causes <form> elements to go around  
your existing <form> element, which causes things to break. You can  
check that by viewing the HTML source in your browser.

I would try to avoid mixing XForms and HTML forms here, especially for  
the login page.

-Erik

On Jun 25, 2008, at 3:50 AM, Masen J wrote:

> Hey all,
>
> I have a small problem:
>
> My login.xhtml  that I got from an example was like this:
> <p> Please enter your login and password </p>
>                    <form action="/j_security_check" method="post">
>                        <table>
>                            <tr>
>                                <td align="right">Login:</td>
>                                <td><input name="j_username"/></td>
>                            </tr>
>                            <tr>
>                                <td align="right">Password:</td>
>                                <td><input type="password"  
> name="j_password"/></td>
>                            </tr>
>                            <tr>
>                                <td/><td>
>                                    <input type="submit"  
> value="Login"/></td>
>                            </tr>
>                        </table>
>                    </form>
>
> Now when I add a model:
> <head>
>        <title>Login</title>
>        <xi:include href="oxf:/apps/2604/homepage/common/r-model.xml"  
> xxi:omit-xml-base="true"/>
>    </head>
>
> my "login button" does not work anymore...=(
>
> What am I doing wrong?
> THX!!!!
>
>
> --
> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: A very small problem with login

masjab-2
ok, but what else can I do?

Am 26.06.2008 um 01:59 schrieb Erik Bruchez:

> I suspect the following: adding the XForms model causes the page to  
> go through the XForms engine. This causes <form> elements to go  
> around your existing <form> element, which causes things to break.  
> You can check that by viewing the HTML source in your browser.
>
> I would try to avoid mixing XForms and HTML forms here, especially  
> for the login page.
>
> -Erik
>
> On Jun 25, 2008, at 3:50 AM, Masen J wrote:
>
>> Hey all,
>>
>> I have a small problem:
>>
>> My login.xhtml  that I got from an example was like this:
>> <p> Please enter your login and password </p>
>>                   <form action="/j_security_check" method="post">
>>                       <table>
>>                           <tr>
>>                               <td align="right">Login:</td>
>>                               <td><input name="j_username"/></td>
>>                           </tr>
>>                           <tr>
>>                               <td align="right">Password:</td>
>>                               <td><input type="password"  
>> name="j_password"/></td>
>>                           </tr>
>>                           <tr>
>>                               <td/><td>
>>                                   <input type="submit"  
>> value="Login"/></td>
>>                           </tr>
>>                       </table>
>>                   </form>
>>
>> Now when I add a model:
>> <head>
>>       <title>Login</title>
>>       <xi:include href="oxf:/apps/2604/homepage/common/r-model.xml"  
>> xxi:omit-xml-base="true"/>
>>   </head>
>>
>> my "login button" does not work anymore...=(
>>
>> What am I doing wrong?
>> THX!!!!
>>
>>
>> --
>> 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
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>
> --
> 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: A very small problem with login

Erik Bruchez
Administrator
Well, what do you want to do with this login page? Often, login pages  
just have that username and password fields.

-Erik

On Jun 25, 2008, at 5:23 PM, Masen J wrote:

> ok, but what else can I do?
>
> Am 26.06.2008 um 01:59 schrieb Erik Bruchez:
>
>> I suspect the following: adding the XForms model causes the page to  
>> go through the XForms engine. This causes <form> elements to go  
>> around your existing <form> element, which causes things to break.  
>> You can check that by viewing the HTML source in your browser.
>>
>> I would try to avoid mixing XForms and HTML forms here, especially  
>> for the login page.
>>
>> -Erik
>>
>> On Jun 25, 2008, at 3:50 AM, Masen J wrote:
>>
>>> Hey all,
>>>
>>> I have a small problem:
>>>
>>> My login.xhtml  that I got from an example was like this:
>>> <p> Please enter your login and password </p>
>>>                  <form action="/j_security_check" method="post">
>>>                      <table>
>>>                          <tr>
>>>                              <td align="right">Login:</td>
>>>                              <td><input name="j_username"/></td>
>>>                          </tr>
>>>                          <tr>
>>>                              <td align="right">Password:</td>
>>>                              <td><input type="password"  
>>> name="j_password"/></td>
>>>                          </tr>
>>>                          <tr>
>>>                              <td/><td>
>>>                                  <input type="submit"  
>>> value="Login"/></td>
>>>                          </tr>
>>>                      </table>
>>>                  </form>
>>>
>>> Now when I add a model:
>>> <head>
>>>      <title>Login</title>
>>>      <xi:include href="oxf:/apps/2604/homepage/common/r-model.xml"  
>>> xxi:omit-xml-base="true"/>
>>>  </head>
>>>
>>> my "login button" does not work anymore...=(
>>>
>>> What am I doing wrong?
>>> THX!!!!
>>>
>>>
>>> --
>>> 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
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>>
>> --
>> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: A very small problem with login

masjab-2
ja,
I just want an login-page for my app...
I have a security-constraint in my tomcat.
Thats all...
Do you mean I should just write a "login.xhtml"  as an orbeon-form  
with two fields like:

xforms:input ... ref="user"
xforms:input ... ref="pass"

and than a subission...

But how does the authentication work?


THX Erik



Am 26.06.2008 um 06:43 schrieb Erik Bruchez:

> Well, what do you want to do with this login page? Often, login  
> pages just have that username and password fields.
>
> -Erik
>
> On Jun 25, 2008, at 5:23 PM, Masen J wrote:
>
>> ok, but what else can I do?
>>
>> Am 26.06.2008 um 01:59 schrieb Erik Bruchez:
>>
>>> I suspect the following: adding the XForms model causes the page  
>>> to go through the XForms engine. This causes <form> elements to go  
>>> around your existing <form> element, which causes things to break.  
>>> You can check that by viewing the HTML source in your browser.
>>>
>>> I would try to avoid mixing XForms and HTML forms here, especially  
>>> for the login page.
>>>
>>> -Erik
>>>
>>> On Jun 25, 2008, at 3:50 AM, Masen J wrote:
>>>
>>>> Hey all,
>>>>
>>>> I have a small problem:
>>>>
>>>> My login.xhtml  that I got from an example was like this:
>>>> <p> Please enter your login and password </p>
>>>>                 <form action="/j_security_check" method="post">
>>>>                     <table>
>>>>                         <tr>
>>>>                             <td align="right">Login:</td>
>>>>                             <td><input name="j_username"/></td>
>>>>                         </tr>
>>>>                         <tr>
>>>>                             <td align="right">Password:</td>
>>>>                             <td><input type="password"  
>>>> name="j_password"/></td>
>>>>                         </tr>
>>>>                         <tr>
>>>>                             <td/><td>
>>>>                                 <input type="submit"  
>>>> value="Login"/></td>
>>>>                         </tr>
>>>>                     </table>
>>>>                 </form>
>>>>
>>>> Now when I add a model:
>>>> <head>
>>>>     <title>Login</title>
>>>>     <xi:include href="oxf:/apps/2604/homepage/common/r-model.xml"  
>>>> xxi:omit-xml-base="true"/>
>>>> </head>
>>>>
>>>> my "login button" does not work anymore...=(
>>>>
>>>> What am I doing wrong?
>>>> THX!!!!
>>>>
>>>>
>>>> --
>>>> 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
>>>
>>> --
>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>>> http://www.orbeon.com/
>>>
>>>
>>> --
>>> 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
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>
>
> --
> 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: A very small problem with login

Erik Bruchez
Administrator
I mean you just write your login page the way you would without  
XForms, with the two HTML input fields and the submit button.

Authentication will work the way it works with any servlet container  
when configured with form-based authentication.

-Erik

On Jun 26, 2008, at 5:10 AM, Masen J wrote:

> ja,
> I just want an login-page for my app...
> I have a security-constraint in my tomcat.
> Thats all...
> Do you mean I should just write a "login.xhtml"  as an orbeon-form  
> with two fields like:
>
> xforms:input ... ref="user"
> xforms:input ... ref="pass"
>
> and than a subission...
>
> But how does the authentication work?
>
>
> THX Erik
>
>
>
> Am 26.06.2008 um 06:43 schrieb Erik Bruchez:
>
>> Well, what do you want to do with this login page? Often, login  
>> pages just have that username and password fields.
>>
>> -Erik
>>
>> On Jun 25, 2008, at 5:23 PM, Masen J wrote:
>>
>>> ok, but what else can I do?
>>>
>>> Am 26.06.2008 um 01:59 schrieb Erik Bruchez:
>>>
>>>> I suspect the following: adding the XForms model causes the page  
>>>> to go through the XForms engine. This causes <form> elements to  
>>>> go around your existing <form> element, which causes things to  
>>>> break. You can check that by viewing the HTML source in your  
>>>> browser.
>>>>
>>>> I would try to avoid mixing XForms and HTML forms here,  
>>>> especially for the login page.
>>>>
>>>> -Erik
>>>>
>>>> On Jun 25, 2008, at 3:50 AM, Masen J wrote:
>>>>
>>>>> Hey all,
>>>>>
>>>>> I have a small problem:
>>>>>
>>>>> My login.xhtml  that I got from an example was like this:
>>>>> <p> Please enter your login and password </p>
>>>>>                <form action="/j_security_check" method="post">
>>>>>                    <table>
>>>>>                        <tr>
>>>>>                            <td align="right">Login:</td>
>>>>>                            <td><input name="j_username"/></td>
>>>>>                        </tr>
>>>>>                        <tr>
>>>>>                            <td align="right">Password:</td>
>>>>>                            <td><input type="password"  
>>>>> name="j_password"/></td>
>>>>>                        </tr>
>>>>>                        <tr>
>>>>>                            <td/><td>
>>>>>                                <input type="submit"  
>>>>> value="Login"/></td>
>>>>>                        </tr>
>>>>>                    </table>
>>>>>                </form>
>>>>>
>>>>> Now when I add a model:
>>>>> <head>
>>>>>    <title>Login</title>
>>>>>    <xi:include href="oxf:/apps/2604/homepage/common/r-model.xml"  
>>>>> xxi:omit-xml-base="true"/>
>>>>> </head>
>>>>>
>>>>> my "login button" does not work anymore...=(
>>>>>
>>>>> What am I doing wrong?
>>>>> THX!!!!
>>>>>
>>>>>
>>>>> --
>>>>> You receive this message as a subscriber of the ops-
>>>>> [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
>>>>
>>>> --
>>>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>>>> http://www.orbeon.com/
>>>>
>>>>
>>>> --
>>>> 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
>>
>> --
>> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
>> http://www.orbeon.com/
>>
>>
>> --
>> 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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: A very small problem with login

masjab-2
Erik,

> I mean you just write your login page the way you would without  
> XForms, with the two HTML input fields and the submit button.
>
> Authentication will work the way it works with any servlet container  
> when configured with form-based authentication.
>

But this didn´t work. I have a navigation on the left side of my page...
When I do like you said(this is, how I had it before) the the  
authentication works, but my navigation looks ugly because it´s  
written in "xforms"...=(

Is there no way like:
I write a xform-login-page.xhtml (with my navigation and the rest that  
is on every page) with two fields...
And my submission does the /j_sec.... action?




--
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: A very small problem with login

Erik Bruchez
Administrator

> But this didn´t work. I have a navigation on the left side of my  
> page...
> When I do like you said(this is, how I had it before) the the  
> authentication works, but my navigation looks ugly because it´s  
> written in "xforms"...=(
>
> Is there no way like:
> I write a xform-login-page.xhtml (with my navigation and the rest  
> that is on every page) with two fields...
> And my submission does the /j_sec.... action?
Good point. You may able to that with a replace="all" and by using the  
application/x-www-form-urlencoded serialization. Something like:

<xforms:instance>
   <form>
     <j_..../>
     <j_..../>
   </form>
</xforms:instance>
<xforms:submission method="post" serialization="application/x-www-form-
urlencoded" replac="all"/>

The container will do a redirect, which may or may not work (to check).

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



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