aspose file tools*
The moose likes JBoss/WildFly and the fly likes Default Port 80 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Default Port 80" Watch "Default Port 80" New topic
Author

Default Port 80

Kenny Chia
Greenhorn

Joined: Feb 25, 2004
Posts: 2
Hello Friends,
i'm having one query,can anyone help me out?
Look normally Jboss(jboss 3.0.6+Tomcat 4.1.18)starts at http://<host>:8080/..This is suited for development environment.Now my production environments asks for port 80 and not 8080
How to configure Jboss to run at port 80.
l'm running on Redhat Linux 9.0
Which is the file l need to edit and after than can my application running??
Thanks in anticipation
Kenny Chia
Technical Support
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

server\default\deploy\jbossweb-tomcat41.sar\META-INF\jboss-service.xml


Groovy
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
Look for jboss-service.xml file in JBOSS_HOME\server\default\deploy\jbossweb.sar\META_INF directory
You will find a entry something like this

Change port="8080" to port="80".


Mani
Quaerendo Invenietis
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Is it possible to start and stop a deployed web application in JBOSS app server?
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
Sure. Go into the jmx-console (hit /jmx-console on your box). Find the MBean for whatever context your webapp is deployed under. The exact name will depend on what version of JBoss you have and what web container you are using, but for "MyApp" you should see something like: JBossWebApplicationContext=3,Jetty=0,context=/MyApp. Click on the MBean and invoke the stop() method. Your webapp should be stopped.
(or you could also undeploy it by deleting your WAR file from the deploy directory)
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Thanks again Norman!
Can I stop the web app programmatically, writing some script. If yes, how do I do it?
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
Yes, you can access all the MBeans remotely. I think I have some code samples at work. I've also used JMX4Ant to access MBeans on JBoss. It's limited, but it can definitely invoke the stop/start methods for you.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Norman,
If I stop a web application and then restart the server, I understand that the previously stopped web application will start receiving requests after the server restart. Is there any way that I make the stopped web application from receiving request after the server restarts. I do not want to undeploy the application.
Thanks Norman for all your help.
Kenny Chia
Greenhorn

Joined: Feb 25, 2004
Posts: 2
Thank You.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Originally posted by norman richards:
Sure. Go into the jmx-console (hit /jmx-console on your box). Find the MBean for whatever context your webapp is deployed under. The exact name will depend on what version of JBoss you have and what web container you are using, but for "MyApp" you should see something like: JBossWebApplicationContext=3,Jetty=0,context=/MyApp. Click on the MBean and invoke the stop() method. Your webapp should be stopped.
(or you could also undeploy it by deleting your WAR file from the deploy directory)


Norman,
For my webapplication testapp.war I found the following entries in the console
J2EEApplication=null,J2EEServer=Local,WebModule=testapp.war,j2eeType=Servlet,name=default
J2EEApplication=null,J2EEServer=Local,WebModule=testapp.war,j2eeType=Servlet,name=invoker
J2EEApplication=null,J2EEServer=Local,WebModule=testapp.war,j2eeType=Servlet,name=jsp
J2EEApplication=null,J2EEServer=Local,j2eeType=WebModule,name=testapp.war

I tried invoking stop on each of the above Mbean but the web application was able to receive the request(the JSP page in application was served)
Can you tell me where lies the problem?
Thanks
Pradeep
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Default Port 80