前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >开发|使用war包部署在Tomcat中运行

开发|使用war包部署在Tomcat中运行

作者头像
算法与编程之美
发布于 2019-07-17 08:04:42
发布于 2019-07-17 08:04:42
2.5K0
举报

本文首发于微信公众号:"算法与编程之美",欢迎关注,及时了解更多此系列文章。

了解war和tomcat服务器

简单来说,war包是JavaWeb程序打的包,war包里面包括写的代码编译成的class文件,依赖的包,配置文件,所有的网站页面,包括html,jsp等等。一个war包可以理解为是一个web项目,里面是项目的所有东西。

Tomcat 服务器是一个免费的开放源代码的Web 应用服务器,属于轻量级应用服务器,在中小型系统和并发访问用户不是很多的场合下被普遍使用,是开发和调试JSP 程序的首选。对于一个初学者来说,我们可以这样理解,当在一台机器上配置好Apache 服务器,可利用它响应HTML页面的访问请求。实际Tomcat是Apache 服务器的扩展,但运行时它是独立运行的,所以当我们运行Tomcat时,它实际上作为一个与Apache 独立的进程单独运行的。

解决方案

打开idea编译器,点开build,打开build artifacts,选择war包。

然后把准备好的war包复制粘贴到webapps目录,返回上一级目录,找到bin,打开bin文件,在bin里面找到starup运行tomcat。运行成功如图所示。

紧接着我们去打开浏览器,输入我们的地址 localhost:你的端口号/你的项目名称,你要运行的jsp文件,下面就是运行结果。

