• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Formfile Not Getting instantiated, <html:file property="theFile"/> sets to null

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everyone,
Please help me to identify the issue:-

1) I am downloading the template from the secured website which asks for user id and password.
2) After this pop-up blocker blocks this file to open, for this I right click allow the file to download and download the file.
3) After this I go to to browse button selects the file and click on upload.
4) After this Browser shows the message " You are about to redirect to a connection which is not secure, The information you are sending to the current site might be transmitted to a non secure site. Do ou wish to continue? " I click yes.
5) After this a browser might send a new request because of which Formfile becomes null and hence FormFile.getInputStream(); comes null.
6) Can anyone help me out why the FormFile object is not set? Here is the code snippet:-

Code in jsp



Code of POJO class



Code for UploadAction


Code of upload Service here it fails since form.getTheFile() is coming null




NOTE:: This code was working good when the file was downloaded from local codebase
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic