第二夜 一天的粮食

第二夜
一天的生活也是充实还是很疲惫?
我搞不清楚了,总觉的在生活里好像就没有离开过校园
很多时候我想到的总是在2006-5-30号的那个在去上海的车上的晚上,究竟生活对我有什么意义呢我的父亲和母亲总是对我的未来发愁,我却没有那样的担忧,有时候我都自己想要是我一直生活在那个宁静的小村庄该有多好,不用在这样忙碌,在那年的冬天里我把自己清泡在寒风中.在风中奔波,,我最希望的不是出人头地什么的,而是安定!!!

[@more@]

第二夜
一天的生活也是充实还是很疲惫?
我搞不清楚了,总觉的在生活里好像就没有离开过校园
很多时候我想到的总是在2006-5-30号的那个在去上海的车上的晚上,究竟生活对我有什么意义呢我的父亲和母亲总是对我的未来发愁,我却没有那样的担忧,有时候我都自己想要是我一直生活在那个宁静的小村庄该有多好,不用在这样忙碌,在那年的冬天里我把自己清泡在寒风中
我甚至对我的存在迷惑起来。每天的粮食似乎是我每天的必修课,生活女神在嘲笑我,我本无心,,生活的意思在哪里?
-------这是分割线,纪念那些过去的夏天,我总是在沉睡!
java语言实际上学习的是什么,是记忆?是经验?
老实的说我讨厌那些比较枯燥的东西,可是我不是天才,所以我学习到的东西都是我自己摸索的
当然我希望我能有些老师们教我,可是我发现很多时候都成了自己教自己,有点苦涩!一些经验就成了这个BLOG的帖子的由来,希望能给到这的人一些的帮助
-----------------------------------------
这是帖子的延长线
语言本质是什么?我们说的话是有什么功用的?语言的一个最基本的意义在于应用,其次它做的是对我们物质世界的描叙,这是语言的基本功用。可是世界是不断进步的发展的,语言也一样,它要适应生活所以它也要进化,进化的原因在于需求,从这个意义上来说计算机语言是最明显的
,说到计算机语言,我们不得不说到冯.诺依曼体系结构,二进制和顺序执行成了计算机的法则
这里涉及到2个方面:1个是数据的保存和运行方式,1个 是程序的执行过程
所有的计算机语言都可以说是在进行这2方面的工作,说着说着,我们又跑题了
我们只谈JAVA,先把环境配置起来,说下TOMACT的配置:
显示的主页:$CATALINA_HOME/webapps/ROOT/index.jsp
用户的定义:$CATALINA_HOME/conf/tomcat-users.xml.
可以观看tomcat的HOW-TO,在里面能找到我们需要的帮助
1.application
/WEB-INF/web.xml 在里面能找到关于web application的配置信息,
/WEB-INF/classes 在里面能找到web使用的类
/WEB-INF/lib place JAR files containing those classes and resourcesof your web application archive
$CATALINA_BASE/shared/lib For classes and resources that must be shared across all web applications, place unpacked classes and resources under $CATALINA_BASE/shared/classes, or place JAR files containing those classes and resources under $CATALINA_BASE/shared/lib
2.在随TOMCAT的发行版本附带的NOTE中我们能找到下面这段,它说明了我们的java application APIs的内容位置
A standard installation of Tomcat 5 makes all of the following APIs available
for use by web applications (by placing them in "common/lib" or "shared/lib"):
* ant.jar (Apache Ant 1.6 or later)
* commons-collections*.jar (Commons Collections 2.1 or later)
* commons-dbcp.jar (Commons DBCP 1.1 or later)
* commons-el.jar (Commons Expression Language 1.0)
* commons-logging-api.jar (Commons Logging API 1.0.3 or later)
* commons-pool.jar (Commons Pool 1.1 or later)
* jasper-compiler.jar (Jasper 2 Compiler)
* jasper-runtime.jar (Jasper 2 Runtime)
* jsp-api.jar (JSP 2.0 API)
* commons-el.jar (JSP 2.0 Expression Language)
* naming-common.jar (JNDI Context implementation)
* naming-factory.jar (JNDI object factories for J2EE ENC support)
* naming-resources.jar (JNDI DirContext implementations)
* servlet-api.jar (Servlet 2.4 API)

You can make additional APIs available to all of your web applications by
putting unpacked classes into a "classes" directory (not created by default),
or by placing them in JAR files in the "lib" directory.
-------------------------------------------------------------------------
开始写下这些文档的中文翻译

pache Tomcat Version 5.0.28
发行笔记


$Id: 发行笔记,v 1.18 2004/06/15 18:42:06 yoavs Exp $


============================
已知发行声明:
============================

* Tomcat 5.0 and JNI Based Applications
* Tomcat 5.0 Standard APIs Available
* Tomcat 5.0 and XML Parsers
* Web application reloading and static fields in shared libraries
* JAVAC leaking memory
* Tomcat on Linux
* Enabling SSI and CGI Support
* Security manager URLs
* Symlinking static resources
* Enabling invoker servlet
* Viewing the Tomcat Change Log
* When all else fails


-------------------------------------
Tomcat 5.0 and JNI Based Applications:
-------------------------------------

Applications that require native libraries must ensure that the libraries have
been loaded prior to use. Typically, this is done with a call like:

static {
System.loadLibrary("path-to-library-file");
}

in some class. However, the application must also ensure that the library is
not loaded more than once. If the above code were placed in a class inside
the web application (i.e. under /WEB-INF/classes or /WEB-INF/lib), and the
application were reloaded, the loadLibrary() call would be attempted a second
time.

To avoid this problem, place classes that load native libraries outside of the
web application, and ensure that the loadLibrary() call is executed only once
during the lifetime of a particular JVM.


----------------------------------
Tomcat 5.0 Standard APIs Available:
----------------------------------

A standard installation of Tomcat 5 makes all of the following APIs available
for use by web applications (by placing them in "common/lib" or "shared/lib"):
* ant.jar (Apache Ant 1.6 or later)
* commons-collections*.jar (Commons Collections 2.1 or later)
* commons-dbcp.jar (Commons DBCP 1.1 or later)
* commons-el.jar (Commons Expression Language 1.0)
* commons-logging-api.jar (Commons Logging API 1.0.3 or later)
* commons-pool.jar (Commons Pool 1.1 or later)
* jasper-compiler.jar (Jasper 2 Compiler)
* jasper-runtime.jar (Jasper 2 Runtime)
* jsp-api.jar (JSP 2.0 API)
* commons-el.jar (JSP 2.0 Expression Language)
* naming-common.jar (JNDI Context implementation)
* naming-factory.jar (JNDI object factories for J2EE ENC support)
* naming-resources.jar (JNDI DirContext implementations)
* servlet-api.jar (Servlet 2.4 API)

You can make additional APIs available to all of your web applications by
putting unpacked classes into a "classes" directory (not created by default),
or by placing them in JAR files in the "lib" directory.

Tomcat 5.0 also makes Xerces 2 and the Commons Logging API (release 1.0.3)
available to web applications.

Please note that the JMX API is available to applications as well. The jmx.jar
file used to be located in the common/lib directory, but was moved to the bin
directory as part of the Tomcat 5.0.20 release. The jmx.jar is in Tomcat's
bootstrap classpath(启动类路径) (included via the Class Path line in bootstrap.jar's manifest).


--------------------------
Tomcat 5.0 and XML Parsers:
--------------------------

As described above, Tomcat 5.0 makes an XML parser (and many other standard
APIs) available to web applications. This parser is also used internally
to parse web.xml files and the server.xml configuration file. If you wish,
you may replace the "xercesImpl.jar" file in "common/endorsed" with another
XML parser, as long as it is compatible with the JAXP 1.2 APIs.

Xerces 2.6.2 is included.


---------------------------------------------------------------
Web application reloading and static fields in shared libraries:
---------------------------------------------------------------

『Some shared libraries (many are part of the JDK) keep references to objects
instantiated by the web application』. To avoid class loading related problems
(ClassCastExceptions, messages indicating that the classloader
is stopped, etc.), the shared libraries state should be reinitialized.

Something which might help is to avoid putting classes which would be
referenced by a shared static field in the web application classloader,
and putting them in the shared classloader instead (JARs should be put in the
"lib" folder, and classes should be put in the "classes" folder).


--------------------
JAVAC leaking memory:
--------------------

The Java compiler leaks memory each time a class is compiled. Web applications
containing hundreds of JSP files may as a result trigger out of memory errors
once a significant number of pages have been accessed. The memory can only be
freed by stopping Tomcat and then restarting it.

The JSP command line compiler (JSPC) can also be used to precompile the JSPs.

Note: This issue has been fixed in Sun JDK 1.4.x.


---------------
Tomcat on Linux:
---------------

Virtual machine crashes can be experienced when using certain combinations of
kernel / glibc under Linux with Sun Hotspot 1.2 to 1.3. The crashes were
reported to occur mostly on startup. Sun JDK 1.4 does not exhibit the problems,
and neither does IBM JDK for Linux.

The problems can be fixed by reducing the default stack size. At bash shell,
do "ulimit -s 2048"; use "limit stacksize 2048" for tcsh.

GLIBC 2.2 / Linux 2.4 users should also define an environment variable:
export LD_ASSUME_KERNEL=2.2.5

Additionally, Redhat Linux 9.0 users should use the same setting, to avoid
stability problems.


----------------------------
Enabling SSI and CGI Support:
----------------------------

Having CGI and SSI available to web applications created security problems when
using a security manager (as a malicious web application could use them to
sidestep the security manager access control). In Tomcat 5.0, they have been
disabled by default, as our goal is to provide a fully secure default
configuration. However, CGI and SSI remain available.


To enable CGI:
* rename the file $CATALINA_HOME/server/lib/servlets-cgi.renametojar to
$CATALINA_HOME/server/lib/servlets-cgi.jar.
重新
* in $CATALINA_HOME/conf/web.xml, you will need to uncomment 2 areas, the
servlet declaration and the servlet mapping. The servlet declaration
looks similar to this:

cgi
...

While the servlet mapping looks similar to this:

cgi
/cgi-bin/*

Alternately, these servlet declarations and mappings
can be added to your web application deployment descriptor.

To enable SSI:
* rename the file $CATALINA_HOME/server/lib/servlets-ssi.renametojar to
$CATALINA_HOME/server/lib/servlets-ssi.jar.
* in $CATALINA_HOME/conf/web.xml, you will need to uncomment 2 areas, the
servlet declaration and the servlet mapping. The servlet declaration
looks similar to this:

ssi
...

While the servlet mapping looks similar to this:

ssi
*.shtml

Alternately, these servlet declarations and mappings
can be added to your web application deployment descriptor.

---------------------
Security manager URLs:
---------------------

The URLs to be used in the policy file to grant permissions to JARs located
inside the web application repositories have changed as of Tomcat 4.1.

In Tomcat 4.0, codeBase URLs for JARs loaded from web application
repositories were:
jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-

In Tomcat 4.1 and 5.0, they should be:
file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar


---------------------------
Symlinking static resources:
---------------------------

By default, Unix symlinks will not work when used in a web application to link
resources located outside the web application root directory.

This behavior is optional, and the "allowLinking" flag may be used to disable
the check.


------------------------
Enabling invoker servlet:
------------------------

Starting with Tomcat 4.1.12, the invoker servlet is no longer available by
default in all webapps. Enabling it for all webapps is possible by editing
$CATALINA_HOME/conf/web.xml to uncomment the "/servlet/*" servlet-mapping
definition.

Using the invoker servlet in a production environment is not recommended and
is unsupported.


这个文档说明的是TOMCAT对一些特性和协议的支持和改动变化
还有就是不同操作平台的变化,

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/210940/viewspace-903988/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/210940/viewspace-903988/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值