【JSP 内置 request 对象】

来源:互联网 发布:mac互联网恢复功能 编辑:程序博客网 时间:2024/05/17 06:38

效果图片 :

这里写图片描述

源码:

<html> <head>  <title> 使用Request对象获取系统信息 </title> </head> <body>        <p align = "center"> <font size = 6 face = STKaiti color = FF33FF> 通信协议: <%= request.getProtocol() %> </font></p>        <p align = "center"> <font size = 6 face = STKaiti color = FF33FF> 请求方式: <%= request.getScheme() %> </font></p>        <p align = "center"> <font size = 6 face = STKaiti color = FF33FF> 服务器地址: <%= request.getRemoteHost() %> </font></p>        <p align = "center"> <font size = 6 face = STKaiti color = FF33FF> 服务器端口号: <%= request.getServerPort() %> </font></p>        <p align = "center"> <font size = 6 face = STKaiti color = FF33FF> 使用者IP地址: <%= request.getRemoteAddr() %> </font></p>        <p align = "center"> <font size = 6 face = STKaiti color = FF33FF> 主机名称: <%= request.getServerName() %> </font></p>        <p align = "center"> <font size = 6 face = STKaiti color = FF33FF> 文件真实路径: <%= request.getRealPath("/888.jsp") %></font></p>    <body background="6666.jpg"    style=" background-repeat:no-repeat ;    background-size:100% 100%;      background-attachment: fixed;" > </body></html>
原创粉丝点击