1. servlet and JSP concepts and functions 1.1 servlet concepts
SERVER + applet = servlet. servlet is a Java application on the server. It is independent of platform and protocol and can generate dynamic web pages. Servlet is a Java application on the server inside the Web server. Unlike the traditional Java application started from the command line, servlet is loaded by the Web server, the Web server must contain a Java virtual machine that supports servlet.
1.2 servlet Functions
It mainly processes client requests and sends the results to the client.
1.3 JSP Concept
JSP is a dynamic page technology. It is a traditional web page HTML file (*. htm ,*. insert the Java program segment (scriptlet) and JSP tag in HTML to form a JSP file (*. JSP ). Web applications developed using JSP are cross-platform. They can run both on Linux and other operating systems. Like servlet, JSP is executed on the server. Generally, HTML text is returned to the client. Therefore, the client can be viewed with a browser.
1.4 JSP Functions
The logic is separated from the servlet and the server-side response result is displayed to the client.
2. Write the simplest Servlet and jsp2.1 and write the simplest servlet.
Import Java. io. ioexception; import Java. io. printwriter; import javax. servlet. servletexception; import javax. servlet. HTTP. httpservlet; import javax. servlet. HTTP. httpservletrequest; import javax. servlet. HTTP. httpservletresponse; public class servlettest extends httpservlet {// class inherits httpservlet and adds the doget () and dopost () Methods Private Static final long serialversionuid =-53350221_2061860l; Public void doget (httpservlet Request request, httpservletresponse response) throws servletexception, ioexception {dopost (request, response);} public void dopost (httpservletrequest request, httpservletresponse response) throws servletexception, ioexception {response. setcontenttype ("text/html"); printwriter out = response. getwriter (); out. println ("<! Doctype HTML public \ "-// W3C // dtd html 4.01 transitional // en \"> "); out. println ("<HTML>"); out. println ("
2.2 compile a simple JSP
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">3. Introduce Weblogic and was3.1 WebLogic
WebLogic was first developed by Weblogic Inc. And then merged into Bea, and finally merged into Oracle. WebLogic is a Java application server used to develop, integrate, deploy, and manage large-scale distributed Web applications, network applications, and database applications. Introduce the dynamic functions of Java and the security of Java Enterprise standards into the development, integration, deployment and management of large-scale network applications.
3.2 was
Was is an industry-leading security expert service and a security service for Web applications, it is a targeted security solution based on the characteristics of the overall architecture of the application system and its personalized needs. Through experience from the front-line, it becomes the security service required by users, this ensures the security of web applications and effectively reduces immeasurable losses caused by security issues.
Was mainly includes:
- The web program comprehensively analyzes code and finds webshell scripts.
- Web application code black/white box test to analyze the security defects of the Code.
- Develop reasonable and effective repair solutions for existing webshell scripts and security defects and implement them.
- The cal permission of the Web application directory is changed, and server configurations such as IIS are reset to improve security.
- This prevents SQL statements from being used to improve permissions based on the running Features of databases such as MSSQL and MySQL.
- Modify some applications on the service to increase system concealment and security.
- Reasonably configure the network database server to prevent unauthorized access to data.
- View System logs to learn about the previous running status of the system. Comprehensively checks the system to prevent intrusion and leaves a backdoor.
Exchange to explore my Sina Weibo: http://weibo.com/tianrui1990