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>
Ïà¹ØÎÊ´ð£º
//Óÿͻ§µÄsessionµÄid½¨Á¢Ò»¸öÁÙʱÎļþ£º
//String tempFileName=(String)session.getId();
String tempFileName = (String)session.getId();
//out.println(& ......
ÎÒÏëÓÃjavabeanʵÏÖ¼ÆÊý
´úÂëÈçÏ£º
ComputerCount.java
package tom.jiafei;
import java.io.*;
public class ComputerCount{
int number=0;
boolean iscome=false;
File file=new ......
jsÖеķ½·¨£¬²»ÄÜÔÚjspÖе÷ÓÃÔõô½â¾ö£¿¼±£¡£¡!
²»Ã÷°×Òâ˼
ºÃºÃ¼ì²éÊDz»ÊÇ·¾¶µÄÎÊÌ⣬ºÜÓпÉÄÜ·¾¶²»¶Ôµ¼Öµ÷Óò»µ½
Ìùһϵ÷ÓõĴúÂë¿´¿´°¡~~
ÓÐûÓÐÕýÈ·ÒýÓÃjs£¿º¯ÊýÓÐûÓгõʼ»¯£¿....
jsp´úÂë±¾À´¾ ......
jspÖÐinclude.incµÄ×÷ÓÃÊÇʲô£¿
include.incɶÒâ˼£¿Ã»Ìý˵¹ý
Java code:
<%include file="include.inc"%>¼ÓÔØÍøÕ¾Ä¿Â¼include.incÎļþÄÚÈÝ
°üº¬Ò»¸ö¾²Ì¬Ò³Ãæ°É···
& ......
<html><head><title>[@title]</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<script language='javascript'>
function diyCheck ......