php jsp提交表单提交方式,JSP之表单提交get和post的区别详解及实例

news/2024/7/8 3:20:14 标签: php jsp提交表单提交方式

JSP之表单提交get和post的详解及实例

一 get和post的区别

8b67685f6329bf6f2fe4208376f86b49.png

二 实战(post方式提交)

1、login.jsp

String path = request.getContextPath();

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>

My JSP 'login.jsp' starting page

用户登录


用户名:
密码:

2、dologin.jsp

String path = request.getContextPath();

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>

My JSP 'dologin.jsp' starting page

登录成功


三 运行结果

3d4446f22462f511d3a96243b383ef8f.png

如有疑问请留言或者到本站社区交流讨论,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!


http://www.niftyadmin.cn/n/1639685.html

相关文章

css3动画应用

按钮边框 按钮 首先实现正常边框按钮, 其次按钮相对定位,因为旋转的内容需要绝对定位, 旋转内容做伪元素处理,z-index设置负数是为了把按钮文字显示出来, 定位一半一半是把长方块中心点放按钮正中, 变形原…

spring学习2之组件注册-@ComponentScan-自动扫描组件指定扫描规则

一&#xff0c;配置文件版 <?xml version"1.0" encoding"UTF-8"?> <beans xmlns"http://www.springframework.org/schema/beans"xmlns:xsi"http://www.w3.org/2001/XMLSchema-instance"xmlns:context"http://www.spri…

java从数据库读取菜单递归生成菜单树

首先看一下菜单的样子根据这个样子我们定义菜单类 public class Menu {// 菜单idprivate String id;// 菜单名称private String name;// 父菜单idprivate String parentId;// 菜单urlprivate String url;// 菜单图标private String icon;// 菜单顺序private int order;// 子菜单…

最大熵图像分割matlab,两个matlab实现最大熵法图像分割程序

%两个程序&#xff0c;亲测可用clear allaimread(moon.tif);figure,imshow(a)countimhist(a);[m,n]size(a);Nm*n;L256;countcount/N;%%每一个像素的分布概率countfor i1:Lif count(i)~0sti-1;break;endendstfor iL:-1:1if count(i)~0ndi-1;break;endendndfcount(st1:nd1); %f是…

Mysql8在Centos7.2上面安装

1&#xff0c;cd /usr/local/software 这个目录下面 2&#xff0c;wget -i -c https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm 下载mysql8.0的rpm 3&#xff0c;先安装 yum install -y mysql80-community-release-el7-1.noarch.rpm&#xff…

python php class 类,PHP如何自定义类Class的示例代码(OOP面向对象教程)

PHP如何自定义类Class的示例代码(OOP面向对象教程)分类&#xff1a;PHP_Python| 发布&#xff1a;佚名| 查看&#xff1a; | 发表时间&#xff1a;2014/9/16那怎么开始设计一个合格的类呢&#xff0c;一开始就写class{}的都错了&#xff0c;正确的是什么都不写&#xff0c;而是…

centos7.2安装nginx

1&#xff0c;先执行 yum -y install gcc gcc-c autoconf pcre pcre-devel make automake 2&#xff0c;vim /etc/yum.repos.d/nginx.repo 在下面添加 [nginx] namenginx repo baseurlhttp://nginx.org/packages/centos/7/$basearch/ gpgcheck0 enabled1 3&#xff0…

php关于钱这类怎么处理,PHP-MYSQL怎么实现买东西扣钱流程(细节问题一大堆)?...

假设用户花费金钱余额兑换1个‘糖’这种虚拟商品&#xff0c;金钱余额和用户拥有‘糖’的个数分别记录在不同的表上&#xff0c;那么我们要做的是&#xff0c;扣除用户金钱的同时&#xff0c;在用户的虚拟物品表中‘糖’的数量1。假设任何用户糖数上限为99先说下目前小弟的思路…