×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Java
Posted by: Igor Mouawa
Added: Jun 28, 2017 1:16 AM
Views: 7
Tags: no tags
Verifica se o form é enctype="multipart/form-data">
  1.     private boolean isMultiPartRequest(FacesContext context) {
  2.         if (context == null) {
  3.             return false;
  4.         }
  5.  
  6.         return ((HttpServletRequest) context.getExternalContext().getRequest()).getContentType().startsWith("multipart");
  7.     }