String Realpath = Request.getrealpath ("web-inf/classes/com/properties/devicetype.properties");The above is the most correct way to get the path, so the properties can be placed under a COM package, or in the SRC directory.Properties props =NewProperties (); ArrayList Al=NewArrayList (); Try{InputStream in=NewBufferedinputstream (NewFileInputStream (Realpath)); Props.load (in); Enumeration en=Props.propertynames (); while(En.hasmoreelements ()) {String key=(String) en.nextelement
JSP practical tutorial-Implementation of the simple File Upload Component (with source code ),
Preface
This article mainly introduces how to implement the JSP simple File Upload Component. I will share it with you for your reference. I will not talk about it below. Let's take a look at the details.
File Upload, including but not limited to Image Upload, is a comm
First, what is JSP
JSP (JavaServer pages) is a Dynamic Web page technology standard, which is initiated by Sun Microsystems Company, and is built by many companies, and its Web site is http://www.javasoft.com/products/jsp. Adding Java program Fragments (scriptlet) and JSP t
JSPactions allows you to dynamically insert a file, reuse the JavaBeans component, move to another page, or generate an HTML for the Java plug-in. The following actions can be used: (1) jsp: include -- include a file when the page is requested. (2) jsp: useBean -- Locate or instantiate a JavaBean. (3) jsp: setProperty
If you are using Java Servlets directly, you will have to handle HTTP input and HTML output in Java classes, and you need rich Java programming experience to build complex applications. The addition of JSP allows you to differentiate HTML's expression logic from the complex business logic embedded in the servlets. This
Introduction to a JSP The full name of the JSP is Java Server Pages, the Chinese name is the Java Servers page, it is simply a simplified servlet design, it is by the sunMicrosystems company advocates, many companies involved in the establishment of a dynamic Web technology standards.
The js| tutorial JSP (IAVA SERVER pages) is a dynamic Web page production technology developed by Sun in the Java language that allows you to separate dynamic parts of a Web page from static HTML. You can use tools that are usually handy and write HTML statements in the usual way. The dynamic parts are then embedded with special tags, which often start with "
js| Tutorial JSP Actions use you can dynamically insert a file, reuse the JavaBeans component, advance to another page, or generate an HTML for the Java plug-in. The action you can use is:
(1) Jsp:include--Included in a file when the page is requested.
(2) jsp:usebean--Find or instantiate a JavaBean.
(3) jsp:setproperty--sets a JavaBean property.
(4) jsp:getprope
This article is an example of how the JSP tutorial uses JavaBean to complete the business logic. Share to everyone for your reference. Specifically as follows:
First, the goal:
① master what is JavaBean;② Master how to write JavaBean;③ Master How to access JavaBean in JSP;④ understand the 4 scopes of objects in a JSP
read an XML file, convert it, and generate an output.Because JSP contains embedded Java programs, it can directly call an analysis program to read/write xml data. This is unreasonable because data and code logic cannot be well separated. In addition, such a program is hard to understand. So next I will introduce the second method: Using JavaBeans.
Ii. use JavaBeans
JSP
js|servlet| | Getting Started Tutorial Java servlet and JSP Tutorials (1)
1 overview
1.1 Java servlet and its features
The servlet is a Java technology answer to CGI programming. Servlet programs run on the server side and dynamically generate Web pages. Compared to tradi
First, the basic concept:
1. Tags (tag):
A label is an XML element that enables a JSP Web page to be concise and maintainable, and to easily implement the same JSP file to support multiple language versions. Because the label is an XML element, its name and attributes are case-sensitive
2. Tag libraries (Tag library):
A set of functionally similar, logically interrelated tags is called a tag library.
3
Using scripts
In some places, you probably want to add some good, mature program to your JSP page, JSP label although very powerful, but the completion of some work is more difficult. You can then use the Scripting Language section to supplement the JSP tags.
The JSP engine used supports scripting languages, and Sun's
JSP Introduction
The JSP full name is Java Server Pages, and the servlet is a technology defined by sun that is used to develop dynamic Web resources, which solves the problem of complex and difficult to maintain servlet output stream layout. JSP is a perfect blend of HTML template elements and
js| Tutorial
JSP directive mso-hansi-font-family: "> affects the overall structure of the servlet class. It is often used in the following forms:
Also, you can write multiple properties in one statement:
Attribute2= "value2"Attributen= "Valuen"%>
There are two main types of directive:
page, which allows you to do something like import classes, define a servlet superclass (superclass),mso-hansi-font-family:
JS Building Dynamic Web site with JSP Sun-yi Cuckoo
First, what is JSP JSP (JavaServer Pages) is initiated by the Sun Microsystems Company, a number of companies involved in the establishment of a dynamic Web page technology standards, its Web site for the http://www.javasoft.com/products/jsp. Adding
Java Study Notes-JSP 1 (32), java Study Notes
Servlet as a dynamic web page development technology is too unreliable. In particular, when writing a page, you need to specify the template tag of the page and process a lot of business logic. Therefore, it is complicated.
Think: Why is it so hard for Servlet to write a page?
The main reason is that Servlet actually
sent to the browser together. Both ASP and JSP are WEB server-oriented technologies, and client browsers do not require any additional software support.ASP's programming language is the scripting language such as VBScript, JSP uses Java, this is the most obvious difference between the two. In addition, there is a more fundamental difference between ASP and
I. Basic concepts:
1. Tag ):
A tag is an XML element. A tag can simplify and maintain a JSP webpage, and supports multiple language versions for the same JSP file. Because tags are XML elements, their names and attributes are case sensitive.
2. Tag library ):
A set of tags that have similar functions and are logically associated with each other is called a tag library.
3. Tag Library description file (Tag L
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.