
File f = new File (config.getServletContext().getRealPath("/") + "artists/" +username);
f.mkdir();
File video = new File (config.getServletContext().getRealPath("/") + "artists/" +username + "/video");
video.mkdir();
File mp3 = new File (config.getServletContext().getRealPath("/") + "artists/" +username + "/mp3");
mp3.mkdir();
File images = new File (config.getServletContext().getRealPath("/") + "artists/" +username + "/images");
images.mkdir();
i am using this code for creating directory and then storing images and other files but when i am trying to display image i am not able to display i am using netbeans and using this code for accessing files
<a href ="../../build/web/artists/<%out.print(userid);%>/images/<%=rs.getString(3)%>" title ="<%=rs.getString(4)%>">
<img src ="../../build/web/artists/<%out.print(userid);%>/images/<%=rs.getString(3)%>" alt ="<%=rs.getString(4)%>" height="150px" width= "125px"/>
</a>
this is the folder where i am storing my image after upload
C:\Users\Arpit\Desktop\mj_27\build\web\artists\arpit\images