• Post Reply Bookmark Topic Watch Topic
  • New Topic

generate multiple barcodes at a time

 
johny jill
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i want to generate multiple barcodes at a time in browser using jsp,

I am using JBarcodeBean.jar to genearte barcodes.

My code is



In the above code based on len barcodes are generated

But when i run this jsp in tomact5 i will get only one barcode is generated instead on 10(if len is 10)

I think the problem in outstream,

Pls help me,

Thanks in advance
 
Rusty Smythe
Ranch Hand
Posts: 93
Mac Objective C Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Um...

Please read Isolate the Problem and Post Real Code

The code you posted is so full of red herrings (ArrayList, database code?!) and non-relevant statements (commented-out lines, System.out...) as to make it unreadable.
[ August 24, 2006: Message edited by: Rusty Smythe ]
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm guessing that the code is returning some kind of image that contains a barcode. (I don't see how it could be producing HTML since as far as I know, HTML doesn't support barcodes.)

So, it would be sending 10 images all concatenated together as the response. That doesn't match the HTTP protocol, which expects only one file to be sent as the response.

If you want an HTML page with 10 barcodes, then you have to output HTML containing 10 <img> elements that provide links to something that produces a barcode for each element. That "something" would be a servlet containing much of the code you posted, only it would just produce and return one barcode.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!