• 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 2 File uploading 2 server

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone, well im using struts 2, and maybe this question is not about struts 2, but I have a project in weblogic with 3 servers in a cluster, so i need to save a file into one of those servers, or in other server...
how can i do that?, thanks.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Apache Struts 2 Documentation: File Upload
 
Rodrigo Cabrera
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actualy the problem is not uploading a file, i dont have a problem with that but with giving the file path, i want to be something like http://127.0.0.1/thefiles/file like a file system, thank you.
 
Joe Ess
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How was I supposed to know that from your first post? Please take a moment and review our FAQ, HowToAskQuestionsOnJavaRanch. The better question you ask, the more help we can give.
As for your question, I had a similar requirement so I created an upload directory to store all uploaded files, then made a servlet which would read directly from the file system. Be aware that some servers are secured so they cannot access files outside the deploy directory (Tomcat on Ubuntu comes to mind) and you should scrub the context given so it does not contain file path operators (allowing a path like "/" or ".." could expose configuration files or other sensitive resources).
 
Ranch Hand
Posts: 188
Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hope this would help
http://debrajmallick.wordpress.com/2011/05/01/struts2-file-upload-to-desire-folder-location/
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic