【高级网络程序设计】Week3-2 Servlet

一、 What are servlets?

1. 定义

(1)Servlets are Java’s answer to CGI:

programs that run on a web server acting as middle layer between HTTP request and databases or other applications.
Used for client requests that cannot be satisfied using pre-built (static) documents.
Used to generate dynamic web pages in response to client.

(2)图解

Web BrowserSending Requests to a Web Server
Web Server

hold/return static web pages

– e.g. index.html does not respond to user input.

Server Side Programs

different technologies written in various languages

 – e.g. CGI scripts, Java Servlets (and JSPs – later), PHP scripts
 – Call to http://localhost:8080/servlet/myhelloservlet.HelloServlet
 – Not web-browsing but executing program (servlet)
Dynamic response– database lookup, calculation etc.
We’ll look at the Java solutionhow to write servlets; how the container (Tomcat) works.

2. A general purpose Web Server

二、Simple Example

ignore how the Container finds the servlet (via the deployment descriptor web.xml).
<form action=“http://server.com/ExecuteServlet”>
<input type=“submit” value = “press for servlet”>
</form>

1.  A Basic Servlet

import jakarta.servlet.*;
import jakarta.servlet.http.*;
import java.io.*;
//import jakarta.servlet.*:imports classes in this directory, but not in sub-directories
public class HelloServlet extends HttpServlet {public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {response.setContentType("text/html");//设置响应文件类型、响应式的编码形式PrintWriter out = response.getWriter();//获取字符输出流out.println(“<html><body>Hello!</body></html>”);out.close();}
}

2.  Echo Servlet

import jakarta.servlet.*;
import jakarta.servlet.http.*;
import java.io.*;
public class GetEchoServlet extends HttpServlet {public void doGet(HttpServletRequest request,HttpServletResponse response)throws IOException, ServletException {String userName = request.getParameter(“fname”);//获取form中输入的参数response.setContentType("text/html");//设置响应文件类型、响应式编码格式PrintWriter out = response.getWriter();//获取字符输出流out.println(“<html><body>Hello”);if (userName != null) out.println(userName);else out.println(“mystery person”);out.println(“</body></html>”);out.close();}
}

3. BMI Servlet

- HTML
//Page that asks for weight (kg) and height (cm) :Write the HTML and the HTTP Request (GET)
<form method=“GET”action=“http://server.com/BMIServlet”>
<input type=“text” name=“weight”/>weight<br>
<input type=“text” name=“height”/>height<br>
<input type=“submit” value=“send”>
</form>

- Servlet


import jakarta.servlet.*;
import jakarta.servlet.http.*;
import java.io.*;
public class BMIServlet extends HttpServlet {public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException {String ht = request.getParameter(“height”);int height = Integer.parseInt(ht);double weight = Double.parseDouble(request.getParameter(“weight”));double ht_squared = (height/100.0)*(height/100.0);response.setContentType("text/html");PrintWriter out = response.getWriter();out.println(“<html><body><br>”);out.println(“Your BMI is: ” + weight/ht_squared + “<body></html>”);out.close();}
}

4. Name-salary Servlet

import jakarta.servlet.*;
import jakarta.servlet.http.*;
import java.io.*;
public class HelloServlet extends HttpServlet {public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {String name = request.getParameter("name");int salary = Integer.parseInt(salary);response.setContentType("text/html");PrintWriter out = response.getWriter();out.println("<html><body><br>");out.println("Hello,"+name);out.println("Your salary is"+salary);out.println("<body><html>");out.close();} // end of method
} // end of class

三、Servlet Key Points

1. Servlets: Key points

NO main method public static void main(String[] args)
NO constructor

There is one (default) constructor but the developer should never write an explicit constructor

