Fight With Me!!!

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

随笔分类 -  Jsp_Servlet

Servlet之ServletContext获取web上下文路径、全局参数、和Attribute(域)
摘要:1)获取web上下文路径 2)获取全局参数 3)和域相关 域:域对象在不同的资源之间来共享数据,保存数据,获取数据。 这个我使用了三个Servlet来说明这个问题,ScopeDemo1用于获取Attribute,ScopeDemo2用于设置Attribute,ScopeDemo3用于删除Attrib 阅读全文

posted @ 2018-07-14 15:58 nickTimer 编辑

jsp 获取服务器ip 以及端口号
摘要:<a href=<%="http://"+request.getLocalAddr()+":"+request.getLocalPort()+"/AutoService/downloadexcel.action" %> >点击下载模板</a> 阅读全文

posted @ 2018-07-14 15:57 nickTimer 编辑

Request的getParameter和getAttribute方法的区别
摘要:HttpServletRequest.getParameter("modelName"); 能取到想要的modelObject吗?经过测试之后,发现是不能的。后来想想,其他道理挺简单的,当两个Web组件之间为转发关系时,转发源会将要共享 request范围内的数据先用setAttribute将数据放 阅读全文

posted @ 2017-03-09 14:47 nickTimer 编辑

JSP 中EL表达式用法详解
摘要:EL 全名为Expression Language EL 语法很简单,它最大的特点就是使用上很方便。接下来介绍EL主要的语法结构: ${sessionScope.user.sex} 所有EL都是以${为起始、以}为结尾的。上述EL范例的意思是:从Session的范围中,取得 用户的性别。假若依照之前 阅读全文

posted @ 2016-12-18 16:14 nickTimer 编辑

<s:property="a" value=""/>取的<s:debug></s:debug>中的value stack中的属性值
摘要:<s:property="a" value=""/>取的<s:debug></s:debug>中的value stack中的属性值 阅读全文

posted @ 2016-05-29 13:28 nickTimer 编辑

放在jsp头部的代码
摘要:String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; Stri 阅读全文

posted @ 2016-05-28 15:42 nickTimer 编辑

Page directive: illegal to have multiple occurrences of contentType with different values
摘要:org.apache.jasper.JasperException: /commons/meta.jsp(1,1) PWC5988: Page directive: illegal to have multiple occurrences of contentType with different ... 阅读全文

posted @ 2015-03-26 20:52 nickTimer 编辑

Failed to start component [StandardEngine[Catalina].
摘要:出现以下的错误的原因: 检查 web.xml文件,应该是<filter>和<filter-mapping>或者<servlet>和<servlet-mapping>标签不成对,没有完全匹配引起的。 也可能是<filter>和<filter-mapping>或者<servlet>和<servlet-m 阅读全文

posted @ 2015-02-11 19:39 nickTimer 编辑

jstl fmt
摘要:1)导入jstl 包,加载ftm标签首先将jstl的jar包放入类库中,使用1.2版本其次在jsp文件中引入所需要的 标记库,对于 ftm 标签,如下:Html代码2)输出 .properties 文件中的信息Html代码testvalue:其中 指定了资源文件的位置,例如: fmt 表示类根路径... 阅读全文

posted @ 2014-11-19 11:56 nickTimer 编辑

点击右上角即可分享
微信分享提示