-1

anyone can help me? I'm developing a J2EE application Hibernate, Spring and Spring webflow security

and I want to load the file and read? p how i can use ???

  • Hi, welcome to SO, please add some context to your question and especially show how far you've gotten so far. We're looking to give very specific answers here, not general descriptions. You can use the [edit link](http://stackoverflow.com/posts/22401453/edit) to improve your question – avalancha Mar 14 '14 at 10:10
  • I want to read file text with : – user3419263 Mar 14 '14 at 10:24
  • First, please add the details to the original post by editing it. We need to know how you are sending the file, how you have attempted to recieve the file, what libraries/etc. you are using, and most importantly the errant output/error messages. To the point of the post, you probably need to read up on Spring MVC's Multipart File support. Google returned this: http://docs.spring.io/spring/docs/3.0.0.M3/reference/html/ch16s08.html – CodeChimp Mar 14 '14 at 11:40
  • thnx @CodeChimp it is important but when ? i can read the file ??? – user3419263 Mar 14 '14 at 21:03
  • My point was that we don't have enough information to help you. There are many ways file upload can be accomplished. If you are fishing for how to do it, StackOverflow is really not the place to do that. If you have attempted something, then give us the details so we can properly help you. – CodeChimp Mar 17 '14 at 11:22

1 Answers1

0

consider using Primefaces and it's file upload widget:

<h:form>  
    <p:fileUpload fileUploadListener="#{fileUploadController.handleFileUpload}" mode="advanced" dragDropSupport="false"  
                  update="messages" sizeLimit="100000" fileLimit="3" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" />  

    <p:growl id="messages" showDetail="true"/>  
</h:form>  

This widget only works if a filter is added to your web.xml:

   <filter>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <filter-class>
               org.primefaces.webapp.filter.FileUploadFilter
        </filter-class>
  </filter>
  <filter-mapping>
        <filter-name>PrimeFaces FileUpload Filter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
  </filter-mapping>
Angular University
  • 42,341
  • 15
  • 74
  • 81