Errors reported by resin

Source: Internet
Author: User
Tags standalone web server

Questions about resin:

1. First download resin.

2. Check the configuration file in resin. (/CONF/resin. conf)

Configure the following items:

1. Port problems. For existing Internet counterparts, or Tomcat port is not occupied, I use 90.

<! -- The http port -->

<Http server-id = "" host = "*" Port = "90"/>

2. Disable the virtual path. For local programs

<Host ID = "" Root-directory = "D:/Java/myeclipseworkspace/SMSs/webroot">.

After that

<Web-app id = "/" document-directory = ""/> otherwise, a directory of/prompt is displayed.

3. If jbpm is applied, add two sentences before the last

<System-property javax. xml. parsers. documentbuilderfactory

= 'Org. Apache. xerces. JAXP. documentbuilderfactoryimpl '/>

<System-property javax. xml. parsers. saxparserfactory

= 'Org. Apache. xerces. JAXP. saxparserfactoryimpl '/>

Very useful resin configuration: (convert)

1. Default port of Resin

The resin standalone web server starts listening to HTTP requests on port 8080 and listens

On port 6802 for any Apache or IIS plugin.

The default port opened by resin is 8080 and the listening port is 6802. You can modify the attribute in CONF/resin. conf.

<! -- The http port -->
<Http server-id = "" host = "*" Port = "8080"/>

Change 8080 to the port you need, but note that it cannot conflict with the port of the opened service. For example, if you have already opened the IIS service and the port is

You cannot change it to port 80.

<Cluster>
<Srun server-id = "" host = "127.0.0.1" Port = "6802" Index = "1"/>
</Cluster>

Change 6802 to the port you need. If you cannot browse through the local machine, the host here can be changed to your external IP address,

2. Main directory and virtual directory of Resin

<Server>
...
<Host ID = ''>

<Document-directory> doc </document-directory>
...
</Host>
The default main directory is in the resin doc directory. You can change it to another directory or even another disk, such
E:/wwwroot. You can also add new application directories (virtual directories), such

<Server>
...

<Web-app id = '/1/'>

<Document-directory>/home/www/docs </document-directory>
...
</Web-app>

<Web-app id = '/2/'>

<Document-directory>/home/www/Slytherin </document-directory>
...
</Web-app>
In this way, you can use http: // localhost: 8080/1 and http: // localhost: 8080/2
To access/home/www/docs and/home/www/Slytherin.

3. Resin disables directory browsing
In earlier versions, you only need to set directory-servlet to "NONE" to disable directory browsing.
<Web-app id = '/'>
<Directory-servlet id = 'false'/>
</Web-app>
The test fails under resin3.08. Find
<Web-app-default>
...
<Servlet-name = "directory"
Servlet-class = "com. Caucho. servlets. directoryservlet"/>
Just comment it out.
<Web-app-default>
...
<! -- Disabled:
<Servlet-name = "directory"
Servlet-class = "com. Caucho. servlets. directoryservlet"/>
-->

...
<Servlet-name = "directory"
Servlet-class = "com. Caucho. servlets. directoryservlet"/>
Just comment it out.
<Web-app-default>
...
<! -- Disabled:
<Servlet-name = "directory"
Servlet-class = "com. Caucho. servlets. directoryservlet"/>
-->

4. How to Set error pages in resin. conf? The basic command is error-page. There are 3 error pages:
Error code pages, e.g. 404
Exception, e.g. java. Lang. nullpointerexception
Connection failures, "can't connect to srun"

5. Modify the server session
<Web-app id = '/'>
<Session-config>
<! -- 2 hour timeout -->
<Session-Time Out> 120 </session-Timeout>
<Sessions-max> 4096 </session-max>
</Session-config>
...
</Web-app>

6. Set Default content document
Modify under CONF/app-default.xml

<Welcome-file-List>
<Welcome-File> index.htm </welcome-File>
<Welcome-File> index. jsp </welcome-File>
<Welcome-File> index.html </welcome-File>
<Welcome-File> index. xtp </welcome-File>
</Welcome-file-List>

The access sequence is from top to bottom.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.