2015-09-23 21:20 GMT+03:00 Mike Guo <hongw...@163.com>: > > Hi. all. > > I knew it should be sent to struts2 mail list, but I feel it is very strange > . and kind of related with tomcat. > > > it is a very strange issues. > > I tried to generate dynamic check code by struts2. so, I used buffered image > class and javax.imageio for a ByteInputstream in my Action. > > look like the function work fine. but strange thing is: every time when I > access that dynamic check code action. system will be start a java > application “Bootstrap” > > please check the picture. also, when I quit this Bootstrap java application, > and my tomcat is stop running too. > > > > would you please share with me what’s this? and why it running by automatic? > > thanks so much >
Bootstrap (org.apache.catalina.startup.Bootstrap) is "entry point" that java runs when launching Tomcat. It is a small class that initializes classloader hierarchy and starts Tomcat. You can see the class name in bin/catalina.sh or in META-INF/MANIFEST.MF of bin/bootstrap.jar My guess is that javax.imageio tries to access your display to process the image. If that is the cause, you need to add -Djava.awt.headless=true to the value of CATALINA_OPTS or JAVA_OPTS variable in a bin/setenv.sh file to tell Java that you do not have a display. See RUNNING.txt file that comes with Tomcat for details about setenv.sh. Your image is odd... (For those not seeing it: an application window of OSX (?) with an icon, text "About Bootstrap" and "Version 1.0 (1.0)"). It may be as well not related to Tomcat. "Boostrap" is a generic word that may as well be used by some 3rd party, and the version number "1.0" is odd. Not sure where it comes from. This list generally strips attachments. See the rules http://tomcat.apache.org/lists.html#tomcat-users -> 7. Unrelated: Beware that there is a known issue with handling of input/output streams in ImageIO. Do not pass ServletInputStream/ServletOutputStream to those APIs unless you wrap them. https://wiki.apache.org/tomcat/FAQ/KnownIssues#ImageIOIssues Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org