Resin FAQ

xiaoxiao2021-03-06  72

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: ... Each virtual host and every web-app Have your own app-dir. App-dir configuration must be placed in resin.conf, not in web.xml (otherwise, resin can not find web.xml): ... If you do not define App-Dir, RESIN will use the ID in / www / htdocs / myapp. Optional, you can put a web.xml in [App-Dir] /Web-inf/web.xml (also, according to JSDK 2.2). Web.xml can contain things that Web-app can put in resin.conf. Automatic heavy-duty class belongs to [App-Dir] / Web-INF, according to JSDK 2.2: Classes - Auto-load / Recompile Java servlet / bean / classes DirectoryLib - Auto-loaded * .jar Files in web-app In, you can add it to auto-reload classpath: jsp / java work directory is / TMP / Caucho (or / Temp / caucho). You can modify this: Finally, the startup script will start the script before RESIN startup, in the RESIN1.1 / lib Add to ClassPath. RESIN VERIFYERROR WHEN LOADING JSP FILES error? JVM has many restrictions on the length of a method. Most compilers do not tell you that your code is too long, so when you try to load the compiled code, you see such an error message. This is easy to appear when you use the Tag library, because each TAG produces quite a few code. The only solution is to divide your page into multiple sub-pages, using JSP: include. In fact, it will be an advantage, because you can use RESIN's Caching to optimize the performance of these subpages.

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 , RESIN will generate the same class for each host. So a host can see the JSP file of the second host. By adding , RESIN can keep each class name unique.

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 /lib/security/java.security (explained in Installation Guide). This will make KeyTool use simple.

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 / lib / security / cacerts to the 'keys' directory. Return the cacerts file to any name you want. It is assumed to be named 'private.keystore'. KeyStore Protection Your private.keystore file is only a copy of the Cacerts KeyStore, which contains CA Public Key Certificate (very important to client HTTPS connection). We have to join your own private key to the file so that it has a password protection, and if others steal the file, it is impossible to fake Certificate. Go to the 'Keys' directory Perform the following command: keytool -storepasswd -storepass changeit -new yourpasswordhere / -keystore private.keystore (Cacerts KeyStore is 'Changeit') Generate Private Key

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 Correct? [no]: yest Key Password for (Return if Same as keystore password): You must write your HTTP Server name as CERTIFICATE CN (this can reply to 'first and last name'). If you don't have a browser, you will warn your customers. Other information look at your choice, but the key pair generation and Attributes definitions are very stringent for "Real-Life" Cryptography. VeriSign will repeat 2 times check your identity, address, etc. Another point is: don't affect a password to your key pair. It must be kept in the keystore, at least to RESIN provides a method of configuring Key Pair Password. Public key certificate Requests a public key certificate and inserts the public key certificate into your keystore. In order to let users trust your Server, you have to make your public key certificate (PKC) is issued by a Certificate Authority (CA) (VeriSign, Thawte, CertPlus ...). You can complete the Certificate Signature Request (CSR) to CA, to copy all legitimate necessary materials, then obtain the return Signed PKC. This step is required for a server as a product. Unless you have a way to make your users confident that your PKC is legal and does not need CA Signature, for example this is still possible in an intranet environment. However, as the purpose of the test, you can start with your Self-Signed PKC without any CA SIGNATURE. One intermediate solution is to use Test CA so you can check if your CSR is issued correctly, and the Certificate chain is checked correctly, and so on.

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: DOC true JKS file: // m: /keys/private.keystore Yourpasswordhere < / key-store-password> Test! Try to connect your Server with HTTPS without http! I have successfully applied on Resin / JDK 1.3 / Windows NT 4 SP6 and JDK 1.2.2 / Solaris 7. SSL. If you can mix HTTPS and WAP together, it will be more interesting ... What is the ClassLoader order? In Resin 1.2.b2: Command line ClassPath Resin / lib directory Envivonmental ClassPath an application Web-INF / LIB and Web-inf / classes has been modified in B2. In previous versions, Web-INF classes have priority than others, but it is less standard, it is easy to generate problems.

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

New Post(0)