Declaration and use of variables and methods in jsp, and use of jsp variable Declaration
This document describes how to declare and use variables and methods in jsp. We will share this with you for your reference. The details are as follows:
<% @ Page language = "java" import = "java. util. * "contentType =" text/html; charset = GBK "%> <% String path = request. getContextPath (); String basePath = request. getScheme () + ": //" + request. getServerName () + ":" + request. getServerPort () + path + "/"; %> <! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN">
I hope this article will help you with jsp program design.
Articles you may be interested in:
- How to call variables in JSP in JS
- Use php to implement global variables like JSP and ASP Application
- JSP tutorial (3) -- Use of "predefined variables" in JSP
- Multiple methods to execute a js function after the jsp page is fully loaded
- Introduction to jsp Hibernate Functions
- The character replacement function str_replace () in JSP is implemented!