本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2019-04-10,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 算法与编程之美 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
Instant Messaging for Business: Your 10 Best Options
It's probably not a surprise to you, but you or our employees are probably already using instant messaging for business. Formally or informally their likely having conversations with each other or even with customers over instant messaging programs. At Rocketbots we've created a Messaging App CRM for business and written extensively on the Most Popular Messaging Apps by Country.
Spanz
2019/06/02
8490
Instant Messaging for Business: Your 10 Best Options
Top 15 Substantial Impact of IT Industry on Current Business
15-Substantial-Impacts-of-IT-Industry.png
用户4822892
2019/07/03
5990
Top 15 Substantial Impact of IT Industry on Current Business
锻炼生产力赋权劳动力
《电子商务时报》采访了生产力专家,以获取他们对有助于组织和个人提高效率的应用程序,平台和技术的看法。
VasiliaSun
2021/01/28
4930
Ultimate Guide to Instant Messaging for Business 2019
Ultimate Guide to Instant Messaging for Business 2019 By Iaroslav Kudritskiy March 1, 2019  The idea of instant messaging for business has been brewing for some time. A wave of Facebook chatbots brought that idea into the western world but in China, We
Spanz
2019/04/26
8330
Ultimate Guide to Instant Messaging for Business 2019
Improving Business Efficiency with Web Application Development
Most businesses use the internet as a central point of their daily operations. They, therefore, strive to make their operations fast and simple. Since the internet is a competitive platform, every business with an online presence will strive to develop a brilliant strategy that will favour its clients.
用户4822892
2019/09/02
5120
Improving Business Efficiency with Web Application Development
Why Hire Top Developers From India?
Creative professionals and talented developers are key players for making a business successful. It is no surprise that hiring programmers is a complex process and a daunting task. It’s simply because it’s hard to find a company on which you can rely on.
用户7067505
2020/03/12
6320
What is Conversational AI?
Conversational AI is technology that enables humans and computers to communicate clearly and effectively through speech or text.
用户6026865
2023/03/03
3800
What is Conversational AI?
平台之路
几年前,马克•贝尼奥夫(Marc Benioff)告诉我,他对开发后台办公应用程序不感兴趣,因为后者会在ERP和金融市场上与SAP和甲骨文(Oracle)竞争。很多人,包括我自己,都对这个想法表示怀疑
甜甜圈
2020/12/04
6190
Best Practices & Tools for DevOps Testing Strategy
Software development companies have been adopting DevOps since it helps automate and streamline their application development life cycle. Not just that, but, DevOps also improves the quality and speed of the project deliveries by making the coordination between development and operations teams better through planning, communication, processes and tools.
用户4822892
2022/04/13
2940
Best Practices & Tools for DevOps Testing Strategy
科技行业可以缓解流行病问题的三件事
COVID-19,又称”冠状病毒”,困扰着我们,虽然技术市场可能会因此而遭受重创,但技术参与者可以做几件事情来减轻损失。
甜甜圈
2020/12/04
3230
Why is Flutter a Good Choice for App Development?
Recently, Flutter app development has become a new easy, and productive way to create applications. Lots of the teams considering it as a possible technology for the next project, which is no surprise, since it has advantages of the native framework while being cross-platform. In this article, we will focus on how Flutter development is different in general and how Flutter mobile development for iOS works in particular.
用户8617680
2021/05/13
5480
Why is Flutter a Good Choice for App Development?
六个也许你需要转变CRM的标志(computing application)
在当今不断发展的业务环境中,每个运营决策都是至关重要的-包括管理客户的最佳实践。客户关系管理平台是该过程的组成部分。实际上,拥有11名以上员工的公司中有91%使用CRM系统。
木樾233
2020/12/18
3960
What is agile software development?
Agile software development is a set of management framework and practices to develop high quality product and deliver the set of features in software which are actually needed by the users. The product development lifecycle is full of pivotal points according to which you have to keep on modifying the product according to user’s demand and interaction behavior with the software. The earlier models were not capable to observe required changes at early stage and adapting the changes to make the product a better market fit.
用户4822892
2020/04/07
6070
What is agile software development?
Top 5 Real Life Usage of Blockchain
Many businesses are embracing blockchain technology to simplify tasks in their firms. At first, Bitcoin made Blockchain technology to gain popularity but later came in the use cases which tried to leverage track of transactions with the help of technology. According to experts, Blockchain can be used to do many things starting from regulatory compliance to data management.
用户4822892
2019/09/16
6130
Top 5 Real Life Usage of Blockchain
Microservices vs Web Services
Microservices vs Web Services. Web application development has been on the rise since the beginning of this century but cloud computing has propelled it to a whole another level. The initial phase began with the development of monolithic backend and frontends but as these applications scaled up to more components, module independence was sought by developers, zero downtime was sought by business owners and their customers. To cater to the demand web services and microservices were introduced one after another under service-oriented architecture for mobile and web applications. To know more about monolithic and microservices architecture you can read our old blog.
用户4822892
2020/09/02
5580
Microservices vs Web Services
COVID-19 如何高效的WFH
How to effectively work from home as a software engineer (during COVID-19?) 截至03/14/2020 (It seems
包子面试培训
2020/03/20
5720
Top 8 technology trends in 2020
We have seen an upsurge of technological tools used in the past decade. Smart Phones have taken over the world and with that, the use of the internet has become an integral part of people’s lives. What we have come across in the past decade was shaped by the efforts of tech companies like Apple, Google, Facebook, and Microsoft. They were the key players in shaping the face of the IT industry. It will be interesting to see how technology trends in 2020 will shape the future of the upcoming decade. We already have got hints regarding some of the coolest technology that will be trending in 2020 in the last few years.
用户4822892
2020/06/02
5140
Top 8 technology trends in 2020
11 Essential Skills to become Software Developer in 2020
In this article, I’ll share 11 skills, which I believe, every programmer should know or learn in 2020.
一个会写诗的程序员
2020/05/27
5740
11 Essential Skills to become Software Developer in 2020
Conversational AI and the Top Companies
Conversational AI is the synthetic brainpower that makes machines capable of understanding, processing and responding to human language.
用户6026865
2022/05/17
5790
Conversational AI and the Top Companies
What is Dark Social & Dark Traffic?
What is Dark Social & Dark Traffic? By Iaroslav Kudritskiy Google Analytics is supposed to speak the
Spanz
2019/05/24
6820
相关推荐
Instant Messaging for Business: Your 10 Best Options
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档