¡@

Home 

java Programming Glossary: externalcontext

How to generate json response from JSF?

http://stackoverflow.com/questions/10982762/how-to-generate-json-response-from-jsf

FacesContext facesContext FacesContext.getCurrentInstance ExternalContext externalContext facesContext.getExternalContext externalContext.setResponseContentType.. ExternalContext externalContext facesContext.getExternalContext externalContext.setResponseContentType application json externalContext.setResponseCharacterEncoding..

JSF navigation redirect to previous page

http://stackoverflow.com/questions/1164964/jsf-navigation-redirect-to-previous-page

after response has been committed com.sun.faces.context.ExternalContextImpl.dispatch ExternalContextImpl.java 322 com.sun.faces.application.ViewHandlerImpl.renderView.. com.sun.faces.context.ExternalContextImpl.dispatch ExternalContextImpl.java 322 com.sun.faces.application.ViewHandlerImpl.renderView.. hoods but instead do FacesContext.getCurrentInstance .getExternalContext .redirect url This will automatically invoke responseComplete..

JSF Filter not redirecting After Initial Redirect [closed]

http://stackoverflow.com/questions/13366936/jsf-filter-not-redirecting-after-initial-redirect

javax.faces.bean.SessionScoped import javax.faces.context.ExternalContext import javax.faces.context.FacesContext import javax.servlet.ServletRequest.. logOut FacesContext ctx FacesContext.getCurrentInstance ExternalContext extCtx ctx.getExternalContext Map String Object sessionMap extCtx.getSessionMap.. ExternalContext extCtx ctx.getExternalContext Map String Object sessionMap extCtx.getSessionMap sessionMap.put..

Prevent suffix from being added to resources when page loads

http://stackoverflow.com/questions/14963756/prevent-suffix-from-being-added-to-resources-when-page-loads

ResourceWrapper @Override public String getRequestPath ExternalContext externalContext FacesContext.getCurrentInstance .getExternalContext.. externalContext FacesContext.getCurrentInstance .getExternalContext String mapping externalContext.getRequestServletPath if externalContext.getRequestPathInfo.. ResourceHandler.RESOURCE_IDENTIFIER.equals context.getExternalContext .getRequestServletPath @Override public void handleResourceRequest..

Forcing a save as dialogue from any web browser from JSF application

http://stackoverflow.com/questions/2914025/forcing-a-save-as-dialogue-from-any-web-browser-from-jsf-application

the HTTP servlet response from under the JSF hoods by ExternalContext#getResponse . In JSF context you only need to ensure that you.. FacesContext facesContext FacesContext.getCurrentInstance ExternalContext externalContext facesContext.getExternalContext HttpServletResponse.. ExternalContext externalContext facesContext.getExternalContext HttpServletResponse response HttpServletResponse externalContext.getResponse..

JSF initialize application-scope bean when context initialized

http://stackoverflow.com/questions/315073/jsf-initialize-application-scope-bean-when-context-initialized

the object in a JSF managed bean you can get it from the ExternalContext FacesContext.getCurrentInstance .getExternalContext .getApplicationMap..

How to read properties file in web application?

http://stackoverflow.com/questions/3160691/how-to-read-properties-file-in-web-application

auth.properties . I cannot use JSF specific ways with ExternalContext because I need properties file in a service module which doesn't.. remove the leading . The JSF specific ExternalContext#getResourceAsStream which uses ServletContext#getResourceAsStream..

Design Patterns web based applications

http://stackoverflow.com/questions/3541077/design-patterns-web-based-applications

In JSF terms this is what the FacesContext and ExternalContext classes are doing. Then there's the State pattern for the case..

How to manually set an authenticated user in Spring Security / SpringMVC

http://stackoverflow.com/questions/4664893/how-to-manually-set-an-authenticated-user-in-spring-security-springmvc

within a Spring Webflow flow hence the RequestContext and ExternalContext classes. But the part that is most relevant to you is the doAutoLogin.. userRegistrationFormBean RequestContext requestContext ExternalContext externalContext try Locale userLocale requestContext.getExternalContext.. externalContext try Locale userLocale requestContext.getExternalContext .getLocale this.userService.createNewUser userRegistrationFormBean..

How to differentiate Ajax requests from normal Http requests?

http://stackoverflow.com/questions/4885893/how-to-differentiate-ajax-requests-from-normal-http-requests

header. In JSF you can obtain the request headers by ExternalContext#getRequestHeaderMap . ExternalContext externalContext facesContext.getExternalContext.. request headers by ExternalContext#getRequestHeaderMap . ExternalContext externalContext facesContext.getExternalContext Map String String.. . ExternalContext externalContext facesContext.getExternalContext Map String String headers externalContext.getRequestHeaderMap..