Results 1 to 7 of 7
Thread: displaying images
- 03-22-2012, 01:56 AM #1
Member
- Join Date
- Mar 2012
- Posts
- 5
- Rep Power
- 0
displaying images
I am developing a project using jsp in Netbeans5.5.1. In Netbeans5.5.1 the image buttons cannot be displayed during execution.
Any one help me how to display those buttons as images. and my code is below
<%
try
{
Connection con=databasecon.getconnection();
Statement st=con.createStatement();
String sql="select * from emp2";
ResultSet rs=st.executeQuery(sql);
while(rs.next())
{
%>
<tr class="paragraping2">
<td height="33"> <font color="000080"> <%out.println(rs.getString("mail"));%> </font></td>
<td height="33"> <font color="000080"> <%out.println(rs.getString("name"));%> </font></td>
<td align="left"><font color="#000000"> <% out.println(rs.getString("dateapp"));%> </font></td>
<td align="left"><font color="#000000"> <% out.println(rs.getString("leavtype"));%> </font></td>
<td align="left"><font color="#000000"> <% out.println(rs.getString("lfrom"));%> </font></td>
<td align="left"><font color="#000000"> <% out.println(rs.getString("leaveuntil"));%> </font></td>
<td><font color="#000000"> <% out.println(rs.getString("app"));%></font></td>
<td><font color="#000000"> <% out.println(rs.getString("status"));%></font></td>
<td><a href="empsendingreply.jsp?<%=rs.getString("name")% >"><img src="images/reply.png" width="50" height="35"></a></td> //problem is here.
<%
}
st.close();
con.close();
}
catch(Exception e)
{
out.println(e);
}
%>
- 03-22-2012, 02:22 AM #2
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 698
- Rep Power
- 6
Re: displaying images
What did you see on the browser? Is it a broken image because the image is not in the correct path of your web app?
Website: Learn Java by Examples
- 03-22-2012, 03:47 AM #3
Re: displaying images
Moved from New to Java
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 03-23-2012, 07:27 AM #4
Member
- Join Date
- Mar 2012
- Posts
- 5
- Rep Power
- 0
Re: displaying images
I saw the designed table.One of the cell containing image.That image is not displayed.
I place the images folder in the current directory itself. so i specify the src location as "images/reply.png"
- 03-23-2012, 09:48 AM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Re: displaying images
What is the webapp structure?
Is it (on Tomcat):
webapps/<yourapp>/images/reply.png
?Please do not ask for code as refusal often offends.
- 03-25-2012, 11:55 AM #6
Member
- Join Date
- Mar 2012
- Posts
- 5
- Rep Power
- 0
Re: displaying images
I am using NetBeans 5.5.1 for execution.
The structure is:
D:\LEAVE_MGMT\web\images\reply.png
(The netbeans project contains the following folders. build,dist,nbproject,src,test,web and a build.xml file)Last edited by sukanya; 03-25-2012 at 12:03 PM.
- 03-25-2012, 02:46 PM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Similar Threads
-
Displaying multiple images
By asmitarnd in forum AWT / SwingReplies: 2Last Post: 04-19-2011, 12:14 PM -
Displaying moving images
By Maulik in forum AWT / SwingReplies: 3Last Post: 04-02-2011, 12:00 AM -
Displaying large images
By pir8ped in forum AWT / SwingReplies: 2Last Post: 01-21-2009, 09:20 PM -
[SOLVED] Need help in displaying images
By kirly in forum Advanced JavaReplies: 3Last Post: 10-21-2008, 05:36 AM -
Images not displaying in JSP in IE7
By chadscc in forum Advanced JavaReplies: 0Last Post: 11-13-2007, 03:24 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks