Tomcat发布java程序

上传人:cjc****537 文档编号:120404560 上传时间:2020-02-06 格式:DOC 页数:3 大小:92.31KB
返回 下载 相关 举报
Tomcat发布java程序_第1页
第1页 / 共3页
Tomcat发布java程序_第2页
第2页 / 共3页
Tomcat发布java程序_第3页
第3页 / 共3页
亲,该文档总共3页,全部预览完了,如果喜欢就下载吧!
资源描述

《Tomcat发布java程序》由会员分享,可在线阅读,更多相关《Tomcat发布java程序(3页珍藏版)》请在金锄头文库上搜索。

1、Tomcat中发布java程序步骤:一、 在myeclipse中新建java web工程HelloWorldServlet二、 新建java类HelloWorldpackage com.supermap.test;import java.io.*;import javax.servlet.*;import javax.servlet.http.*;import com.supermap.data.*;public class HelloWorld extends HttpServlet /* * */private static final long serialVersionUID = 1L

2、;public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException response.setContentType(text/html); Workspace workspace = new Workspace(); String str = ;/ if(workspace = null)/ / str = instance success;/ / else/ / str = instance failed;/ PrintWriter

3、out = response.getWriter(); out.println(); out.println(); out.println(Hello World!); out.println(); out.println(); out.println(Hello +workspace+World!); out.println(); out.println(); 三、 配置web.xml文件 index.jsp HelloWorldExample com.supermap.test.HelloWorld HelloWorldExample /hello 四、 浏览器访问浏览器访问改地址:http:/localhost:8080/HelloWorldServlet/hello

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 高等教育 > 教育学

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号