title: How To Load Servlet Result Page in Div?
body: <p>I have following situation:</p>
  
  <p>There is a left side menu in my web application, when user clicks any link of that menu that specific page will be opened in specific div. This specific div is working as content page. </p>
  
  <p>For example there is password changing link, when I click it, it will be displayed on that content div.</p>
  
  <p>Every page is done with .jsp format and thus each page have also error and success pages. For example if I would have changePassword.jsp I would also have changePasswordError.jsp and changePasswordSuccess.jsp, they are used to display error and success messages.</p>
  
  <p>I'm using <strong>Servlets</strong> to get information and handle it and to redirect on correct page. So for example if user would want to change his/her password and everything goes fine they would be directed to changePasswordSuccess.jsp from servlet and if they get an error they would be directed to changePasswordError.jsp.</p>
  
  <p>When I do this they would be opened as an own page so it's very silly that I have to provide a link for user to return to main page. Even if they get an error message, that error page is opened as an own page which is very obvious.</p>
  
  <p>My question is that how I can direct user from Servlet to main page so that result page of Servlet will be displayed in that content div? Meaning that if a user is directed to success page, that success page will be displayed on main page's content div.</p>
  
  <p>If possible I would not rather use .php redirection style, which includes header tag and inside of it there's redirection url.</p>