JSP is a new web development tool developed by Sun on the basis of servlet. In foreign countries, ejb+jsp/servlet+application server+database has become a popular architecture for e-commerce sites. If you choose the jsp platform as the support for Internet commercial sites, then speed, price and stability should all be taken into consideration. As these resins are very good. The installation of resin under Linux has been introduced in many articles. This article introduces its installation under the Windows operating system. I believe that after reading this article, you will easily build a web site with powerful functions.
The first requirement is that jdk has been installed normally. I won't go into detail about the installation of jdk here, there are many articles in this area.
There are two ways for resin to achieve the purpose of jsp interpreter. One is to integrate with iis, and the other is to use httpd as a standalone. Which method to use depends on personal preference and actual situation. I use the first one.
First, let’s explain the simplest standalone method.
This method requires almost no configuration. After decompressing the resin, just run binhttpd.exe directly. It should be noted that after running httpd.exe, two windows will be generated. One is similar to the command line window (but can only output, not input), and the other is the gui control window. You must not use direct x on these two windows. method to close it, which will cause resin system errors. The correct way is to use the quit button on the gui.
Wait until the command line window appears:
resin 2.1.6 -- mon oct 2 17:34:31 pdt 2000
Listening to *:8080
means the startup is successful, and the following 8080 is the port that resin httpd is currently listening to. This port can be modified. When modifying, you need to modify the confresin.conf file and modify the following
section:xml:
<!-- the http port -->
<httpd-port>8080</httpd-port>
Just change 8080 here to the port you want. But please be careful not to duplicate the already occupied port, otherwise it will not start. At this time, resin httpd is already accepting access and has the basic functions of iis. The http root directory defaults to the doc directory of the resin installation directory, but it can also be modified. You can modify
confresin.conf:xml:
<http-server>
<app-dir>doc</app-dir>
This is the default situation. You can also write absolute paths to define other directories. Enter http://localhost:8080/ and take a look!
Let’s talk about how to integrate with iis. In this mode, resin runs as a plug-in for iis. It only parses .jsp, .xtp and other files, just like asp.dll is responsible for parsing .asp files and perl.dll is responsible for parsing .pl files. . This configuration is complicated and may cause problems, but it brings great convenience.
Please think twice before you act.
What I want to talk about below is the manual installation method. Personally, I feel that the setup.exe it provides often has problems during installation and is unreliable.
1. After installing jdk and resin (these are all nonsense)
2. Execute the binsetup.exe file
and fill in the resin home and iis/pws directories, click ok, it will stop iis/copy iis_run.dll/start iis At this time, there will be an iis_run.dll file under the inetpubscripts directory of your iis. At the same time, there will be an additional srun in the filter configured in iis.
3. Resin cannot be used at this time, and you need to install a service and execute the srun.exe -install command in the bin directory. This will install a resin service on the system.
4. Configure the resin.conf file
and edit the following section:
<http-server>
<app-dir>doc</app-dir>
Modify doc to the directory where your wwwroot is located, and it will be fine now!
5. Restarting the system
is necessary. If not restarted, the resin service will not run correctly.
6. Browse http://localhost/caucho-status and take a look!
In this case, it's basically over. In the future, iis and resin will perform their respective duties, iis is responsible for parsing html and asp files, and resin is responsible for parsing jsp files. The last thing I want to say is that the function of resin is very powerful, and virtual directories, virtual hosts, and load balancing can all be implemented.