----------------------------------------
> Date: Thu, 4 Feb 2010 08:01:36 +0100
> From: i...@1t3xt.info
> To: itext-questions@lists.sourceforge.net
> Subject: Re: [iText-questions] Does not get an image from a servelt
>
> Donald Jayawardena wrote:
>> Thanks for your solution. Once the main servlet(riskmap) called image servlet
>> (createjpg), createjpg writes to a log file after it generating the image. I
>> can see riskmap call to createjpg is working fine. But the virtual image does
>> not come to the parent servlet(riskmap). The parent (riskmap) servlet does 
>> not
>> give any error. How can I trap the stack trace without it returing any
>> exception?
>
> You can't.
> The main question is: can the parent servlet(riskmap) be rewritten
> so that iText is not involved? Can it retrieve the byte[] with the
> image? I guess not, because iText doesn't do anything special.
> It just creates an URL object and calls openStream() to get the

I guess this always creates problems when designing an API. You expose
something like public Widget makeWidget(HighRiskErrorProneThing x) throws 
Throwable
or do you trap exceptions internally and return null and let call sort through
the parameter in steps? 

But, in any case, breaking it up into higher-rish and lower-risk steps
would be helpful. Any IO or user interaction is high-risk as anything can 
happen.
Presumably once you have your bytes itext will behave predictably just based on
the validity of the byte array. If you get back null or an exception you can
pass byte array around and do various checks.

btw, was that thing trying to popup a dialog box on the server?






> bytes of the Image... Although it does this multiple times; maybe
> you should first get the image bytes and then feed them to iText.
>
> Nevertheless: the error you're mentioning is not related to the problem.
> That's very strange.
> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
>
> ------------------------------------------------------------------------------
> 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
> iText-questions@lists.sourceforge.net
> 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/
                                          
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/201469229/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
iText-questions@lists.sourceforge.net
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