Package javax.servlet.http

Examples of javax.servlet.http.HttpSession


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

    String returnStatus ="";
    try
    {
      HttpSession session = req.getSession();
      com.centraview.common.UserObject  userobjectd = (com.centraview.common.UserObject)session.getAttribute( "userobject" );//get the user object
      int individualID = userobjectd.getIndividualID();
     
      System.out.println("san-OrderLookupHandler-getting OrderList from LG ...");
      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      OrderList DL = ( OrderList )lg.getOrderList(individualID , 0,0 , "" ,"OrderID");
View Full Code Here


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

    request.setAttribute(AdminConstantKeys.PREFERENCEPAGE, "EMAIL");

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

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

    ActionErrors allErrors = new ActionErrors();
    String forward = ".forward.preference.mail.account_list";
View Full Code Here

    String forwardTo = "failure";
    try
    {
      request.setAttribute("refreshWindow", "true");
      HttpSession session = request.getSession(true);
     
      UserObject  userobjectd = (UserObject)session.getAttribute( "userobject" );
      String rowId = (String)request.getParameter("rowId");
      request.setAttribute("rowId",rowId);
      String index = (String)request.getParameter("index");
      request.setAttribute("index",index);
      String folderid = (String)request.getParameter("folderid");
View Full Code Here

    try
    {
      PurchaseOrderForm purchaseForm = (PurchaseOrderForm)form;
      purchaseForm.convertItemLines();

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


      String typeOfSave = "saveclose";

      if (request.getParameter("buttonpress") != null)
View Full Code Here

    String saveandclose = (String) request.getParameter("saveandclose");
    String saveandnew = (String) request.getParameter("saveandnew");
    String returnStatus = "failure";

    HttpSession session = request.getSession(true);
    UserObject userobject = (UserObject) session.getAttribute("userobject");
    currentTZ = userobject.getUserPref().getTimeZone();
    int indvID = 0;

    if (userobject != null)
    {
View Full Code Here

{
  private static Logger logger = Logger.getLogger(PurchaseOrderListDeleteHandler.class);
  public ActionForward execute(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException, CommunicationException, NamingException
  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    HttpSession session = request.getSession(true);
    int individualId = ((UserObject)session.getAttribute("userobject")).getIndividualID();
    ArrayList deleteLog = new ArrayList();
    String rowId[] = request.getParameterValues("rowId");
    AccountFacadeHome accountFacadeHome = (AccountFacadeHome)CVUtility.getHomeObject("com.centraview.account.accountfacade.AccountFacadeHome","AccountFacade");
    try
    {
      AccountFacade remote = (AccountFacade)accountFacadeHome.create();
      remote.setDataSource(dataSource);
      for (int i=0; i<rowId.length; i++)
      {
        if(rowId[i] != null && !rowId[i].equals(""))
        {
          int elementID = Integer.parseInt(rowId[i]);
          try
          {
      remote.deletePurchaseOrder(elementID,individualId);
          } catch(AuthorizationFailedException ae) {
            String errorMessage = ae.getExceptionDescription();
            deleteLog.add(errorMessage);
          } catch(RemoteException re) {
            logger.error("[execute] Exception thrown.", re);
          }
        } //end of if(rowId[i] != null && !rowId[i].equals(""))
      } //end of for (int i=0; i<rowId.length; i++)
    } catch(CreateException e) {
      logger.error("[execute] Exception thrown.", e);
      throw new CommunicationException(e.getMessage());
    }
    if (!deleteLog.isEmpty())
    {
      ActionErrors allErrors = new ActionErrors();
      allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.freeForm", "You do not have permission to delete one or more of the records you selected."));
      session.setAttribute("listErrorMessage", allErrors);
    }
    ActionForward forward = new ActionForward(request.getParameter("currentPage"), true);
    return forward;
  }
View Full Code Here

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

  try
  {
    HttpSession session = request.getSession(true);
    UserObject  userobjectd = (UserObject)session.getAttribute( "userobject" );
    int individualId = userobjectd.getIndividualID();
    ListPreference listpreference= userobjectd.getListPreference("Email");
    MailMessage mailMessage = new MailMessage();
    DynaActionForm dynaForm = (DynaActionForm)form;

    String accountid   = (String) dynaForm.get( "AccountID" );

    String messageid    = (String) request.getParameter( "messageid" );
   
    mailMessage.setMessageID( Integer.parseInt( messageid ) );
         

    HashMap attchmentids =( HashMap) session.getAttribute( "AttachfileList" );


    int id = Integer.parseInt( accountid );

    /** code added for query change **/
    FolderList fl = ( FolderList )session.getAttribute("folderlist");
    Set listkey = fl.keySet();
    Iterator it = listkey.iterator();
    int accountID;
    AccountDetail ad1 = null;
    while(it.hasNext())
View Full Code Here

    throws IOException, ServletException, CommunicationException, NamingException
  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    String FORWARD_final = ".view.marketing.editlistmanager";

    HttpSession session = request.getSession(true);
    String rowId[] = null;
    String row = null;
    if (request.getParameterValues("rowIdParent") != null)
    {
      rowId = request.getParameterValues("rowIdParent");
    } //end of if statement (request.getParameterValues("rowIdParent") != null)
    else if (request.getParameterValues("marketingListID") != null)
    {
      rowId = request.getParameterValues("marketingListID");
    } //end of else if statement (request.getParameterValues("marketingListID") != null)
  else if (session.getAttribute("marketingListID") != null)
  {
     row = (String) session.getAttribute("marketingListID");
     session.removeAttribute("marketingListID");
  } //end of else if statement (getAttribute("marketingListID") != null)   
  else if (request.getParameterValues("listid") != null)
  {
    rowId = request.getParameterValues("listid");
  } //end of else if statement (getAttribute("marketingListID") != null) 
  else
    {
      if (request.getParameterValues("rowId") != null)
      {
        rowId = request.getParameterValues("rowId");
      } //end of if statement (request.getParameterValues("rowId") !=null)
      else if (request.getAttribute("rowId") != null)
      {
        row = (String)request.getAttribute("rowId");
      } //end of else if statement (request.getAttribute("rowId") !=null)
      else
      {
        row = (String)request.getAttribute("groupid");
      } //end of else statement
    } //end of else statement

  // 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 (rowId != null)
    {
      row = rowId[0];
    } //end of if statement (rowId != null)

    request.setAttribute("rowId", row);

  MarketingFacadeHome aa = (MarketingFacadeHome)CVUtility.getHomeObject("com.centraview.marketing.marketingfacade.MarketingFacadeHome", "MarketingFacade");
    try
    {
      MarketingFacade remote = (MarketingFacade)aa.create();
      remote.setDataSource(dataSource);
    DynaActionForm dyna = (DynaActionForm)form;
    if (row != null && !row.equals("")){
      int rowID = Integer.parseInt(row);
      ListVO listVO = remote.viewList(rowID);
      dyna.set("listname", listVO.getTitle());
      dyna.set("listdescription", listVO.getDescription());
      dyna.set("listid", listVO.getListID()+"");
      dyna.set("create", listVO.getCreated());
      dyna.set("modify", listVO.getModified());
      dyna.set("owner", listVO.getOwnerID()+"");
      dyna.set("ownername", listVO.getOwnerName());
    }
    request.setAttribute("listFormBean", dyna);
    } //end of try block
    catch (Exception e)
    {
      logger.error("[Exception] ViewListHandler.Execute Handler ", e);
    }

    request.setAttribute("TypeOfOperation", "List Manager");
    request.setAttribute("showAddAttendeesButton", new Boolean(false));
    request.setAttribute("showImportButton", new Boolean(true));

    UserObject userobjectd = (UserObject)session.getAttribute("userobject");
    try
    {
      this.buildSubList(Integer.parseInt(row), userobjectd, request, session, dataSource);
    }
    catch (Exception e)
View Full Code Here

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

    request.setAttribute(AdminConstantKeys.PREFERENCEPAGE, "EMAIL");

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

    int individualID = userObject.getIndividualID();    // logged in user
   
    ActionErrors allErrors = new ActionErrors();
    String forward = ".forward.preference.mail.account_list";
View Full Code Here

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


    try
    {
      HttpSession session = request.getSession(true);

      // 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 (session.getAttribute("highlightmodule") != null)
        session.setAttribute("highlightmodule", "project");

      com.centraview.common.UserObject  userobjectd = (com.centraview.common.UserObject)session.getAttribute( "userobject" );


            ListPreference listpreference= userobjectd.getListPreference("Timeslip");


      DisplayList displaylistSession = ( DisplayList )session.getAttribute( "displaylist") ;

      DisplayList displaylist = ( DisplayList )request.getAttribute( "displaylist") ;

      TimeSlipList DL= null;
      if( displaylist == null  )
      {
         ListGenerator lg = ListGenerator.getListGenerator(dataSource);

         DL = ( TimeSlipList )lg.getTimeSlipList( userobjectd.getIndividualID() , 1,listpreference.getRecordsPerPage() , "" ,listpreference.getSortElement());

      }
      else
      {

        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()) ) ))
        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)
         {
          DL = (TimeSlipList)displaylistSession;
          request.setAttribute("displaylist" , displaylistSession );
         }
         else
         {

          ListGenerator lg = ListGenerator.getListGenerator(dataSource);
          DL = ( TimeSlipList )lg.getTimeSlipList( userobjectd.getIndividualID(),displaylist );
         }

      }

      setLinks(DL);
      session.setAttribute( "displaylist" , DL );

      request.setAttribute("displaylist" , DL );
      request.setAttribute("list" , "Timeslip" );

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.