To integrate with tomcat, java servlet should be included in your application class path which can add barcode support to a dedicated web server and easily embed in HTML as an image with the <IMG> tag. Hope it helped.
Right. Actually, you need a barcode generation package including Servlet which can do what you want to do. Try to find a third party package which can solve your problem.
I have used one, but I don’t know whether it includes servlet to integrate with tomcat and I don’t know how to use it. I feed back for some sample code or tutorial but no results.
1. Place the.jar file from what you have used inside the package in the /WEB-INF/lib directory of the WebApp.
2. Install or verify use of Java developmental environment
3. Be sure Java.awt GUI functions are available in the environment.
4. Edit the web.xml in the appropriate /WEB-INF/ directory for the WebApp.
5. Restart the Apache Tomcat server by either restarting the service or executing the appropriate control scripts per system configuration.
6. After the servlet server is started, type the following code into a browser and specify applet parameters to create the barcode.
To be more detailed you can refer to a java barcode tutorial guide with detailed information on barcode generation aspects including how to integrate with tomcat using Java servlet.