This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { | |
PrintWriter out = response.getWriter(); | |
CharResponseWrapper wrapper = new CharResponseWrapper((HttpServletResponse) response); | |
chain.doFilter(request, wrapper); | |
out.write(wrapper.getData()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ServletOutputStream getOutputStream() | |
throws IOException { | |
if (usingWriter) | |
throw new IllegalStateException | |
(sm.getString("coyoteResponse.getOutputStream.ise")); | |
usingOutputStream = true; | |
if (outputStream == null) { | |
outputStream = new CoyoteOutputStream(outputBuffer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private UIComponent createComponentResource(FacesContext ctx, ResourceDependency dep) { | |
Expressions exprs = expressionsMap.get(dep); | |
Application app = ctx.getApplication(); | |
String resname = exprs.getName(ctx); | |
UIComponent c = ctx.getApplication().createComponent("javax.faces.Output"); | |
c.setRendererType(app.getResourceHandler().getRendererTypeForResourceName(resname)); | |
Map<String,Object> attrs = c.getAttributes(); | |
attrs.put("name", resname); | |
if (exprs.library != null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | |
* | |
* Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. | |
* | |
* The contents of this file are subject to the terms of either the GNU | |
* General Public License Version 2 only ("GPL") or the Common Development | |
* and Distribution License("CDDL") (collectively, the "License"). You | |
* may not use this file except in compliance with the License. You can | |
* obtain a copy of the License at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://gist.github.com/1251704 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.richfaces.demo; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintWriter; | |
import java.io.Writer; | |
import java.util.LinkedHashSet; | |
import java.util.Set; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void processEvent(SystemEvent event) throws AbortProcessingException { | |
if (event instanceof PostRestoreStateEvent) { | |
FacesContext.getCurrentInstance().getApplication().subscribeToEvent(PreRenderViewEvent.class, this); | |
preDecode(getFacesContext()); | |
} | |
if (event instanceof PreRenderViewEvent) { | |
FacesContext.getCurrentInstance().getApplication().unsubscribeFromEvent(PreRenderViewEvent.class, this); | |
preEncodeBegin(getFacesContext()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WebDriver client; | |
JSFServerSession server; | |
void testMethod() { | |
WebElement element = client.get... | |
element.click(); | |
// test goes to server | |
FacesContext facesContext = server.getFacesContext(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(Arquillian.class) | |
public void TestCase { | |
@Deployment | |
... | |
@Drone | |
WebDriver driver; | |
@Test @RunAsClient | |
public void use_Selenium_and_GWT_dev_mode_to_test_WebStorage() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RunWith(Arquillian.class) | |
public void PerformanceTestCase { | |
@Deployment | |
... | |
@Resource | |
HttpClient client; | |
@Client |
OlderNewer