求救大侠 菜鸟的超级难题 jsp中如何得到用户输入地址栏的完整信息,可能是错误的信息.
tomcat
localhost_access_log.2007-02-08.txt可以记录访问者的输入信息,但是我想在jsp中如何得到,request能得到么?
如ie中输入http://localhost:8080/gatetransmit/sdsfdsfd
127.0.0.1 - - [08/Feb/2007:05:03:12 -0500] "GET /gatetransmit/sdsfdsfdHTTP/1.1" 404 436 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"
我要的到http://localhost:8080/gatetransmit/sdsfdsfd这个信息
有可能用户输入的是http://localhost:8080/gatetransmit/saaaa
那我要得到http://localhost:8080/gatetransmit/saaaa
String test=request.getServerName() + request.getContextPath() + request.getServletPath() ;
StringBuffer ssurl = request.getRequestURL();
用这样都得不到.
会得到tomcat出错时候默认的
http://localhost:8080/gatetransmit/index.jsp
谢谢!
菜鸟自己先顶一下,大侠们救救!
我是想分析用户输入错误信息是什么.