Package javax.servlet.http

Examples of javax.servlet.http.HttpSession


  private static Logger logger = Logger.getLogger(SaveContactHandler.class);
  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws RuntimeException, Exception
  {
    final String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

    HttpSession session = request.getSession();
    UserObject userObject = (UserObject)session.getAttribute("userobject");

    int individualID = userObject.getIndividualID();    // logged in user

    ActionErrors allErrors = new ActionErrors();
    String forward = "showContactDetails";
View Full Code Here


  System.out.println( "*********** RuleEnableHandler ********** " )
   
  String rowId[]=null;
  String listType=null;
 
  HttpSession session = request.getSession(true)

  rowId =request.getParameterValues("rowId");
  listType=request.getParameter("listType");

  String enable =request.getParameter("enable");
  boolean status = false ;
 
  if ( enable.equals( "0" ) )
  {
    status = false ;
  }
 
  if ( enable.equals( "1" ) )
  {
    status = true ;
  }
   

  System.out.println( "*********** RuleEnableHandler ********** " +enable )

  System.out.println("Row ID"+ rowId[0] +" ListType  "+listType);

  // id in global list
  String listId = request.getParameter("listId");

  long idd = 0;
  if(listId != null)
    idd = Long.parseLong( listId  );

  ListGenerator lg = ListGenerator.getListGenerator(dataSource);
  RuleList DL = ( RuleList )lg.getDisplayList(idd );
 
  //added by sameer
  DisplayList displaylistSession = ( DisplayList )session.getAttribute( "displaylist") ;
  if((displaylistSession!=null)&&(displaylistSession.getListID()==idd))
      displaylistSession.setDirtyFlag(true);
     
  for( int l=0 ; l < rowId.length ; l++ )
  {
View Full Code Here

    long entityID = 0;
    long orderID = 0;
    try
    {

      HttpSession session = request.getSession(true);
      session.setAttribute("highlightmodule", "account");
      String entityidStr = request.getParameter("EntityID");
      String orderidStr = request.getParameter("OrderID");

      if (entityidStr != null && !entityidStr.equals(""))
        entityID = Long.parseLong(entityidStr);

        // After performing the logic in the DeleteHanlder, we are generat a new request for the list
        // So we will not be carrying the old error. So that we will try to collect the error from the Session variable
        // Then destory it after getting the Session value
        if (session.getAttribute("listErrorMessage") != null)
        {
          ActionErrors allErrors = (ActionErrors) session.getAttribute("listErrorMessage");
          saveErrors(request, allErrors);
          session.removeAttribute("listErrorMessage");
        }//end of if (session.getAttribute("listErrorMessage") != null)
       
      if (orderidStr != null && !orderidStr.equals(""))
        orderID = Long.parseLong(orderidStr);

      request.setAttribute(AccountConstantKeys.TYPEOFSUBMODULE, AccountConstantKeys.INVOICE);
      request.setAttribute("body", "list");

      com.centraview.common.UserObject userobjectd = (com.centraview.common.UserObject)session.getAttribute("userobject");//get
                                                                                                                          // the
                                                                                                                          // user
                                                                                                                          // object
      int individualID = userobjectd.getIndividualID();
      ListPreference listpreference = userobjectd.getListPreference("InvoiceHistory");

      InvoiceList displaylistSession = null;
      InvoiceList displaylist = null;

      try
      {
        displaylistSession = (InvoiceList)session.getAttribute("displaylist");//gets
                                                                              // the
                                                                              // list
                                                                              // from
                                                                              // session
      } catch (Exception e)
      {
        displaylistSession = null;
      }
      try
      {
        displaylist = (InvoiceList)request.getAttribute("displaylist");//gets
                                                                       // the
                                                                       // list
                                                                       // from
                                                                       // request
      } catch (Exception e)
      {
        displaylist = null;
      }

      InvoiceList DL = null;
      ListGenerator lg = ListGenerator.getListGenerator(dataSource);

      if (displaylist == null)
      {
        int records = listpreference.getRecordsPerPage();//gets the initial
                                                         // record per page to
                                                         // be displayed from
                                                         // listPreference
        String sortelement = listpreference.getSortElement();//gets the initial
                                                             // sort element
                                                             // from
                                                             // listPreference
        DL = null;
        DL = (InvoiceList)lg.getInvoiceList(individualID, 1, records, "", sortelement, entityID, orderID);//called
                                                                                                          // when
                                                                                                          // the
                                                                                                          // request
                                                                                                          // for
                                                                                                          // the
                                                                                                          // list
                                                                                                          // is
                                                                                                          // for
                                                                                                          // first
                                                                                                          // time

        if (entityidStr != null)
          DL.setEntityID(entityID);

        if (orderidStr != null)
          DL.setOrderID(orderID);

        DL = setLinksfunction(DL);
      } else
      //if(displaylistSession !=null)
      {
        String searchSession = displaylistSession.getSearchString();
        String searchrequest = displaylist.getSearchString();
        if (searchSession == null)
          searchSession = "";
        if (searchrequest == null)
          searchrequest = "";

        if (((displaylistSession.getListID() == displaylist.getListID()) && (displaylist.getDirtyFlag() == false) && (displaylist.getStartAT() >= displaylistSession.getBeginIndex()) && (displaylist.getEndAT() <= displaylistSession.getEndIndex()) && (displaylist.getSortMember().equals(displaylistSession.getSortMember())) && (displaylist
            .getSortType() == (displaylistSession.getSortType()) && (searchSession.equals(searchrequest))))
            || displaylist.getAdvanceSearchFlag() == true)
        {
          entityID = displaylistSession.getEntityID();
          orderID = displaylistSession.getOrderID();
          DL = (InvoiceList)displaylistSession;
          DL.setEntityID(entityID);
          DL.setOrderID(orderID);
        } else
        {
          entityID = displaylistSession.getEntityID();
          orderID = displaylistSession.getOrderID();

          displaylist.setEntityID(entityID);
          displaylist.setOrderID(orderID);

          DL = (InvoiceList)lg.getInvoiceList(individualID, displaylist);
          DL.setEntityID(entityID);
          DL.setOrderID(orderID);
        }
        DL = setLinksfunction(DL);

      }
      session.setAttribute("displaylist", DL);
      request.setAttribute("displaylist", DL);

      // forward to jsp page
      FORWARD_final = FORWARD_showinvoicelist;
    } catch (Exception e)
View Full Code Here

    int smarkFlag = 0;
    try
    {
      boolean markflag = false;
      HttpSession session = request.getSession(true);
      UserObject userobjectd = (UserObject)session.getAttribute("userobject");
      int individualId = userobjectd.getIndividualID();

      String rowId = null;

      int destfolderid = 0;
View Full Code Here

  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException
  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

    HttpSession session = request.getSession();
    UserObject userObject = (UserObject)session.getAttribute("userobject");

    int individualID = userObject.getIndividualID();    // logged in user
   
    // "mailCheckForm" defined in struts-config-preference.xml
    DynaActionForm mailForm = (DynaActionForm)form;
View Full Code Here

  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

    String btnClicked = (String) request.getParameter("btnClicked");

    HttpSession session = request.getSession();
    UserObject userobjectd = (UserObject) session.getAttribute("userobject");
    int individualID = userobjectd.getIndividualID();

    OrderForm oform = (OrderForm) form;
    OrderForm tempform = null;
    oform.convertFormbeanToValueObject("add");
View Full Code Here

  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

    try {
      request.setAttribute("action", "view");
      HttpSession session = request.getSession();
      UserObject userObject = (UserObject) session.getAttribute("userobject");
      int individualID = userObject.getIndividualID();

      SupportFacadeHome sfh = (SupportFacadeHome) CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
      SupportFacade remote = sfh.create();
      remote.setDataSource(dataSource);
View Full Code Here

  EmailFacadeHome cfh = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
    try
    {
      DynaActionForm dynaForm = (DynaActionForm)form;

      HttpSession session = request.getSession(true);
      UserObject userobjectd = (UserObject)session.getAttribute("userobject");
      int individualID = userobjectd.getIndividualID();
      ListPreference listpreference = userobjectd.getListPreference("Email");
      String rowId = null;


      rowId = request.getParameter("rowId");
      int messageID = Integer.parseInt(rowId);

      String listAction = request.getParameter("listAction");

      String folderid = request.getParameter("folderid");
      if (folderid == null)
      {
        folderid = (String)session.getAttribute("folderid");
      }
      else
      {
        session.setAttribute("folderid", folderid);
      }


      String indexfrompage = request.getParameter("index");
     System.out.println("indexfrompage"+indexfrompage);

      if (listAction != null && listAction.equals("next"))
      {
      System.out.println("messageID"+messageID);
           messageID = messageID - 1 ;
           int index = 0;
           if (indexfrompage != null){
         index = Integer.parseInt(indexfrompage);
         indexfrompage = (index - 1)+"";
       }
           rowId = messageID + "";
      }

      System.out.println("indexfrompage"+indexfrompage);
      DisplayList displaylistSession = (DisplayList)session.getAttribute("displaylist");

      int index = 0;
      boolean flag = false;

      // THIS IS UTTER SILLINESS. WHY ARE WE LOOPING THROUGH A SESSION ATTRIBUTE
View Full Code Here

    try
    {
      DynaActionForm dynaForm = (DynaActionForm)form;

      HttpSession session = request.getSession();
      UserObject userObject = (UserObject)session.getAttribute("userobject");
      int individualID = userObject.getIndividualID();

      IndividualVO individualVO;
      AddressVO addressVO = null;

      ContactFacadeHome cfh = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      ContactFacade remote = (ContactFacade)cfh.create();
      remote.setDataSource(dataSource);

      session.setAttribute("highlightmodule", "preferences");
      individualVO = remote.getIndividual(individualID);
      individualVO.populateFormBean(dynaForm);     

      if (individualVO.getUserName() != null)
      {
View Full Code Here

      String listId = request.getParameter("listId");
      if (listId == null) {
        listId = (String)request.getAttribute("listId");
      }
     
      HttpSession session = request.getSession();
      UserObject userobjectd = (UserObject)session.getAttribute("userobject");
      int individualID = userobjectd.getIndividualID();
      session.setAttribute("highlightmodule", "account");

      request.setAttribute(AccountConstantKeys.TYPEOFSUBMODULE, AccountConstantKeys.ORDER);
      request.setAttribute("body", AccountConstantKeys.EDIT);

      AccountFacade remote = (AccountFacade)accountFacadeHome.create();
View Full Code Here

TOP

Related Classes of javax.servlet.http.HttpSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.