 – Why——servlet lifecycle

Two key (service) methodsdoGet(); doPost()

2. Finding things

Tracing the user data
– e.g. name attribute inside an HTML element
– name in HTTP request message
– argument in request.getParameter(...)
 String(int/double required)

then have to use appropriate method on this String to convert

- Integer.parseInt();

- Double.parseDouble();

Finding the servlet
<form> tag action attribute e.g. <FORM action=“servlet/myServlet” ...>
– Used by deployment descriptor, web.xml (see later), to map to the corresponding servlet class.

3. JavaBeans, JSPs and Servlets

Although a servlet can be a completely self-contained program, to ease server-side programming, generating content should be split into
The business logic (content generation), which governs the relationship between input, processing, and output.
The presentation logic (content presentation, or graphic design rules), which determines how information is presented to the user.
controllerthe servlet handles the HTTP protocol and coordination of which other servlets and auxiliary class methods to call
modelJava classes/JavaBeans handle the business logic
viewJava Server Pages handle presentation logic

4. Advantages of Servlets over CGI

Efficient
– Servlets run in the JVM. Each request is serviced using a thread rather than a new process (so lower overhead).
- Though some scripting languages, e.g. perl on certain web servers do this now.
Convenient– Provides infrastructure that parses and decodes HTML forms.
Powerful
– Can communicate directly with web server.
– Multiple servlets can share database connections.
– Simplifies session tracking.
Portable– Written in Java and follows standard API.
Secure
– CGI often executed using O/S shells, which can cause many security breaches.
– Array checking & exception handling is automatic in Java.
Inexpensive
– Many Java web servers are freely available.

四、Servlets in Detail

1. A general purpose Web Server

2. What servlets do

