JSP ÈçºÎʵÏÖÍøÒ³¶¨Ê±Ìø×ª:
JSP ÈçºÎʵÏÖÍøÒ³¶¨Ê±Ìø×ª:
<script language="javascript">
<!--
setTimeout("document.location.href='http://www.163.com'",3000);
//-->
</script>
ˢУº
<meta http-equiv="Refresh" content="xxx;yyy.jsp"/>
xxxÊÇÃëÊý
xxxÃëÖ®ºó¾Í»áÌø×ªµ½yyy.jsp
Ïà¹ØÎĵµ£º
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%@ page contentType="text/html; charset=gb2312" language="java"
import="java.sql.*"%>
<%
/*********************
&nb ......
ÅäÖóÌÐòµÄÔËÐÐĿ¼ÓëJDBCÊý¾ÝÔ´:
<Context path="/test" docBase="F:\JSPLesson\test" reloadable="true">
<Resource name="jdbc/bookstore" auth="Container" type="javax.sql.DataSource"
maxActive="1 ......
ºÍJavaÒ»Ñù£¬JSPÊÇĿǰ±È½ÏÈÈÃŵÄÒ»¸ö»°Ìâ¡£ËüÊÇÒ»ÖÖÔÚ·þÎñÆ÷¶Ë±àÒëÖ´ÐеÄWebÉè¼ÆÓïÑÔ£¬ÒòΪ½Å±¾ÓïÑÔ²ÉÓÃÁËJava£¬ËùÒÔJSP¼Ì³ÐÁËJavaµÄËùÓÐÓŵ㡣¿ÉÊÇÔÚʹÓÃJSP³ÌÐòµÄ¹ý³ÌÖУ¬³£Óöµ½ÖÐÎÄÂÒÂëÎÊÌ⣬ºÜ¶àÈËΪ´ËÍ·ÌÛ²»ÒÑ£¬±ÊÕß¾ÍÉîÊÜÆäº¦£¬¶øÇÒʹÓÃÆ½Ì¨²»Í¬£¬ÖÐÎÄÂÒÂëÎÊÌâµÄ½â¾ö·½·¨Ò²²»Í¬£¬ÎÞÐÎÖÐÔö¼ÓÁËѧϰJSPµÄÄѶȡ£Æäʵ£¬Ô ......
Æä´úÂëÈçÏÂ:
<%@page language="java" contentType="text/html" import="java.util.*" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<body>
<%
int a=9;
int b=0;
try{
%>
<%=(a/b)%>
<%
}cat ......