jsp访问Servlet 要如何配置web.xml:
你新建servlet类时,一般会自动配置web.xml。不需要你去配置。具体配置,例子如下:
This is the description of my J2EE component
This is the display name of my J2EE component
CartServlet
com.digitalweb.servlet.CartServlet
/CartServlet
这里的servlet类名为CartServlet,存放在包com.digitalweb.servlet里
Servlet:
Servlet(Server Applet)是Java Servlet的简称,称为小服务程序或服务连接器,用Java编写的服务器端程序,主要功能在于交互式地浏览和修改数据,生成动态Web内容。