This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to deploy a servlet into a web server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to deploy a servlet into a web server" Watch "how to deploy a servlet into a web server" New topic
Author

how to deploy a servlet into a web server

Rohit Ms
Greenhorn

Joined: Dec 17, 2010
Posts: 1
Hello frens,

I am new to servlets...my task is to send an image to database from netbeans and in return get an acknowledgement from database..

Please help me in this...how to start this....

Many thanks,
Rohit
Ravi C Kota
Ranch Hand

Joined: Jan 29, 2008
Posts: 61
Rohit Ms wrote:Hello frens,

I am new to servlets...my task is to send an image to database from netbeans and in return get an acknowledgement from database..

Please help me in this...how to start this....

Many thanks,
Rohit


Few things which you need to clarify. What do you mean by sending an image to database? Is this persisting to database. Then why are you bothered about servlets.

Or is this sending an image over HTTP to some remote server, which in turn takes the responsibility of persisting to database and send back an ack. I guess this is what you are looking for.

this is similar to file upload (though I have not personally worked on this). Apache has an open source project called FileUpload which provides this facility. Once you get the file at server, persisting to database is a different operation. Google on apache FileUpload and you are presented with abundant examples.

Happy coding.


Thanks & Regards, Ravi C.Kota
SCJP 5.0, OCDJWS 5.0
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Please help me in this...how to start this....


There are many examples , that are aviable in internet .
I will tell you the starting point , on to the Form (to upload images ) , make it as enc


and in your Servlet use the PreparedStatement use this



and use Blob as Datatype for that Database column .
try it.


Save India From Corruption - Anna Hazare.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to deploy a servlet into a web server
 
Similar Threads
Struts
How to get Yesterday's date
convert of text into xml
db to jsp
File & dynamic retrieval