上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 47 下一页
摘要: 1 3 4 5 6 7 Insert title here 8 9 10 11 12 13 14 15 display.jsp 1 3 4 5 6 7 8 Insert title here 9 10 11 12 13 我使用了filter,代码如下: 1 package org.lxh.filterdemo; 2 3 import java.io.IOException; 4 import java.nio.charset.Charset; 5 6 import javax.servlet.Filter; 7 import javax.serv... 阅读全文
posted @ 2013-07-14 17:21 rldts 阅读(576) 评论(0) 推荐(0)
摘要: 这样的话,启动或者关闭tomcat都会报错,在eclipse的话,还可能出现无法创建新的tomcat server的现象,选择clean server报错:启动的时候出错改成这样就好了 阅读全文
posted @ 2013-07-14 15:57 rldts 阅读(2549) 评论(0) 推荐(0)
摘要: Window->Show View->Other->Java->Javadoc这样你用鼠标选中一个element就可以在Javadoc tag中显示信息了,而不是那种浮动窗口,有的时候eclipse会抽风,浮动窗口总是不出现 阅读全文
posted @ 2013-07-14 10:41 rldts 阅读(483) 评论(0) 推荐(0)
摘要: 总之通用的法则,google:"XxxName documentation"例如,如果要查看JSTL的reference manual,google:jstl doc即可,oracle官网有http://docs.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/又比如,Expression Language, google: el documentation,俩URLhttp://docs.oracle.com/javaee/6/tutorial/doc/gjddd.htmlhttp://docs.oracle.com/javaee/1. 阅读全文
posted @ 2013-07-12 17:05 rldts 阅读(237) 评论(0) 推荐(0)
摘要: 哪些jar包应该放到你的/WEB-INF/lib中?(目前为止,我的classpath只配置了dt.jar和tools.jar,也就是说,我的web-project所用的所有jar包都没有配置到classpath中,而是直接放到/WEB-INF/lib中的)放到/WEB-INF/lib中的jar包主要是为了支持你的wep-project的运行而如果你仅仅是想编译一些java文件,那么就直接用eclipse为你的项目导入jar包即可了,但是要注意,eclipse导入jar包只是用来帮助编译你的java文件的,并不能用来支持你的web-project的运行!要想支持你的web-project的运行 阅读全文
posted @ 2013-07-11 16:30 rldts 阅读(691) 评论(0) 推荐(0)
摘要: 如图:SEVERE: Servlet.service() for servlet jsp threw exceptionorg.apache.jasper.JasperException: /ch12/hellotag.jsp(7,46) Attempt to redefine the prefix holyshit to mldn_hello, when it was already defined as /WEB-INF/hellotag.tld in the current scope.尼玛我搞了半天这个exception,原来是因为第一个@taglib没有被注释掉,我BLEEP!难道这 阅读全文
posted @ 2013-07-11 12:17 rldts 阅读(253) 评论(0) 推荐(0)
摘要: 刚才发现自己的servlet-api.jar里面的javax.servlet.jsp为空的,但是我又需要做一些JSP tag-lib的编程,所以没办法,只好去下一个新的包上网找了找,我用的tomcat是tomcat6,去tomcat官网看,tomcat6用的是servlet 2.5所以去找servlet 2.5的jar好像名字为servlet-api.jar,找了找,下下来的javax.servlet.jsp仍然是空的,嘿,我勒个去我就郁闷了然后去再google了一下,Java EE 5 SDK里面应该有,去oracle下吧,尼玛这网速,5-6k下接近100M的东西,晕了再后来,我怀疑是我的t 阅读全文
posted @ 2013-07-11 11:14 rldts 阅读(318) 评论(0) 推荐(0)
摘要: 刚才在测试一个HttpSessionListenerpackage org.lxh.listenerdemo ;import javax.servlet.http.* ;public class HttpSessionListenerDemo implements HttpSessionListener { public void sessionCreated(HttpSessionEvent se){ System.out.println(this + ":** SESSION创建,SESSION ID = " +se.getSession().getId() ) ; . 阅读全文
posted @ 2013-07-09 12:20 rldts 阅读(3152) 评论(0) 推荐(0)
摘要: 我刚才发布了这么一个listenerpackage org.lxh.listenerdemo ;import javax.servlet.http.* ;public class HttpSessionListenerDemo implements HttpSessionListener { public void sessionCreated(HttpSessionEvent se){ System.out.println(this + ":** SESSION创建,SESSION ID = " +se.getSession().getId() ) ; } p... 阅读全文
posted @ 2013-07-09 12:03 rldts 阅读(443) 评论(0) 推荐(0)
摘要: JSP页面最终是编译为Servlet执行的,你可以在Tomcat的%CATALINA_HOME%/work/Catalina/localhost中找到一个文件夹,该文件夹跟你的web-project的虚拟路径一致!比如说,我在%CATALINA_HOME%/conf/server.xml中配置了我的web-project为如下那么在%CATALINA_HOME%/work/Catalina/localhost中就有一个文件夹名为“mldn”!并且,你在\mldn\org\apache\jsp目录下还会找到你所有jsp页面对应的.class文件,这就证明了JSP页面最终是编译为Servlet执行 阅读全文
posted @ 2013-07-09 11:30 rldts 阅读(2200) 评论(0) 推荐(0)
上一页 1 ··· 37 38 39 40 41 42 43 44 45 ··· 47 下一页