How to use HTTP server and application server in Java web application

I have a question about a deployment model for a Java EE web application. We are currently deploying our web application as a WAR file in Tomcat 6. All content is packaged in a WAR file, including static content such as images, static html pages, etc. But I want to deploy this static content on an HTTP server and use the application server only to receive dynamic content. How do I share these things? Has anyone done something like that and has a good deployment model for my scenario. Help will be appreciated.

Is it good to make 2 WAR files one with static content only and deploy this WAR on the HTTP server, and the rest as another WAR file and deploy it on the application server? But this approach will affect all the pages that are currently linked to by static content and require code changes, which is very cumbersome, since our project is "Huge" and the code is very large.

Any strategy and ideas are welcome.

+5
source share
3 answers

This may be interesting to do for performance reasons.

/ . /WAR// . , WAR .

WAR .


Edit

HTTP- . Apache Linux, .

<VirtualHost *:80>
  # This first-listed virtual host is also the default for *:80
  ServerName www.example.com
  DocumentRoot /www/domain
</VirtualHost>

, 80, IP- www.example.com. /www/domain.

.

+1

WAR HTTP. A WAR - Java, (, Tomcat). , -. , -, :

WAR JSP, Java, Java, HTML .. -.

, .

, , ​​ , , , .

0

4 Tomcat . - ( 2002 ...). Tomcat , , .

, , .

0

All Articles