Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

com.oreilly.servlet package!

 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would be grateful if some one could help me in order to use com.oreilly.servlet package .
I need to upload files of any size using a frame on the client side , and may be this will be a problem .
Regards,
Jimi.
 
Andrew Shafer
Ranch Hand
Posts: 338
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I've used some of the classes from that package.
What exactly have you tried to do that doesn't work or are having problems with?
 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrew ,As I told , I am trying to upload a file of any size , i.e. if it is a large file , I am going to upload each part (may be 10MB) individually . and this is not a problem if I am viewing only html on the client side , but if it is for example a java frame , what will be the client program ? and how the servlet is going to be invoked ?
Thanks,
 
vaibhav punekar
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jimi,
why don't you use applet instead so that it can be shown in the HTML file?Ya! there will be a security problem if you upload files from the remote host.So I thnink the only change you will require is to make that "input type =file" working in your application.Is it possible to have "browse" button and select the required files from the local m/c?I never tried it.You can ve workaround to this problem.You can use "filedialogbox" instead.But these com.oreilly classes are very much interrelated and you will require to make changes accordingly.So is it the absolute requirement to have frame only.Otherwise you can use HTML directly to make your life easy.
 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can use applet, no problem because I can sign it , and it is actually signed , I agree with you that using html makes my life easier , but the problem is that I am developing an existed system and the supervisor do not want me to change the current applet . if you are ready to help I will provide you with the current part of the client program that invokes servlet. and with the current servlet program . note that I can browse files using JFileChooser and every thing is working fine, but the current system is uploading the whole file , so if it becomes a large file (more than 25-30 MB), it will fail.
Waiting for your comment..
Thanks,
Jimi.
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the MultipartRequest class. Just invoke an instantiation and the upload is done there.
 
Jimi Rock
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cameron, I would be grateful if you tell me how can I modify the current code in order to get the advantage of this orielly package, and note that I am using it for the first time .I need the client program to determine the source file, distination file , and the servlet url(as it is now) if possible.


Thanks,
Jimi.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic