摘要:
在webapps中新建文件夹H,在其中再创建WEB-INF文件夹,在创建classes文件夹和web.xml文件,web.xml需要配置一下,classes文件夹中存放Servlet经编译过的class文件;在localhost中创建H.xml配置一下路径等。 阅读全文
摘要:
web.xml中url-pattern的值必须和相关联的jsp页面form中的action的值一样,才会从jsp页面跳转到servlet。 阅读全文
摘要:
try { Class.forName( "org.postgresql.Driver" ).newInstance(); String url = "jdbc:postgresql://localhost:5432/postgres" ; ... 阅读全文