what i am trying to do is fetching the session attribute from servlet, This attribute contains the path of my desired image which i want to display on jsp page. if i put this attribute like
<%=session.getAttribute("imageurl")%>
it give me perfect path. but when i do
<%String img=(String)session.getAttribute("imageurl");%>
<img src="img" alt="" width="100" height="100"/>
it shows nothing... please help regarding this scenario
this is my code from servlet
String name=rs.getString("name");
String image=rs.getString("ppicture");
String loc = "G:/Friendbook/pictures/";
String imageurl=loc+image;imageurl=imageurl.trim();
HttpSession session=req.getSession();
session.setAttribute("name",name);
session.setAttribute("imageurl",imageurl);
req.setAttribute("imageurl", imageurl);
req.getRequestDispatcher("home.jsp").forward(req, res);