jspÒ³Ãæ¼ä±äÁ¿´«µÝ¼°»ñÈ¡µÄÎÊÌâ - Web ¿ª·¢ / ÆäËû
ËÑË÷ÁËһϣºhttp://so.csdn.net/bbsSearchResult.aspx?q=jsp+%e4%bc%a0%e9%80%92&p=1£¬Ã»Óз¢ÏÖÄÜÓõġ£ÒòΪÎÒÊdzõѧjsp£¬Òò´ËÓÐЩҲÐíÄÜÓã¬Ö»ÊÇÎÒ¿´²»Ã÷°×£¿
Ò»¡¢ÎÒµÄÇéÐΣº
a.html ͨ¹ý<form action="b.jsp" method="post"><input......></form>Ìá½»±äÁ¿¡°user_name¡±£¬ÖµÎª¡°gogo¡±£»
b.jsp ͨ¹ý<%Input_user=request.getParameter("user_name")%>,ÅжÏÈç¹ûInput_user="gogo"µÄ»°¾Í½«±äÁ¿¡°Input_user¡±´«¸øc.jsp£»
c.jsp»ñÈ¡b.jsp´«À´µÄInput_user£¬½«¡°gogo¡±Ð´ÈëÊý¾Ý±í¡£
¶þ¡¢ÎÒµÄÎÊÌ⣺ÈçºÎÔÚc.jsp»ñÈ¡b.jspÖеġ°Input_user¡±±äÁ¿Öµ£¿·½·¨Ò»¡¢ÎÒÓÃ<% request.getParameter("Input_user") %>È¡²»³öµÄ£¬µÃµ½µÄÊÇ¡°null¡±£»·½·¨¶þ¡¢ÎÒÔÚb.jspÓÃ<% request.setAttribute(Input_user,v);this.getServletConfig().getServletContext().getRequestDispatcher("/b.jsp").forward(request,response); %>£»ÔÚc.jspÓÃ<% String phs_nbr=request.getAttribute(Input_user); %>,ÓÖ²»³É¹¦£¬µ±È»£¬µÚ¶þÖÖ·½·¨ÎÒÖ»ÊÇ¡°ÐζøÉÏѧ¡±µÄ£¬Çë·¹ý¶®µÃµÄÅóÓѲ»ÁßÖ¸µ¼¡£ÔÚ´ËÏÈÐÐл¹ý£¡
ÏÖÉè¸öString±äÁ¿ È»ºóÔÚ´«
ÀýÈ磺
String message="";
........
message = "gogo";
request.setAttribute("message",message);
request.getRequestDispatcher("/admin/loginFail.jsp").forward(request, response);
ÔÙÔÚc.jspÒ³Ãæ½ÓÊÕmessage±äÁ¿
ÎÒ»¹Ã»ÓÐÊÔ£¬ÏÈллduizhanvs2010£¬ÇëÎÊ¡°loginFail.jsp¡±ÊÇÎҵġ°b.jsp¡±£¿¡°ÔÙÔÚc.jspÒ³Ãæ½ÓÊÕmessage±äÁ¿¡±ÈçºÎ×ö£¿
loginFai
Ïà¹ØÎÊ´ð£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
jsÖеķ½·¨£¬²»ÄÜÔÚjspÖе÷ÓÃÔõô½â¾ö£¿¼±£¡£¡!
²»Ã÷°×Òâ˼
ºÃºÃ¼ì²éÊDz»ÊÇ·¾¶µÄÎÊÌ⣬ºÜÓпÉÄÜ·¾¶²»¶Ôµ¼Öµ÷Óò»µ½
Ìùһϵ÷ÓõĴúÂë¿´¿´°¡~~
ÓÐûÓÐÕýÈ·ÒýÓÃjs£¿º¯ÊýÓÐûÓгõʼ»¯£¿....
jsp´úÂë±¾À´¾ ......
<html><head><title>[@title]</title>
<meta http-equiv=Content-Type content="text/html; charset=gb2312">
<script language='javascript'>
function diyCheck ......
ÎÒÔÚjspÒ³Ãæ²éѯµ½Êý¾Ý¿âÖеÄÒ»±ÊÊý¾Ý£¬²¢ÒÔtableÑ»·µÄÐÎʽÏÔʾ£¬µ«ÐèÒªÏÂÔر£´æ³Éhtml¸ñʽ£¬ÇëÎÊÓ¦¸Ã´¦Àí£¿´úÂëÓÐûÓÐÌØÊâÒªÇó£¿ÊDz»ÊÇÐèÒªÌرðµÄjar°ü£¿
ÄãÕâÊǰѱ¨±í±£´æΪHTML¸ñʽ£¬²»ÖªÓÐʲôÓô¦£¬
ÒªÊÇ ......
HTML code:
<%@ page language="java" import="java.util.*,com.test.model.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePa ......