JSPÖÐÓë·¾¶Ïà¹ØµÄ³£Óõö·½·¨
http:/localhost/123/jsp/test.jsp:
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>test.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css" mce_href="styles.css">
-->
</head>
<body>
<p>
<h2>application - javax.servlet.ServletContext</h2>
application.getRealPath("/")<%=application.getRealPath("/") %><br>
application.getMajorVersion() - <%=application.getMajorVersion() %><br>
application.getMimeType("txt") - <%=application.getMimeType("txt") %><br>
application.getServerInfo() - <%=application.getServerInfo() %><br>
application.getServletContextName() - <%=application.getServletContextName() %><br>
application.getContext()
</p>
<p>
<h2>config - javax.servlet.ServletConfig</h2>
config.getServletName() - <%=config.getServletName() %><br>
config.getServletContext()<br>
</p>
<p>
<h2>pageContext - javax.servlet.jsp.PageContext</h2>
pageContext.getRequest()£¨JSPÖеÄrequsetÒþʽ¶ÔÏó£©<b
Ïà¹ØÎĵµ£º
·½·¨Ò»¡¢
login.html
<html>
<head>
<title>Óû§µÇ¼</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
</head>
<script language="javascript">
&nbs ......
£±.×îÖ±½Ó×î¼òµ¥µÄ£¬·½Ê½ÊǰÑÎļþµØÖ·Ö±½Ó·Åµ½htmlÒ³ÃæµÄÒ»¸öÁ´½ÓÖС£ÕâÑù×öµÄȱµãÊǰÑÎļþÔÚ·þÎñÆ÷ÉϵÄ·¾¶±©Â¶ÁË£¬²¢ÇÒ»¹ÎÞ·¨¶ÔÎļþÏÂÔØ½øÐÐÆäËüµÄ¿ØÖÆ£¨ÈçȨÏÞ£©¡£Õâ¸ö¾Í²»Ð´Ê¾ÀýÁË¡£
£².ÔÚ·þÎñÆ÷¶Ë°ÑÎļþת»»³ÉÊä³öÁ÷£¬Ð´Èëµ½response£¬ÒÔresponse°ÑÎļþ´øµ½ä¯ÀÀÆ÷£¬ÓÉä¯ÀÀÆ÷À´ÌáʾÓû§ÊÇ·ñÔ¸Òâ±£´æÎ ......
JSPÁôÑÔ¹ÜÀíϵͳ (¸½¼ÓÓû§È¨ÏÞ¹¦ÄÜ)
1.ÓοͿÉÒԲ鿴ͨ¹ýÉóºËµÄÁôÑÔ£»
2.ÆÕͨÓû§µÇ¼ºó¿ÉÒÔ·¢±íÁôÑÔ£¬ÐÞ¸ÄÃÜÂ룻
3.¹ÜÀíÔ±µÇ¼ºó¿ÉÒÔÉóºË¡¢Ð޸ġ¢É¾³ýÁôÑÔ£»
4.³¬¼¶¹ÜÀíÔ±µÇ¼ºó¿ÉÒÔ¹ÜÀíÓû§£¬É¾³ýÓû§¡¢ÐÞ¸ÄÃÜÂë¡¢¸ü¸ÄȨÏÞ¡£
´ËÁôÑÔ¹ÜÀíϵͳ°üº¬ÒÔÏÂÎļþ£º
1.Ê×Ò³(index.jsp)£º°´·¢±íʱ¼äµ¹ÐòÏÔʾÁôÑÔÄÚÈÝ£¬²»Í¬È¨ ......