Results 1 to 1 of 1
Thread: load image in the jsp page
- 04-09-2010, 09:23 PM #1
Member
- Join Date
- Apr 2010
- Posts
- 10
- Rep Power
- 0
load image in the jsp page
Hi everyone,
Here I am again with some more questions about eclipse!! Please be patient!! You have been a beginner as well, haven't you!? ;)
Anyway, I am doing a hangman game and I have 6 pictures (src/resources) that I would like to load into my nameGame.jsp page!! I have a Bean class(?) called GameBean which holds all the calculation of the game and it is working fine!!
I thought about adding in my JSP page something like
and in my GameBean have the getImage returning a string with the path for the picture!! But Eclipse won't allow me to pass the string with "/" on it.Java Code:<h:graphicImage value="{GameBean.image]"></h:graphicImage>
I have seen about getResource() but you need to have it as a separate class, don't you? If so, how from my GameBean I would be able to use it?
I hope it makes sense!!
Cheers
Similar Threads
-
JSP session query on page load
By Msnforum in forum New To JavaReplies: 2Last Post: 03-21-2010, 09:59 PM -
How to load collection to JSP Page ?
By tking88 in forum Advanced JavaReplies: 0Last Post: 03-08-2010, 03:09 PM -
load classes to jsp page
By ITMaster in forum New To JavaReplies: 6Last Post: 11-10-2008, 03:33 PM -
Add data to combobox in page load
By hussainzim in forum JavaServer Pages (JSP) and JSTLReplies: 5Last Post: 05-15-2008, 12:57 PM -
how to load a servlet on index.jsp page...
By sujithc34 in forum Java ServletReplies: 1Last Post: 01-19-2008, 12:28 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks