building
来自「精通tomcat书籍原代码,希望大家共同学习」· 代码 · 共 31 行
TXT
31 行
Building from the cvs tree:
sh buildconf --with-apr=apr_source_location.
configure --with-apr=apr_install_location --with-ssl=openssl_install_location
make
Testing the build:
The make should produce a .so file named libtcnative-1.so.
Build the jar containing the example by
cd ..
ant jar
Run the example:
ant example-basic
Using it in Tomcat:
1 - In <Connector> use of conf/server.xml:
protocol="org.apache.coyote.http11.Http11AprProtocol"
2 - In bin/setenv.sh add the following:
CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=tclib_location"
In my machine I am using:
/home/jfclere/jakarta-tomcat-connectors/jni/native/.libs for tclib_location
NOTES:
- configure --without-ssl : Configure without ssl support.
- To use it in Tomcat you may have to add in bin/setenv.sh:
LD_LIBRARY_PATH=openssl_install_location/lib; export LD_LIBRARY_PATH
(use ldd ./.libs/libtcnative-1.so to check it).
- quick testing: openssl s_client -connect localhost:8443
- For MAC OS X you must manually add a link
cd ${tcnative installdir}
ln -d libtcnative-1.dylib libtcnative-1.jnilib
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?