jsp的application使用案例
来源:互联网 发布:pokemon虚拟定位软件 编辑:程序博客网 时间:2024/06/11 08:55
【web.xml页面】
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>InitSer</servlet-name>
<servlet-class>servlet.InitSer</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
【servlet部分】
public void init() throws ServletException {
// Put your code here
ArrayList<Grade> grades=gradeimpl.queryGrade("");
ServletContext app=this.getServletContext();//得到application的一个容器--属于tomcat
app.setAttribute("grades",grades);
String[] slikes={"唱歌","跳舞","篮球","乒乓","足球"};
app.setAttribute("slikes", slikes);
}
<servlet>
<description>This is the description of my J2EE component</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>InitSer</servlet-name>
<servlet-class>servlet.InitSer</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
【servlet部分】
public void init() throws ServletException {
// Put your code here
ArrayList<Grade> grades=gradeimpl.queryGrade("");
ServletContext app=this.getServletContext();//得到application的一个容器--属于tomcat
app.setAttribute("grades",grades);
String[] slikes={"唱歌","跳舞","篮球","乒乓","足球"};
app.setAttribute("slikes", slikes);
}
0 0
- jsp的application使用案例
- JSP application对象的使用
- Jsp中的Application使用
- Jsp中的Application使用
- Jsp中的Application使用
- Jsp中的Application使用
- JSP标签使用案例
- jsp的application对象
- JSP的application对象
- JSP的application对象
- 使用jsp+servlet+jdbc做的登陆注册案例
- JSP教程--Application 的应用
- jsp的application技术整理
- jsp的application技术整理
- jsp的application技术整理
- JSP中application的用法
- JSP的内置对象application
- jsp的application技术整理
- hdoj 1754 I Hate It【线段树】
- java设计模式第9弹--代理模式
- 类的高级概念
- java线程安全的集合类
- 【Java大数】hdu 5429 Geometric Progression
- jsp的application使用案例
- ajax 笔记
- 杭电acm--2026
- 【LeetCode 232: Implement Queue using Stacks】
- Android开发-Activity(二)
- 概率论与数理统计笔记(一): 样本空间 随机事件
- 在android 4.2.2上调试MU609步骤,WCDMA
- Geoprocessor 裁切
- ARM9 ADS8344 SPI驱动移植 (二)