一、web的核心——servlet, server applet
servlet就是一个接口,写java代码实现它,就可以被浏览器访问;
java类中没有main方法必须借助服务器才能运行,如tomcat;
不同的人可以看到不同的类容,需要java代码编写,叫动态资源;所有人看到的一样的叫静态资源,如图片;
二、servlet的运行机制:
其中,创建的实现servlet接口的类中实现的方法里有一个service是一定要的,工具会提示必须重写的方法;
浏览器访问的是url-pattern,
servlet的java代码
三、servlet执行原理