1 19 20 package org.openbravo.erpCommon.security; 21 22 import java.io.IOException ; 23 import java.io.PrintWriter ; 24 import javax.servlet.ServletException ; 25 import javax.servlet.http.HttpServletRequest ; 26 import javax.servlet.http.HttpServletResponse ; 27 import org.openbravo.base.secureApp.HttpSecureAppServlet; 28 import org.openbravo.base.secureApp.VariablesSecureApp; 29 import org.openbravo.xmlEngine.XmlDocument; 30 31 public class Menu extends HttpSecureAppServlet { 32 33 34 public Menu() { 35 } 36 37 public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException , ServletException { 38 39 VariablesSecureApp vars = new VariablesSecureApp(request); 40 String targetmenu = vars.getSessionValue("targetmenu"); 41 printPageFrameIdentificacion(response, "../utility/VerticalMenu.html", (targetmenu.equals("") ? "../utility/Home.html" : targetmenu)); 42 } 43 44 private void printPageFrameIdentificacion(HttpServletResponse response, String strMenu, String strDetalle) throws IOException , ServletException { 45 XmlDocument xmlDocument = xmlEngine.readXmlTemplate("org/openbravo/erpCommon/security/Login_FS").createXmlDocument(); 46 47 xmlDocument.setParameter("frameMenu", strMenu); 48 xmlDocument.setParameter("frame1", strDetalle); 49 response.setContentType("text/html; charset=UTF-8"); 50 PrintWriter out = response.getWriter(); 51 out.println(xmlDocument.print()); 52 out.close(); 53 } 54 } 55 | Popular Tags |