---
title: "Tomcat中的应用程序通过多个域名获得"
author: "HeLinHang"
date: "2011-09-26T00:00:27Z"
tags: []
categories: ["开源软件"]
slug: "tomcat"
draft: false
lastmod: "2011-09-26T00:00:27Z"
id: 1180280
url: "https://ibook.iteye.com/blog/1180280"
---

在Root目录下中的index.jsp中添加如下代码

String don=request.getServerName()

 

获得的用户就是通过那个域名进行访问的