You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Steven Gollery <sg...@cadrc.calpoly.edu> on 2006/11/06 18:16:03 UTC

problem: s:form reload after error drops port number

I have a login form that uses the MyFaces sandbox s:form tag to allow posting
using https. The tag looks like this:

   <s:form scheme="https" servername="#{systemBean.server}"
port="#{systemBean.securePort}" id="welcomeForm">


where systemBean is set up to return values based on the url of the servlet,
etc. This works fine when the page is intially loaded. The generated html
looks like this:

<form id="welcomeForm" method="post"
action="https://localhost:8443/LHS/welcome.jsf"
enctype="application/x-www-form-urlencoded">

But if I submit the form with missing information, triggering a validation
error so that I get back the same page with error messages included, the
html on the new version of the page now looks like this:

<form id="welcomeForm" method="post"
action="https://localhost/LHS/welcome.jsf"
enctype="application/x-www-form-urlencoded">

The s:form tag representation in the component tree has mysteriously lost
the value for the https port, so from then on clicking the submit button
results in a "connection was interrupted" page. This also happens if I just
try to load the page a second time from the initial url.

Does anyone have any idea why this is happening?

Thanks,

Steven Gollery

PS if there is a better forum for me to post questions like this, please let
me know.



-- 
View this message in context: http://www.nabble.com/problem%3A-s%3Aform-reload-after-error-drops-port-number-tf2583731.html#a7202891
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: problem: s:form reload after error drops port number

Posted by Martin Marinschek <ma...@gmail.com>.
Hi Steven,

your problem description indicates to a problem in the state-saving
and restoring mechanism of HtmlForm - I looked through it, but didn't
find one, everything seems alright. Can you try to debug through
restoreState, saveState and getPort of
org.apache.myfaces.custom.form.HtmlForm and tell us what happens?

regards,

Martin

On 11/6/06, Steven Gollery <sg...@cadrc.calpoly.edu> wrote:
>
> I have a login form that uses the MyFaces sandbox s:form tag to allow posting
> using https. The tag looks like this:
>
>    <s:form scheme="https" servername="#{systemBean.server}"
> port="#{systemBean.securePort}" id="welcomeForm">
>
>
> where systemBean is set up to return values based on the url of the servlet,
> etc. This works fine when the page is intially loaded. The generated html
> looks like this:
>
> <form id="welcomeForm" method="post"
> action="https://localhost:8443/LHS/welcome.jsf"
> enctype="application/x-www-form-urlencoded">
>
> But if I submit the form with missing information, triggering a validation
> error so that I get back the same page with error messages included, the
> html on the new version of the page now looks like this:
>
> <form id="welcomeForm" method="post"
> action="https://localhost/LHS/welcome.jsf"
> enctype="application/x-www-form-urlencoded">
>
> The s:form tag representation in the component tree has mysteriously lost
> the value for the https port, so from then on clicking the submit button
> results in a "connection was interrupted" page. This also happens if I just
> try to load the page a second time from the initial url.
>
> Does anyone have any idea why this is happening?
>
> Thanks,
>
> Steven Gollery
>
> PS if there is a better forum for me to post questions like this, please let
> me know.
>
>
>
> --
> View this message in context: http://www.nabble.com/problem%3A-s%3Aform-reload-after-error-drops-port-number-tf2583731.html#a7202891
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces