Saturday, November 15, 2014

Uploading Image in jsp, java, Netbeans

i had spent a lot of time for uploading an image in jsp page.so to help you guys i am writing this blog.
the way to upload the desired image is as below(neteans project)

1. Put the image file in web folder(where all the web pages are placed.)
2. Wright the code

<%String s=request.getContextPath() + "/abc.JPG";%>
<img src="<%=s%>" width = "500" hight = "600" aligh = "center" />

3. Mention the extensions of image carefully i.e(.jpeg, jpg are not treated as same)

for any other query keep posting.
Good Luck!!!

No comments:

Post a Comment