Reputation: 4543
I'm trying to use Intellij IDEA Ultimate
for developing static (no dynamic pages - plain HTML + javascript) web site. Currently I'm using Tomcat
as a local server and tomcat
plugin for IDEA
. Actually, the site later will have RESTful layer, which will be deployed to google-app-engine
, but currently I'd like to fully focus on the client-side.
I have the following project directory structure:
--+ src
|--+ main
| |--+ webapp
| | |--+ js
| | |--+ css
| | |--+ html
| | |--- index.html
My main requirement for such development - is to immediately see the changes I make in html/js/css without the need for rebuilding the project. For this purpose believe I need to configure somehow the run configuration for tomcat
being looking directly into webapp
directory (and not exploded war directory). Is there such way? I'm fully open for other options for local server rather than Tomcat
, which might be simpler for this purpose and which can run in Windows
Upvotes: 1
Views: 1512
Reputation: 16140
Just put your content in a directory somewhere under your project and point a browser at the index page on the filesystem. Every time you change something in Idea, refresh the page -- it'll work. You don't need a server at all for any of that
Upvotes: 3
Reputation: 340230
CATALINA_BASE
Catalina is the part of Tomcat that provides web server ability.
By default, Catalina looks to Tomcat's own "webapps" folder for the content of the web sites it serves. You can easily override that default. You can specify a "Tomcat base" setting where you specify a particular folder. Search for CATALINA_BASE
to learn more.
Upvotes: 1
Reputation: 133
You're currently using an application server where it sounds like you just need a web server.
You can easily set up a basic web server that will serve up your HTML and JavaScript files. A great option, if you have Python installed, is SimpleHTTPServer.
Upvotes: -1