Sai Shrawan

Greenhorn
+ Follow
since Feb 04, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Sai Shrawan

thanx for the hint.

this is what i was looking for, where to store the client file.
stored here:request.getSession().getServletContext().getRealPath("/")

and then used relative path as u said for referring the file on server.

thanx again
19 years ago
JSP
thanx for the quick reply.

i'll make my pblm clearer. i'm able to read the file from the client machine ... means i'm getting the bytes.
now my question is how to write those bytes to a file and where to store it so that it can be referenced by all the clients.
19 years ago
JSP
Hi everyone,

i searched a lot for this one before posting this.

my requirement in brief:
i)User selects an image.
ii)I need to read the image
iii)Store it in server's file system. (Not in database as BLOB)
iv)The image selected by the user should be made visible in a page. so i need to give a reference to the image uploaded thru src attribute in img tag of the webpage.

now the problem is how to accomplish the iii) and iv) steps. i'm able to read the file from client machine thru MultiPart concept and i'm able to accomplish the first 2 steps.

the problem becomes tricky bcoz all the clients shud be able to see the image and we need to set the src attribute such a way that it is global and not specific to any client/server's file system.

i tried to give relative path, but its not working.

am i missing something which is very simple.
help is appreciated
[ June 14, 2005: Message edited by: Bear Bibeault ]
19 years ago
JSP
thanx stephen for ur timely response,

i'll chk out those links n try to figure out how can i use them in my appl.

just want to make my requirement clear:
actually i'm working on a richtext editor wherein the user of the application prepares documents n can insert images too... so my pblm is to embed those images directly into the HTML document push it to database for future reference ( i dont want to save the image as a seperate file )
when i searched internet for this i came across something interesting in this below link
http://www.bennherrera.com/EmbeddedImage/
wherein u can observe the approach used by Benn... but i cudnt get his what he did exactly in his java program ... i mailed him but cudnt get any response.

if u can get anything frm the above approach it wud be nice of u .... coz i think its suit my purpose...
19 years ago
hi
i'm trying to embed an image in a html document which can be done by using base64 encoding in HTML but for that i need to provide the content of the image in hexadecimal
can anyone tell me how this can be acheived in java
there's a restriction that i shudn't use applets for this...
19 years ago