如何更改Glassfish的默认开始页面? [英] How to change default start page of Glassfish?

查看:94
本文介绍了如何更改Glassfish的默认开始页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,当我输入我的webapp的URL时,说http://abc.edu/mywebapp/,我被带到我的webapp的登录页面。当我输入http://abc.edu/时,我被带到GlassFish信息页面。我该如何做,这样当我键入http://abc.edu/时,我将被带到我的登录页面而不是GlassFish信息页面?

解决方案

选项1:您可以将其中一个webapps设置为默认值。这可以通过管理控制台完成:

配置 - >虚拟服务器 - >服务器



然后从下拉菜单中选择您的默认Web应用程序。如果您的网络服务器端口是8080,您现在可以通过以下方式启动您的应用程序:


$ b http://主机名:8080



而不是 http://主机名:8080 / webapp



请注意,server是Glassfish的默认虚拟服务器的名称。如果您为web应用程序配置了不同的虚拟服务器,则需要对其进行相应更改。



关于此来源,JDBCRealms可能存在一些问题。

选项2:您也可以将您的默认Web应用程序部署为/而不是/ webapp,但我认为第一个选项更加灵活。


Currently when I type in the URL of my webapp, say "http://abc.edu/mywebapp/", I am taken to the login page of my webapp. When I type "http://abc.edu/", I am taken to the GlassFish info page. How can I do it such that when I key in "http://abc.edu/", I will be taken to my login page and not the GlassFish info page?

解决方案

Option 1: You can set one of your webapps as default. This can be done with the admin console:

Configuration --> Virtual Servers --> server

Then select your default web application from the drop-down menu. If your webserver port is 8080, you can start your application now by:

http://hostname:8080

instead of http://hostname:8080/webapp

Notice that "server" is the name of Glassfish's default virtual server. If you configured a different virtual server for your webapp you need to change it accordingly.

Furthermore regarding this source, there might be some problems with JDBCRealms.

Option 2: You could also deploy your default webapp to "/" instead of "/webapp" but I think the first option is more flexible.

这篇关于如何更改Glassfish的默认开始页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