Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm beginning Javascript development and as a beginner in JavaScript I make a lot of mistakes. The way I'm developing is very counter-productive because every mistake I fix I have to shutdown Glassfish, re-build the app and re-deploy it. My app is a Java back-end with REST services and the Html, JavaScript, CSS for the frontend. Everything is packed in a .ear file. As of right now, I'm just working with the frontend but I do have to make this whole process to update the files.

My question is ... is there a better way of doing this? Can somebody tell how do you guys work in a similar setup to do the everyday development?

share|improve this question
hi, I might be wrong or misunderstood your question, but if this is about a process related to Netbeans maybe stack overflow is more appropriated? (according to FAQ: programming tools (ask on Stack Overflow instead)). Not sure.. – Oeufcoque Penteano Apr 8 '12 at 5:28
@OeufcoquePenteano I am okay with this question. It believe the question is more about process than tools, or both. It already has 3 close votes. I will let the community or another moderator decide whether to leave it open or not. – maple_shaft Apr 8 '12 at 13:41
Sorry, but I thought this question would fit under "development methodologies" from the FAQ section "What kind of question can I ask here?" I just wanted some advice regarding easier editing in a Java EE environment not Netbeans speficifically, but please let me know if I should move this to Stack Exchange instead. Thanks – marcelocbf Apr 8 '12 at 13:58
@maple_shaft Got it, thanks for the feedback will help improve my flags :) Glad you got it answered despite my confusion and close votes! – Oeufcoque Penteano Apr 8 '12 at 15:01
up vote 1 down vote accepted

I do a couple of things that greatly increase my efficiency when debugging with javascript, HTML or CSS. One such method that I use is to separate all static web content into the root context of my web app such that it can be served by an Apache front-end. Using the mod_jk module of Apache allows this web server to link to a Java application server that serves the dynamic content on the webapp context.

The benefit this gives is that I can make a change in my IDE and run a simple shell script that copies the static web content to the root context of my web server allowing me to instantly see the results without having to compile or package a deployment file.

Another helpful tip would be to look into the Firebug tool for Firefox. It allows you to debug Javascript, inspect DOM elements, modify HTML, modify styles and also stylesheets on whatever page is currently being viewed in Firefox. It is an invaluable debug and prototype tool that will save you a lot of time. It is well worth learning how to use.

share|improve this answer
Nice one. Moving the static content to the root context makes sense because it is gonna be served from the same domain and can be edited without redeploying. I'm using firebug already, it helps a lot. Thanks again for shedding some light here ... – marcelocbf Apr 8 '12 at 14:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.