By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,649 Members | 2,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,649 IT Pros & Developers. It's quick & easy.

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

P: n/a
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\default\tmp\deploy\tmp17751xxx.war. 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
Share this Question
Share on Google+
1 Reply


P: n/a
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\default\tmp\deploy\tmp17751xxx.war. 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 discussion thread is closed

Replies have been disabled for this discussion.