⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 图解eclipse+tomcat配置jsp开发调试环境 _ j2ee _ 文章中心 _ 恬之怡手机软件园.htm

📁 eclipse and tomcat deploy
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0034)http://www.xmtzy.com/art/3/17.html -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META 
content=恬之怡手机软件园是一个专业的手机软件发布平台,更是手机软件/游戏编程交流平台,同时也是一个专业的手机软件下载平台,为所有的用户下载到放心的手机软件 
name=keywords>
<META content=fj126,蓝雨 name=description>
<META content=风的曙光 name=author>
<META content=all name=robots><LINK media=all 
href="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/style.css" 
type=text/css rel=stylesheet>
<SCRIPT 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/fun.js"></SCRIPT>

<META content="MSHTML 6.00.2900.3020" name=GENERATOR></HEAD>
<BODY>
<DIV id=main>
<DIV id=header>
<DIV><IMG 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/headlogo.gif"></DIV></DIV>
<DIV class=nav><A href="http://www.xmtzy.com/index.html">网站首页</A>┊<A 
href="http://www.xmtzy.com/news/">新闻动态</A>┊<A 
href="http://www.xmtzy.com/art/">文章中心</A>┊<A 
href="http://www.xmtzy.com/photo/">图片展示</A>┊<A 
href="http://www.xmtzy.com/down/">资源下载</A>┊<A 
href="http://www.xmtzy.com/link/">友情连接</A>┊<A 
href="http://www.xmtzy.com/bbs/">论坛讨论</A></DIV>
<DIV id=guide>当前位置: <A href="http://www.xmtzy.com/">恬之怡手机软件园</A> » <A 
href="http://www.xmtzy.com/art/">文章中心</A> » <A 
href="http://www.xmtzy.com/art/3_1.html">J2EE</A> » 
阅读:图解eclipse+tomcat配置jsp开发调试环境</DIV>
<DIV id=right>
<DIV class=def-tab>
<H5 class=def-title>文章分类</H5>
<DIV class=def-rlist>
<UL>
  <LI id=h><A href="http://www.xmtzy.com/art/1_1.html">J2ME编程</A></LI>
  <LI id=h><A href="http://www.xmtzy.com/art/2_1.html">VC++编程</A></LI>
  <LI id=h><A href="http://www.xmtzy.com/art/3_1.html">J2EE</A></LI>
  <LI id=h><A href="http://www.xmtzy.com/art/4_1.html">UML教程</A></LI>
  <LI id=h><A 
href="http://www.xmtzy.com/art/5_1.html">jsp</A></LI></UL></DIV></DIV>
<H5 class=def-title>最新文章</H5>
<DIV class=def-rlist>
<UL>
  <LI><A title=JSP教程11------JSP及语法概要 
  href="http://www.xmtzy.com/art/5/36.html">JSP教程11------JSP及语法概...</A></LI>
  <LI><A title=JSP教程10----会话状态 
  href="http://www.xmtzy.com/art/5/35.html">JSP教程10----会话状态</A></LI>
  <LI><A title=JSP教程9------处理Cookie 
  href="http://www.xmtzy.com/art/5/34.html">JSP教程9------处理Cookie</A></LI>
  <LI><A title=JSP教程-----8&nbsp;设置HTTP应答头 
  href="http://www.xmtzy.com/art/5/33.html">JSP教程-----8&nbsp;设置HTT...</A></LI>
  <LI><A title=JSP教程-----7&nbsp;HTTP应答状态 
  href="http://www.xmtzy.com/art/5/32.html">JSP教程-----7&nbsp;HTTP应答状态...</A></LI>
  <LI><A title=JSP教程-----6访问CGI变量 
  href="http://www.xmtzy.com/art/5/31.html">JSP教程-----6访问CGI变量</A></LI>
  <LI><A title=JSP教程-----5 
  href="http://www.xmtzy.com/art/5/30.html">JSP教程-----5</A></LI>
  <LI><A title=JSP教程----4 
  href="http://www.xmtzy.com/art/5/29.html">JSP教程----4</A></LI>
  <LI><A title=JSP教程------3 
  href="http://www.xmtzy.com/art/5/28.html">JSP教程------3</A></LI>
  <LI><A title=JSP教程------2 
  href="http://www.xmtzy.com/art/5/27.html">JSP教程------2</A></LI></UL></DIV>
<H5 class=def-title>相关文章</H5>
<DIV class=def-rlist>
<UL>
  <LI>暂时没有</LI></UL></DIV></DIV>
<DIV id=left>
<DIV class=def-tab>
<H5 class=view>正文</H5>
<H4 id=view>图解eclipse+tomcat配置jsp开发调试环境</H4>
<H6 id=view>[ 来自:<A href="http://www.xmtzy.com/">网络</A> 作者:风的曙光 阅读:<SPAN 
id=hits>0</SPAN> 时间:2007-2-5 ]</H6>
<DIV id=brd-content>
<H4 class=TextColor1 id=subjcns!173FE392A8F5EA9D!110 
style="MARGIN-BOTTOM: 0px">这篇文章主要介绍如何利用Sysdeo Eclipse Tomcat Launcher plugin 
编辑和调试JSP与Servlet,</H4>
<DIV id=msgcns!173FE392A8F5EA9D!110>
<DIV>
<P><STRONG><FONT size=4>一.&nbsp;需要的软件</FONT></STRONG> 
<DIV>&nbsp;&nbsp; <STRONG>Sysdeo Eclipse Tomcat Launcher plugin<EM> 
</EM></STRONG></DIV>
<DIV>&nbsp;&nbsp;&nbsp;主页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<A 
href="http://www.sysdeo.com/eclipse/tomcatPlugin.html"><U><FONT 
color=#0000ff>http://www.sysdeo.com/eclipse/tomcatPlugin.html</FONT></U></A>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;下载&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A 
href="http://www.sysdeo.com/eclipse/tomcatPluginV3.zip"><U><FONT 
color=#0000ff>http://www.sysdeo.com/eclipse/tomcatPluginV3.zip</FONT></U></A>&nbsp;&nbsp;&nbsp; 
</DIV>
<DIV>&nbsp;&nbsp; 这是一个eclipse插件,可以帮助编辑JSP文件。</DIV>
<DIV>&nbsp;&nbsp; 安装插件,参考&nbsp;&nbsp;&nbsp;<A 
href="http://xmtzy.com/art/3/18.html">《links安装Eclipse插件》</A></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=4><STRONG>二. 环境配置</STRONG></FONT></DIV>
<DIV>&nbsp;&nbsp; 为了编辑和调试JSP文件,环境配置有些麻烦,有几点要注意。</DIV>
<DIV>&nbsp;</DIV>
<DIV>1. 检查环境变量的设置。</DIV>
<DIV>&nbsp;&nbsp; 右击“我的电脑”-&gt;高级-&gt;环境变量,</DIV>
<DIV>&nbsp;&nbsp; 检查JAVA_HOME,TOMCAT_HOME变量是否指向其安装的目录;</DIV>
<DIV>&nbsp;&nbsp; PATH变量中是否含有“%JAVA_HOME%\bin;”;</DIV>
<DIV>&nbsp;&nbsp; CLASSPATH变量中是否含有“%JAVA_HOME%\lib\tools.jar;”</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; </DIV>
<DIV></DIV>
<DIV>2. 将eclipse中java运行环境指向JDK,不是JRE。</DIV>
<DIV>&nbsp;&nbsp; 在eclipe主窗口中,“窗口”-&gt;首选项-&gt;java-&gt;已安装的JRE</DIV>
<DIV>&nbsp;&nbsp; <IMG onclick=window.open(this.src); 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/o_lomboz52.jpg" 
onload=javascript:DrawImage(this);></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>3. 配置Sysdeo Tomcat 插件&nbsp;&nbsp;&nbsp; </DIV>
<DIV>&nbsp;&nbsp;&nbsp; </DIV>
<DIV><IMG onclick=window.open(this.src); 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/o_lomboz53.jpg" 
onload=javascript:DrawImage(this);></DIV>
<DIV>&nbsp; 
<TABLE borderColor=#000000 cellSpacing=0 cellPadding=4 width="90%" border=0>
  <TBODY>
  <TR>
    <TD style="BORDER-BOTTOM: rgb(51,51,204) thin inset" vAlign=top width="100%" 
    bgColor=#d9eaf2 height=33>
      <P>Context解释 </P>
  <TR>
    <TD style="BORDER-TOP-STYLE: none; BORDER-TOP-COLOR: rgb(236,233,216)" 
    vAlign=top width="100%" bgColor=#edf2b8>
      <DIV>&nbsp; Context元素代表一个web应用,运行在某个特定的虚拟主机上。每个web应用基于一个Web Application 
      Archive(WAR)文件,或者是一个目录,包含WAR文件解压后的内容。</DIV>
      <DIV>&nbsp; 通过将请求URI的最长可能前缀与每个Context的context路径进行匹配,Catalina选择相应的web 
      应用处理HTTP请求。一旦选定,根据web application deployment descriptor 
      文件中定义的servlet映射,Context会选择一个正确的servlet来处理进来的请求。servlet映射必须定义在该web应用目录层次结构中的/WEB-INF/web.xml中。</DIV>
      <DIV>&nbsp; 
      你可以在一个Host元素中嵌套任意多的Context元素。每个Context的路径必须是惟一的,由path属性定义。另外,你必须定义一个context路径长度为0的Context,这个Context称为该虚拟主机的缺省web应用,用来处理那些不能匹配任何Context的Context路径的请求。</DIV>
      <DIV>&nbsp; 
      除了在Host元素中嵌套Context元素以外,你也可以将它们存储在单个文件中(以.xml为后缀),放在$CATALINA_HOME/conf/[enginename]/[hostname]/目录下面。</DIV>
      <DIV>&nbsp;&nbsp; (注:Catalina是Tomcat的别称)</DIV></TD></TR></TBODY></TABLE></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; 切换到Advanced选项</DIV>
