当前位置:网站首页>Dynamic Web Development Fundamentals
Dynamic Web Development Fundamentals
2022-08-10 03:59:00 【Tangerineꦿ.๓】
URL
Tomcat服务器简介
配置Tomcat环境变量
启动Tomcat服务
测试Tomcat
Tomcat的端口配置
通过配置文件server.xml修改Tomcat端口号
注意:修改了配置文件后,一定要重新启动Tomcat,再次访问Tomcat
Web项目的目录结构
通过配置文件web.xmlVisit the start page
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<welcome-file-list>
<welcome-file>index01.html</welcome-file>
<welcome-file>index02.html</welcome-file>
</welcome-file-list>
<display-name></display-name>
</web-app>
什么是JSP
<%@ page language="java" import="java.util.*,java.text.*" contentType=
"text/html; charset=utf-8" %>
<html>
<head>
<title>第一个Web应用</title>
</head>
<body>
你好,今天是
<% SimpleDateFormat formater=new SimpleDateFormat("yyyy年MM
月dd日");
String strCurrentTime=formater.format(new Date());%>
<%=strCurrentTime%>
</body>
</html>
JSP中的page指令
<%@ pagelanguage="java" --告诉服务器使用什么动态语言来翻译jsp文件import="java.util.*,java.text.*" --告诉服务器java文件使用什么包,between multiple packages用逗号分隔pageEncoding="utf-8" --告诉服务器使用什么编码翻译jsp文件(成java文件)contentType= "text/html; charset=utf-8" --The server sends the browser the type of data and insidecontent encoding%>jsp表达式语法<%=Variable or expression or constant%> 作用:Outputs the value or expression of a variable to the browserThe calculated results are similarout.printjsp脚本语法<%java代码%> 作用:执行java代码jsp声明语法<%!变量或方法%> 作用:声明js的变量或方法jsp注释语法<%--jsp注释--%> 注:HTML的注释will be translated and executed,而jspThe annotations do notwill be translated and executedInternal comments for the script<% //单行注释 /*多行注释*/ %>External comments for scripts<%--jsp注释--%>
JSP 执行过程
使用eclipse创建web项目
在eclipse中配置tomcat
部署Web项目
Web程序的调试与排错
课后作业
静态网页和动态网页各有特点,Whether a website adopts dynamic or static pages mainly depends on the function of the websiteThe amount of demand and website content.如果网站功能比较简单,内容更新量不是很大,Use pure static networkThe page way would be simpler,反之一般要采用动态网页技术来实现.静态网页是网站建设的基础,静态网页和动态网页之间也并不矛盾,For the website to adapt to the searchsearch engine retrieval needs,即使采用动态网站技术,也可以将网页内容转化为静态网页发布.动态网站也可以采用静动结合的原则,适合采用动态网页的地方用动态网页,如果有必To use static web pages,则可以考虑用静态网页的方法来实现,在同一个网站上,within dynamic web pagesIt is also common for both content and static web content to coexist
二、请描述B/S架构的特点?
在B/S结构中,The browser side and the application server side use the request/响应模式进行交互.交互的过程如下.1.The client accepts the user's request;2.The client sends a request to the application server:The client sends the request message(包含用户名、密码等信息)发送到应用服务器端,等待服务器端的响应;3.数据处理:The server side of the application usually uses a server-side scripting language,如JSP、ASP.Net等,来访问数据库,获得查询结果;4.发送响应:The application server sends a response message to the client(Usually generated dynamicallyHTML页面),并by the user's browser,解释HTML文件,呈现用户界面.
三、请描述B/S架构与C/S架构的区别?
维护和升级方式简单.C/S结构的每一个客户端都必须安装和配置软件.If a company has a total of有50个客户站点使用一套C/S结构的软件,Then when the software has undergone even minor changes(比Such as adding a function),The system maintainer should uninstall the original software of the client,Install the new version again,然后进行设置.由于在B/S结构中,软件应用的业务逻辑完全在服务器端实现,All clients only是浏览器,根本不需要做任何的维护.所以,软件升级后,The system maintainer just takes the server out of itJust upgrade the software to the latest version.其他客户端,只要重新登录系统,The latest version is already in usethis software.用户访问范围更大.C/S是建立在局域网的基础上的,而B/S是建立在Internet的基础上的,The scope of user access is naturally different
边栏推荐
猜你喜欢
想要避免After Effects渲染失败的问题,5个小技巧必看
[Kali Security Penetration Testing Practice Course] Chapter 7 Privilege Escalation
(十四)时间延时任务及定时任务
Day16 charles的基本使用
实测办公场景下,国产远程控制软件的表现力如何?(技术解析)
从8k到13k,我全靠这本《接口自动化测试——从入门到精通》
【Image Classification】2022-ResMLP
Robust Real-time LiDAR-inertial Initialization (Real-time Robust LiDAR Inertial Initialization) Paper Learning
liunx PS1 settings
实例048:数字比大小
随机推荐
liunx PS1 settings
使用注解实现限流
Meteor accelerator Trojan analysis and disposal plan
金融财经翻译的行业前景如何
vue项目 npm run build 打包项目防止浏览器缓存
plsql 查询数据库操作历史记录(Ctrl + e)
获取属性特性几种方法
元宇宙+NFT是“宝”还是“炒”
清洁环保的小型风电滑环基本介绍
流星加速器木马分析与处置方案
State compression small experience
Camera partial update
所谓软件测试工作能力强,其实就是这 5 点
实测办公场景下,国产远程控制软件的表现力如何?(技术解析)
驱动程序开发:按键中断之异步通知
【图像分类】2022-CycleMLP ICLR
NFG电商系统在元宇宙趋势下做什么?
[Kali Security Penetration Testing Practice Course] Chapter 8 Web Penetration
How to write a high-quality test case?
2022.8.9 Exam Unique Bid Auction--800 Question Solutions