摘要: 打开Tomcat\conf\server.xml文件,在<host>加入下面的Context:<Context path="/myapp" docBase="D:\myapp" debug="0" reloadable="true" crossContext="true" /> 阅读全文
posted @ 2012-05-12 10:03 我是小菜鸟 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 添加两个文件:1. ..\myapps\WEB-INF\classes\test\TestBean.java:package test;public class TestBean{ private String name = null; public TestBean(String name) { this.name = name; } public void setName(String name){ this.name = name; } public String getName() { return this.name; }}2. ..\myapps\testBean.jsp:< 阅读全文
posted @ 2012-05-12 10:02 我是小菜鸟 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 1. 在新建的目录下myapps/myapp/WEB-INF/classes/test,新建HelloWorld.java,并写入以下内容package test;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;public class HelloWorld extends HttpServlet{ public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOEx 阅读全文
posted @ 2012-05-12 09:59 我是小菜鸟 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 1. 下载JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u32-downloads-1594644.html,并安装2. 下载Tomcat: http://apache.etoak.com/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.exe,并安装3. 配置JDK PATH:JAVA_HOME: D:\Program Files\java\jdk1.6.0_32classpath: .;%JAVA_HOME%\lib\dr.jar;%JAVA_HOME%\ 阅读全文
posted @ 2012-05-12 09:53 我是小菜鸟 阅读(621) 评论(0) 推荐(0) 编辑