myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabio F." <fabio...@gmail.com>
Subject Re: Tomahawk and eclipse galileo not working?
Date Tue, 23 Mar 2010 14:13:57 GMT
Ah, ok.

Here's login.jsp.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login aziende</title>
</head>
<body>
<center><h1>Elenco aziende</h1></center>
<form id="login" name="login" method="post"
action="/telemarketing/faces/login.jsp"
enctype="application/x-www-form-urlencoded">
    <p>Entra</p>
    <p>Username: <input id="login:j_id_jsp_1876195572_2"
name="login:j_id_jsp_1876195572_2" type="text" value="fabio" /></p>
    <p>Password: <input type="password" name="login:j_id_jsp_1876195572_3"
/></p>
    <script type="text/javascript"><!--


    function oamSetHiddenInput(formname, name, value)
    {
        var form = document.forms[formname];
        if (typeof form == 'undefined')
        {
            form = document.getElementById(formName);
        }

        if(typeof form.elements[name]!='undefined' &&
(form.elements[name].nodeName=='INPUT' ||
form.elements[name].nodeName=='input'))
        {
            form.elements[name].value=value;
        }
        else
        {
            var newInput = document.createElement('input');
            newInput.setAttribute('type','hidden');
            newInput.setAttribute('id',name);
            newInput.setAttribute('name',name);
            newInput.setAttribute('value',value);
            form.appendChild(newInput);
        }

    }


    function oamClearHiddenInput(formname, name, value)
    {
        var form = document.forms[formname];
        if (typeof form == 'undefined')
        {
            form = document.getElementById(formName);
        }

        var hInput = form.elements[name];
        if(typeof hInput !='undefined')
        {
            form.removeChild(hInput);
        }

    }

    function oamSubmitForm(formName, linkId, target, params)
    {

        var clearFn = 'clearFormHiddenParams_'+formName.replace(/-/g,
'\$:').replace(/:/g,'_');
        if(typeof window[clearFn] =='function')
        {
            window[clearFn](formName);
        }

        if(typeof window.getScrolling!='undefined')
        {
            oamSetHiddenInput(formName,'autoScroll',getScrolling());
        }

        var form = document.forms[formName];
        if (typeof form == 'undefined')
        {
            form = document.getElementById(formName);
        }

        var oldTarget = form.target;
        if(target != null)
        {

            form.target=target;
        }
        if((typeof params!='undefined') && params != null)
        {

            for(var i=0, param; (param = params[i]); i++)
            {
                oamSetHiddenInput(formName,param[0], param[1]);
            }

        }

        oamSetHiddenInput(formName,formName +':'+'_idcl',linkId);

        if(form.onsubmit)
        {
            var result=form.onsubmit();
            if((typeof result=='undefined')||result)
            {
                try
                {
                    form.submit();
                }
                catch(e){}
            }

        }
        else
        {
            try
            {
                form.submit();
            }
            catch(e){}
        }

        form.target=oldTarget;
        if((typeof params!='undefined') && params != null)
        {

            for(var i=0, param; (param = params[i]); i++)
            {
                oamClearHiddenInput(formName,param[0], param[1]);
            }

        }

        oamClearHiddenInput(formName,formName +':'+'_idcl',linkId);return
false;
    }


//--></script><input id="login:j_id_jsp_1876195572_4"
name="login:j_id_jsp_1876195572_4" type="submit" value="Login"
onclick="if(typeof
window.getScrolling!='undefined'){oamSetHiddenInput('login','autoScroll',getScrolling());}"
/>
<input type="hidden" name="autoScroll" />
<input type="hidden" name="login_SUBMIT" value="1" /><input type="hidden"
name="javax.faces.ViewState" id="javax.faces.ViewState"
value="zIMgBuW/tce7OOILsjV0PiVTJ/AqSIX+uDFIECtrt49O49UDy2OA2ZSz0eJf6CsXjINRtpLixMffHDTl5zBAaQ=="
/></form>

<script type="text/javascript"><!--

    function getScrolling()
    {
        var x = 0; var y = 0;if (self.pageXOffset || self.pageYOffset)
        {
            x = self.pageXOffset;
            y = self.pageYOffset;
        }
         else if ((document.documentElement &&
document.documentElement.scrollLeft)||(document.documentElement &&
document.documentElement.scrollTop))
        {
            x = document.documentElement.scrollLeft;
            y = document.documentElement.scrollTop;
        }
         else if (document.body)
        {
            x = document.body.scrollLeft;
            y = document.body.scrollTop;
        }
        return x + "," + y;
    }

//--></script>
</body>
</html>

2010/3/23 Jakob Korherr <jakob.korherr@gmail.com>

> OK thanks for the URL.
>
> No I don't mean from the JSP, but from the generated HTML in the browser.
> Just open your login.jsp in the browser and view the HTML source.
>
> Regards,
> Jakob
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message