Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

jsp—MySqlÖÆ×÷B/sµÇ½µÄºÃÀý×Ó Ñ§Ï°±Ê¼Ç

½¨Á¢Ìõ¼þÊ×ÏÈÒ»¶¨ÒªÈ·¶¨×Ô¼ºµÄmysql£¬tomcat,eclipseÁ¬½ÓÊÇÕýÈ·µÄ¡£
index.jspºÜ¼òµ¥£¬¾ÍÒ»¸öÌøת¡£
<%
response.sendRedirect("lg.jsp");
%>
lg.jsp ʵÏֵǼ¿ò¼Ü
<%@ page contentType="text/html; charset=utf-8" %>
<html>
<head>
<title>
login
</title>
</hea ......

JSPʵÀý¶þ¡¢µÇ¼ÑéÖ¤

·½·¨Ò»¡¢
login.html
<html>
  <head>
    <title>Óû§µÇ¼</title>
    <meta http-equiv="content-type" content="text/html; charset=gb2312">
  </head>
 
  <script language="javascript">
  &nbs ......

jspµÇ¼ҳÃæÖÐÇå³ýacegiµÄµÇ¼»º´æÐÅÏ¢

 ÎÒµÄϵͳʹÓÃacegiµÇ¼ÈÏÖ¤£¬²¢ÇÒÅäÖÃÓû§»º´æ
<!-- »º´æÆ÷,ΪuserCacheBackendÌṩ»º´æ¹ÜÀí¡£ -->
 <bean id="cacheManager"
  class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" />
<!-- EhCacheÒ»°ãÓÃ;ÈçÏ£ºHibernate»º´æ£¬DAO»º´æ£¬°²È«ÐÔƾ֤»º´æ£¨Ace ......

jspÖÐ×Ô¶¨Òå±êÇ©×ܽá(Ò»)_´«Í³±êǩƪ

×Ô¶¨Òå±êÇ©ÊÇÈÿª·¢ÈËÔ±´´½¨¿Í»§»¯µÄ±êÇ©,²¢ÇÒÔÚjspÎļþÖÐʹÓÃÕâЩ±êÇ©,ÕâÑù¿ÉÒÔʹjsp´úÂë¸ü¼ò½à!
 Ê×ÏÈÕâÀïÏȽéÉÜ´Ó¶¨Òå±êÇ©µ½Ê¹ÓñêÇ©µÄ²½Öè:
     1,´´½¨×Ô¶¨Òå±êÇ©´¦ÀíÀà,¼°Ïà¹ØÀà.class ²¢ÇÒ°ÑËûÃǶ¼·ÅÔÚWEB-INF/classesĿ¼ÏÂ
     2,´´½¨TLD±êÇ©¿âÃèÊöÎļþ(.tld)Î ......

JSPÖеÄCOOKIE²Ù×÷


JSPÖеÄCOOKIE²Ù×÷
Cookie¸ÅÄî:
    CookieµÄ¸ñʽʵ¼ÊÉÏÊÇÒ»¶Î´¿Îı¾ÐÅÏ¢, ÓÉ·þÎñÆ÷Ëæ×ÅÍøÒ³Ò»Æð·¢Ë͵½¿Í»§¶Ë, ²¢±£´æÔÚ¿Í»§¶ËÓ²ÅÌÖÐÖ¸¶¨µÄĿ¼µÄ. ´ó¼Ò¶¼´«ËµCookie»áÔì³ÉÑÏÖصݲȫÍþвʲôµÄ, Æäʵ²»ÊÇÕâô»ØÊÂÇé. ·þÎñÆ÷¶ÁÈ¡CookieµÄʱºò, Ö»Äܹ»¶ÁÈ¡µ½Õâ¸ö·þÎñ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