📄 conf-web_xml--rosonsandy.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0055)http://rosonsandy.blogdriver.com/rosonsandy/871673.html -->
<HTML><HEAD><TITLE>conf/web.xml--rosonsandy</TITLE>
<META http-equiv=Content-Type content="text/html; charset=GBK">
<META http-equiv=Pragma content=no-cache>
<META http-equiv=Cache-Control content=no-cache>
<META http-equiv=Expires content=0>
<META
content="classloader in tomcat[转贴加修改]conf/web.xmltomcat源代码分析 博客 博客动力 blog blogdriver blogger 中国"
name=description>
<META
content="rosonsandy classloader in tomcat[转贴加修改]conf/web.xmltomcat源代码分析 博客 博客动力 blog blogdriver blogger 中国"
name=keywords><LINK href="conf-web_xml--rosonsandy.files/diary.css"
type=text/css rel=stylesheet>
<SCRIPT language=JavaScript
src="conf-web_xml--rosonsandy.files/UBB.js"></SCRIPT>
<SCRIPT src="conf-web_xml--rosonsandy.files/blog.js"
type=text/javascript></SCRIPT>
<META content="MSHTML 6.00.2900.3199" name=GENERATOR></HEAD>
<BODY>
<DIV id=container>
<DIV id=header>
<H1 class=title><A
href="http://rosonsandy.blogdriver.com/rosonsandy/index.html">rosonsandy</A></H1></DIV>
<DIV id=category><A title=上一篇
href="http://rosonsandy.blogdriver.com/rosonsandy/871539.html">classloader in
tomcat[转贴加修改]</A>- -| <A
href="http://rosonsandy.blogdriver.com/rosonsandy/index.html">回首页</A> | <A
href="http://rosonsandy.blogdriver.com/rosonsandy/catalog_2005.html">2005年索引</A>
| - -<A title=下一篇
href="http://rosonsandy.blogdriver.com/rosonsandy/874744.html">tomcat源代码分析</A></DIV>
<DIV class=entity>
<H2 class=diaryTitle>conf/web.xml- -</H2>
<P>
<P>先介绍两种在tomcat中经常要用到的:DefaultServlet和JspServlet 。前者为处理Servlet后者为编译Jsp文件。
<P><B>DefaultServlet</B><BR>The default servlet for all web applications, that
serves static resources. It processes all requests that are not mapped to other
servlets with servlet mappings (defined either here or in your own web.xml file
).<BR>作用:处理静态资源(html,jpg等)和没有在web.xml中定义的servlet。 </P>
<P><PRE style="COLOR: #006600; FONT-FAMILY: Andale Mono, Courier New, Courier, monospace"> <SERVLET />
<SERVLET-NAME />default</SERVLET-NAME />
<SERVLET-CLASS />
org.apache.catalina.servlets.DefaultServlet
</SERVLET-CLASS />
<INIT-PARAM />
<PARAM-NAME />debug</PARAM-NAME />
<PARAM-VALUE />0</PARAM-VALUE />
</INIT-PARAM />
<INIT-PARAM />
<PARAM-NAME />listings</PARAM-NAME />
<PARAM-VALUE />true</PARAM-VALUE />
</INIT-PARAM />
<LOAD-ON-STARTUP />1</LOAD-ON-STARTUP />
</SERVLET />
<SERVLET-MAPPING />
<SERVLET-NAME />default</SERVLET-NAME />
<URL-PATTERN />/</URL-PATTERN />
</SERVLET-MAPPING />
</PRE><BR>因此缺省情况下,default servlet在web应用启动的时候加载,目录列表是打开的,调试开关关闭。 <IMG
style="WIDTH: 566px; HEIGHT: 391px" height=391
src="conf-web_xml--rosonsandy.files/defaultServlet.jpg" width=566>
<P><B>JspServlet</B><BR>The JSP page compiler and execution servlet, which is
the mechanism used by Tomcat to support JSP pages.
<BR>作用:调用jasper,并编译*.jsp文件。</P>
<P><PRE style="COLOR: #006600; FONT-FAMILY: Andale Mono, Courier New, Courier, monospace"><SERVLET />
<SERVLET-NAME />jsp</SERVLET-NAME />
<SERVLET-CLASS />org.apache.jasper.servlet.JspServlet</SERVLET-CLASS />
<INIT-PARAM />
<PARAM-NAME />logVerbosityLevel</PARAM-NAME />
<PARAM-VALUE />WARNING</PARAM-VALUE />
</INIT-PARAM />
<INIT-PARAM />
<PARAM-NAME />fork</PARAM-NAME />
<PARAM-VALUE />false</PARAM-VALUE />
</INIT-PARAM />
<LOAD-ON-STARTUP />3</LOAD-ON-STARTUP />
</SERVLET />
<SERVLET-MAPPING />
<SERVLET-NAME />jsp</SERVLET-NAME />
<URL-PATTERN />*.jsp</URL-PATTERN />
</SERVLET-MAPPING />
</PRE><BR><IMG style="WIDTH: 570px; HEIGHT: 591px" height=591
src="conf-web_xml--rosonsandy.files/jspServlet.jpg" width=570>
<P>参考文章:<BR><A
href="http://ndog.blogchina.com/226109.html">http://ndog.blogchina.com/226109.html</A><BR><A
href="http://ndog.blogchina.com/224657.html">http://ndog.blogchina.com/224657.html</A></P>
<P></P>
<P class=diaryFoot>- 作者: <A
onclick="window.open('http://publishblog.blogdriver.com/blog/postMessage.b?receiver=517836','发送短消息','width=520, height=455')"
href="javascript:void(0);">rosonsandy</A> 2005年08月5日, 星期五 21:21 </P></DIV>
<DIV class=operation><A name=trackback>
<H3>Trackback</H3></A>
<P class=trackback>你可以使用这个链接引用该篇日志
http://publishblog.blogdriver.com/blog/tb.b?diaryID=871673 </P></DIV>
<DIV class=operation><A name=relatedDiary>
<H3>博客手拉手</H3></A>
<TABLE width="90%">
<TBODY></TBODY></TABLE></DIV>
<DIV class=operation><A name=comment>
<H3>回复</H3></A><A name=comment$(remark.remarkID)>
<H4>- 评论人:535 </H4></A>
<H5>Sat Nov 12 21:34:04 CST 2005 <A href="mailto:ertwertet@.2343"><IMG
class=imgStyle height=12 alt=作者邮箱
src="conf-web_xml--rosonsandy.files/letter.gif" width=16 align=absMiddle
border=0></A> <A href="http:///" target=_blank><IMG class=imgStyle height=14
alt=作者Blog src="conf-web_xml--rosonsandy.files/blog_2.gif" width=16
align=textTop border=0></A> </H5><BR>
<P class=comment>67<BR><BR></P></DIV>
<DIV class=operation>
<TABLE class=comment cellSpacing=0 cellPadding=0 width=700 border=0>
<FORM id=replyForm method=post><INPUT type=hidden value=356891 name=blogID>
<INPUT type=hidden value=871673 name=diaryID> <INPUT type=hidden
value=rosonsandy name=blogDomino>
<SCRIPT>
if(getCookie('userID') == null){
document.write('<tr><td width="70">发布人:</td>');
document.write('<td width="150"> <input name="remark.authorNameFUI" type="text" size="20" class="inputStyle" maxlength="20"></td>');
document.write('<td width="70">邮箱:</td>');
document.write('<td width="435"> <input name="remark.authorEmail" type="text" size="20" class="inputStyle" maxlength="40"></td>');
document.write('</tr><tr><td>主 页:</td>');
document.write('<td colspan="3"> <input name="remark.authorURL" type="text" class="inputStyle" value="HTTP://" size="63" maxlength="40"></td></tr>');
}else{
document.write('<input type="hidden" name="remark.authorNameFUI" value="Blogdriver">');
}
</SCRIPT>
<TBODY>
<TR align=left>
<TD colSpan=4>评论内容:<BR><TEXTAREA class=textStyle id=remark name=remark.remarkFUI rows=8 cols=60> </TEXTAREA>
</TD></TR>
<TR align=left>
<TD colSpan=4> <INPUT onclick=reply() type=button value=提交>
<INPUT type=reset value=重置> </TD></TR></FORM></TBODY></TABLE></DIV></DIV>
<SCRIPT src="" type=text/javascript></SCRIPT>
<DIV id=footer><A
href="http://statices.blogdriver.com/jsp/reg/register.jsp"><IMG class=logo
src="conf-web_xml--rosonsandy.files/logo3.gif" border=0></A><A
href="http://www.blogdriver.com/">2003-2004 BLOGDRIVER.COM All rights
reserved</A></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -