This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Fill the table with the image instead of text ( jsp..jstl)  RSS feed

 
Tatiana Schineider
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

I am writing the code below, using JSP and JSTL, but I stopped at a condition below

Next line shows the values of a select, but sometimes this blank (null)



I would like to display an image instead of a text!?

thanks



Is it possible?

thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course it is. JSP is just a way of creating HTML -- so how would you place an image there instead of text with HTML?
 
Tatiana Schineider
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes,

show an image instead of text
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what is your problem? Do you know HTML? I'm not sure what this question has to do with JSP at all.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When faced with any problem like this, first create a plain HTML page with fake data that displays like you want, then figure out how to get JSP to generate HTML like that. Really much faster than just flailing about with JSP.

Bill
 
Tatiana Schineider
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
..

Hi,

I managed to solve by applying the following line:



thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
src="../cliente/img/filial.jpeg"

Relative page addressing in JSPs are a problem waiting to happen. You should be using server-relative URls -- ee the JSP FAQ for more information.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!