title: Issue with web application using JSP and Hibernate
body: <p>Below is my index.html and action.jsp code
  When I am submitting the values from index.html to action.jsp instead of getting the output of out.println in action.jsp I am getting the complete action.jsp as my output. <a href="https://i.stack.imgur.com/IYbpp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IYbpp.jpg" alt="output of the code"></a></p>
  
  <p>Advise what is the issue and how to rectify it also advise if the directory structure is correct i.e.; all files are placed where they are usually supposed to be placed or not <a href="https://i.stack.imgur.com/b0whA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b0whA.jpg" alt="Directory Structure"></a></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;TODO supply a title&lt;/title&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;form action="action.jsp" method="post"&gt;
      Name &lt;input type="text" name = "name"&gt; &lt;br&gt;
      Password &lt;input type="password" name="password"&gt; &lt;br&gt;
      &lt;input type="submit" value="submit"&gt;
      &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  // Below is action.jsp
  
  &lt;%@page import="p1.NewHibernateUtil"%&gt;
  &lt;%@page import="org.hibernate.Transaction"%&gt;
  &lt;%@page import="p1.User"%&gt;
  &lt;%@page import="org.hibernate.Session"%&gt;
  &lt;%@page import="org.hibernate.SessionFactory"%&gt;
  &lt;%@page import="org.hibernate.cfg.Configuration"%&gt;
  &lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;title&gt;JSP Page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
      &lt;%
            out.println("In scriplet tag");
            Configuration cfg = new Configuration();
            out.println("Configuration object created");
            cfg.configure("hibernate.cfg.xml");
            out.println("Configured");
  
  //            SessionFactory sf = NewHibernateUtil.getSessionFactory();
  //            out.println("SessionFactory created");
  //            Session ses = sf.openSession();
  //            Transaction t = ses.beginTransaction();
  //            String n = request.getParameter("name");
  //            String p = request.getParameter("password");
  //            
  //           out.println("Welcome " + n);
  //            User u1 = new User(n, p);
  //            ses.save(u1);
  //            t.commit();
  //            ses.close();
  //            out.println("Data inserted successfully");
  
  
  
       %&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>