Examples of HttpSession


Examples of javax.servlet.http.HttpSession

    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

Examples of javax.servlet.http.HttpSession

      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

Examples of javax.servlet.http.HttpSession

  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
  {
    try
    {
      HttpSession session  = request.getSession(false);
      session.setAttribute("highlightmodule", "email");
      FORWARD_final = FORWARD_email;
    }catch(Exception e){
      e.printStackTrace();
      FORWARD_final = GLOBAL_FORWARD_failure;
    }
View Full Code Here

Examples of opendap.dap.http.HTTPSession

   * Do a HEAD call on the URL.
   * Look for the header "Content-Description" = "ncstream" or "dods".
   */
  static private ServiceType disambiguateHttp(String location) throws IOException {

    HTTPSession session = new HTTPSession();

    // have to do dods first
    ServiceType result = checkIfDods(session,location);
    if (result != null)
      return result;

    HTTPMethod method = null;
    try {
      method = session.newMethodHead(location);
      int statusCode = method.execute();
      if (statusCode >= 300) {
        if (statusCode == 401)
          throw new IOException("Unauthorized to open dataset " + location);
        else
          throw new IOException(location + " is not a valid URL, return status=" + statusCode);
      }

      Header h = method.getResponseHeader("Content-Description");
      if ((h != null) && (h.getValue() != null)) {
        String v = h.getValue();
        if (v.equalsIgnoreCase("ncstream"))
          return ServiceType.CdmRemote;
      }

      return null;

    } finally {
      if (session != null) session.close();
    }
  }
View Full Code Here

Examples of org.apache.cocoon.environment.http.HttpSession

     *
     * @see org.apache.cocoon.environment.Request#getSession(boolean)
     */
    public Session getSession(boolean create) {
        javax.servlet.http.HttpSession serverSession = this.req.getSession(create);
        HttpSession session;
        if (serverSession != null) {
            synchronized (sessions) {
                // retrieve existing wrapper
                WeakReference ref = (WeakReference)sessions.get(serverSession);
                if (ref == null || (session = (HttpSession)ref.get()) == null) {
                    // create new wrapper
                    session = new HttpSession(serverSession);
                    sessions.put(serverSession, new WeakReference(session));
                }
            }
        } else {
            // invalidate
View Full Code Here

Examples of org.apache.cxf.transport.http.HTTPSession

            exchange.setInMessage(inMessage);
            setupMessage(inMessage, context, req, resp);
           
            ((MessageImpl)inMessage).setDestination(this);
   
            exchange.setSession(new HTTPSession(req));
        }
       
        try {   
            incomingObserver.onMessage(inMessage);
            resp.flushBuffer();
View Full Code Here

Examples of org.apache.openejb.webadmin.HttpSession

    public void setInvocation(String invID, Invocation obj){
        getInvocationMap().put(invID, obj);
    }

    public HashMap getInvocationMap(){
        HttpSession session = request.getSession();
        HashMap invocations = (HashMap)session.getAttribute("invocations");
        if (invocations == null) {
            invocations = new HashMap();
            session.setAttribute("invocations",invocations);
        }
        return invocations;
    }
View Full Code Here

Examples of org.fto.jthink.j2ee.web.HttpSession

    /* 设置资源容器, WEBApplicationContext上下文 */
    setResourceContainer(WEBApplicationContext.class.getName(), webContext);

    /* 设置资源容器, HttpSession用户会话 */
    HttpSession session = new HttpSession(((HttpServletRequest)req).getSession());
    setResourceContainer(HttpSession.class.getName(), session);
   
    /* 设置资源容器, HttpRequest请求 */
    HttpRequest request = new HttpRequest(req);
    setResourceContainer(HttpRequest.class.getName(), request);
View Full Code Here

Examples of org.jivesoftware.openfire.http.HttpSession

            throws UnauthorizedException {
        if (serverName == null) {
            throw new UnauthorizedException("Server not initialized");
        }
        PacketDeliverer backupDeliverer = server.getPacketDeliverer();
        HttpSession session = new HttpSession(backupDeliverer, serverName, address, id, rid, connection);
        Connection conn = session.getConnection();
        conn.init(session);
        conn.registerCloseListener(clientSessionListener, session);
        localSessionManager.getPreAuthenticatedSessions().put(session.getAddress().getResource(), session);
        connectionsCounter.incrementAndGet();
        return session;
    }
View Full Code Here

Examples of pt.opensoft.http.HttpSession

    }

    public void allows(HttpRequest request, ActionWrapper actionWrapper) {
        if (needsLogin(actionWrapper.getCompleteModuleName(), actionWrapper.getActionName())) {
            HttpSession session = (HttpSession) request.getSession();
            if (session == null || !session.isValid()) {
                throw new NotAllowedException(this.getClass().getSimpleName() + " refused access to " + actionWrapper);
            } else {
              if(session.getValue(_sessionUserTag) == null) {
                throw new NotAllowedException(this.getClass().getSimpleName() + " refused access to " + actionWrapper);
              }
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.