473,770 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Serve static files with Apache from a .WAR file deployed in JBoss?

I have setup Apache 2.0.50 and JBoss 3.2.5 using mod_jk2.

My application is defined to operate in the root context
(http://servername/) by creating a WEB-INF/jboss-web.xml

I am serving static files (with apache) from a directory off the file
system, by setting the DirectoryRoot variable in httpd.conf. JBoss is
working off a .WAR built from this directory.

Is there any way to reference the unarchived files from Apache?
Currently, they are going to
c:\jboss-3.2.5\server\de fault\tmp\deplo y\tmp17751xxx.w ar. I believe
that the directory name is dynamic, so I can't depend on it.

I guess what I'm asking is how to configure JBoss to deploy wars to a
known location? I'd rather not have to manually unarchive the .WAR
file into a deploy/filename.war/ directory (which I believe I read
about in the FAQ?)

Any help would be greatly appreciated.

Thanks,
Josh
Jul 17 '05 #1
1 7610
Joshua McCulloch wrote:
I have setup Apache 2.0.50 and JBoss 3.2.5 using mod_jk2.

My application is defined to operate in the root context
(http://servername/) by creating a WEB-INF/jboss-web.xml

I am serving static files (with apache) from a directory off the file
system, by setting the DirectoryRoot variable in httpd.conf. JBoss is
working off a .WAR built from this directory.

Is there any way to reference the unarchived files from Apache?
Currently, they are going to
c:\jboss-3.2.5\server\de fault\tmp\deplo y\tmp17751xxx.w ar. I believe
that the directory name is dynamic, so I can't depend on it.

I guess what I'm asking is how to configure JBoss to deploy wars to a
known location? I'd rather not have to manually unarchive the .WAR
file into a deploy/filename.war/ directory (which I believe I read
about in the FAQ?)

Any help would be greatly appreciated.


Josh,

I suspect that you are not telling us what you really want to
accomplish. Why don't you try that?

If you are asking how to make links from your static HTML pages to
content in your WAR, that is not difficult. You have to think like the
web browser. For example, suppose your static stuff is located in
http://www.blah.com/static and you have Apache and JBoss configured so
that your WAR is mapped to http://www.blah.com/app. Then you can link
from say http://www.blah.com/static/index.html with href="../app/index.jsp".

HTH,
Ray
--
XML is the programmer's duct tape.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1645
by: Jaap de Bergen | last post by:
Hello people, I'm optimizing my script because my server is under heavy load in the evening. I have a question which methode is more efficient for my server: ================== //connection with database is already open because other queries where executed first.
2
14169
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip Smarty-2.6.7.tar.gz on a system running WindowsXP SP2. Apache and PHP tested out fine. After adding Smarty, I ran the following http://localhost/testphp.php
5
1393
by: Mike D | last post by:
I have a site that will be displaying static files to clients. Each client will have their owb directory locked down through NTFS permissions. Currently I have a Client folder in the wwwroot then that client folder has a folder for static files in it. How much more secure would it be if I moved it out of the wwwroot and used a virtual directory? Thanks Mike
11
8776
by: Mark J. McGinty | last post by:
Greets, One site I've written allows the user to install an IE extension menu (not malware at all) by downloading/merging a short .REG file. Worked like a peach on Win2K Server, now that I upgraded to Server 2003, it returns a 404 file not found error. I'm positive the file is there/spelled right. I changed it to .txt and it displays the text in the user's browser. So there's little question that this is some "security" addition, to...
4
1344
by: feng | last post by:
Hi, I need to implement a function, GetAllFiles, of a web service that once called, returns all the files in a folder to the caller. My question is: what is the best way to implement this function? If it is just one file, I can use FileSteam's OpenRead and return a Byte array to the caller. But in my case I need to transfer multiple files and I don't think calling the function mutiple times in a loop is very efficient. What
1
1123
by: anon2005 | last post by:
Just wondering ... according to http://msdn2.microsoft.com/en-us/library/e22s60h9.aspx, static files (images, .html, etc) during deployment are supposed to be copied "as is" to the target deployment folder. I read this to be an automatic process done by the tool. In my VS2005 web app, no static files are being copied. Not a huge deal ... I can just copy the images folder, the styles folder, etc., when necessary (which is rarely since...
22
4009
by: petermichaux | last post by:
Hi, I'm curious about server load and download time if I use one big javascript file or break it into several smaller ones. Which is better? (Please think of this as the first time the scripts are downloaded so that browser caching is out of the equation.) Thanks, Peter
0
3528
by: amansura | last post by:
I have a web site deployed on IIS. It is a simple static site for test purposes with only one html page and a javascript file. HTML page code: <html> <head></head> <script language="javascript" src="jsFile.js"></script> <body onload="onBodyLoad()"> </body>
9
3244
by: Tool69 | last post by:
Hi, Until now, I was running my own static site with Python, but I'm in need of dynamism. After reading some cgi tutorials, I saw Joe Gregorio's old article "Why so many Python web frameworks?" about wsgi apps and have a question about it. The code he gave works like a charm (I had to make a little change because SQLAlchemy has changed since), but how the hell can I serve static files (css, js, images, etc.) within an wsgi
0
9439
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10071
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8905
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6690
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5326
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.