Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Please help about picture path.  RSS feed

 
arada theera
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use WSAD 5.0 and crystal java viewer.When I launch report viewer ,everything show correctly except buttons ( ex. print button,refresh button ).Buttons are missing and display red cross instead.How should I do I fix this problem. I try to put .gif files in many directories but it's not work!!!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since a browser gets an image from your server in a separate request, you need to give it the right information to find the file.
1. make each url in a src= attribute a complete one (not relative.)
-or-
2. put a <BASE tag in the head area of your page, giving the starting point for relative urls.
Bill
 
arada theera
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can not modify url of picture. Because it is in .jar file and I'm not written this jar . I just declare variable and call a method of this class.However when I view source I found src='/crystalreportviewers/images/toolbar/grouptree.gif'.
What I can do to fix this problem ?
 
arada theera
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you mind to give me some example or tell me more about <BASE tag ?
Thanks in advance.
 
arada theera
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would you mind to give me some example or tell me more about <BASE tag ?
Thanks in advance.
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arada, the <BASE> tage is simple HTML tag that helps specify the base URL for the links on your page.

Here....

http://www.w3schools.com/tags/tag_base.asp
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you look at your document folder structure can you find the file grouptree.gif

when you trace through the folders

/crystalreportviewers/images/toolbar/

Eric
 
arada theera
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everbody thanks for your answer.
Because of URL of jsp page is "http://localhost:7080/MyProject/MyFile/ShowReport.jsp"


So,I create folder like crystalreportviewers/images/toolbar and put in the same directory like ShowReport.jsp and then I try <BASE tag as follow :

<HEAD>
<BASE href="http://localhost:7080/MyProject/MyFile" />
</HEAD>
<IMG src="/crystalreportviewers/images/toolbar/grouptree.gif">

I receive error :
[11/23/04 9:07:56:623 ICT] 55b97c5c OSEListenerDi E PLGN0021E: Servlet Request Processor Exception: Virtual Host/WebGroup Not Found : The web group /crystalreportviewers/images/toolbar/grouptree.gif has not been defined

But when I change the code to

<HEAD>
<BASE href="http://localhost:7080/MyProject/MyFile/" />
</HEAD>
<IMG src="crystalreportviewers/images/toolbar/grouptree.gif">

It's success.But I can't use the secode code.
Because <IMG src="/crystalreportviewers/images/toolbar/grouptree.gif"> is in .jar file I can't change it.^_^'
Now I gonna be mad.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!