• 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

Technologies to use in a file upload web project

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey.

First i don't know if its proper place to post my tread. I'm familiar with J2SE so its time to learn some web. I like to learn while making an actual real projects, and there's one i'm going to do. Here it comes in short:
- there will be website to upload files (text, xml, dbf).
- i make an out file txt in certain format, according to data in input files and give it back to user.
- you will need to make an account to be able to use it.
- every user will have their account where they can store out files and download them at any time.

My question now. What technologies should i use to make it. I would appreciate advices from experienced users how they would do it. Have in mind i'm a beginning web developer.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

I assume that if you're here and are familiar with JSE, you want to do this in Java. If so, you have posted to the right place. You can accomplish what you want with a combination of servlets (for the Java code) and JSP (for dynamic HTML).

I would advise finding a good modern tutorial or book on these subjects to get you started. I emphasize modern. If the resource you use shows example that put Java code in a JSP, get something better and more modern.

Caveat: some books will teach modern JSTL (JSP Standard Tag Library) and EL (Expression Language) along with obsolete Java scriptlets (Java in a JSP). That's OK -- just ignore the scriptlets parts for now, or at least know that that's an obsolete technique that should not be used in new JSP pages.


 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to add one more observation. A lot of people think that the best place to upload files is into a subdirectory in a WAR.

It is not. For one thing, in strict J2EE usage, a WAR is a single (ZIP-format) file and as such has no subdirectories in the literal filesystem sense. You'd have to create a whole new WAR containing the uploaded data, since the Java ZIP classes don't allow update-in-place for ZIP files and their relatives.

However, a lot of webservers "explode" WARs into real files and directories. You might think then that as long as you're using such as server, you're OK.

Wrong. The first time you update the webapp, that WAR is going to get nuked and so will all of the uploaded file data.

Always upload your files to some directory that is external to both your webapp server and your webapp. For Linux/Unix systems, the convention is usually to put that directory under the OS /var/lib directory. Windows has no such convention, so it's up to you. All that really matters is that the data will be stored out of harm's way. Extra points for putting it some place that gets backed up, though.
 
Greenhorn
Posts: 7
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Luke,

I guess before getting started with the actual development I would suggest follow some good tutorials on j2ee and make yourself comfortable with jsp, servlet, web server(apache tomcat is best for starters).
below forum is what I found very usefull
http://javabrains.koushik.org/p/jsps-and-servlets.html
 
Luke Bielecki
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys for all answers. Really helpful.
 
reply
    Bookmark Topic Watch Topic
  • New Topic