GWT Fileupload, what event or handler when user click the choose file button - google-app-engine

I am new to GWT/GAE.
To use GAE Blobstore service, a upload url must be returned from server side, as the tutorial in this blog .
But it seems this get upload url service can be called while user is browsing file, thus I need to find the event to handle when user press the choose file button, and set the formpanel's action attribute there.
fileupload itself has attach/detach or change event, but it seems not what i am looking for.
My code which can do upload to blobstore is as follow:
The upload form is:
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import com.google.gwt.cell.client.DateCell;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.FileUpload;
import com.google.gwt.user.client.ui.FormPanel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteHandler;
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.TextArea;
public class UploadFilePanel implements EntryPoint {
private FileServiceAsync upls = GWT.create(FileService.class);
AsyncCallback<String> callback;
FormPanel form;
String upload_url;
public void onModuleLoad() {
get_upload_url();
RootPanel rootPanel = RootPanel.get();
FlowPanel flowPanel = new FlowPanel();
rootPanel.add(flowPanel, 0, 0);
add_submit_form(flowPanel);
}
private void add_submit_form(FlowPanel flowPanel) {
VerticalPanel panel = new VerticalPanel();
flowPanel.add(panel);
// Create a FormPanel and point it at a service.
form = new FormPanel();
panel.add(form);
form.setEncoding(FormPanel.ENCODING_MULTIPART);
form.setMethod(FormPanel.METHOD_POST);
form.addSubmitCompleteHandler(new SubmitCompleteHandler() {
#Override
public void onSubmitComplete(SubmitCompleteEvent event) {
RootPanel.get().clear();
RootPanel.get().getElement()
.setInnerHTML("upload complete " + event.toString());
}
});
form.setSize("222px", "52px");
// Create a FileUpload widget.
FileUpload upload = new FileUpload();
form.setWidget(upload);
upload.setSize("100%", "100%");
upload.setName("myFile");
TextArea textArea = new TextArea();
panel.add(textArea);
textArea.setWidth("100%");
// Add a 'submit' button.
Button submitbtn = new Button("Submit");
panel.add(submitbtn);
submitbtn.addClickHandler(new ClickHandler() {
#Override
public void onClick(ClickEvent event) {
upls.get_upload_url("/stmtgen/upload", callback);
}
});
}
private void get_upload_url() {
callback = new AsyncCallback<String>() {
#Override
public void onSuccess(String result) {
form.setAction(result);
upload_url = result;
form.submit();
}
#Override
public void onFailure(Throwable caught) {
RootPanel.get().clear();
RootPanel.get().getElement()
.setInnerHTML("Can't get upload url");
}
};
if (upls == null)
upls = GWT.create(FileService.class);
}
}
The Async service I used to get upload url is this:
import com.google.gwt.user.client.rpc.AsyncCallback;
public interface FileServiceAsync {
void get_upload_url(String up, AsyncCallback<String> callback);
}
The problem is when user hit submit button, there is two services invocation which slow down the response.
I tried addHandler(Handler, Type) as below, it doesn't work.
FileUpload upload = new FileUpload();
upload.addHandler(new ClickHandler() {
#Override
public void onClick(ClickEvent event) {
//get upload url here
}
}, ClickEvent.getType()
);

Related

Whitelabel Error Page error (Spring Boot + React)

localhost:9000 is opening fine on the browser. And if I navigate to a link from the menu like localhost:9000/about, it is working fine.
But if I hit localhost:9000/about directly without going to localhost:9000 then nothing happens on the local and if I do the same on server, following error is produced:
Whitelabel Error Page This application has no explicit mapping for
/error, so you are seeing this as a fallback.
Mon Feb 12 14:09:05 IST 2018 There was an unexpected error (type=Not
Found, status=404). No message available
Please help!!
This is happening because in your application you have not defined what your application should do when it will get url request localhost:9000.
For every Request mapping you need to define the operation you want to perform. In your case for localhost:9000 you have to write what you want to do as you have done for local:9000/about.
#RequestMapping("")
#ResponseBody
Function_For_HandlingRequest{}
When you hit http://localhost:9090/about directly, SpringBoot redirect To a /login.html.
So, Redirect every page to index.html .
https://github.com/geowarin/boot-react/blob/master/backend/src/main/java/react/config/SinglePageAppConfig.java
The WebMvcConfigurer interface, starting with Spring 5, contains default implementations for all its methods. As a result, the abstract adapter (WebMvcConfigurerAdapter) class was marked as deprecated.
package your.package.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.util.StringUtils;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.resource.ResourceResolver;
import org.springframework.web.servlet.resource.ResourceResolverChain;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
/**
* Redirects every page to index.html
* Used to handle the router
*/
#Configuration
public class SinglePageAppConfig implements WebMvcConfigurer {
#Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/**")
.addResourceLocations("classpath:/static/")
.resourceChain(false)
.addResolver(new PushStateResourceResolver());
}
private class PushStateResourceResolver implements ResourceResolver {
private Resource index = new ClassPathResource("/static/index.html");
private List<String> handledExtensions = Arrays.asList("html", "js", "json", "csv", "css", "png", "svg", "eot", "ttf", "woff", "appcache", "jpg", "jpeg", "gif", "ico");
private List<String> ignoredPaths = Arrays.asList("api");
#Override
public Resource resolveResource(HttpServletRequest request, String requestPath, List<? extends Resource> locations, ResourceResolverChain chain) {
return resolve(requestPath, locations);
}
#Override
public String resolveUrlPath(String resourcePath, List<? extends Resource> locations, ResourceResolverChain chain) {
Resource resolvedResource = resolve(resourcePath, locations);
if (resolvedResource == null) {
return null;
}
try {
return resolvedResource.getURL().toString();
} catch (IOException e) {
return resolvedResource.getFilename();
}
}
private Resource resolve(String requestPath, List<? extends Resource> locations) {
if (isIgnored(requestPath)) {
return null;
}
if (isHandled(requestPath)) {
return locations.stream()
.map(loc -> createRelative(loc, requestPath))
.filter(resource -> resource != null && resource.exists())
.findFirst()
.orElseGet(null);
}
return index;
}
private Resource createRelative(Resource resource, String relativePath) {
try {
return resource.createRelative(relativePath);
} catch (IOException e) {
return null;
}
}
private boolean isIgnored(String path) {
return ignoredPaths.contains(path);
}
private boolean isHandled(String path) {
String extension = StringUtils.getFilenameExtension(path);
return handledExtensions.stream().anyMatch(ext -> ext.equals(extension));
}
}
}
in Application
#Bean
public WebServerFactoryCustomizer<ConfigurableWebServerFactory> webServerFactoryCustomizer() {
return factory -> {
ErrorPage error404Page = new ErrorPage(HttpStatus.NOT_FOUND, "/index.html");
factory.addErrorPages(error404Page);
};
}
enter image description here

how to create CXF API for jbilling integration?

Can anyone tell me how to create CXF API? For jbilling integration, I want to create CXF API. But I don't know how to create it.
you can create a class in jbilling which call other evn and send headers and body as Json or string.
like this.
package com.cycle30.plugin.payment;
import java.util.ArrayList;
import java.util.List;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.cxf.jaxrs.client.WebClient;
import org.apache.log4j.Logger;
public class HttpJMSClient {
private PostMethod postMethod;
private String webUrl;
private List<NameValuePair> nameValuePairs=new ArrayList<NameValuePair>();
private static final Logger logger = Logger.getLogger(HttpJMSClient.class);
public HttpJMSClient() {
// TODO Auto-generated constructor stub
}
public void getConnection()
{
webUrl="http://localhost:8081";
nameValuePairs.add(new NameValuePair("x-force-user-id","abc1233"));
nameValuePairs.add(new NameValuePair("x-trans-id","123"));
}
public String makeCall( String body)
{
Object output=null;
try{
WebClient client = WebClient.create(webUrl);
for (NameValuePair h : nameValuePairs) {
client.header(h.getName(), h.getValue());
}
Response response = client.type(MediaType.APPLICATION_JSON).post(body,
Response.class);
logger.debug("Output from Server .... \n");
output = response.getEntity();
logger.debug(output);
System.out.println("my res: "+output.toString());
int statusCode = response.getStatus();
System.out.println("status code: "+statusCode);
return output.toString();
}catch(Exception e){
logger.error(e.getMessage());
logger.error(e.getCause());
}
return output.toString();
}
}

Selenium Web driver--Failure Screenshot is not captured in TestNG report

With below mentioned code,if the test case is pass-screenshot captured successfully and displayed in report.But when the test is failed--screenshot is not displayed.Even screenshot hyperlink is not displayed in report.Anybody can sort out the mistake in code?
package listeners;
import java.io.File;
import java.io.IOException;
import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.ITestResult;
import org.testng.Reporter;
import org.testng.annotations.Listeners;
import org.testng.annotations.Test;
import org.testng.ITestResult;
import org.testng.Reporter;
import org.testng.TestListenerAdapter;
import java.util.logging.Logger;
#Listeners
public class CountryChoserLayer extends TestListenerAdapter {
#Test(priority=1)
public void choseCountry() throws Exception{
driver.findElement(By.id("intselect")).sendKeys("India");
driver.findElement(By.xpath(".//*[#id='countryChooser']/a/img")).click();
//window.onbeforeunload = null;
Date date=new Date();
Format formatter = new SimpleDateFormat("yyyy-MM-dd_hh-mm-ss");
File scrnsht = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
String NewFileNamePath=("C://Documents and Settings//vlakshm//workspace//MyTNG//test-output//Screenshots"+"//SearsINTL_"+ formatter.format(date)+".png");
FileUtils.copyFile(scrnsht, new File(NewFileNamePath));
System.out.println(NewFileNamePath);
Reporter.log("Passed Screenshot");
System.out.println("---------------------------------------");
System.out.println("Country choser layer test case-Success");
System.out.println("---------------------------------------");
}
public String baseurl="http://www.sears.com/shc/s/CountryChooserView?storeId=10153&catalogId=12605";
public WebDriver driver;
public int Count = 0;
#Test(priority=0)
public void openBrowser() {
driver = new FirefoxDriver();
driver.manage().deleteAllCookies();
driver.get(baseurl);
}
#Test(priority=2)
public void closeBrowser() {
driver.quit();
}
#Override
public void onTestFailure(ITestResult result){
Reporter.log("Fail");
System.out.println("BBB");
//Reporter.setCurrentTestResult(result);
Date date=new Date();
Format formatter = new SimpleDateFormat("yyyy-MM-dd_hh-mm-ss");
File scrnsht = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
//File scrFile = ((TakesScreenshot) WebDriver.globalDriverInstance).getScreenshotAs(OutputType.FILE);
String NewFileNamePath=("C://Documents and Settings//vlakshm//workspace//MyTNG//test-output//Screenshots"+"//SearsINTL_"+ formatter.format(date)+".png");
//System.out.println("AAA" + NewFileNamePath);
try {
//System.out.println("CCC");
FileUtils.copyFile(scrnsht,new File(NewFileNamePath));
System.out.println(NewFileNamePath);
} catch (IOException e) {
// TODO Auto-generated catch block
System.out.println("DDD");
e.printStackTrace();
}
Reporter.log("Failed Screenshot");
Reporter.setCurrentTestResult(null);
System.out.println("---------------------------------------");
System.out.println("Country choser layer test case Failed");
System.out.println("---------------------------------------");
}
#Override
public void onTestSkipped(ITestResult result) {
// will be called after test will be skipped
Reporter.log("Skip");
}
#Override
public void onTestSuccess(ITestResult result) {
// will be called after test will pass
Reporter.log("Pass");
}
}
Your onTestFailure method is not being called because you didn't specify listener for your test class. You are missing a value in #Listeners annotation. It should be something like
#Listeners({CountryChoserLayer.class})
You can find more ways of specifying a listener in official TestNg's documentation.
Another problem you are likely to encounter would be NullPointerException while trying to take screenshot in onTestFailure method. The easiest workaround for that would be changing the declaration of driver field to static. I run the code with those fixes and I got the report with screenshot.
I must add that in my opinion putting both test and listener methods into one class is not a good practice.

Tap events not fired in mgwt

