Tuesday, January 6, 2009

Jsp broken link images

I have encounter many times my Jsp page is not reading the images .In jsp it not as direct and straight forward as java application where you jus need to give the entire source link.
Eg. <-- img src ='C:/Documents and Settings/User/Desktop/image.gif'-->(this doesn work in jsp but works in java application)

Lets just say i wan to use just this link as below example, so that my Jsp page will load my images correctly, how should i do that?
Eg. <-- img src ='ok.gif' -->

The location of the images must be in the folder of the project but where?
If you want the Jsp to read the image link and display it well without appearing broken after it is build and clean.Please see the image below.This is an example of how i put my images which u can insert it through drag and drop from the picture source.i dragged my images from the desktop.It is a netbeans platform



After that at my servlet i will have this code to create the html tag


<-- String ImageName = "ok.gif"; -->
<-- out.println("img src ='"+ImageName+"'"); -->

Please add a < and > because i don wan my post to recognise it as Images path so i have removed it

2 comments:

Anonymous said...

It isn't hard at all to start making money online in the hush-hush world of [URL=http://www.www.blackhatmoneymaker.com]blackhat seo forums[/URL], It's not a big surprise if you don't know what blackhat is. Blackhat marketing uses not-so-popular or misunderstood ways to generate an income online.

Anonymous said...

[url=http://www.onlinecasinos.gd]casinos online[/url], also known as agreed casinos or Internet casinos, are online versions of respected ("buddy and mortar") casinos. Online casinos approve gamblers to dissemble and wager on casino games to a t the Internet.
Online casinos typically lay down the law odds and payback percentages that are comparable to land-based casinos. Some online casinos exact forth higher payback percentages during performance plan games, and some phylum non-military payout involve audits on their websites. Assuming that the online casino is using an aptly programmed unsystematically various generator, hasten games like blackjack comprise an established congress edge. The payout suitableness assignment of these games are established then non-standard reprimand to the rules of the game.
Dissimilar online casinos certify gone away from or holdings their software from companies like Microgaming, Realtime Gaming, Playtech, Adventurous Deception Technology and CryptoLogic Inc.