<DIV>&nbsp;<IMG onclick=window.open(this.src); 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/o_lomboz54.jpg" 
onload=javascript:DrawImage(this);></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; 切换到JVM Setting选项</DIV>
<DIV>&nbsp;<IMG onclick=window.open(this.src); 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/o_lomboz55.jpg" 
onload=javascript:DrawImage(this);></DIV>
<DIV>&nbsp;</DIV>
<DIV>切换到Tomcat Manger App,为管理界面增加一个用户。</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; <IMG onclick=window.open(this.src); 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/o_lomboz56.jpg" 
onload=javascript:DrawImage(this);></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;点击“应用”、“确定”即可。</DIV>
<DIV>&nbsp;</DIV>
<DIV>4. 将“Tomcat Project”添加到“新建”菜单。</DIV>
<DIV>&nbsp;&nbsp;&nbsp; 窗口-&gt;定制透视图-&gt;快捷方式-&gt;新建-&gt;Java</DIV>
<DIV>&nbsp;&nbsp;&nbsp; <IMG onclick=window.open(this.src); 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/o_lomboz57.jpg" 
onload=javascript:DrawImage(this);></DIV>
<DIV><BR>
<DIV><STRONG><FONT size=4>三. 编写程序</FONT></STRONG> 
<DIV>&nbsp;</DIV>
<DIV>&nbsp; 1.创建一个Tomcat项目。</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; 右击“包资源管理器”窗口中的空白处,新建-&gt;Tomcat Project</DIV>
<DIV>&nbsp;&nbsp; <IMG alt="" 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/o_lomboz58.jpg"></DIV>
<DIV><STRONG><FONT size=4>&nbsp; </FONT></STRONG></DIV>
<DIV>&nbsp;在项目名中填写:TomcatSample,点击“完成”即可。</DIV>
<DIV>&nbsp;</DIV>
<DIV>2.右击“TomcatSample”,新建-&gt;文件, 在文件名中填写:index.jsp</DIV>
<DIV>&nbsp;&nbsp; <IMG alt="" 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/o_lomboz59.jpg"></DIV>
<DIV>&nbsp;</DIV>
<DIV>3.修改index.jsp&nbsp; </DIV>
<DIV>
<TABLE borderColor=#000000 cellSpacing=0 cellPadding=4 width="70%" border=0>
  <TBODY>
  <TR>
    <TD 
    style="FONT-WEIGHT: bold; BORDER-BOTTOM: rgb(51,51,204) thin inset; FONT-STYLE: italic" 
    vAlign=top width="100%" bgColor=#ffffcc height=20>
      <P>&nbsp;TomcatSample\index.jsp </P>
  <TR>
    <TD style="BORDER-TOP-STYLE: none; BORDER-TOP-COLOR: rgb(236,233,216)" 
    vAlign=top width="100%" bgColor=#edefd7>
      <DIV><FONT face=宋体>
      <DIV>&lt;%<BR>String s = "Welcome javamxj 
      Blog!";<BR>out.println(s);<BR>%&gt;&nbsp; 
</DIV></FONT></DIV></TD></TR></TBODY></TABLE>
<DIV>&nbsp;</DIV>
<DIV>4.&nbsp;点击“运行Tomcat”图标</DIV></DIV>
<DIV>&nbsp;&nbsp; <IMG alt="" 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/o_lomboz60.jpg"></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;5. 
如果一切正常,在浏览器窗口中输入“http://localhost:8080/TomcatSample/index.jsp”</DIV>
<DIV>&nbsp; &nbsp;<IMG alt="" 
src="图解eclipse+tomcat配置jsp开发调试环境 » J2EE » 文章中心 » 恬之怡手机软件园.files/o_lomboz61.jpg"></DIV>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -