
JSP
yigg
追逐成功的路上只有逆风
展开
-
JSP中的编码设置
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><t...原创 2019-07-15 22:39:39 · 379 阅读 · 0 评论 -
jsp页面相对路径配置 String path = request.getContextPath();
原文地址:http://www.cnblogs.com/qq3111901846/p/6242096.html<%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort...转载 2018-06-07 21:47:51 · 661 阅读 · 0 评论 -
在Jsp中怎么导入Java类
1.目录结构2.在form.jsp中导入City类<%@ page import="包名.类名" %><%@ page import="struts2.City" %>为什么需要在form.jsp中导入City类?如不导入City类,那么List<City> cities=new ArrayList<City>();则...原创 2017-11-07 14:08:01 · 30511 阅读 · 3 评论 -
JSP页面的9个隐含对象
何为作用域先让我们看看效果:大概流程是这样的,我们访问index.jsp的时候,分别对pageContext, request, session,application四个作用域中的变量进行累加。(当然先判断这个变量是不是存在,如果变量不存在,则要把变量初始化成1)。计算完成后就从index.jsp执行forward跳转到test.jsp。在test.jsp里再进行一次累加,然后显示出这四...原创 2017-09-05 12:57:16 · 732 阅读 · 0 评论 -
JSTL、EL、ONGL、Struts标签的区别与使用
https://www.cnblogs.com/1175429393wljblog/p/5806439.html转载 2018-06-08 18:28:00 · 128 阅读 · 0 评论 -
JSP与Servlet面试题
Servlet面试题Servlet接口中有哪些方法? Servlet接口定义了5个方法,其中前三个方法与Servlet生命周期相关: void init(ServletConfig config) throws ServletException void service(ServletRequest req, ServletResponse resp) throws ServletEx...转载 2019-07-04 09:57:36 · 253 阅读 · 0 评论