JSP notes

xiaoxiao2021-03-06  15

Chapter3

After the JSP receives the first user's request, the JSP engine generates the corresponding servlet code. When receiving additional user requests, simply call this servlet code.

When a JSP is wrong, you can look for errors in the JSP generated servlet source code.

Chapter4

1, <% @ Page [language = "java"]

[import = "package.class | ......."] [session = ...] [buffer = ...] [autoflush = ...]

[iSthreadsafe = ...] [info = "text"] [errorpage = "relativeurl"] [contenttype = "text / html" [; charSet = ISO-8859-1]]]

[iSerrorPage = ...]%> 2. <% @ include file = ...%> Insert in the compile time Insert 3. <% @ Taglib URI = "..." prefix = "..."%> 4. Note statement Note is not displayed, but it is included in the source program. <% - ... -%> Will not appear on the client

First, two ways of jump page

1. Take the jump with the context:

Javax.Servlet.RequestDispatcher rd = null; string rpath = "/ wlcwait.jsp"; rd = request.getRequestDispatcher (rpath); Rd.Forward (Request, Response);

2, do not bring the jump of the context:

Response.sendredirect (Response.EncodeURL ("WLCWAIT.JSP"));

转载请注明原文地址:https://www.9cbs.com/read-45970.html

New Post(0)