如何更改glassfish应用程序URL [英] how to Change glassfish application url

查看:46
本文介绍了如何更改glassfish应用程序URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以使用此URL访问我当前的glassfish应用程序

My current glassfish application can be accessed using this url

localhost:9595/apex

localhost:9595/apex

我想将其更改为

localhost:9595/pls/apex

localhost:9595/pls/apex

在这种情况下我需要更改什么.

what i need change in this case.

推荐答案

您可以通过在glassfish-web.xml中添加上下文根来更改应用程序的上下文根(如果您的项目中没有此文件,像这样在WEB-INF文件夹中创建它:

You can change the context-root for your application by adding a context-root in glassfish-web.xml (If you don't have this file in your project, create it in the WEB-INF folder) like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
    <context-root>/pls/apex</context-root>
</glassfish-web-app>

更新:如果这不起作用,您可以尝试使用sun-web.xml,如

Update: If this doesn't work you can try to use a sun-web.xml like it is described in this question.

这篇关于如何更改glassfish应用程序URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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