Detailed steps for configuring Beans in Resin

xiaoxiao2021-03-06  37

Seeing that everyone often encounters the configuration of bean, here, here, I have organized the detailed configuration steps in RESIN:

Suggest:

The server uses Linux or FreeBSD, the client uses Ultradev to do development tools, so that UNIX Database Bean JSP is the best strategy.

1. Configure the site in RESIN.conf):

Your site root directory absolute path

Compile = true />

The ID is a folder below your site root directory, just built an AMAO or Agou, but you will put it here, compile = true indicates automatic compilation, you can only place the Java source file locally, To the server side, you will automatically compile become a Class file. Right, RESIN's compilation speed is the fastest, and Chinese support is also the best, I love Resin!

2. Create a web-inf / class of the Site root directory, which is the root directory of the bean, then build your package directory, such as web-inf / classes / COM

3, then place your bean in the web-inf / class / COM directory, but the first sentence of Bean's Java source file should be like this: package card; where COM is your folder name;

4. There are two situations that are referenced in the JSP file: one is import: <% @ page import = "com. ***"%> where *** is your Java file name, remember not With a suffix.

Another situation is to use UseBean: where the id is essentially your object, the name of this bean Arbitrary, your later program uses it to reference; scope refers to the validity period of the bean, which can be set to one of the values ​​in Page / Request / Session / Application. Class is the class file COM, which is you referenced. The back is the name of the bean.

转载请注明原文地址:https://www.9cbs.com/read-65236.html

New Post(0)