I have just started learning mgwt. After creating a Button and adding a TapHandler, the tap events are not fired. I don't know what is wrong in the code. I have deployed this on GAE and accessing the site on a Android device. Below is the code for onModuleLoad()
import com.citrix.demo.client.css.AppBundle;
import com.google.gwt.activity.shared.ActivityMapper;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.GWT.UncaughtExceptionHandler;
import com.google.gwt.dom.client.StyleInjector;
import com.google.gwt.place.shared.PlaceHistoryHandler;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.SimplePanel;
import com.googlecode.mgwt.dom.client.event.tap.TapEvent;
import com.googlecode.mgwt.dom.client.event.tap.TapHandler;
import com.googlecode.mgwt.mvp.client.AnimatableDisplay;
import com.googlecode.mgwt.mvp.client.AnimatingActivityManager;
import com.googlecode.mgwt.mvp.client.Animation;
import com.googlecode.mgwt.mvp.client.AnimationMapper;
import com.googlecode.mgwt.ui.client.MGWT;
import com.googlecode.mgwt.ui.client.MGWTSettings;
import com.googlecode.mgwt.ui.client.MGWTStyle;
import com.googlecode.mgwt.ui.client.animation.AnimationHelper;
import com.googlecode.mgwt.ui.client.dialog.TabletPortraitOverlay;
import com.googlecode.mgwt.ui.client.layout.MasterRegionHandler;
import com.googlecode.mgwt.ui.client.layout.OrientationRegionHandler;
import com.googlecode.mgwt.ui.client.widget.Button;
import com.googlecode.mgwt.ui.client.widget.LayoutPanel;
/**
* #author Daniel Kurka
*
*/
public class MgwtAppEntryPoint implements EntryPoint {
private static LayoutPanel layout = new LayoutPanel();
private void start() {
//set viewport and other settings for mobile
MGWT.applySettings(MGWTSettings.getAppSetting());
final ClientFactory clientFactory = new ClientFactoryImpl();
// Start PlaceHistoryHandler with our PlaceHistoryMapper
AppPlaceHistoryMapper historyMapper = GWT.create(AppPlaceHistoryMapper.class);
final PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
historyHandler.register(clientFactory.getPlaceController(), clientFactory.getEventBus(), new com.citrix.demo.client.activities.HomePlace());
if ((MGWT.getOsDetection().isTablet())) {
// very nasty workaround because GWT does not correctly support
// #media
StyleInjector.inject(AppBundle.INSTANCE.css().getText());
createTabletDisplay(clientFactory);
} else {
createPhoneDisplay(clientFactory);
}
historyHandler.handleCurrentHistory();
}
private void createPhoneDisplay(ClientFactory clientFactory) {
AnimatableDisplay display = GWT.create(AnimatableDisplay.class);
PhoneActivityMapper appActivityMapper = new PhoneActivityMapper(clientFactory);
PhoneAnimationMapper appAnimationMapper = new PhoneAnimationMapper();
AnimatingActivityManager activityManager = new AnimatingActivityManager(appActivityMapper, appAnimationMapper, clientFactory.getEventBus());
activityManager.setDisplay(display);
RootPanel.get().add(display);
}
private void createTabletDisplay(ClientFactory clientFactory) {
SimplePanel navContainer = new SimplePanel();
navContainer.getElement().setId("nav");
navContainer.getElement().addClassName("landscapeonly");
AnimatableDisplay navDisplay = GWT.create(AnimatableDisplay.class);
final TabletPortraitOverlay tabletPortraitOverlay = new TabletPortraitOverlay();
new OrientationRegionHandler(navContainer, tabletPortraitOverlay, navDisplay);
new MasterRegionHandler(clientFactory.getEventBus(), "nav", tabletPortraitOverlay);
ActivityMapper navActivityMapper = new TabletNavActivityMapper(clientFactory);
AnimationMapper navAnimationMapper = new TabletNavAnimationMapper();
AnimatingActivityManager navActivityManager = new AnimatingActivityManager(navActivityMapper, navAnimationMapper, clientFactory.getEventBus());
navActivityManager.setDisplay(navDisplay);
RootPanel.get().add(navContainer);
SimplePanel mainContainer = new SimplePanel();
mainContainer.getElement().setId("main");
AnimatableDisplay mainDisplay = GWT.create(AnimatableDisplay.class);
TabletMainActivityMapper tabletMainActivityMapper = new TabletMainActivityMapper(clientFactory);
AnimationMapper tabletMainAnimationMapper = new TabletMainAnimationMapper();
AnimatingActivityManager mainActivityManager = new AnimatingActivityManager(tabletMainActivityMapper, tabletMainAnimationMapper, clientFactory.getEventBus());
mainActivityManager.setDisplay(mainDisplay);
mainContainer.setWidget(mainDisplay);
RootPanel.get().add(mainContainer);
}
#Override
public void onModuleLoad() {
GWT.setUncaughtExceptionHandler(new UncaughtExceptionHandler() {
#Override
public void onUncaughtException(Throwable e) {
Window.alert("uncaught: " + e.getMessage());
e.printStackTrace();
}
});
new Timer() {
#Override
public void run() {
start();
}
}.schedule(1);
//set viewport and other settings for mobile
MGWT.applySettings(MGWTSettings.getAppSetting());
MGWTStyle.getTheme().getMGWTClientBundle().getMainCss().ensureInjected();
Label label = new Label("Welcome");
label.setAutoHorizontalAlignment(Label.ALIGN_CENTER);
Button button = new Button();
button.setRound(true);
button.setText("Click");
button.addTapHandler(new TapHandler() {
#Override
public void onTap(TapEvent event) {
Window.alert("Hola !");
}
});
layout.add(label);
layout.add(button);
//build animation helper and attach it
AnimationHelper animationHelper = new AnimationHelper();
// RootPanel.get().add(layout);
RootPanel.get().add(animationHelper);
animationHelper.goTo(layout, Animation.POP);
}
}
Can somebody help me out with this ? Thanks..!
You are adding more than one AnimatableDisplays to one region. Those will overlap.
You just added some lines of code to the mgwt showcase I guess without removing the showcase code. To fix this you could remove the call to start() from the timer.

