For users who do not use IDE tools such as Myeclipse,netbean, if you use Java files when writing JSPs, you must configure JavaBean, and there are many examples of configuring JavaBean in Tomcat on the web. Here I simply say the process of my own configuration.
Before this, believe that the beginner has already configured the virtual path of Tomcat, some virtual path is not suitable for using JavaBean, will not stop the error, at this point, first find the WebApps folder in the Tomcat folder, and then cut the virtual path of their previous configuration. For example, my virtual directory is a YSW file, cut over, in the YSW folder under the Web-inf file to create a classes file, (Web-inf has the Web. xml file) and then paste the. class file that you want to use into the classes folder, such as when I want to use the path to a register.class, at which time it's in the way: E:\Program Files\apache The Software Foundation\tomcat 6.0\webapps\ysw\web-inf\classes\yesiwei;yesiwei folder is a package that contains the Register.class files. Then, when invoked in a JSP, use the following statement directly: <jsp:usebean id= "Reg" scope= "request" class= "Yesiwei. Register "/>; At this point, you can successfully call JavaBean in the JSP file (the ID and scope are selected based on the usage, not fixed).
about how to use JavaBean in Tomcat