社区
Web 开发
帖子详情
Simple example of Servlet
MyPlanet
2002-11-14 09:33:50
I am learning JAVA. Can you tell me where I can find a simple example how to create Servlet and use it in JSP?
...全文
51
4
打赏
收藏
Simple example of Servlet
I am learning JAVA. Can you tell me where I can find a simple example how to create Servlet and use it in JSP?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
xuw
2002-11-15
打赏
举报
回复
不知你用什么服务,但用tomcat是最简单的了.
那里有很多例子可用:
http://localhost:8080/examples/servlets/index.html
HawaiiLeo
2002-11-15
打赏
举报
回复
Tomcat 中例子
C:\Tomcat4.1\webapps\examples\servlets
如helloworld.html
=====================================
Source Code for HelloWorld Example
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class HelloWorld extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<body>");
out.println("<head>");
out.println("<title>Hello World!</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Hello World!</h1>");
out.println("</body>");
out.println("</html>");
}
}
alsoran
2002-11-14
打赏
举报
回复
www.servletforum.com
longlink
2002-11-14
打赏
举报
回复
use Tomcat and it will give you some example.
简单
servlet
程序
老师给的一个很简单的
servlet
的例子
servlet
简单示例
最基础
servlet
例子,包含一个
servlet
类,一个web.xml文件的配置
创建简单
servlet
NULL 博文链接:https://liuna718-163-com.iteye.com/blog/763193
servlet
技术
结合慕课网上的视频,对
servlet
技术总结
基于java的开发的简单WEB服务器源码.zip
基于java的开发的简单WEB服务器源码.zip
Web 开发
81,116
社区成员
341,738
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章