mode整合要msvcp110.dll放到哪里里

帮助企业打造成功软件!
热门搜索:
控件教程:Aspose.Words在word文档合并时如何控制列表编号
控件教程:Aspose.Words在word文档合并时如何控制列表编号
| 作者:慧都控件网 |
12:01:00| 阅读 0次
概述:为了帮助大家在进行word文档合并时灵活地控制列表编号,Aspose.Words for .NET为大家提供了ImportFormatMode属性设置来进行相应的操作。
为了帮助大家在进行word文档合并时灵活地控制列表编号,为大家提供了ImportFormatMode属性设置来进行相应的操作。在本文中,我们会给出两个合并前的文件(目标文件和源文件),每个文件都包含一个列表,每个列表都使用了名为 MyStyle的超链接样式,具体如下图:
目标文件:
在MyStyle的超链接样式下,用ImportFormatMode.KeepSourceFormatting 保留源文件格式的列表编号的代码如下:
&Document dstDoc = new Document(gDataDir + &TestFile.DestinationList.doc&);
Document srcDoc =& new Document(gDataDir + &TestFile.SourceList.doc&);
// Append the content of the document so it flows continuously.
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.C
dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting);
dstDoc.Save(gDataDir + &TestFile.ListKeepSourceFormatting Out.doc&);
Visual Basic
&Dim dstDoc As New Document(gDataDir & &TestFile.DestinationList.doc&)
Dim srcDoc As New Document(gDataDir & &TestFile.SourceList.doc&)
' Append the content of the document so it flows continuously.
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous
dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting)
dstDoc.Save(gDataDir & &TestFile.ListKeepSourceFormatting Out.doc&)
文件合并后效果图如下:
但是,如果我们在MyStyle的超链接样式下,使用ImportFormatMode.UseDestinationStyles 沿用目标文件格式的列表编号,会出现列表自动连续编号,如下图:
如果我们既想要沿用目标文件格式的列表编号,同时又想要防止列表的连续编号的话,我们需要运行以下代码来解决以上问题:
&Document dstDoc = new Document(gDataDir + &TestFile.DestinationList.doc&);
Document srcDoc =& new Document(gDataDir + &TestFile.SourceList.doc&);
// Set the source document to continue straight after the end of the destination document.
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.C
// Keep track of the lists that are created.
Hashtable newLists = new Hashtable();
// Iterate through all paragraphs in the document.
foreach (Paragraph para in srcDoc.GetChildNodes(NodeType.Paragraph, true))
&&& if (para.IsListItem)
&&&&&&& int listId = para.ListFormat.List.ListId;
&&&&&&& // Check if the destination document contains a list with this ID already. If it does then this may
&&&&&&& // cause the two lists to run together. Create a copy of the list in the source document instead.
&&&&&&& if (dstDoc.Lists.GetListByListId(listId) != null)
&&&&&&&&&&& List currentL
&&&&&&&&&&& // A newly copied list already exists for this ID, retrieve the stored list and use it on
&&&&&&&&&&& // the current paragraph.
&&&&&&&&&&& if (newLists.Contains(listId))
&&&&&&&&&&& {
&&&&&&&&&&&&&&& currentList = (List)newLists[listId];
&&&&&&&&&&& }
&&&&&&&&&&& else
&&&&&&&&&&& {
&&&&&&&&&&&&&&& // Add a copy of this list to the document and store it for later reference.
&&&&&&&&&&&&&&& currentList = srcDoc.Lists.AddCopy(para.ListFormat.List);
&&&&&&&&&&&&&&& newLists.Add(listId, currentList);
&&&&&&&&&&& }
&&&&&&&&&&& // Set the list of this paragraph& to the copied list.
&&&&&&&&&&& para.ListFormat.List = currentL
// Append the source document to end of the destination document.
dstDoc.AppendDocument(srcDoc, ImportFormatMode.UseDestinationStyles);
// Save the combined document to disk.
dstDoc.Save(gDataDir + &TestFile.ListUseDestinationStyles Out.docx&);
Visual Basic
&Dim dstDoc As New Document(gDataDir & &TestFile.DestinationList.doc&)
Dim srcDoc As New Document(gDataDir & &TestFile.SourceList.doc&)
' Set the source document to continue straight after the end of the destination document.
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous
' Keep track of the lists that are created.
Dim newLists As New Hashtable()
' Iterate through all paragraphs in the document.
For Each para As Paragraph In srcDoc.GetChildNodes(NodeType.Paragraph, True)
&&& If para.IsListItem Then
&&&&&&& Dim listId As Integer = para.ListFormat.List.ListId
&&&&&&& ' Check if the destination document contains a list with this ID already. If it does then this may
&&&&&&& ' cause the two lists to run together. Create a copy of the list in the source document instead.
&&&&&&& If dstDoc.Lists.GetListByListId(listId) IsNot Nothing Then
&&&&&&&&&&& Dim currentList As List
&&&&&&&&&&& ' A newly copied list already exists for this ID, retrieve the stored list and use it on
&&&&&&&&&&& ' the current paragraph.
&&&&&&&&&&& If newLists.Contains(listId) Then
&&&&&&&&&&&&&&& currentList = CType(newLists(listId), List)
&&&&&&&&&&& Else
&&&&&&&&&&&&&&& ' Add a copy of this list to the document and store it for later reference.
&&&&&&&&&&&&&&& currentList = srcDoc.Lists.AddCopy(para.ListFormat.List)
&&&&&&&&&&&&&&& newLists.Add(listId, currentList)
&&&&&&&&&&& End If
&&&&&&&&&&& ' Set the list of this paragraph& to the copied list.
&&&&&&&&&&& para.ListFormat.List = currentList
&&&&&&& End If
&&& End If
' Append the source document to end of the destination document.
dstDoc.AppendDocument(srcDoc, ImportFormatMode.UseDestinationStyles)
' Save the combined document to disk.
dstDoc.Save(gDataDir & &TestFile.ListUseDestinationStyles Out.docx&)
&代码运行后效果图如下:
本站文章除注明转载外,均为本站原创或翻译
欢迎任何形式的转载,但请务必注明出处,尊重他人劳动成果
转载请注明:文章转载自:慧都控件网 []
本文地址:compatible mode和enhanced mode 区别_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
文档贡献者
评价文档:
喜欢此文档的还喜欢
compatible mode和enhanced mode 区别
把文档贴到Blog、BBS或个人站等:
普通尺寸(450*500pix)
较大尺寸(630*500pix)
大小:9.51KB
登录百度文库,专享文档复制特权,财富值每天免费拿!
你可能喜欢本地Apche httpd2.4.6(/share/link?shareid=&uk=)和Tomcat7.0.42是如何安装的,请参考前面的文章。
下面是具体整合的步骤。
首先需要得到mod_jk.so,它是apache到tomcat的连接器。
首先,将tomcat-connectors-1.2.37-src.tar.gz解压,可以到( /share/link?shareid=&uk= )下载。
#tar xvzf tomcat-connectors-1.2.37-src.tar.gz
之后得到tomcat-connectors-1.2.37-src目录,进入其中native目录,执行
[root@bogon native]# ./configure -with-apxs=/usr/local/apache2/bin/apxs
checking build system type... i686-pc-linux-gnuchecking host system type... i686-pc-linux-gnuchecking target system type... i686-pc-linux-gnuchecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking for test... /usr/bin/testchecking for grep... /bin/grepchecking for echo... /bin/echochecking for sed... /bin/sedchecking for cp... /bin/cpchecking for mkdir... /bin/mkdirneed to check for Perl first, apxs depends on it...checking for perl... /usr/bin/perlAPRINCLUDEDIR is& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1building connector for "apache-2.0"checking for gcc... gcc -std=gnu99checking for C compiler default output file name... a.outchecking whether the C compiler works... yeschecking whether we are cross compiling... nochecking for suffix of executables... checking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc -std=gnu99 accepts -g... yeschecking for gcc -std=gnu99 option to accept ANSI C... none neededchecking for style of include used by make... GNUchecking dependency style of gcc -std=gnu99... nonechecking for a sed that does not truncate output... /bin/sedchecking for egrep... grep -Echecking for ld used by gcc -std=gnu99... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for /usr/bin/ld option to reload object files... -rchecking for BSD-compatible nm... /usr/bin/nm -Bchecking whether ln -s works... yeschecking how to recognise dependent libraries... pass_allchecking how to run the C preprocessor... gcc -std=gnu99 -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking dlfcn.h usability... yeschecking dlfcn.h presence... yeschecking for dlfcn.h... yeschecking for g++... g++checking whether we are using the GNU C++ compiler... yeschecking whether g++ accepts -g... yeschecking dependency style of g++... nonechecking how to run the C++ preprocessor... g++ -Echecking for g77... nochecking for f77... nochecking for xlf... nochecking for frt... nochecking for pgf77... nochecking for fort77... nochecking for fl32... nochecking for af77... nochecking for f90... nochecking for xlf90... nochecking for pgf90... nochecking for epcf90... nochecking for f95... f95checking whether we are using the GNU Fortran 77 compiler... yeschecking whether f95 accepts -g... yeschecking the maximum length of command line arguments... 32768checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... okchecking for objdir... .libschecking for ar... archecking for ranlib... ranlibchecking for strip... stripchecking if gcc -std=gnu99 static flag& works... yeschecking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... nochecking for gcc -std=gnu99 option to produce PIC... -fPICchecking if gcc -std=gnu99 PIC flag -fPIC works... yeschecking if gcc -std=gnu99 supports -c -o file.o... yeschecking whether the gcc -std=gnu99 linker (/usr/bin/ld) supports shared libraries... yeschecking whether -lc should be explicitly linked in... nochecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking for shl_load... nochecking for shl_load in -ldld... nochecking for dlopen... nochecking for dlopen in -ldl... yeschecking whether a program can dlopen itself... yeschecking whether a statically linked program can dlopen itself... yeschecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... yesconfigure: creating libtoolappending configuration tag "CXX" to libtoolchecking for ld used by g++... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking whether the g++ linker (/usr/bin/ld) supports shared libraries... yeschecking for g++ option to produce PIC... -fPICchecking if g++ PIC flag -fPIC works... yeschecking if g++ supports -c -o file.o... yeschecking whether the g++ linker (/usr/bin/ld) supports shared libraries... yeschecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking for shl_load... (cached) nochecking for shl_load in -ldld... (cached) nochecking for dlopen... (cached) nochecking for dlopen in -ldl... (cached) yeschecking whether a program can dlopen itself... (cached) yeschecking whether a statically linked program can dlopen itself... (cached) yesappending configuration tag "F77" to libtoolchecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... yeschecking for f95 option to produce PIC... -fPICchecking if f95 PIC flag -fPIC works... yeschecking if f95 supports -c -o file.o... yeschecking whether the f95 linker (/usr/bin/ld) supports shared libraries... yeschecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yesLIBTOOL="/usr/local/apr/build-1/libtool --silent"checking for char... yeschecking size of char... 1checking for int... yeschecking size of int... 4checking for long... yeschecking size of long... 4checking for short... yeschecking size of short... 2checking for long double... yeschecking size of long double... 12checking for long long... yeschecking size of long long... 8checking for longlong... nochecking size of longlong... 0checking size of pid_t... 4checking size of pthread_t... 4checking for snprintf... yeschecking for vsnprintf... yeschecking for flock... yeschecking for setsockopt in -lsocket... nochecking sys/filio.h usability... nochecking sys/filio.h presence... nochecking for sys/filio.h... nochecking whether to use SO_RCVTIMEO with setsockopt()... yeschecking whether to use SO_SNDTIMEO with setsockopt()... yeschecking whether to use SOCK_CLOEXEC with socket()... nochecking poll.h usability... yeschecking poll.h presence... yeschecking for poll.h... yeschecking for poll... yeschecking for target platform... unixno apache givenno netscape givenconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating apache-1.3/Makefileconfig.status: creating apache-1.3/Makefile.apxsconfig.status: creating apache-2.0/Makefileconfig.status: creating apache-2.0/Makefile.apxsconfig.status: creating common/Makefileconfig.status: creating common/list.mkconfig.status: creating common/jk_types.hconfig.status: creating common/config.hconfig.status: executing depfiles commands
注意上面粗体部分是指向本机Apche的bin中的apxs文件的,这个参数要根据各人机器实际配置调整,不可盲目照搬。
接下来。再执行make
[root@bogon native]# makeMaking all in commonmake[1]: Entering directory `/home/hy/tomcat-connectors-1.2.37-src/native/common'/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp12_worker.c -o jk_ajp12_worker.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_connect.c -o jk_connect.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_msg_buff.c -o jk_msg_buff.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_util.c -o jk_util.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp13.c -o jk_ajp13.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_pool.c -o jk_pool.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_worker.c -o jk_worker.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp13_worker.c -o jk_ajp13_worker.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_lb_worker.c -o jk_lb_worker.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_sockbuf.c -o jk_sockbuf.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_map.c -o jk_map.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_uri_worker_map.c -o jk_uri_worker_map.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp14.c -o jk_ajp14.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp14_worker.c -o jk_ajp14_worker.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_md5.c -o jk_md5.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_shm.c -o jk_shm.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_ajp_common.c -o jk_ajp_common.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_context.c -o jk_context.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_url.c -o jk_url.lo/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c jk_status.c -o jk_status.lomake[1]: Leaving directory `/home/hy/tomcat-connectors-1.2.37-src/native/common'Making all in apache-2.0make[1]: Entering directory `/home/hy/tomcat-connectors-1.2.37-src/native/apache-2.0'/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -DUSE_APACHE_MD5 -I ../common -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -g -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -c mod_jk.c -o mod_jk.lo/usr/local/apr/build-1/libtool --silent --mode=link gcc -std=gnu99 -I/usr/local/apache2/include& -DHAVE_CONFIG_H -DUSE_APACHE_MD5 -I ../common -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -DHAVE_APR& -I/usr/local/apr/include/apr-1 -I/usr/local/apr/include/apr-1& -DHAVE_CONFIG_H -g -O2 -pthread -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE& -o mod_jk.la -module -rpath /usr/local/apache2/modules -avoid-version mod_jk.lo ../common/jk_ajp12_worker.lo ../common/jk_connect.lo ../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo ../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo ../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo ../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo ../common/jk_ajp14_worker.lo ../common/jk_md5.lo ../common/jk_shm.lo ../common/jk_ajp_common.lo ../common/jk_context.lo ../common/jk_url.lo ../common/jk_status.lo../scripts/build/instdso.sh SH_LIBTOOL='/usr/local/apr/build-1/libtool --silent' mod_jk.la `pwd`/usr/local/apr/build-1/libtool --silent --mode=install cp mod_jk.la /home/hy/tomcat-connectors-1.2.37-src/native/apache-2.0/libtool: install: warning: remember to run `libtool --finish /usr/local/apache2/modules'make[1]: Leaving directory `/home/hy/tomcat-connectors-1.2.37-src/native/apache-2.0'make[1]: Entering directory `/home/hy/tomcat-connectors-1.2.37-src/native'make[1]: Nothing to be done for `all-am'.make[1]: Leaving directory `/home/hy/tomcat-connectors-1.2.37-src/native'target="all"; \&&&&&&& list='common apache-2.0'; \&&&&&&& for i in $ do \&&&&&&&&&&& echo "Making $target in $i"; \&&&&&&&&&&& if test "$i" != "."; then \&&&&&&&&&&&&&& (cd $i && make $target) || exit 1; \&&&&&&&&&&& \&&&&&&&Making all in commonmake[1]: Entering directory `/home/hy/tomcat-connectors-1.2.37-src/native/common'make[1]: Nothing to be done for `all'.make[1]: Leaving directory `/home/hy/tomcat-connectors-1.2.37-src/native/common'Making all in apache-2.0make[1]: Entering directory `/home/hy/tomcat-connectors-1.2.37-src/native/apache-2.0'make[1]: Nothing to be done for `all'.make[1]: Leaving directory `/home/hy/tomcat-connectors-1.2.37-src/native/apache-2.0'
完成以后,进入apache-2.0目录,就能发现我们需要的目标文件
[root@bogon native]# cd apache-2.0/[root@bogon apache-2.0]# lsbldjk54.qclsrc& Makefile.apxs&&&& mod_jk.a&&& mod_jk.lobldjk.qclsrc&&& Makefile.apxs.in& mod_jk.c&&& mod_jk.oconfig.m4&&&&&& Makefile.in&&&&&& mod_jk.dsp& mod_jk.soMakefile&&&&&&& Makefile.vc&&&&&& mod_jk.la&& NWGNUmakefile
这个文件就是Apache和Tomcat的连接器,我们需要把它拷贝到apache的modules目录去。
[root@bogon apache-2.0]# cp mod_jk.so /usr/local/apache2/modules/cp: overwrite `/usr/local/apache2/modules/mod_jk.so'? y
上面覆写的原因是原有一个不正确的mod_jk.so,这次用生成的文件覆盖掉。如果原来没有则直接拷贝不会有输出。
再接下里,要修改apache的conf文件了。
打开/usr/local/apache2/conf/httpd.conf,在末尾增加这样一段:
LoadModule jk_module modules/mod_jk.soJkWorkersFile conf/workers.propertiesJkLogFile logs/mod_jk.logJkLogLevel debugJkMount /*.jsp worker1
保存退出后,在同一目录下新增文件workers.properties,其内容如下:
worker.list=worker1worker.worker1.port=8009worker.worker1.host=localhostworker.worker1.type=ajp13worker.worker1.lbfactor=1
之后执行拷贝文件,之所以要这样做是因为将/usr/local/httpd/conf/httpd.conf和/usr/local/apache2/conf/httpd.conf保持一致。
[root@bogon conf]# cp& httpd.conf& /usr/local/httpd/conf/cp: overwrite `/usr/local/httpd/conf/httpd.conf'? y
到这里,配置工作就完成了,我们需要重启httpd服务和启动Tomcat
[root@bogon conf]# service httpd stopAH00557: httpd: apr_sockaddr_info_get() failed for bogonAH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message[root@bogon conf]# service httpd startAH00557: httpd: apr_sockaddr_info_get() failed for bogonAH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
启动Tomcat
[root@bogon apache-2.0]# cd /usr/local/tomcat7.0.42/[root@bogon tomcat7.0.42]# lsbin&& lib&&&&& logs&&& RELEASE-NOTES& temp&&&& workconf& LICENSE& NOTICE& RUNNING.txt&&& webapps[root@bogon tomcat7.0.42]# cd bin[root@bogon bin]# lsbootstrap.jar&&&&&&&&&&&&&&&& cpappend.bat&&&&& startup.batcatalina.bat&&&&&&&&&&&&&&&&& daemon.sh&&&&&&&& startup.shcatalina.sh&&&&&&&&&&&&&&&&&& digest.bat&&&&&&& tomcat-juli.jarcatalina-tasks.xml&&&&&&&&&&& digest.sh&&&&&&&& tomcat-native.tar.gzcommons-daemon.jar&&&&&&&&&&& setclasspath.bat& tool-wrapper.batcommons-daemon-native.tar.gz& setclasspath.sh&& tool-wrapper.shconfigtest.bat&&&&&&&&&&&&&&& shutdown.bat&&&&& version.batconfigtest.sh&&&&&&&&&&&&&&&& shutdown.sh&&&&&& version.sh[root@bogon bin]# ./startup.sh Using CATALINA_BASE:&& /usr/local/tomcat7.0.42Using CATALINA_HOME:&& /usr/local/tomcat7.0.42Using CATALINA_TMPDIR: /usr/local/tomcat7.0.42/tempUsing JRE_HOME:&&&&&&& /usr/java/jdk1.7.0_25Using CLASSPATH:&&&&&& /usr/local/tomcat7.0.42/bin/bootstrap.jar:/usr/local/tomcat7.0.42/bin/tomcat-juli.jar[root@bogon bin]#
最后来检验一下,首先看Tomcat自带的网页,网址是:http://192.168.0.104:8080/examples/jsp/jsp2/el/basic-arithmetic.jsp
再让我们访问80端口看看,网址是:http://192.168.0.104/examples/jsp/jsp2/el/basic-arithmetic.jsp
两个URL中,端口一个是8080,一个是80,但结果是一致的,这说明Apache到Tomcat的连接完全成功了。
&全文完,有问题请指出,谢谢!&
阅读(...) 评论()

我要回帖

更多关于 win7的更新放到了哪里 的文章

 

随机推荐