 requestRead any data sent by the user
Look up information embedded in HTTP request
Generate results.
response
Format results inside a document (e.g. HTML, XML, GIF, EXCEL).
Set appropriate HTTP response parameters.
Send the document back to the client.

3. Typical generic servlet code

import java.io.*;
import jakarta.servlet.*;
public class AnyServlet extends GenericServlet {public AnyServlet() {} // constructor – BUT USE THE DEFAULT// NEVER ANY NEED TO WRITE ONE//ONLY creates an object, becomes a “proper” servlet after init().public void init(ServletConfig config) throws ServletException;// The method is actually called by container when servlet is// first created or loaded.public void service(ServletRequest req, ServletResponse res)throws ServletException, IOException;// Called by a new thread (in the container) each time a// request is received.public void destroy();// Called when servlet is destroyed or removed.
}

4. A Servlet is “deployed” in a container

• A program that receives (e.g. HTTP) requests to servlets from a web server application:
– finds the servlet (and loads, calls constructor & init() if not ready);
– creates or reuses a thread that calls service() method of chosen servlet;
– creates & passes request and response objects to chosen servlet;
– passes the response (e.g. HTTP response) back to the web server application; kills servlet thread or recycles into thread pool; and deletes request and response objects.
• More generally, manages the life cycle of its servlets:
Calls constructor, init(), service(), destroy().
– Also invokes methods of listening classes that a servlet implements (out of scope here).
• It has a main() and is working “all the time”.
• Also provides:
– Declarative security using settings in Deployment Descriptor (DD).
– JSP support.

5. Dissecting the Container’s actions

- HTTP request:
GET   /myServlet/BMIInfo   height=156&name=paula+fonseca   HTTP/1.1
- Servlet:
public class BMIServlet extends HttpServlet {
        public void doGet(HttpServletRequest request, HttpServletResponse response) throws
IOException, ServletException {
                // ...
                String ht = request.getParameter(“height”);
                // ...
        }
}

6. The servlet life cycle

7. methods & inheritance

8. Servlet’s Life cycle

Constructor (no arguments)
– not written or called by a developer
– called by the container
public void init()
– called after constructor
– called once, at the beginning (so potentially useful for initialisation of, e.g. databases)
– can be overridden by the developer
public void service(…)
rarely overridden by thedeveloper
– called everytime

public void doGet() /

public void doPost()

must be written by the developer
– must match the HTTP method in <form> in the HTML
public void destroy()

– must be written by the developer

五、 Configuration Servlets To Run In Tomcat

1. Mapping names using the Deployment Descriptor (DD)

//For each servlet in the web application.
//Internal name of servlet can be “anything” following XML rules.
<web-app ...><servlet><servlet-name>…</servlet-name>//maps internal name to fully qualified class name (except without .class)<servlet-class>…</servlet-class>//maps internal name to public URL name e.g. /makebooking</servlet><servlet-mapping><servlet-name>…</servlet-name><url-pattern>…</url-pattern ></servlet-mapping>
...
</web-app>

2. Servlet Mapping Examples

- HTML:
<FORM method=“post” action=“/servlet/MyTest.do”>
- Server (webapps):
WEB-INF/classes/Echo.class
<servlet>
        <servlet-name>......</servlet-name>
        <servlet-class>.....</servlet-class>
</servlet>
<servlet-mapping>
        <servlet-name>......</servlet-name>
        <url-pattern>.......</url-pattern >
</servlet-mapping>
- HTML:
<FORM method=“post” action=“/servlet/Test”>
- Server (webapps):
WEB-INF/classes/foo/Name.class
<servlet>
        <servlet-name>......</servlet-name>
        <servlet-class>.....</servlet-class>
</servlet>
<servlet-mapping>
        <servlet-name>......</servlet-name>
        <url-pattern>.......</url-pattern >
</servlet-mapping>

3. Example: A Small Form

//SmallForm.html
<html><title>Sending Form Information to a Servlet</title><body><form action="http://localhost:8080/servlet/elem004.ProcessSmallForm"method="post">//Can use absolute or relative URLs or pre-configured names.Please input your login: <br><input type="text" name="Login"><input type="submit" value="Login"></form></body>
</html>//the Deployment Descriptor (web.xml) and the servlet
<servlet><servlet-name>smallForm</servlet-name><servlet-class>SmallFormServlet</servlet-class>
</servlet>
<servlet-mapping><servlet-name>smallForm</servlet-name><url-pattern>/servlet/elem004.ProcessSmallForm</url-pattern>
</servlet-mapping>

4. Putting everything in the right place

Level 1WEB-INF (folder) and .html, .jsp
Level 2(inside WEB-INF folder): web.xml and classes (folder)
Level 3 (inside classes folder): servlet .class files (and other “business” class files e.g. JavaBeans)

5. Servlet initialisation & Servlet Configuration object

• Only one servlet instance is created: each request is serviced by a separate thread in the container.
• Prior to initialisation, the ServletConfig object is created by the container:
– one ServletConfig object per servlet;
– container uses it to pass deploy-time information to the servlet (data you do not want to hard code into the servlet, e.g. the DB name);
– the names are specified in the DD.
• Parameters are set in a server-specific manner, e.g.
– in a file called web.xml (for Tomcat);
– in a file called resin.config (for Resin).
• Parameters do not change while servlet is deployed and running:
– like constants;
– if servlet changes, then need to redeploy.

6. Example: DD’s init parameters (web.xml for Tomcat)

<web-app xmlns=“http://java.sun.com/xml/ns/j2ee”xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”xsi:schemaLocation=“http//java.sun.com/xml/ns/j2ee/web-app_2.4.xsd”version=“2.4”><servlet><servlet-name>Hello World Servlet</servlet-name><servlet-class>S1</servlet-class><init-param><param-name>lecturersEmail</param-name><param-value>paula.fonseca@qmul.ac.uk</param-value></init-param>//Container reads these & gives them to ServletConfig object.</servlet>
</web-app>
out.println(getServletConfig().getInitParameter(“lecturersEmail”));
Returns the servlet’s ServletConfig object (all servlets have this method).
Getting a parameter value from the ServletConfig object; this code is in servlet.

7. Creating a servlet: ServletConfig and init(…)

Step 1container reads the deployment descriptor
Step 2container creates new ServletConfig object
Step 3
container creates name/value pair (Strings) for each servlet init-param
Step 4
container passes references to these to the ServletConfig object
Step 5container creates new instance of the servlet class
Step 6
container calls servlet’s init() method passing in reference to the ServletConfig object

六、Thread Safety And Putting Things Together

1. Instance Variables

public class ExampletServlet extends HttpServlet {
private int age;
public void init() { age = 0; }
public void doGet(HttpServletRequest request,
HttpServletResponse response) throws
IOException, ServletException {
age = Integer.parseInt(request.getParameter(“age”));
response.setContentType(“text/html”);
PrintWriter out = response.getWriter();
out.println(“<HTML><BODY>You are ” + age + “ weeks old”);
out.println(“</BODY></HTML>”);
out.close();
}
}

2. The 3 Threads access same Resources

• We don’t know whose age will be displayed!
• Solution 1:
– Never use instance variables in servlets (some books say you
can’t – what they mean is you shouldn’t!).
– Find a way to save information (state) about each user (i.e.
each request) – we’ll see how later …
• Solution 2:
Synchronisation – a lock that makes a variable thread-safe

3. Access – introducing the ServletContext object

Servlet
ServletConfig object – one per servlet (or JSP)
– contains init params
– all requests made to a servlet can access this object
• Web application
ServletContext object – one per web application
• Web applications normally have several servlets/JSPs.
– Used to access web application parameters that need to be seen by all servlets/JSPs in the application.
• A misnomer, as it relates not to a servlet but to the set of servlets and JSPs in the web application.
The web application’s DD specifies the context parameters

<web-app ...> ...<servlet><servlet-name>...</servlet-name><servlet-class>...</servlet-class><init-param><param-name>...</param-name><param-value>...</param-value></init-param></servlet> ... + other servlets<context-param><param-name>HOP_Email</param-name><param-value>g.tyson@qmul.ac.uk</param-value></context-param>
...
</web-app>

Note: Not inside any servlet. These are parameter namevalue pairs: both are strings.

ServletContext object created and set up when web application is deployed.

4. To access web app parameters in servlet code

ServletContext ctx = getServletContext();
out.println(ctx.getInitParameter(“HOP_Email”));
Context parameters generally more commonly used than Config.
– Typical use (of former) is a DB lookup name.
• Can access ServletContext,
– directly: getServletContext().getInitParameter(…)
– from ServletConfig: getServletConfig().getServletContext().getInitParameter(…)
– Latter is useful if in a method of an auxiliary class e.g. a JavaBean, and only the ServletConfig object has been passed as a parameter.
Same name for get method as when accessing ServletConfig object.

5. ServletContext also has attributes

• Parameters are name-value pairs, where both name and value are strings.
• Attributes are name-value pairs where the name is a String, but the value is an object (that may not be a String).
– accessed by getAttribute(String);
– set by setAttribute(String,Object).
• Running code prior to invoking any servlet in the application:
– E.g. to turn sets of parameters into attribute objects,
• so all servlets only need to deal with objects;
• and don’t have to read the context parameters.
– Implement a ServletContextListener (out of scope here)

6. Servlets – The Basics: Key Points & What we can’t do yet

How to call a servlet in an HTML formWhat a deployment descriptor does
How to write a servletWhere to deploy files
How to access client informationServlet life-cycle
Initialisation
ServletConfig
ServletContext
Have a conversation with a client
– Shopping basket
Session object
Run any code before a servlet starts
– E.g. Database set up
Listeners

Send client information, or control,

to another servlet/JSP

– Could be in another web server
Redirect and forward

7. Extracting unknown parameters and multiple values

String getParameter(String)
parameter name is known:
– returns null if unknown parameter;
– returns "" (i.e. empty string) if parameter has no value.
Enumeration getParameterNames() obtain parameter names
String[] getParameterValues(String) 

obtain an array of values for each one:

– returns null if unknown parameter;
– returns a single string ("") if parameter has no values. Case sensitive.

8. Example: A Big Form

//BigForm.html
<form action="http://localhost:8080/servlet/elem004.ProcessBigForm"method="post">Please enter: <br><br>Your login: <input type="text" name="Login"> <br><br>Your favourite colour:<input type="radio" name="Colour" value="blue">Blue<input type="radio" name="Colour" value="red">Red<input type="radio" name="Colour" value="green">Green <br><br>//Single-value parameters.Which of these courses you are taking: <br><input type="checkbox" name="Course" value="elem001">ELEM001 <br><input type="checkbox" name="Course" value="elem002">ELEM002 <br><input type="checkbox" name="Course" value="elem003">ELEM003 <br><input type="checkbox" name="Course" value="elem004">ELEM004 <br><input type="submit" value="Send to Servlet">//Multiple-value parameter.
</form>
//After BigForm is processed.getParameterNames() returns parameters in no particular order.//ProcessBigForm.java
//More code here ...out.println("<table border=1>");// Obtain all the form’s parameters from the request object.Enumeration paramNames = req.getParameterNames();while (paramNames.hasMoreElements()) {String paramName = (String) paramNames.nextElement();// Obtain values for this parameter and check how many there are.String[] paramValues = req.getParameterValues(paramName);if (paramValues.length == 1) { // a single valueString paramVal = req.getParameter(paramName);out.println("<tr><td>" + paramName +"</td><td>"+ paramVal + "</td></tr>");}else { // If several values print a list in the table.out.println("<tr><td>" + paramName +"</td><td><ul>");for (int i = 0; i < paramValues.length; i++)out.println("<li>" + paramValues[i] + "</li>");out.println("</ul></td></tr>");}}out.println("</table>");out.close();
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/201297.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【LeetCode刷题】-- 29.两数相除

29.两数相除 思路&#xff1a; class Solution {public int divide(int dividend, int divisor) {//考察被除数为最小值的情况if(dividend Integer.MIN_VALUE){//被除数为最小值&#xff0c;除数是1&#xff0c;返回最小值if(divisor 1){return Integer.MIN_VALUE;}//除数是-…

羊大师提示,羊奶都有哪些惊人功效?

羊奶不仅是一种美味的健康饮品&#xff0c;在近年来备受瞩目的的健康圈子里&#xff0c;羊奶还被赋予了更多的功效&#xff0c;成为一种备受推崇的保健品。羊奶不但富含营养&#xff0c;而且还有着非常多的益处&#xff0c;它能够用来美容、保健&#xff0c;甚至还可以治疗某些…

C语言基本算法之选择排序

目录 概要&#xff1a; 代码如下 运行结果如下 概要&#xff1a; 它和冒泡排序一样&#xff0c;都是把数组元素按顺序排列&#xff0c;但是方法不同&#xff0c;冒泡排序是把较小值一个一个往后面移&#xff0c;选择排序则是直接找出最小值&#xff0c;可以这个说&#xff…

【OpenCV实现图像:OpenCV利用Python创作热力图】

文章目录 概要读取图像图像灰度化**像素化效果**小结 概要 热力图是一种强大的统计图表&#xff0c;通过对数据进行色彩映射&#xff0c;直观展示了数据分布的热度和密度。在绘制热力图时&#xff0c;关键在于指定颜色映射的规则&#xff0c;这决定了图中不同数值的呈现方式。…

【React-Router】路由导航

1. 概念 路由系统中的多个路由之间需要进行路由跳转&#xff0c;并且在跳转的同时有可能需要传递参数进行通信。 2. 声明式导航 // /page/Login/index.jsimport { Link } from react-router-dom const Login () > {return <div>登录页{/* 解析成 a 链接 */}<Li…

利用ros实现单片机通讯(转载)

我觉得如果使用这个人的micro_ros通信协议&#xff0c;就不用再去Ubuntu或者Windows上面自己写驱动程序了&#xff0c; 利用micro_ros实现esp32与ros2的通讯 Tianci ​ 天津大学 工学博士 参考&#xff1a;https://github.com/micro-ROS/micro_ros_arduino https://blog.cs…

04 后端增删改查【小白入门SpringBoot + Vue3】

项目笔记&#xff0c;教学视频来源于B站青戈 https://www.bilibili.com/video/BV1H14y1S7YV 保证前面的都功能都实现后&#xff0c;接着往下走。 查 分页 接下来&#xff0c;实现前端页面分页功能。 前端分页组件 打开elementplus官网&#xff0c;找到合适的分页组件&…

软件测试工具常用的都有哪些

软件测试工具是用于辅助软件测试的软件工具&#xff0c;可以帮助测试人员执行测试用例、记录测试结果、跟踪缺陷状态等&#xff0c;提高测试效率和质量。以下是一些常见的软件测试工具&#xff1a; 一、AutoRunner自动化测试工具 AutoRunner(简称AR&#xff09;是国内自主研发…

python使用selenium webDriver时 报错

可能原因和解决&#xff1a; 1. python 解释器 ----> 设置 2. 浏览器版本 与 浏览器驱动版本不一致 ----> 安装同一版本的 (下载chromedriver | 谷歌驱动更高版本的测试版) 参考&#xff1a;Python使用Selenium WebDriver的入门介绍及安装教程-CSDN博客 Selenium安…

企业网盘哪家好?值得信赖的品牌推荐

企业网盘可谓是当下热门的企业服务之一&#xff0c;市面上也出现了非常多企业网盘工具。那么&#xff0c;企业网盘哪家好&#xff1f;哪个品牌更值得信赖呢&#xff1f; 企业网盘哪家好&#xff1f; Zoho Workdrive企业网盘一定榜上有名&#xff0c;Zoho Workdrive企业网盘是著…

IDEA JRebel安装使用教程

1、下载插件 版本列表&#xff1a;https://plugins.jetbrains.com/plugin/4441-jrebel-and-xrebel/versions 下载&#xff1a;JRebel and XRebel 2022.4.1 这里下载2022.4.1版本&#xff0c;因为后续新版本获取凭证会比较麻烦。下载完成会是一个压缩包。 2、安装 选择第一步…

微软Copilot即将对大陆开放,一起来看看都有什么好用的功能

微软发布了Copilot&#xff0c;12月1日起对大陆用户开放&#xff0c;以下是Copilot的11个新功能&#xff0c;你一定不想错过&#xff1a;1. PowerPoint&#xff1a; 将Word文档转换为演示文稿。从文件中快速创建演示文稿。通过关键幻灯片总结冗长的演示文稿。使用提示添加新的…

2024贵州大学计算机考研分析

24计算机考研|上岸指南 贵州大学 贵州大学计算机科学与技术学院&#xff08;贵州大学省级示范性软件学院&#xff09;位于贵州省贵阳市花溪区贵州大学东校区。 计算机科学与技术学院&#xff08;软件学院&#xff09;自1972年创办计算机软件本科专业开始&#xff0c;至今已有…

cadence layout lvs时出现error

Error&#xff1a;Schematic export failed or was cancelled.Please consult the transcript in the viewer window. 解决办法同下&#xff1a; cadence layout lvs时出现error-CSDN博客

Unity 头顶图文字性能优化

如图&#xff1a;常规的排版&#xff0c;会有很多Batches。这是优化后的Batches只有3。 常用解决方案&#xff1a; 1、创建两个Canvas&#xff0c;一个放所有文本Text&#xff0c;一个放所有Image。但这里有会有两个问题&#xff1a;一旦文字夹在两个Image中间&#xff0c;还有…

掌握Katalon Studio 导入 swagger 接口文档,接口测试效率提升100%

katalon studio大家都已经不陌生了&#xff0c;是一款现在非常主流的自动化测试工具&#xff0c;包括了web、api、APP&#xff0c;甚至PC应用程序都可以使用它来完成自动化测试。 swagger是一款RESTFUL接口的文档在线自动生成软件&#xff0c;swagger是一个规范和完整的框架&a…

智能座舱架构与芯片 - (2) 架构篇

一、定义 1.1 智能座舱定义 按照百度百科的定义&#xff0c;智能座舱&#xff08;intelligent cabin&#xff09;旨在集成多种IT和人工智能技术&#xff0c;打造全新的车内一体化数字平台&#xff0c;为驾驶员提供智能体验&#xff0c;促进行车安全。目前国内外已经有很多研究…

算法刷题-动态规划-1

算法刷题-动态规划-1 不同路径不同路径||方法一&#xff1a;方法二 第N个泰波那契数递归写法滚动数组 三步问题递归操作滚动数组 使用最小画法爬楼梯递归 解码方法方法一方法二&#xff1a;&#xff08;大佬讲解&#xff09; 不同路径 //机器人不同的路径进入到指定的地点 publ…

SpringBoot : ch06 整合 web (一)

前言 SpringBoot作为一款优秀的框架&#xff0c;不仅提供了快速开发的能力&#xff0c;同时也提供了丰富的文档和示例&#xff0c;让开发者更加容易上手。在本博客中&#xff0c;我们将介绍如何使用SpringBoot来整合Web应用程序的相关技术&#xff0c;并通过实例代码来演示如何…

“图纸保密大作战:上海迅软DSE解决方案守护机械公司核心资料

机械行业是我国重要的工业制造行业之一&#xff0c;相关企业在发展中往往需要用到ERP、PDM、PLM等系统来对产品信息进行管理&#xff0c;其中便涉及到大量文档和图纸等重要数据。然而随着业务的快速发展和数字化转型&#xff0c;机械行业也面临着如数据泄露、外来袭击攻击、内部…