Examples of WebApplicationContext


Examples of org.springframework.web.context.WebApplicationContext

    }

    @Test
    public void testEarlyFeatureUsage() throws IOException {

        WebApplicationContext applicationContext = ContextLoader.getCurrentWebApplicationContext();
        SpringEarlyFeatureUsageService service = applicationContext.getBean(SpringEarlyFeatureUsageService.class);

        assertEquals(false, service.isFeature1Active());
        assertEquals(false, service.isFeature2Active());

    }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

  @Override
  public String intercept(ActionInvocation invocation) throws Exception {
    logger.debug("Start AuthenticationInterceptor");
    final Object action = invocation.getAction();
    final ActionContext context = invocation.getInvocationContext();
    WebApplicationContext ctx = WebApplicationContextUtils.
      getWebApplicationContext((ServletContext) context.get(SERVLET_CONTEXT));
    HttpServletRequest request = (HttpServletRequest)context.get(HTTP_REQUEST);
    HttpServletResponse response = (HttpServletResponse)context.get(HTTP_RESPONSE);
   
    OperatingUnitDao operatingUnitDao = (OperatingUnitDao)ctx.getBean("loxiaOperatingUnitDao");
   
    String strMethod = invocation.getProxy().getMethod();
    Method m = getActionMethod(action.getClass(), strMethod);
    Acl acl = m.getAnnotation(Acl.class);
    if(acl == null)
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

         
          MemberVO token = null;
          LoginHistoryVO accessHistory = null;
         
          ServletContext sCtx = request.getSession().getServletContext();
          WebApplicationContext wCtx = WebApplicationContextUtils.getWebApplicationContext(sCtx);       
          MyAlumniUserContainer container = (MyAlumniUserContainer)wCtx.getBean("userContainer");    
 
 
          logger.info("Login attempt --> , [ " + username +   " ][ " + currentIP + "]");
 
 
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

public final int doStartTag() throws JspException
    {
        request = (HttpServletRequest) pageContext.getRequest();
        session = request.getSession();
        container = (MyAlumniUserContainer)session.getAttribute(BaseConstants.USER_CONTAINER);
        WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
        classNewsService = (IClassNewsService) wac.getBean(BaseConstants.SERVICE_CLASSNEWS_LOOKUP);
        return EVAL_BODY_BUFFERED;
    }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

   */
  @Override
public final int doStartTag() throws JspException
    {
        request = (HttpServletRequest) pageContext.getRequest();
        WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
      sysConfigService = (ISystemConfigService) wac.getBean(BaseConstants.SERVICE_SYSTEM_CONFIG);
        return EVAL_BODY_BUFFERED;
    }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

   */
  @Override
  public final int doStartTag() throws JspException {
    request = (HttpServletRequest) pageContext.getRequest();

    WebApplicationContext wac = WebApplicationContextUtils
        .getWebApplicationContext(pageContext.getServletContext());
    memService = (IMemberService) wac
        .getBean(BaseConstants.SERVICE_MEMBER_LOOKUP);
    return EVAL_BODY_BUFFERED;
  }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

public final int doStartTag() throws JspException
    {
        request = (HttpServletRequest) pageContext.getRequest();
        //session = request.getSession();
        //container = (MyAlumniUserContainer)session.getAttribute(BaseConstants.USER_CONTAINER);
        WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
        configService = (ISystemConfigService) wac.getBean(BaseConstants.SERVICE_SYSTEM_CONFIG);
        return EVAL_BODY_BUFFERED;
    }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

   */
  @Override
public final int doStartTag() throws JspException
    {
        request = (HttpServletRequest) pageContext.getRequest();
        WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(pageContext.getServletContext());
        frontPageService = (IFrontPageService) wac.getBean(BaseConstants.SERVICE_FRONT_PAGE);
        return EVAL_BODY_BUFFERED;
    }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

   */
  @Override
  public final int doStartTag() throws JspException {
    request = (HttpServletRequest) pageContext.getRequest();

    WebApplicationContext wac = WebApplicationContextUtils
        .getWebApplicationContext(pageContext.getServletContext());
    memService = (IMemberService) wac
        .getBean(BaseConstants.SERVICE_MEMBER_LOOKUP);

    return EVAL_BODY_BUFFERED;
  }
View Full Code Here

Examples of org.springframework.web.context.WebApplicationContext

   
    // This is where it was suppose to forward to in the first place.
    ActionForward forward = super.execute(ex, ae, mapping, form, request, response);
   
    ServletContext sCtx = request.getSession().getServletContext();
      WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(sCtx);
      IErrorLogService loggerService = (IErrorLogService) wac.getBean(BaseConstants.SERVICE_ERRORLOGGER_LOOKUP);
     
    String forwardKey = new String();
    Integer statusCode = (Integer) request.getAttribute("javax.servlet.error.status_code");

    Throwable thr = (Throwable)request.getAttribute("javax.servlet.error.exception");
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.