DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Evolution of Recommendation Systems: From Legacy Rules Engines to Machine Learning
  • Okta + SAML + JBoss EAP 6.4.x + Picketlink

Trending

  • Ensuring Configuration Consistency Across Global Data Centers
  • AI-Driven Test Automation Techniques for Multimodal Systems
  • Building an AI/ML Data Lake With Apache Iceberg
  • Is Agile Right for Every Project? When To Use It and When To Avoid It
  1. DZone
  2. Coding
  3. Java
  4. Deploying Static Content on JBoss Server

Deploying Static Content on JBoss Server

Learn how to deploy static content on a JBoss server.

By 
Ravi Isnab user avatar
Ravi Isnab
·
Dec. 31, 14 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
25.9K Views

Join the DZone community and get the full member experience.

Join For Free

Recently, I had a question from a commenter on my blog post on installing ELK stack on Ubuntu/Debian. The question was how to serve kibana 3 via a server like jboss. Kibana 3 is essentially (more or less) static content. It serves html and content changes based on it's querying elasticsearch via javascript. I couldn't find any blog with all the instructions in one page for serving static content via Jboss. So here it is:

These instructions are for JBoss Application Server 7:

Install JBoss

If you already have JBoss installed then you can skip this step.

Download and extract JBoss:

cd /tmp  
wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz
tar -xvf jboss-as-7.1.1.Final.tar.gz

Move extracted JBoss to /usr/local/share


mv /tmp/jboss-as-7.1.1.Final /usr/local/share/jboss-7.1.1  
Deploying static content to JBoss:


  • Create a directory called yourwebapp.war inside/usr/local/share/jboss/standalone/deployments
  • Create a file name yourwebapp.war.dodeploy in/usr/local/share/jboss/standalone/deployments
  • Create a directory WEB-INF inside yourwebapp.war
  • Create a file web.xml with contents shown below
<?xml version="1.0" encoding="ISO-8859-1" ?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
</web-app>
  • Start JBoss
  • Browse to your server's ipaddress:8080/yourwebapp
An example of deploying static content to JBoss:

I am demonstrating static content deployment to JBoss with kibana 3 content.

cd /usr/local/share/jboss-7.1.1/standalone/deployments/  
sudo mkdir -p kibana.war/WEB-INF  
sudo cp -r /tmp/kibana-3.1.2/* kibana.war  
sudo touch kibana.war.dodeploy  

Create web.xml with contents shown below: vi kibana.war/WEB-INF/web.xml


<?xml version="1.0" encoding="ISO-8859-1" ?>

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
</web-app>  

Start JBoss:


cd /usr/local/share/jboss  
./bin/standalone.sh -Djboss.bind.address=192.168.1.8 -Djboss.bind.address.management=192.168.1.8

Browse to: http://192.168.1.8:8080/kibana

Please replace 192.168.1.8 with your server's ip address



JBoss

Published at DZone with permission of Ravi Isnab, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Evolution of Recommendation Systems: From Legacy Rules Engines to Machine Learning
  • Okta + SAML + JBoss EAP 6.4.x + Picketlink

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!