Run jsp in eclipse on specific port and ssl - eclipse

I have used Eclipse 3.4 to create a Dynamic Web Project. I have also configured my server to use port 8443 with ssl. If I start my server I can access my test.jsp by going to it's address
https://localhost:8443/TestContext/test.jsp
In eclipse, I have installed this server and added my project to the server. If I Run test.jsp it always launches as
http://localhost:8080/TestContext/test.jsp
My question is: How can I set up eclipse to run this on https://localhost:8443/ rather than the default 8080? Thanks in advance.

You should have a project called "Servers". There your tomcat should have its folder - for example "Tomcat 6.0.20 at localhost-config". There is server.xml there, in which you can enable SSL.
When you enable the SSL, the server accepts requests on port 8443 as well as on 8080. The server is not run on a port - it accepts connections on multiple ports. So just type https://localhost:8443/

Related

GWT Request builder, send data from one port to another port

I hava a GWT project running on port 3000, and i have a Java project running on port8080. Now i just want to send a string from port 3000 to 8080. Would it be possible by using GWT request builder? or how to make this process happen by using other technology?
I also need data to be sent from port 8080 to port 3000....
Yes it is possible.
I'm assuming your java project should be a service/webapp, since you have mentioned the port in which your java project is running is 8080(default tomcat port).
Your access from GWT project running on port 3000 to java project running on port 8080 is a Cross Site Request.
References on Cross site request:
http://www.gwtproject.org/doc/latest/tutorial/Xsite.html
(Please read section : Access Restrictions: Same Origin Policy)
GWT RequestBuilder - Cross Site Requests

Domain Name Instead of Localhost In Eclipse

I've got a tomcat server instance running inside of eclipse. By default it uses a hostname similar to http://localhost:8080/MyApp/ is there some way to proxy this so I can use a domain name like http://example.com/ instead?
On the production server I use apache to proxy the request to point to the tomcat instance, but within eclipse I don't have that luxury.
I'm using Ubuntu. I thought maybe I could map the domain to point to the localhost version in /etc/hosts but that seems to only be the first step. From there I can't figure out how to point the domain to the tomcat url.
Add this to your hosts file, to access via domain name : localhost example.com
Now, You have couple of options :
Host file doesn't know about ports. You have to access your app like http://example.com:8080/MyApp
You can change your tomcat port 8080 to 80 so that you dont have to access it via port like this http://example.com/MyApp
To access your web application via http://example.com, you have to deploy your application in tomcat root. For that refer Deploying my application at the root in Tomcat

Must I use port 9000 for XDebug?

I am using:
WAMP
PHP 5.3
XDebug
NetBeans
I want to debug and have the debug port in Netbeans set as 9000 (after following various tutorials, including this one --> Xdebug And Netbeans Problem ). The problem is, I'm unsure as to the purpose of the port 9000.
Does debug port 9000 mean that I must run Wamp on port 9000?
You don't run Wamp on port 9000: it's NetBeans that runs on port 9000!
Your debug client (NetBeans, in this case) needs to listen for incoming connections so Xdebug is able to establish a connection and send the apporpriate info. Please note that there're two requests involved:
Someone (possibly NetBeans) connects to the web server to request the HTML document and start a debug session.
Xdebug connects to whoever requested the debug session (NetBeans) and sends some XML with variables and other debug info.
Details can vary depending on your settings but this is the general idea.
The port you choose is irrelevant as far as:
It's available (no other app is using it) at this moment.
It's reachable from the web server (no firewall / router issues).

tomcat and eclipse: starting server

in my system i am using eclipse and tomcat server. I hav 3 different versions of tomcat servers.
But i am trying to run only one server at a time. But by default Already one server is running on port number 8080. When i am trying to start the tomcat server in 8081 port, the tomcat server is not getting start.
I have configured my tomcat home, and server.xml in eclipse properly. But I don't know what I am missing. please guide me.
It sounds like you don't have your port numbers defined and each tomcat instance is fighting to grab the port range first before the others.
Check your config file to make sure the port numbers are specified for each instance.
see how to change port in y=tomcat , may be you forgot to change some where
http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/
you can stop another tomcat service before you start your tomcat gets started , end process tomcatX(X is version) from task-manager

Can't run a Servlet with Tomcat because something is using the ports

I'm trying to write a Servlet in eclipse configured to use Tomcat 5.5 and I get the following error when I try to run it:
Several ports (8080, 8009) required by Tomcat v5.5 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s)
As far as I know, Tomcat 5.5 is the one using port 8080, and when I go to http://localhost:8080 I do get the Tomcat success page, so it looks like eclipse tries to run another instance of Tomcat without shutting down the original and fails. How do I solve this?
like it says, something is using the port.
there are two solutions for your problem.
identify (on windows with netstat command) what is using the port (e.g. skype, ...) and stop it
change the port of your tomcat runtime in eclipse -> http://techteam.wordpress.com/2009/02/13/changing-the-tomcat-port-settings-in-eclipse/
hope this helps