This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Deploying MyApp as default application on JBoss server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Deploying MyApp as default application on JBoss server" Watch "Deploying MyApp as default application on JBoss server" New topic
Author

Deploying MyApp as default application on JBoss server

Tushar J Kandalgaonkar
Greenhorn

Joined: Mar 11, 2011
Posts: 3
Hi,
I've created a web application and it runs on JBoss 5.1.0.GA using the following url:

http://mok.services.com:8080/MySearch/SearchTopic

I have to confiigure this so that web application can be access like

http://www.mysearch.com

this application should come up by default (That means, we should get rid of /MySearch/SearchTopic
and also the port number. I already have an IP address that maps to www.mysearch.com
.
Thanks in advance

Tushar
anandraj tadkal
Ranch Hand

Joined: Feb 22, 2011
Posts: 98

Hi,

This can be achieved by doing two things.
1. Modifying the default application context root.
2: Modifying the default Jboss Web Server port which is port 8080.

For more detailed information, refer the below post.
Changing JBoss Default Application

Regards,
Anandraj
http://weblogic-wonders.com/



Regards,
Anandraj
http://weblogic-wonders.com
Follow us on facebook:
https://www.facebook.com/weblogicwonders
Tushar J Kandalgaonkar
Greenhorn

Joined: Mar 11, 2011
Posts: 3
Thanks anandraj


I'm able to deploy our application as default application now. As we are deploying our application as EAR file

I change the context path in application.xml as <context-root>/</context-root> and also updated the URL pattern in application web.xml to <url-pattern>/</url-pattern> from <url-pattern>/SearchTopic <url-pattern>

Now the issue we are facing

#1 On the Target server one application( deploy on different application server) is already
listening on port 80, so now requirment is that we have to configure our application on 8080 and it should be access with out specifying the port number in the URL like

http://www.mysearch.com


#2 When application is set as deafult application it not able to find the image from image folder

The directory struture is like this

-WebContent
| - images
| - WebInf

access the image using code

"<img src=\"" + request.getContextPath() + "images/my-image.jpg\" />"


The value of ContextPath is coming as blanks and no image is display

Thanks
Tushar

anandraj tadkal
Ranch Hand

Joined: Feb 22, 2011
Posts: 98

Hi Tushar,

1:

You cannot bind two services for a same port for an IP address, however you can try configuring a Network Interface Card (NIC) where you can have two different IP addresses for the same machine.

If you want to bind to a specific network interface card (NIC), use
-bind_addr <IP-Address>, where <IP-Address> is the IP address of the NIC to which you want to bind. Use this parameter in both the sender and the receiver.

2:
The request.getContextPath() would return ''" empty if the default context root is '/' according to the J2EE specs as the container does not decode this string.

Cheers,
Anandraj
http://weblogic-wonders.com
Tushar J Kandalgaonkar
Greenhorn

Joined: Mar 11, 2011
Posts: 3
Thanks anandraj

It help us in resovle the issue.

Thanks
Tushar
anandraj tadkal
Ranch Hand

Joined: Feb 22, 2011
Posts: 98

Great to hear that one Tushar.

Cheers,
Anandraj
http://weblogic-wonders.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deploying MyApp as default application on JBoss server
 
Similar Threads
Disable JBoss Management
Error in configuration/accessing JBoss datasource jdbc not bound
Deploye Enterprise application in Server
error while invoking jndi list in jmx - console
HTTP Status 404