[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Missing Hidden Values

ashok_av do-not-reply at jboss.com
Mon Oct 22 13:30:39 EDT 2007


Hello,
         This following peice of code was working fine with jboss 3.2.7 and tomcat 5.0. After i upgrdaed to JBoss 4.2.1.GA with tomcat 6.x, the code no longer works. 



  | //login.jsp
  | 
  |     if(request.getParameter( "ScreenResolutionHeight" ) == null )
  |     {
  | %>
  | <html>
  | <head>
  |     <title>Please wait one moment...</title>
  | </head>
  | <body onload='SubmitOnLoad();'>
  | 
  | <form method='post' id='ScreenResolutionForm'>
  | <input type='hidden' name='ScreenResolutionWidth' value='1024'>
  | <input type='hidden' name='ScreenResolutionHeight' value='768'>
  | 
  | <script>
  | function SubmitOnLoad()
  | {
  |     var this_form = FindElementById( 'ScreenResolutionForm' );
  |     this_form.ScreenResolutionWidth.value = window.screen.availWidth;
  |     this_form.ScreenResolutionHeight.value = window.screen.availHeight;
  |     this_form.BrowserType.value = navigator.appName;
  | 
  | 
  |     this_form.submit();
  | }
  | 
  | function FindElementById( id )
  | {
  |     if( document.getElementById )
  |     {
  |         return document.getElementById( id );
  |     }
  |     else if (document.layers)
  |     {
  |         return document.layers[id];
  |     }
  |     else if (document.all)
  |     {
  |         return document.all[id];
  |     }
  | 
  |     return undefined;
  | }
  | </script>
  | 
  | </body>
  | </html>
  | <%
  |     }else {
  |     ............
  | 

After the form the submitted to itself in the SubmitOnLoad method, the hidden values are no longer available in the request object.As a result, the page gets into an endless loop.

Any ideas?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097572#4097572

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097572



More information about the jboss-user mailing list