old: text/html; charset=UTF-8, new: text/html;charset=UTF-8

本文探讨了在JSP页面中包含另一个JSP页面时遇到的问题,特别是关于%@page指令中的空格问题及其对IDEA编辑器的影响。

当我们在一个jsp页面里面包含另一个jsp页面时候

<%@include file=”../include/admin/adminHeader.jsp”%>

在包含文件里面设置的是

<%@ page language=”java” contentType=“text/html;charset=UTF-8”
pageEncoding=”UTF-8” isELIgnored=”false”%>

注意这里两个之间没有空格,

而使用这个包含文件里面设置的是

<%@ page language=”java” contentType=”text/html; charset=UTF-8”
pageEncoding=”UTF-8” isELIgnored=”false”%>

的时候,就会出现这样的错误,所以一般保持一致,IDEA默认是没有空格的,我自己写的有空格,所以推荐按默认设置的。不要自己写,容易出错。

按照上面定义,请帮我标注出来[root@keepmoving ~]# curl -v -H "Origin: http://example.com" -X GET "https://www.keepmoving123.cn/test/test123.html" Note: Unnecessary use of -X or --request, GET is already inferred. * Trying 203.193.226.100:443... * Connected to www.keepmoving123.cn (203.193.226.100) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt * CApath: none * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): * TLSv1.3 (IN), TLS handshake, Certificate (11): * TLSv1.3 (IN), TLS handshake, CERT verify (15): * TLSv1.3 (IN), TLS handshake, Finished (20): * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.3 (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 * ALPN, server accepted to use h2 * Server certificate: * subject: CN=keepmoving123.cn * start date: Feb 8 00:00:00 2025 GMT * expire date: May 8 23:59:59 2025 GMT * subjectAltName: host "www.keepmoving123.cn" matched cert's "www.keepmoving123.cn" * issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=Encryption Everywhere DV TLS CA - G2 * SSL certificate verify ok. * Using HTTP2, server supports multiplexing * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 * Using Stream ID: 1 (easy handle 0x55b69735fd90) > GET /test/test123.html HTTP/2 > Host: www.keepmoving123.cn > user-agent: curl/7.79.1 > accept: */* > origin: http://example.com > * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * old SSL session ID is stale, removing * Connection state changed (MAX_CONCURRENT_STREAMS == 128)! < HTTP/2 200 < date: Thu, 13 Mar 2025 09:34:15 GMT < content-type: text/html < content-length: 370 < server: openresty < last-modified: Thu, 06 Mar 2025 13:37:33 GMT < etag: "67c9a51d-172" < x-ccdn-expires: 2591893 < via: CHN-GZguiyang-AREACT1-CACHE58[29],CHN-GZguiyang-AREACT1-CACHE19[0,TCP_HIT,20],CHN-HNchangsha-GLOBAL1-CACHE34[43],CHN-HNchangsha-GLOBAL1-CACHE19[0,TCP_HIT,36] < x-hcs-proxy-type: 1 < x-ccdn-cachettl: 2592000 < x-ccdn-req-id-46b1: e47b7ecf9522344085fd872944737d22 < nginx-hit: 1 < age: 107 < accept-ranges: bytes < access-control-expose-headers: Content-Length,Content-Encoding < access-control-allow-origin: http://*.exampel.com < access-control-allow-methods: GET,POST,HEAD,OPTIONS < content-disposition: attachment;filename=test150x150.jpg < access-control-allow-headers: X- Custom-Header,Origin, X-Requested-With, Content-Type, Accept, Authorization < strict-transport-security: max-age=36000 < <!DOCTYPE html> <html lang="en"> <head> <meta name="viewport" content="width=device-width" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>keepmoving test</title> </head> <body> <h1>KeepMoving</h1> <h2>CDN启蒙实践</h2> <h2>卜永进 test</h2> <h2>buyongjin test</h2> <h2>buyongjin test</h2> <h2>buyongjin test</h2> </body> </html> * Connection #0 to host www.keepmoving123.cn left intact
03-14
帮我实现按钮按过后通过反馈显示开关状态,HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 <!DOCTYPE html> <html> <head> <title>ESP32 AP控制中心</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta charset="utf-8"> <style> * { box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%); min-height: 100vh; display: flex; justify-content: center; align-items: center; margin: 0; padding: 20px; } .container { background: white; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); padding: 30px; max-width: 450px; width: 100%; text-align: center; } h1 { color: #2c3e50; margin-bottom: 20px; font-size: 2rem; } .card { background: #ffffff; border-radius: 12px; padding: 25px; margin: 20px 0; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); } .button { display: inline-block; background: #3498db; border: none; color: white; padding: 16px 40px; text-align: center; font-size: 18px; margin: 12px; cursor: pointer; border-radius: 50px; width: 220px; transition: all 0.3s ease; box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3); font-weight: 600; text-decoration: none; } .button:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(52, 152, 219, 0.4); } .button:active { transform: translateY(1px); } .button-off { background: #e74c3c; box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3); } .button-off:hover { box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4); } .status { font-size: 18px; color: #7f8c8d; margin: 15px 0; font-weight: 500; } footer { margin-top: 20px; color: #95a5a6; font-size: 14px; } </style> </head> <body> <div class="container"> <h1>ESP32 AP控制中心</h1> <div class="card"> <h2>LED手动控制</h2> <a href="/?led1" class="button button-off">开关 LED1</a><br> <a href="/?led2" class="button button-off">开关 LED2</a> <div class="status">当前状态: 所有LED已关闭</div> </div> <footer> ESP32物联网控制器 | 在线状态: 正常 </footer> </div> </body> </html>
最新发布
09-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值