博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
用idea制作Javaweb程序遇到的过程
阅读量:6952 次
发布时间:2019-06-27

本文共 1339 字,大约阅读时间需要 4 分钟。

hot3.png

index.jsp

<%--  Created by IntelliJ IDEA.  User: Administrator  Date: 2018/10/29  Time: 11:47  To change this template use File | Settings | File Templates.--%><%@ page contentType="text/html;charset=UTF-8" language="java" %>      客户      
客户姓名:
客户年龄:

 

save.class

package cn.sm1234.web;import javax.servlet.ServletException;import javax.servlet.annotation.WebServlet;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import java.io.IOException;@WebServlet(name = "save",urlPatterns = "/save")public class save extends HttpServlet {    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {                   this.doGet(request,response);    }    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {                    request.setCharacterEncoding("utf-8");                    String name=request.getParameter("name");                    String age = request.getParameter("age");                    System.out.println(name+","+age);    }}

遇到的问题1:

1522564534_274221.png

解决方案:

浏览器设置的问题

出现问题2:

å¾ç说æ

试过很多方法,也从cmd中终止了程序,但是还是不可以,最后我的解决方法是将使用的tomcat删除,重新导入tomcat。

转载于:https://my.oschina.net/u/3829307/blog/2254411

你可能感兴趣的文章
搭建kubernetes时容易遇到的问题
查看>>
centos7安装python3 以及tab补全功能
查看>>
文字透明使用背景色
查看>>
部署桌面虚拟化时要考虑的因素
查看>>
整体管理
查看>>
Allegro16.6导出位号图
查看>>
mycat err:java.sql.SQLNonTransientException: find no Route:select日志报错
查看>>
Centos7.4源码搭建zabbix3.4.11企业级监控
查看>>
yumi引导盘制作
查看>>
Objective C类方法load和initialize的区别
查看>>
【高德地图API】从零开始学高德JS API(五)路线规划——驾车|公交|步行
查看>>
LINUX中nagios客户端安装步骤及遇到问题
查看>>
CentOS6.7系统优化加强牢固脚本
查看>>
nofollow是什么意思?nofollow标签的写法和作用
查看>>
MySQL常用命令收录
查看>>
SQL 删除数据-select在当前表字段作为条件
查看>>
nike roshe run homme pas cher
查看>>
webrtc研究资源摘录
查看>>
.Net Micro Framework移植基础(包编译通过)
查看>>
对象和实例的区别
查看>>