jspµÄÎÊÌâ
н¨µÄÒ»¸öjspÒ³ÃæÈçÏ£¬ÎªÊ²Ã´½á¹ûÊÇnull£¿
HTML code:
<%@ page language="java" import="java.util.*" contentType="text/html; charset=GB2312" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'test.jsp' starting page</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">
-->
</head>
<body>
<% Servlet s = (Servlet)page; %>
<%=s.getServletConfig().getServletContext().getServletContextName()%>
</body>
Ïà¹ØÎÊ´ð£º
jsÖеķ½·¨£¬²»ÄÜÔÚjspÖе÷ÓÃÔõô½â¾ö£¿¼±£¡£¡!
²»Ã÷°×Òâ˼
ºÃºÃ¼ì²éÊDz»ÊÇ·¾¶µÄÎÊÌ⣬ºÜÓпÉÄÜ·¾¶²»¶Ôµ¼Öµ÷Óò»µ½
Ìùһϵ÷ÓõĴúÂë¿´¿´°¡~~
ÓÐûÓÐÕýÈ·ÒýÓÃjs£¿º¯ÊýÓÐûÓгõʼ»¯£¿....
jsp´úÂë±¾À´¾ ......
ÎÒÏë×ö¹»¹ºÎï³µÓÃsession µ«ÊDz»ÖªµÀÔõô»ñÈ¡¹ºÂòÊýÁ¿ ËÓоßÌåµÄ´úÂëÂð Ï£ÍûÄܸîÉá
ÏÂÃæÊǹºÎï³µµÄºËÐÄ´úÂë
ÓÐÁËÕâ¸ö ¾ÍÓ¦¸ÃÄܹ»×ö³öÀ´°É
Java code:
public void doPost(HttpServletRequest reque ......
jspÖÐinclude.incµÄ×÷ÓÃÊÇʲô£¿
include.incɶÒâ˼£¿Ã»Ìý˵¹ý
Java code:
<%include file="include.inc"%>¼ÓÔØÍøÕ¾Ä¿Â¼include.incÎļþÄÚÈÝ
°üº¬Ò»¸ö¾²Ì¬Ò³Ãæ°É···
& ......
ͨ¹ýrequest.getHeader("Referer")¿ÉÒÔ»ñµÃÉϸöÒ³ÃæµÄÀ´Ô´,ÓÐûÓа취αÔìÕâ¸örefererÊôÐÔ.
response.setHeader("refresh","3;url='regiest.jsp'");
response.setHeader("re ......
ÎÒËù½¨µÄÏîÄ¿·ÅÔÚEÅÌ ÓиöimageÎļþ¼Ð±£´æÉÏ´«Í¼Æ¬ÓõÄ
ÎÒµÄtomcat·ÅÔÚFÅÌÏ tomcatµÄwebappsϱ¾À´Ã»ÕâÏîÄ¿
ÎÒ¿ªÆô·þÎñÆ÷²¢·¢²¼Õâ¸öÏîÄ¿
ÕâÊÇtomcatµÄwebappsÔÝʱÓÐÁËÕâ¸öÏîÄ¿
ÎÒÉÏ´«Í¼Æ¬³É¹¦£¬ÔÚEÅÌµÄ ......