You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ha...@informatiefabriek.nl on 2003/10/07 16:15:53 UTC

how to keep developing time as short a possible?

Hi all,

I'm a J2EE developer. I have made a few projects using Struts. And I have 
to say I like the Struts framework very much. 
I'm using XDoclet to generate struts-config.xml (to speed up development).

The only thing I'm not happy about is the following:

1. I change something in my JSP.
2. Run Ant (create a war and ear).
3. Deploy the ear - file.
4. See the results in the browser. (JSP has to get compiled).

Unfortunatly these four steps take at least (in my case) 3 minutes for 
each run. 

Is there some way to check my JSP before compiling it? Or some other way 
to keep the time as short as possible?

Many thanks,

Harm de Laat
Informatiefabriek
The Netherlands




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: how to keep developing time as short a possible?

Posted by Max Cooper <ma...@maxcooper.com>.
IntelliJ IDEA is capable "checking" your JSPs at the end of a build. It
takes a long time, though, which I suspect means that it is compiling them
all to .java and then to .class files. I don't know if it is possible to use
these compiled versions or not, but it can be useful as a check. It does not
appear to be possible to compile one JSP at a time, but the editor is
constantly checking the JSP code for you in the background, so I am not sure
if a separate compile step would have any value. The editor will check for
imports, undeclared variables, taglib usage, etc. It even seems to
understand if you declare a variable with <bean:define
id="myNewLocalVariable"/>, for instance. Good stuff.

I recommend setting up your build so that you can deploy an "expanded"
version of your app (ear or war) during development. We used to have a /web
directory that we both stored all our JSPs in and used as an output
directory for .class files (under WEB-INF/classes). We used to deploy the
app (a .war, but expanded) from that directory. That would allow you to edit
a JSP and just reload the page in the browser to see the changes.

But that limits some of the things you can do in a build (static templating,
trimming the fat from JSPs, etc.), and co-mingles source and build output
files to some extent (which complicates the 'clean' target). Now we have ant
copy our /web directory to the build output directory (specifically
'/build/web' for our project). Now we deploy the app from the build output
directory for development work (and build the packaged version from the
directory later in the build, if you run the 'dist' target). Ant is very
fast about copying (only copies changed files, and even seems to be darn
fast on a clean build), and as long as you separate out the target that
copies the files, you can run it individually when you change a JSP ('ant
copy-web' or something like that). Running the copy-web target on my project
takes about 2-4 seconds if you only changed a file or two.

-Max

----- Original Message ----- 
From: <ha...@informatiefabriek.nl>
To: <st...@jakarta.apache.org>
Sent: Tuesday, October 07, 2003 7:15 AM
Subject: how to keep developing time as short a possible?


> Hi all,
>
> I'm a J2EE developer. I have made a few projects using Struts. And I have
> to say I like the Struts framework very much.
> I'm using XDoclet to generate struts-config.xml (to speed up development).
>
> The only thing I'm not happy about is the following:
>
> 1. I change something in my JSP.
> 2. Run Ant (create a war and ear).
> 3. Deploy the ear - file.
> 4. See the results in the browser. (JSP has to get compiled).
>
> Unfortunatly these four steps take at least (in my case) 3 minutes for
> each run.
>
> Is there some way to check my JSP before compiling it? Or some other way
> to keep the time as short as possible?
>
> Many thanks,
>
> Harm de Laat
> Informatiefabriek
> The Netherlands
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: how to keep developing time as short a possible?

Posted by Vic Cekvenich <ce...@baseBeans.com>.
I think I have a good practice:

Point Resin (or container) to your project where IDE is:
<web-app id='/' document-directory='\jasic\bPproj\bP' >

Cany changes to Java or JSP, you do not need to restart resin.
(changes to xml files, you do).

I also recomend dual mointors, resin console and browser on right; 
Eclipse front and center.
As soon as I save an action java  file, for example, I can go to left 
monitor w/mouse, browse the action, and new debnug messages display in 
resin console.

Eclipse detects a change, and creates a class file. Resin detects the 
change, and reloads the new class.


hth,
.V

harm@informatiefabriek.nl wrote:

> Hi all,
> 
> I'm a J2EE developer. I have made a few projects using Struts. And I have 
> to say I like the Struts framework very much. 
> I'm using XDoclet to generate struts-config.xml (to speed up development).
> 
> The only thing I'm not happy about is the following:
> 
> 1. I change something in my JSP.
> 2. Run Ant (create a war and ear).
> 3. Deploy the ear - file.
> 4. See the results in the browser. (JSP has to get compiled).
> 
> Unfortunatly these four steps take at least (in my case) 3 minutes for 
> each run. 
> 
> Is there some way to check my JSP before compiling it? Or some other way 
> to keep the time as short as possible?
> 
> Many thanks,
> 
> Harm de Laat
> Informatiefabriek
> The Netherlands



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: how to keep developing time as short a possible?

Posted by Mike Kienenberger <mk...@alaska.net>.
harm@informatiefabriek.nl wrote:
> I'm a J2EE developer. I have made a few projects using Struts. And I have 
> to say I like the Struts framework very much. 
> I'm using XDoclet to generate struts-config.xml (to speed up development).
> 
> The only thing I'm not happy about is the following:
> 
> 1. I change something in my JSP.
> 2. Run Ant (create a war and ear).
> 3. Deploy the ear - file.
> 4. See the results in the browser. (JSP has to get compiled).
> 
> Unfortunatly these four steps take at least (in my case) 3 minutes for 
> each run. 
> 
> Is there some way to check my JSP before compiling it? Or some other way 
> to keep the time as short as possible?

I use Eclipse + Tomcat + the Sysdeo Eclipse Tomcat Launcher plugin and just 
run it directly in the IDE, effectively skipping steps 2 and 3.

http://www.sysdeo.com/eclipse/tomcatPlugin.html

I've since switched over from JSP to Velocity, but I don't remember even 
needing to restart the tomcat instance or having to recompile to change jsp 
code.  I know that I don't need to do anything for Velocity pages other than 
edit the vm file and reload the page in the browser.  Works as good as 
WebObjects in that respect :)


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org