How do I change Netbeans's webserver port from 8383?
I know I could install and use a separate webserver, but I'd prefer to just use the embedded one.
Some of what I've read online makes me think it might not be possible to change the port. But, then bug https://netbeans.org/bugzilla/show_bug.cgi?id=222570 makes it sound like using other than 8383 is possible.
I can't find such a setting with the UI. I searched under the installation directory for 8383 and can't find anything.
So, how do I do this? I'm using Netbeans 8.0.1.
Thanks.
ADDITIONAL INFO:
I'm using the internal webserver that comes with Netbeans.
I don't think this is possible, definitely not via UI. Looking at the java class, port number seems to be hardcoded in the source. You would have to build the particular NetBeans module and then replace the one in NetBeans installation folder with yours module.
From what I can tell from the issue, it fixes cases when default port 8383 is occupied, IDE uses different one (increment by 1) and thanks to the fixed bug, this incremented port is also used in browser (prior the fix, even with incremented port, old 8383 was being used in browser).
You can file enhancement with request for it.
Under Window / Services / Servers you'll find every registered server. Right-click on your server, choose "Properties" and under the "Connection"-tab you can define your port.
(You haven't mentioned which server you are using, but that's the way where you usually define your port).
I can't find Servers option either and I'm using NetBeans v8.0.2. But you can use an external server [ex. IIS, Apache] as an workaround: right-click the project in Project Window > Properties > Run. Then change the Web Server to External and Project URL to your desired address.
If your project is not in an web accessible directory you must make it web accessible first by configuring your web server or adding it in an web accessible location.
Related
I'm trying to search for a string in eclipse. I'm currently connected to a remote linux server using RSE. but the search doesn't yield any results. I'm sure that the string is present in some of the files in the directories I'm searching in. I have search in sub-folder options checked.
Any setting I need to change for it search successfully?
Thanks in advance!
Which version of Eclipse are you using and which protocol do you use for your connection (ssh, ftp, or dstore)? In addition, it would be good to know which kind of project you are working on (Java, C/C++, ...). From what you stated in your question, I would guess that your project is not fully indexed yet so that most of the files are not being searched. Try rebuilding your index and see if this helps.
You are best advised to permanently forget about searching in remote repositories using Eclipse RSE. Remote Search requires running a dedicated daemon on the remote server, so unless you own the server and have root access (necessary for launching daemons and opening ports on the firewall), remote searching functionality will be unavailable to you, full stop.
It eludes me why RSE doesn't just use find | grep over SSH. </rant>
I have downloaded and started the community version of SFSx2. I read everything on their documentation page:
http://docs2x.smartfoxserver.com/DevelopmentBasics/introduction
Which unfortunately only talks about flash client side code. Nothing about the corresponding server side code, nor about html5 client side which I need.
I downloaded the HTML5 examples, which took me a long time to find (they are here: http://www.smartfoxserver.com/download/get/140 )
None of the examples work, as they can't connect to the server. Presumably, this is because the examples only supply client side code. There are no instructions supplied on how to install or run the examples.
I can find no mention on the smartfox documenation on the following:
1) what language is used on the server side. One assumes its java.
2) how does one deploy java code to the smartfox server? I cant find any mention of this in the docs.
3) how does one find and install the server part of the client side examples (which are Tris, GameLobby, BuddyMessenger, AdvancedChat).
I applied to be allowed to post on the smartfoxserver forums, but no reply yet.
I also found it hard so I share what I've found out.
The server extensions are written in Java. I used Eclipse JUNO to write my code.
You can download Eclipse here. http://www.eclipse.org/downloads/
You export the extension in jar format from eclipse into you extension path. The name of your file has to end in 'extension' eg MyFirstExtension.jar otherwise sfs2x wont recognize it. Your extension path will be something like this: C:\Program Files\SmartFoxServer2X\SFS2X\extensions\MyFirstExtension\MyFirstExtension.jar if your working in windows.
You will find docs on JAVA API here. http://docs2x.smartfoxserver.com/api-docs/javadoc/server/
This is a link to the basic example code: http://www.smartfoxserver.com/download/get/120
Unzip the content into the [SFS2X_install_folder]/SFS2X/www/root/examples folder, overwriting the existing file. Run the index.html file, then navigate to another index.html to open the example. Run the sfs2x-standalone.exe first of course(see below). If you followed the 'server configuration tutorial' on smartfox website and changed the server ports, the examples wont work. Leave the ports alone until you start to understand the server.
This is a link to the flash example code: http://www.smartfoxserver.com/download/get/108
You will find the example code for apps mentioned above. They are written in Adobe Flash Builder and Java extensions. I don't know if there is any code for HTML5 but the Java server code and AS3 is there.
I also found that using the standalone server was the way to go rather than using SFS2x as a service. c:\program files\smartfoxserver2x\sfs2x\sfs2x-standalone.exe. Using the exe gives you the command prompt window. You can use the window for debugging and see the state of the server when it starts.
Most of the examples should work without creating extensions but to create an extension out of source examples:
Create and setup a new project in your Java IDE. You will have already set up a workspace.
Copy the content of the /source/server/src folder to your project's source folder.
Add SFS2X Libraries. Go to properties of the project -> Select Java Build Path -> Click Library Tab -> Add external jar. Add 'sfs2x.jar' and 'sfs2x-core.jar' from C:\Program Files\SmartFoxServer2X\SFS2X\lib folder. To create the extension, export jar file to extension path. Restart server.
Another problem I had was the Java Version I was using. I had to use Java1.6 with my version of sfs2x when writing extensions. This was trial and error as there was no documentation. There may be a newer version out now.
I had to copy all the server source into eclipse to try and understand how things were done. It was a way of having all the code in one place. There was a lot of trial and error as getting help is hard. I eventually accomplished what I set out to achieve. Good Luck.
SmartFox Server is easy to use even with extension. documentation Give try to Nuggeta solution for game development too. No extension needed at first. This is optionnal.
We have full HTML5 open source game walkthrough on github
Is there a way to set what port Eclipse uses for its local help server (e.g. localhost:64219/help/index.jsp)? I would like to bookmark specific pages, but I obviously can't since the port changes each time it runs.
I personally think its crazy they don't just try a common port # and then work up from there so there is consistency not just for a given user, but across users. That would make it possible to share local help links with coworkers.
I found this help article on running a standalone Information Center that says you can -port, but that doesn't seem to work with Eclipse itself (I tried adding it to eclipse.ini).
In current Kepler release it can be changed by adding
-vmargs
-Dserver_port=8089
in config.ini
I am trying to get the debugger (CF extension for Eclipse) working for last few hours. And struck in strange situation.
My settings are listed below
ColdFusion 8
Eclipse 3.4
I set up the RDS & modified the JVM.config settings and verified the connection & debugger, both returns successful in test run. But When i attach a debugger to the site, breakpoints are not hit.
My Eclipse workbench & site virtual directory pointing to the same path. It is in a remote server.
I left Eclipse-CF mapping blank since both pointing the same remote path.
And i am using WYSE thin client emulator.. does it anything to do with this..?
Can someone help me to resolve this problem?
Cheers
If your eclipse configuration is ok, could be that something is not confgured right on server side. Check if Line Debugger Settings > Allow Line Debugging feature is enabled and that Debugger Port (5005) is opened and accessible form client machine.
Articles that should walk you through proper setup:
http://eclipse.sys-con.com/node/382427
http://www.adobe.com/devnet/coldfusion/articles/debugger.html
Also you could try using CF Builder and/or FusionDebug http://www.fusion-debug.com/fd/ .
You do need to specify at least one mapping. Eclipse needs to know what folder in your project maps to the http root. Even if the mapping is / -> /, you need to specify that. The only time you can leave mapping blank is when the CF server is on the same machine as Eclipse.
‘Servers’ is built-in view in Eclipse. We could integrate Java EE server into Eclipse easily. It could start/stop server both in normal and debug modes. Moreover, we could even set timeout and deployment path, things like that. Various types of server tomcat, jboss, websphere are supported, no intrusive to server.
I am just curious about how these cool things happen behind the scene. The complete mechanism is large and complex, so I just want to know general mechanism about it, an article also could be fine for me. Thank you!
It's the server-specific plugin which does all the work. When integrating a Server in Eclipse you basically need to instruct the plugin where to find the installation root of the server in question. The plugin in turn knows precisely where to locate the default libraries, how to deploy webapps to the server in question and how to start/stop the server with eventually extra commandline arguments.
Since every server make/version needs a different approach (as different as when you need to do it "manually"), I'll only give a Tomcat 6.0 based example how it roughly works. Doubleclick the server entry in Servers view and check the Server Location section. The field Server Path denotes the root location of configuration files. It's by default in Eclipse metadata (when Use workspace metadata is selected). If you browse further in this folder, you'll find something like tmp0\conf\server.xml. It contains information about where the to-be-deployed webapps are located, which context name it should have and so on. The plugin basically gives this information to Tomcat and it will handle it further.
Basically, server adapters are Eclipse plugins and allow to extend the IDE by implementing a set of generic actions (start, debug, stop, deploy, undeploy) that are translated into server specific orders. They also expose server specific configuration parameters. The deployment is more or less intrusive depending on the server (it may be done outside the server folder tree or in a special eclipse folder).