Examples of WebAction


Examples of com.pugh.sockso.web.action.WebAction

            req = new HttpRequest( sv );
            req.process( new BufferedInputStream(client.getInputStream()) );

            Locale locale = localeFactory.getLocale( req.getPreferredLangCode() );

            final WebAction action = dispatcher.getAction( req );
            action.setRequest( req );
            action.setLocale( locale );

            if ( action.requiresSession() ) {
                final Session session = new Session( db, req, null );
                user = session.getCurrentUser();
            }

            action.setUser( user );

            res = new HttpResponse(
                new BufferedOutputStream(client.getOutputStream()),
                db, p, locale, user,
                req.getHeader("Accept-Encoding").contains("gzip")
                    // @TODO fix safari gzip bug
                    && !req.getHeader("User-Agent").contains("Safari")
            );

            action.setResponse( res );

            process( action, user, req, locale, res );

        }
       
View Full Code Here

Examples of org.soybeanMilk.web.exe.WebAction

    parser.parse("org/soybeanMilk/test/unit/web/TestWebConfigurationParser-0.xml");
   
    WebConfiguration webConfiguration= parser.getWebConfiguration();
   
    {
      WebAction ac=(WebAction)webConfiguration.getExecutable("exe0");
      Assert.assertNull(ac.getTarget().getUrl());
      Assert.assertEquals(Target.FORWARD, ac.getTarget().getType());
    }
    {
      WebAction ac=(WebAction)webConfiguration.getExecutable("exe1");
      Assert.assertEquals("url", ac.getTarget().getUrl());
      Assert.assertEquals(Target.FORWARD, ac.getTarget().getType());
    }
    {
      WebAction ac=(WebAction)webConfiguration.getExecutable("exe2");
      Assert.assertNull(ac.getTarget().getUrl());
      Assert.assertEquals("json", ac.getTarget().getType());
    }
    {
      WebAction ac=(WebAction)webConfiguration.getExecutable("exe3");
      Assert.assertNull(ac.getTarget().getUrl());
      Assert.assertEquals("JSON", ac.getTarget().getType());
    }
  }
View Full Code Here

Examples of org.soybeanMilk.web.exe.WebAction

 
  @Test
  public void getAllInvokeResultKey() throws Exception
  {
    String[] expected={"result0", "request.result1", "session.result2", "application.result3", "request.result5", "request.result4"};
    WebAction webAction=(WebAction)webConfiguration.getExecutable("exe1");
   
    String[] re=abstractTargetHandler.getAllResultKeys(webAction);
   
    for(int i=0;i<expected.length;i++)
    {
View Full Code Here

Examples of org.soybeanMilk.web.exe.WebAction

 
  @Test
  public void getActualTargetUrl() throws Exception
  {
    WebObjectSource os=createWebObjectSource();
    WebAction webAction=(WebAction)webConfiguration.getExecutable("exe3");
   
    os.set("request.v0", "v0");
    os.set("request.v1", "v1");
   
    Assert.assertEquals("v0/v1/aaa/null/bbb.jsp", abstractTargetHandler.getActualTargetUrl(webAction, os));
View Full Code Here

Examples of org.soybeanMilk.web.exe.WebAction

  }
 
  //@Override
  protected Action createActionIntance()
  {
    return new WebAction();
  }
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.