RESIN FAQ Collection
{
Blueski.jsp
Remarks: This article comes from FAQ system from Frontjsp.com.cn
The deadline is Resin 1.2
2000/12
}
RESIN LIBCAUCHO.SO NOT FOUND error? Libcaucho.so contains some JNI for UNIX. When you call configuration make, it must be compiled. Due to some reason, JVM did not get the library. You are likely to check if ld_library_path is in your environment and Wrapper.pl. For many sites, libcaucho.so is not a big problem. It is just a GRAB some CPU Statistics. However, IT Also Enabled The SetUid Needed by user-name and group-name. So if you use user-name from root to change the user, you need libcaucho.so to run.
RESIN recompilation at Windows
This happens in some version of JDK's internal Javac compiler. To solve this problem, use external compiler javac or jikes:
How to install RESIN as a Linux Service? (Stephen Kuo Answer) This is a very basic issue. In my Red Hat 6.2, I joined the following row in the /etc/rc.d/rc.local file to make RESIN a service: /usr/local/resin1.1/bin/srun.sh Start but when After I restart the system, RESIN didn't get up. (Guy Tal) You must set an environment parameters in the RC file (when you execute it from the command line, they are only valid in your own environment, while the RC file is run as root, so it is not set). Add below: ---------- Snip ---------- path = / usr / local / bin: / usr / bin: / binExport pathjava_home = / usr / javaExport java_homeresin_home = / Opt / resin1.1.1export resin_homeclasspath = / usr / java / jre / lib / rt.jarclasspath = $ ClassPath: /opt/resin1.1/lib/resin.jarclasspath= /classpath: /opt/resin1.1/lib/jsdk22. JarclassPath = $ classpath: /opt/resin1.1/lib/jdk12.jaarexport classpath ---------- SNIP ---------- You can also in srun.sh or wrapper.pl Set these environment parameters in.
How to set the wrong page in resin.conf? The basic command is ERROR-PAGE. There are 3 wrong pages: Error Code Pages, E.G. 404 Exception, E.G. Java.lang.NullPointerexception Connection Failpes, "Can't connect to srun"
Where are each documents in RESIN? Document Root can be set in resin.conf, using app-dir:
RESIN Multiple ClassPath CAN't Auto-Compile error You define the ClassPath in resin.conf being arranged sequences. When automatically compiling a class, only the next is valid: <: classpath id = 'foo / classes' /> <: classpath id = 'bar / class' /> RESIN will first compile BAR / CLASSES class. Bar / classes / test.java cannot use any classes in Foo / Classes. Once Bar / Classes has been completed, RESIN will compile classes in the foo / classes. The classes in the foo / classes can use anything in Bar / Classes.
How many Active HTTP sessions in RESIN?
There are information in com.caucho.server.http.statistics objects. It is saved in servletContext (Application) as "Caucho.statistics". How to open a data file in RESIN?
You need to translate URL into a real path. This is to use the current directory of getRealPath.resin, it is resin_home, it is not the location where you usually put the data file. You can use ServletContext.getRealPath () or relative to the current URL to use ServletRequest.getRealPath () ServletContext app = getServletContext ();. String path = app.getRealPath ( "/ WEB-INF / mydata.csv"); InputStream is = New fileInputstream (path); ...
How to disable directory browsing in RESIN? Set the Directory-Servlet to "None" to disable directory browsing.
Why two virtual hosts in RESIN use the same index.jsp? Just as described in the virtual host reference, you have to configure the virtual host in Resin.conf. If
If you use a servlet as a WELCOME page?
No other url-pattern will only match '/'. So URL-pattern = '/' will set the servlet to the default servlet, and replace the file servlet. You want to use RESIN's URL-RegExp. URL-regExp = '^ / $' will reach the purpose you want.
Returning NO DATA in Resin This may be due to the "EAPI" conflict. If your Apache is compiled together, RESIN does not include two separate compilation, and Mod_caucho conflicts. Apache diary is like this: [Tue Aug 8 15:33:24 2000] [Notice] caught sigterm, shutting down [Tue aug 8 15:33:24 2000] [WARN] Loaded DSO / etc / httpd / modules / mod_caucho .so uses Plain Apache 1.3 API, this Module Might Crash under EAPI! (PLEASERECOMPILE IT WITHDEAPI) usually,. / Configure script can automatically detect if EAPI is required, if not, you can do this: UNIX> ./configure --with-apache-eAPi
Can I use MOD_REWRITE in RESIN? Yes, but you have to be sure to use the PASSTHROUGH flag so that RESIN can be controlled after mod_rewrite. ReWriteEngine OnRewriterule ^ / Hello.html $ /HELLO.JSP [L, PT]
How to make index.jsp as the default document of IIS?
(Stefan Wesner Answer) Make index.jsp to become an Active documentation that belongs to the IIS configuration. In IS4.0, you can do it as follows: Open the interface for "default web site" (or any other web-site or virtualDirectorX). Select Home Directory Tab for The Default Web Site or "Virtual Directory" page . Select "Configuration" to add application mappings for your IIS_SRun.dll, (I also use PUT, DELETE, as long as Copy it), turn off the sub-dialog. Select the "Documents" page to add index.jsp and index.xtp to the default document list. Try HTTP: // YourHost / How to configure RESIN and SSL?
(Nicholas Lehuen Answer :) Here is a short step to install SSL to RESIN. Objective: Will support SSL support to Resin Requirements: The latest RESIN 1.2 Snapshot (I successfully used 08/04/2000 snapshot) http://www.caucho.com/download/index.xtp jsse 1.0.1 http: //java.sun.com/products/jsse/ Optional: A Certificate Authority (CA) such as VeriSign, Thawte, or yourself. Thawte offers a free test Certificate Authority service, which allows you to detect the certificate processing before your purchase. Of course, you can also skip the CA by providing your own certified Public Key Certificate. This is introduced later. (https://www.thawte.com/cgi/server/test.exe) JSSE setup
Follow the installation guide provided by http://java.sun.com/products/jsse/install.html. Even if RESIN has its own Provider Registration System (given in next step), I still recommend that you still register SunJsse, by editing
KeyStore initialization
Create a directory called 'keys' in a part of the RESIN installation directory. I suggest you put it under the RESIN HOME path. Copy file
Now we generate your Key Pair, which consists of a private key. One point is to use RSA Key Pair Generator instead of default DSA. This is what JSse Security Provider is used. Run the following commands: M: / keys> keytool -genkey -keyalg RSA -alias myserverkeypair / -storepass YourPasswordHere -keystore private.keystoreWhat is your first and last name [Unknown]:? Www.myserver.comWhat is the name of your organizational unit ? [Unknown]: Foo DeptWhat is the name of your organization [Unknown]:? BarWhat is the name of your City or Locality [Unknown]:? ParisWhat is the name of your State or Province [Unknown]:? FranceWhat is the two -LETTER Country Code for this Unit? [unknown]: fris
Thawte provides a Test CA (mentioned above) generates a CSR: M: / Keys> Keytool -certreq -Arias MyServerKeypair -StorePass YourPasswordHerePair -StorePass YourPasswordHerePair -Store Private.KeyStore ----- Begin New Certificate Requestore ----- Begin New Certificate Requestore ----- MIIBqjCCARMCAQAwajELMAkGA1UEBhMCRlIxDzANBgNVBAgTBkZyYW5jZTEOMAwGA1UEBxMFUGFy ... cut ... KDYZTklbg1NOiXTdXIhPHb3 YOgZ HoeDTxOx / rRhA == ----- END NEW CERTIFICATE REQUEST ----- Copy / Paste CSR to the following address to the text box. Allow other options to remain default. Https://www.thawte.com/cgi/server/test.exe you will get a Certificate, it looks like this: ----- Begin Certificate ----- miicjzcafigawibagidbp8sma0gcsqgsib3dqebbauamighmqswcqydvqqqqqja ... cut ... / 93Q58II4FGQ / KC L8OGPVWH / IJW1UJMSZD19JF PXYYSMM = ----- End certificate ----- Copy / Paste This Certificate is called 'MyServer.cer'. If you have Microsoft Internet Explorer 5.0 (perhaps 4.0), you can open this .cer file and see Certificate. A warning will be issued when your user requests the security property provided by your Server. It means that you can't believe this certificate because it doesn't point to a trusted root CA. You can continue, you can also download and trust Test Root CA (provided in https://www.thawte.com/servertest.crt). Note that end users should not believe that it will not accept this Test Root CA. Anyway, to import your launched Signed Certificate, you have to import Test Root Ca CA CERTIFICATE. You can download and import: m: / keys> keytore -import -alias servert-storePass YourPasswordHere / -KeyStore Private.Keystore -File Servert.CrtOWNER: CN = THAWTE TEST CA ROOT, OU = Test, O = Thawte, ST = For testing, c = zaissuer: cn = Thawte test ca root, ou = test, o = thawte, st = for testing, c = zaserial number: 0valid from: thu aug 01 02:00:00 CEST 1996 Until: THU DEC 31 22:59:59 CET 2020CERTIFICATE FINGERPRINTS: MD5: 5E: E0: 0E: 1D: 17: B7: CA: A5: 7D: 36: D6: 02: DF: 4D: 26: A4SHA1: 39: C6: 9D: 27: AF: DC: EB: 47: D6: 33: 36: 6A: B2: 05: F1: 47: A9: B4: DA: EATRUST this CERTIFICATE? [NO]: YES certificate Certificate will be added to KeyStore.
Import a certificate, attach it to your Server Key Pair: M: / Keys> keytool -storePass YourPasswordhere / -keystore private.KeyStore -file myserver. The reply reply to the keystore. Key pair verified by the following command: M: / keys> keytool -list -v -alias myserverkeypair -storepass YourPasswordHere / -keystore private.keystoreAlias name: myserverkeypairCreation date: Fri Aug 11 23:07:53 CEST 2000Entry type: keyEntryCertificate chain length: 2Certificate [1]: Owner: CN = www.myserver.com, ou = foo dept, o = bar, l = paris, st = france, c = frissuer: cn = THAWTE TEST CA ROOT, OU = Test, O = Thawte , ST = for testing, c = zaserial number: 69f12valid from: fri aug 11 23:00:07 CEST 2000 Until: Mon Sep 11 23:00:07 CEST 2000CERTIFICATE FINGERPRINTS: MD5: 41: 84: 55: 8C: A1: 85: 28: DA: B0: 5A: 47: D6: 5B: D2: ED: 41SHA1: 61: DE: DB: E6: 7C: 3C: AD: 90: 63: 9B: 20: E0: FF: 3B: 02: 3A: 60: EB: B4: 82CERTIFICATE [2]: Owner: cn = THAWTE TEST CA ROOT, OU = Test, O = THAWTE, ST = for Testing, C = Zaissuer: cn = THAWTE TEST CA ROOT, OU = Test, o = thawte, st = for testing, c = zaserial number: 0valid from: thu aug 01 02:00:00 CEST 1996 02:59:59 CET 2020CERTIFICATE FINGERPRINTS: MD5: 5E: E0: 0E : 1D: 17: B7: CA: A5: 7D: 36: D6: 02: DF: 4D: 26: A4SHA1: 39: C6: 9D: 27: AF: DC: EB: 47: D6: 33: 36 : 6A: B2: 05: F1: 47: A9: B4: DA: EA You can see alias MyServerKeypair points to a keyntry type entry, its Certificate chain has 2 certificate, the first is your own Certificate, By Thawte Test Ca Root, the other is Thawte Test Ca Root ourselves.
Resin.conf) Adds support for SunJsse Security Provider: