I thnk it would help if you could get a stack trace from an exception
that involves itext. User some toher utility to verify that the url
you have is valid etc. Develop some debug strategy for
your servlets that catches everything and logs to a file somewhere.
I think when you posted this earlier no one knew what to make
of your error report.


> For the pdf page in riskmap servlet,
> I have used getInstance call as below:
>
> Image iRiskNo = null;
>
> iRiskNo = 
> com.lowagie.text.Image.getInstance("http://localhost:8080/createjpg/createjpg";);
>
>
>
> When it runs the above statement, it
> gives the following error
>
> SEVERE: -->> returning Frame
> NULL
>
> SEVERE: BaseDialog: owner frame is
> a java.awt.Frame

Who is "it" that you mention and what is a BaseDialog? 
That call appears to return an Image, not something that obviously
relates to your text above even from Image.toString(). 
Is Lowagie  saying this is severe? If your call has to throw an IOException
or something, what does your code do? The error you are printing could be 
anything-
someone could be trying to put up a dialog box and of course the servlet 
probably
isn't attached to a gui, the severity being due to the chernobyl effect acting 
on
a common exception. Can you put a try/catch around the code and dump the stack 
somewhere
like a log file? I forget the normal error handling appraoches for servlets but 
popping
up a dialog isn't the first thought I would have.



>
>
>
> In creatjpg servlet, the statements
> that generate the image are as follows:
>
>
> created a bufferedimage and ...
>
> .......
>
> JPEGEncodeParam
> eP = JPEGCodec.getDefaultJPEGEncodeParam(bufferedImage);
>
> eP.setQuality(1.0f,
> true);
>
> JPEGImageEncoder
> encoder = JPEGCodec.createJPEGEncoder(out);
>
> encoder.encode(bufferedImage,
> eP);
>
>

Did you try to hit the url you expect to contain your image using something 
like wget
and verify the server is returning a valid image file with any headers that may 
be relevant?

>
> I imported the following classes in
> createjpg servlet:
>
> import java.awt.*;
>
> import java.awt.geom.*;
>
> import java.awt.image.*;
>
> import java.awt.Color;
>
> import java.awt.Font;
>
> import java.io.*;
>
> import java.io.IOException;
>
> import com.sun.image.codec.jpeg.JPEGEncodeParam;
>
> import com.sun.image.codec.jpeg.JPEGImageEncoder;
>
> import javax.servlet.http.*;
>
> import javax.servlet.*;
>
> import com.sun.image.codec.jpeg.JPEGCodec;
>


Are you worried about name conflicts? What does this tell us?


>
>
> As I mentioned above, the riskmap servlet
> (pdf objects) does not receive images from createjpg servlet.
>
> Can someone please let me know how I
> can troubleshoot/solve this problem?.

Go to sun.com and find debugging strategies for servlets and come back here 
with and stack traces
that mention lowagie or itext. 



>

                                          
_________________________________________________________________
Hotmail: Free, trusted and rich email service.
http://clk.atdmt.com/GBL/go/201469228/direct/01/
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to