Examples of RequestContext


Examples of org.apache.jetspeed.request.RequestContext

                }
            }

            session.setAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, preferedLocale,
                    PortletSession.APPLICATION_SCOPE);
            RequestContext requestContext = (RequestContext) request
                    .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
            requestContext.setLocale(preferedLocale);
            requestContext.setSessionAttribute(PortalReservedParameters.PREFERED_LOCALE_ATTRIBUTE, preferedLocale);
        }

        return;
    }
View Full Code Here

Examples of org.apache.jetspeed.request.RequestContext

    @Override
    protected void doHeaders(RenderRequest request, RenderResponse response)
    {
        if (this.dojoJsRelativeUrl != null)
        {
            RequestContext requestContext = (RequestContext) request.getAttribute(RequestContext.REQUEST_PORTALENV);
            String portalContextPath = requestContext.getRequest().getContextPath();
            DojoPortletHelper.enableDojo(response, portalContextPath + this.dojoJsRelativeUrl);
        }
        else
        {
            DojoPortletHelper.enableDojo(response, this.dojoJsUrl);
View Full Code Here

Examples of org.apache.jetspeed.request.RequestContext

            enableOpenIDEntry = Boolean.parseBoolean(enableOpenIDEntryPref);
        }
        request.setAttribute(ENABLE_OPEN_ID_ENTRY_ATTR_NAME, Boolean.toString(enableOpenIDEntry));
       
        // access login errors in session from OpenIDRelayingPartyServlet
        RequestContext requestContext = (RequestContext)request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
        String errorCode = (String)requestContext.getSessionAttribute(OpenIDConstants.OPEN_ID_ERROR);
        if (errorCode != null)
        {
            request.setAttribute(OpenIDConstants.OPEN_ID_ERROR, errorCode);
        }
       
View Full Code Here

Examples of org.apache.jetspeed.request.RequestContext

        {
            String action = actionRequest.getParameter(OpenIDConstants.OPEN_ID_REQUEST);
            if (action != null)
            {
                // redirect action to OpenIDRelayingPartyServlet
                RequestContext requestContext = (RequestContext)actionRequest.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
                String servletRedirect = requestContext.getRequest().getContextPath()+OPEN_ID_RELAYING_PARTY_SERVLET_MAPPING+"/"+action+"?"+OpenIDConstants.OPEN_ID_RETURN+"="+requestContext.getPortalURL().getBasePath();
               
                // perform action
                if (action.equals(OpenIDConstants.OPEN_ID_LOGIN_REQUEST))
                {
                    // access new user registration init parameters and preferences
                    // and save in session for consumption by the OpenIDRelayingPartyServlet
                    String logConfiguration = "none";
                    PortletPreferences prefs = actionRequest.getPreferences();
                    if (Boolean.parseBoolean(prefs.getValue(ENABLE_REGISTRATION_CONFIG_PREF_NAME, null)))
                    {
                        OpenIDRegistrationConfiguration registrationConfiguration = new OpenIDRegistrationConfiguration();
                        registrationConfiguration.setEnableRegistration(prefs.getValue(ENABLE_REGISTRATION_PREF_NAME, null));
                        registrationConfiguration.setUserTemplateDirectory(prefs.getValue(REGISTRATION_USER_TEMPLATE_PREF_NAME, null));
                        registrationConfiguration.setSubsiteRootFolder(prefs.getValue(REGISTRATION_SUBSITE_ROOT_PREF_NAME, null));
                        registrationConfiguration.setRoles(prefs.getValue(REGISTRATION_ROLES_PREF_NAME, null));
                        registrationConfiguration.setGroups(prefs.getValue(REGISTRATION_GROUPS_PREF_NAME, null));
                        registrationConfiguration.setProfilerRules(prefs.getValue(REGISTRATION_PROFILER_RULE_NAMES_PREF_NAME, null), prefs.getValue(REGISTRATION_PROFILER_RULE_VALUES_PREF_NAME, null));
                        registrationConfiguration.merge(initRegistrationConfiguration);
                        requestContext.setSessionAttribute(OpenIDConstants.OPEN_ID_REGISTRATION_CONFIGURATION, registrationConfiguration);
                        logConfiguration = "preferences";
                    }
                    else if (initRegistrationConfiguration != null)
                    {
                        requestContext.setSessionAttribute(OpenIDConstants.OPEN_ID_REGISTRATION_CONFIGURATION, initRegistrationConfiguration);
                        logConfiguration = "init params";
                    }

                    // login redirect to OpenIDRelayingPartyServlet
                    String discoveryParam = actionRequest.getParameter(OpenIDConstants.OPEN_ID_DISCOVERY);
View Full Code Here

Examples of org.apache.jetspeed.request.RequestContext

     * @see org.apache.portals.applications.webcontent.portlet.IFrameGenericPortlet#doView(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
     */
    public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
    {
        // get current session OpenID login state
        RequestContext requestContext = (RequestContext)request.getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
        Subject sessionSubject = (Subject)requestContext.getSessionAttribute(PortalReservedParameters.SESSION_KEY_SUBJECT);
        String sessionOpenIDProvider = (String)requestContext.getSessionAttribute(PortalReservedParameters.SESSION_OPEN_ID_PROVIDER);
        PortletPreferences prefs = request.getPreferences();
        String requiredOpenIDProvider = prefs.getValue(REQUIRED_OPEN_ID_PROVIDER_PREF_NAME, null);
        String requiredOpenIDProviderLabel = prefs.getValue(REQUIRED_OPEN_ID_PROVIDER_LABEL_PREF_NAME, null);

        // check against configured requirements
View Full Code Here

Examples of org.apache.myfaces.trinidad.context.RequestContext

  /**
   * Returns the currently selected folder.
   */
  public FolderData getCurrentFolder()
  {
    RequestContext afContext = RequestContext.getCurrentInstance();
    return (FolderData) afContext.getPageFlowScope().get("currentFolder");
  }
View Full Code Here

Examples of org.apache.shindig.gadgets.http.MultipleResourceHttpFetcher.RequestContext

  public void revisit() throws Exception {
    Node img1 = elem("img", "src", IMG_JPG_SMALL_URL);
    Node img2 = elem("img", "src", IMG_JPG_LARGE_URL);
    List<Node> nodes = ImmutableList.of(img1, img2);

    RequestContext reqCxtImg1 = createRequestContext(IMG_JPG_SMALL_URL, "image/jpeg");
    RequestContext reqCxtImg2 = createRequestContext(IMG_JPG_LARGE_URL, "image/jpeg");

    expect(requestPipeline.execute(eq(reqCxtImg1.getHttpReq())))
        .andReturn(reqCxtImg1.getHttpResp());
    expect(requestPipeline.execute(eq(reqCxtImg2.getHttpReq())))
        .andReturn(reqCxtImg2.getHttpResp());

    Node html = htmlDoc(new Node[] {}, img1, img2);

    String expectedContent = new StringBuilder()
        .append(".__shindig__image0 {\n")
View Full Code Here

Examples of org.apache.tapestry.request.RequestContext

            _internal = !(location.startsWith("/") || location.indexOf("://") > 0);
        }

        public void process(IRequestCycle cycle)
        {
            RequestContext context = cycle.getRequestContext();

            if (_internal)
                forward(context);
            else
                redirect(context);
View Full Code Here

Examples of org.apache.tomcat.util.http.fileupload.RequestContext

        upload.setSizeMax(1024 * 1024 * 10);

        Post p = new Post();

        try {
            RequestContext ctx = new ServletRequestContext(request);
            final List items = upload.parseRequest(ctx);
            Iterator iter = items.iterator();



View Full Code Here

Examples of org.apache.webbeans.context.RequestContext

*/
public class ContextsImpl implements org.jboss.jsr299.tck.spi.Contexts<AbstractContext> {

    public AbstractContext getRequestContext() {
        ContextFactory contextFactory = WebBeansContext.currentInstance().getContextFactory();
        RequestContext ctx = (RequestContext) contextFactory.getStandardContext(RequestScoped.class);

        if (ctx == null) {
            contextFactory.initRequestContext(null);
        }

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.