Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Uploading File with JSP

 
Raymund Caga
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Im in a middle of a project. Im suppose to upload a file to a server using JSP. The problem is it should be automatic right after writing to the SIGNATURE PAD. another is that I should not use a INPUT TYPE=FILE bcoz it needs user interface...
Can anyone help me???
Thanks!!!

Raymund
 
Hugh Jamieson
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Raymond!
Uploading files is a snap if you can use Struts. It offers some very nice handling of multipart forms, and has special beans that make the file available to your backend processing. I would check it out at jakarta.org.
Before I used Struts, I found some jsp + java code on the net. I will scrounge around to see if I still have it. Also, I think Marty Hall covered this topic in his book about Servlets + JSPs. I highly recommend this book + author.
I also remember some post about this topic on O'Reilly book website. I think they even have a helper javabean to do this.
Best of luck!!
Hugh
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't quite follow you on your requirements. What do you mean by "signature pad", and what is the problem with requiring a user interface?
 
Raymund Caga
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi There,
Thanks for helping...
Most of the examples in the net and in the book use the INPUT TYPE=FILE which is possible but i cant use it bcoz (user reqmnts).
Signature Pad is a Device Im using right now. and the file that is being generated by the Pad is the one Im suppose to Upload to the Server...
I cant find any code that could upload without using the above mentioned...
Thank You... and Need help Badly....

Raymund
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So if I'm following you, and I'm still not sure that I am, you have an input device (a signature pad) which generates a file. Is this signature pad a piece of hardware? Is this file saved somewhere? Within the pad maybe?
From what I understand so far, it doesn't sound like JSP is the way to go, unless you have some specific reason you feel it should be JSP.
 
Raymund Caga
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jason,
The signature pad is a hardware device. The file that is being generated is saved in a specific directory in the client computer.
The design goes like this, after generating the file in a specific directory. The program should get that file from the directory and upload it to the server. Actually the Sigbox.ocx is the one generating the file. I have no problem with generating the file. Now the problem is how to upload the file to the server. Most of the examples use Input Type=File, but it needs user interaction if I use it. Im looking for a code that can upload a file to a server with any user interaction...
Hope this will clear it...
Need your help...
Thank you...

Raymund
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somehow you need to create a HTTP POST request and send it to the web server. You could check out the jakarta commons project's HttpClient subproject (especially the MultipartPostMethod class).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic