title: how to call html id from servlet class?
body: <p>I design one login page in <strong>HTML</strong>, for database I used servlet class, if username &amp; password is correct then I call home class id in html page , but I dont know how to call html id from servlet file. I am using one html file, login &amp; home page logic is in one html file, So my problem is how to call home class of html file from servlet.</p>
  
  <pre><code>    &lt;!doctype html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;&lt;/head&gt;
      &lt;style&gt;
      .header{width: 100%;background-color: #8B008B;color: #fff;padding: 30px 0px;font-size: 30px;}
      .footer{position:fixed;bottom:0;width:100%;background-color:#8B008B;color:#fff;padding:10px 0;}
  
      &lt;/style&gt;
      &lt;link rel="stylesheet" type="text/css" href="bootstrap.css" media="all" /&gt;
      &lt;body&gt;
          &lt;div class="header"&gt;
              &lt;div class="conainer"&gt;
                  &lt;div class="pull-left text-left col-md-6"&gt;
                      Bakers &amp; More
                  &lt;/div&gt;
                  &lt;div class="pull-right text-right col-md-6"&gt;
                  &lt;a class="btn btn-primary" href="#" role="button"&gt;Logged in as&lt;/a&gt;
                  &lt;a class="btn btn-primary" href="#" role="button"&gt;Logout&lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="clearfix"&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div id="login"&gt;
              &lt;div class="col-md-3"&gt;&lt;/div&gt;
              &lt;div class="col-md-6" style="margin-top: 8%;border: 1px solid;background-color: #FFE4C4;padding:30px;"&gt;
  
                  &lt;form class="form-horizontal" name="login_form" action="checkUser" method="post" &gt; 
                   &lt;div class="form-group"&gt;
                      &lt;label for="inputEmail3" class="col-sm-2 control-label"&gt;Email&lt;/label&gt;
                      &lt;div class="col-sm-10"&gt;
                        &lt;input type="email" class="form-control" id="inputEmail3" placeholder="Email"&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="form-group"&gt;
                      &lt;label for="inputPassword3" class="col-sm-2 control-label"&gt;Password&lt;/label&gt;
                      &lt;div class="col-sm-10"&gt;
                        &lt;input type="password" class="form-control" id="inputPassword3" placeholder="Password"&gt;
                      &lt;/div&gt;
                    &lt;/div&gt;
                    &lt;div class="form-group"&gt;
                      &lt;div class="col-sm-offset-2 col-sm-4"&gt;
                        &lt;button type="submit" class="btn btn-default" onclick="myFunction()"&gt;Sign in&lt;/button&gt;
                        &lt;br /&gt;
                        &lt;div id="demo"&gt;&lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="col-sm-offset-2 col-sm-4"&gt;
                        &lt;a href="#" role="button"&gt;Forgot Paswaord&lt;/a&gt;
                      &lt;/div&gt;
  
                  &lt;/div&gt;
  
                  &lt;/form&gt;
              &lt;/div&gt;
              &lt;div class="col-md-3"&gt;&lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="col-md-12" style="display:none;" id="home"&gt;
              &lt;div class="col-md-3" style="margin-top: 2%;border: 1px solid;padding:30px;"&gt;
                  &lt;h3&gt;Administrator&lt;/h3&gt;
                  &lt;select class="form-control"&gt;
                    &lt;option&gt;User Details&lt;/option&gt;
                    &lt;option&gt;Create user&lt;/option&gt;
                    &lt;option&gt;Show User&lt;/option&gt;
                    &lt;option&gt;Update User&lt;/option&gt;
                    &lt;option&gt;Delete User&lt;/option&gt;
                  &lt;/select&gt;&lt;br /&gt;
                  &lt;select class="form-control"&gt;
                    &lt;option&gt;Shop Details&lt;/option&gt;
                    &lt;option&gt;Device&lt;/option&gt;
                    &lt;option&gt;Product&lt;/option&gt;
                    &lt;option&gt;Special Iems&lt;/option&gt;
                    &lt;option&gt;Order&lt;/option&gt;
                  &lt;/select&gt;&lt;br /&gt;
                  &lt;select class="form-control"&gt;
                    &lt;option&gt;User Details&lt;/option&gt;
                    &lt;option&gt;2&lt;/option&gt;
                    &lt;option&gt;3&lt;/option&gt;
                    &lt;option&gt;4&lt;/option&gt;
                    &lt;option&gt;5&lt;/option&gt;
                  &lt;/select&gt;&lt;br /&gt;
                  &lt;select class="form-control"&gt;
                    &lt;option&gt;Shop Details&lt;/option&gt;
                    &lt;option&gt;2&lt;/option&gt;
                    &lt;option&gt;3&lt;/option&gt;
                    &lt;option&gt;4&lt;/option&gt;
                    &lt;option&gt;5&lt;/option&gt;
                  &lt;/select&gt;
              &lt;/div&gt;
              &lt;div class="col-md-3"&gt;&lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="footer"&gt;
              &lt;div class="container text-center"&gt;
                  &lt;div&gt;Copyright. All Rights Reserved&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
  
          &lt;script&gt;
              function myFunction() {
                  var x, text;
  
                  // Get the value of the input field with id="numb"
                  x = document.getElementById("inputEmail3").value;
  
                  // If x is Not a Number or less than one or greater than 10
                  if (isNaN(x) || x &lt; 1 || x &gt; 10) {
                      text = "Input not valid";
                  } else {
                      text = "Input OK";
                  }
                  document.getElementById("demo").innerHTML = text;
              }
  &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>