Web应用程序在端口8080上启动,该在哪里更改? [英] Web applications starts on port 8080, where can I change it?

查看:223
本文介绍了Web应用程序在端口8080上启动,该在哪里更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Netbeans IDE 6.8版和Glassfish 3版. 我的glassfish侦听器设置为端口81,但是当我尝试通过Netbenas IDE运行最简单的Web应用程序时,它将尝试在端口8080上运行它.在哪里可以更改它?对我的Web应用程序来说,使用端口8080对我来说是不可能的.

I have Netbeans IDE version 6.8, and Glassfish version 3. My glassfish listener is set to port 81, but when I try to run the simplest web application via the Netbenas IDE it tries to run it on port 8080. where can I change it ? Using port 8080 for my web application is out of the question for me.

推荐答案

有点晚了,但这应该可以...

A bit late, but this should work...

我已经没有6.8了,但是以下情况适用于6.9和6.10m1-在目录< home dir>/.netbeans/< version>/config中,有一个名为.nbattrs的文件-编辑它,然后寻找类似的东西:

I don't have 6.8 anymore, but the following is true for 6.9 and 6.10m1 - in the directory <home dir>/.netbeans/<version>/config, there is a file called .nbattrs - edit it, and look for something like:

<attr name="GlassFishEE6\Instances\glassfish_autoregistered_instance\httpportnumber" stringvalue="8082"/>

将值更改为您在适当的Glassfish域中设置的任何值.如果像我一样,如果您安装了多个版本的Glassfish,或者可能安装了多个域,则只需注意.... displayName键并跟随您的鼻子-显然您要更改哪个版本.

Change the value to whatever you've set in the appropriate Glassfish domain. If, like me, you have more than one version of Glassfish installed, or perhaps multiple domains, just look out for the ....displayName keys and follow your nose - it should be obvious which one you're altering.

HTH,

约翰

NB:您当然可以删除服务器,然后使用向导选择正确的端口再次将其添加到服务器中-但是我认为编辑.nbattrs要容易得多

NB: you can, of course, delete the server and add it in again using the wizard to select the right ports - but I think editing .nbattrs is far easier

NB2:目录链中还有另一个.nbattrs文件,该文件中还包含glassfish配置(无法记住确切的位置-抱歉!),这看起来像是更改端口的正确位置-但会出现编辑此文件的情况.对我来说没有任何作用,因为每次启动Netbeans时,它都会被config/.nbattrs文件中的内容覆盖

NB2: there is another .nbattrs file further down the directory chain that also contains glassfish config (can't remember the exact location - sorry!) and this looks like the right place to change the port - but editing this file appears to have no effect as, for me, it gets overridden with whatever is in config/.nbattrs file whenever I start up Netbeans

这篇关于Web应用程序在端口8080上启动,该在哪里更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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