Jump to content
We've recently updated our Privacy Statement, available here ×

Image Error when loading from an "https" site


Recommended Posts

By: Makarand - mkharche

Image Error when loading from an "https" site

2006-04-17 03:59

Hi,

 

I have a report template with the image getting loaded from a secure site i.e. https site. The exact URL is

 

https://fastraq.selectica.com/imageServer/images/sample/catalog/stdlaser_small.gif

 

but, while generating the report, it fails saying

"net.sf.jasperreports.engine.JRRuntimeException: Error loading image data :https://fastraq.selectica.com/imageServer/images/sample/catalog/stdlaser_small.gif"

 

Can anyone guide me out of this ?

 

-thanks.

Link to comment
Share on other sites

  • 3 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

I got the same error. After searching on Google, it seems to me that java.net.URL (1.4.2) doesn't support HTTPS directly.

So I used <imageExpression class="java.io.File"> instead of <imageExpression class="java.lang.String">

by passing a file path (was a URL loaction).

E.g. String applicationPath=request.getSession().getServletContext().getRealPath("/");

parameters.put("logoImage", applicationPath);

 

It works then.

 

Regards,

 

William

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...