当前位置:网站首页>Project Notes - Random 2
Project Notes - Random 2
2022-08-11 06:56:00 【kerodaisuki】
1. Upload the image to the tomcat server
Deploy the project to webapps
Adapt the deployment method to war mode and deploy the project under the webapps of tomcat
Two ways to deploy projects in Idea
war mode: upload the project to the webapps directory in the form of a wai package;
war exploaded mode: just the mapping of the directory, it is equivalent to tomcat starting in the project source folder
Create upload directory in webapps
The upload directory is specially used to save uploaded pictures
Upload image to server
Modify the output path of the image
1. Get the running directory information of the project
2. Intercept the directory path to webapps
3. Splice the output path and save the image to upload
Page Loading Image
When using tomcat as an image server, after storing the uploaded image, if you want the image to be accessible, you need to configure it in the idea:
1. Select extend source

Select the upload folder in the webapps directory
2. Upload a picture to the server
3. Load pictures on the internal page of the project

4. It can also be accessed through HTTP
http://localhost:8080/upload/xxxxxxxxx.jpgBeanUtils Tools
BeanUtils is one of the members of Apache commons components, mainly used to simplify the operation of JavaBean package data.All data submitted by a form can be encapsulated into JavaBeans.
. BeanUtils Object Common Methods
populate(Object bean, Map properties) : Encapsulate the Map data into the specified javabean, generally used to encapsulate all the data of the form into the javabean
setProperty(Object obj , String name ,Object value) : set property value
getProperty(Object obj , String name): get the property value
边栏推荐
猜你喜欢
随机推荐
解决AttributeError: ‘NoneType‘ object has no attribute ‘val‘ if left.val!=right.val:Line 17 问题
Vulnhub靶机--born2root
2022年全国职业技能大赛网络安全竞赛试题B模块自己解析思路(2)
勒索病毒eking.devos.mkp.makop.lockbit.eight.locked.roger等剖析及中毒文件恢复
【LeetCode-349】两个数组的交集
C语言-7月22日- NULL和nullptr的深入了解以及VScode对nullptr语句报错问题的解决
SSL证书部署后,为什么还是显示不安全?
C语言-6月10日-my_strcpy函数的编写
无胁科技-TVD每日漏洞情报-2022-8-8
(一)软件测试理论(0基础了解基础知识)
手把手导入企业项目(快速完成本地项目配置)
【LeetCod】三数之和-15
Gradle 相关知识总结
【LeetCode-75】 颜色分类
无胁科技-TVD每日漏洞情报-2022-7-31
Lua 字符串
Lua 快速入门(二)——函数(Function)
Lua 快速入门(三)——表(Table)
星盟-pwn-babyfmt
Unity Rebuild和Rebatch浅析









![[HTB]渗透Backdoor靶机](/img/fd/61fb3fe8498dec4462ee4156adb806.png)