JSF file upload on GAE

I'm trying to have a file upload element in my JSF over Google App Engine.
I have browsed the web for several alternatives but none seem to work with GAE.
I was able to do so using JSP and servlet with BlobstoreService but couldn't find a way to make it working with JSF.
As a workaround I was trying to see if there is a way to include a JSP within a JSF but I guess this isn't doable as well.
Would be thankful to get a working example.
Thanks!
First get library http://code.google.com/p/gmultipart/ and add to your project.
And than override class org.primefaces.webapp.filter.FileUploadFilter (just put in your src).
There is code of class org.primefaces.webapp.filter.FileUploadFilter:
package org.primefaces.webapp.filter;
import java.io.File;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.gmr.web.multipart.GFileItemFactory;
import org.primefaces.webapp.MultipartRequest;
public class FileUploadFilter implements Filter {
private final static Logger logger = Logger.getLogger(FileUploadFilter.class.getName());
private final static String THRESHOLD_SIZE_PARAM = "thresholdSize";
private final static String UPLOAD_DIRECTORY_PARAM = "uploadDirectory";
private String thresholdSize;
private String uploadDir;
public void init(FilterConfig filterConfig) throws ServletException {
thresholdSize = filterConfig.getInitParameter(THRESHOLD_SIZE_PARAM);
uploadDir = filterConfig.getInitParameter(UPLOAD_DIRECTORY_PARAM);
if(logger.isLoggable(Level.FINE))
logger.fine("FileUploadFilter initiated successfully");
}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException {
HttpServletRequest httpServletRequest = (HttpServletRequest) request;
boolean isMultipart = ServletFileUpload.isMultipartContent(httpServletRequest);
if(isMultipart) {
if(logger.isLoggable(Level.FINE))
logger.fine("Parsing file upload request");
//start change
FileItemFactory diskFileItemFactory = new GFileItemFactory();
/* if(thresholdSize != null) {
diskFileItemFactory.setSizeThreshold(Integer.valueOf(thresholdSize));
}
if(uploadDir != null) {
diskFileItemFactory.setRepository(new File(uploadDir));
}*/
//end change
ServletFileUpload servletFileUpload = new ServletFileUpload(diskFileItemFactory);
MultipartRequest multipartRequest = new MultipartRequest(httpServletRequest, servletFileUpload);
if(logger.isLoggable(Level.FINE))
logger.fine("File upload request parsed succesfully, continuing with filter chain with a wrapped multipart request");
filterChain.doFilter(multipartRequest, response);
} else {
filterChain.doFilter(request, response);
}
}
public void destroy() {
if(logger.isLoggable(Level.FINE))
logger.fine("Destroying FileUploadFilter");
}
}
In managed bean write method like:
public void handleFileUpload(FileUploadEvent event) {
UploadedFile uploadedFile = event.getFile();
try {
String blobKey = BlobUtils.uploadImageToBlobStore(uploadedFile.getContentType(), uploadedFile.getFileName(), uploadedFile.getContents());
this.iconKey = blobKey;
} catch (IOException e) {
log.log(Level.SEVERE, "Ошибка при попытке загрузить файл в blob-хранилище", e);
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Ошибка при попытке загрузить файл", event.getFile().getFileName() + " не загружен!");
FacesContext.getCurrentInstance().addMessage(null, msg);
return;
}
FacesMessage msg = new FacesMessage("Успешно.", event.getFile().getFileName() + " загружен.");
FacesContext.getCurrentInstance().addMessage(null, msg);
}
And that all.
First of all , I think that whatever you are doing with JSP should eventually work with JSF as well..
BUT,
If you are looking for a file upload component for JSF , that works on GAE ,
take a look at the PrimeFaces FileUpload
Here is another link that got an explanation on what to do in order it to work on GAE :Primefaces File Upload Filter
(haven't tried it myself...)

Resources