0

i've created a rather simple Web application for demo purposes. It works perfectly fine when running it from netbeans (using tomcat). there is a search form and a search results display page. The search result display page uses AJAX with JQuery and it datatables plugin. a column in the datatable contains a dynamically generated image.

When i deployed it statically in tomcat applications works and no errors are thrown but the images are not created. the column displays the content of the image tags alt attribute.

How could I "debug" this issue? Is it a tomcat config problem?

EDIT:

I can render image by going to the render servlet directly i then get following message displayed instead of the image:

The image cannot be displayed because it contains errors

This is on Windows. The images are created from an existing library that does the work. This works perfectly fine when deploying the application from netbeans. Also note I'm not a tomcat expert.

Chris Martin
  • 30,334
  • 10
  • 78
  • 137
beginner_
  • 7,230
  • 18
  • 70
  • 127
  • Have you copied the images into your webapp? They should've been ideally the part of the WAR file that you created before deploying – adarshr Jan 20 '12 at 15:47
  • what do you see as ``when you load the page on browser? – jmj Jan 20 '12 at 15:49
  • they are created dynamically. Please also see edit – beginner_ Jan 20 '12 at 15:49
  • Is the Tomcat install on a Linux machine? The default JVM install on Linux doesn't install fonts. I've had issues with images containing text not getting rendered on a Linux box due to not having any fonts installed. – Daniel Pryden Jan 20 '12 at 15:52
  • So the plugin being used to render the images is not found? – AJG85 Jan 20 '12 at 15:53
  • @beginner: most likely, an exception is being thrown while you're generating the image, and the exception message is being written out the HTTP response stream, which makes for a corrupt image file. Check your logs and see if there are any relevant exceptions. – Daniel Pryden Jan 20 '12 at 15:57
  • @Jigar: image tag is correct even so the text in alt probably looks like gibberish to you. O=C6OC1(CCCCC1)C(C(=O)N2CCC5(CC2)(CC5(C(=O)NC3=CC=CC(=C3)N4C(=O)NCC4)))C6 – beginner_ Jan 20 '12 at 16:00
  • are you able to see the image at `http://yourhost:port/appcontext/renderMolecule?molId=3043` ? – jmj Jan 20 '12 at 16:05

1 Answers1

0

sry guys my bad. The Webapp is a database app supposedly independent of which database. however postgresql is the issue as certain method parameters of it's JBDC driver are case-sensitive (IMHO a bad decision) while in others like hsqldb upperCase is required. this caused the issue.

Chris Martin
  • 30,334
  • 10
  • 78
  • 137
beginner_
  • 7,230
  • 18
  • 70
  • 127