ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rashmi Rubdi <dev_subscripti...@yahoo.com>
Subject Re: How to compile jsp files with ANT
Date Wed, 21 Feb 2007 17:35:17 GMT
I normally pre-compile the JSPs in the development environment,
package *only the class files* [Excluding the JSPs and the JSP Java files generated by Jasper]
into a WAR and then upload the WAR to production.

As James originally mentioned, I think if I ran HttpUnit directlly once on production , it
would generate the class files
the first time using the container that's installed on the Production environment, thus by
running HttpUnit or something similar (Apache Cactus)
accorss each environment (dev, staging, QA, prod) , the Ant build file would be independent
of the Web Container used on each environment
(if a different web container was used on each environment).

But, the above would require that the JSP files be uploaded to each environment.

And, also if I were to run HttpUnit on a production environment, it would have to be done
during off-peak hours when not many visitors are on the site.

So the final conclusion I think is if current web container compatibility or future web container
compatibility is not an issue for a project, and if it's a high traffic website
then go with the Jasper task otherwise perform HttpUnit or the equivalent of it, if compatibility
is of concern.

-Rashmi

----- Original Message ----
From: Rashmi Rubdi <dev_subscriptions@yahoo.com>
To: Ant Users List <user@ant.apache.org>
Sent: Wednesday, February 21, 2007 12:09:36 PM
Subject: Re: How to compile jsp files with ANT


> With an httpunit run straight after deployment, you can hit every single 
> JSP page in turn -on the production machine-. This gets the preload hit 
> out the way, and helps test the live system is working.

Ah ok, now I get it. Sorry my brain is a little slow.

I guess this process would also generate the JSP class files and then, when I package the
WAR I would just 
package the class files and thus skip the Jasper step. 

But, I don't think running HttpUnit instead of Jasper would solve the compatibility issue
(sorry if I'm wrong here, it's just a guess) , however since HttpUnit also serves to test
the overall application in addition to generating a list of compiled classes so I guess it's
better than using Jasper alone.

I have the "Java Development with Ant - Manning" book but I got it a long time ago, it covers
the basics - I'm in the middle of chapter 4 of the book, and it's been written very well.
I was able to understand the basics of Ant and write a build script all by myself, I'll take
a look at "Ant in Action" soon.

Thanks for explaining the details.

-Regards
Rashmi


----- Original Message ----
From: Steve Loughran <stevel@apache.org>
To: Ant Users List <user@ant.apache.org>
Sent: Wednesday, February 21, 2007 10:53:27 AM
Subject: Re: How to compile jsp files with ANT


Rashmi Rubdi wrote:
> I've used JUnit before, I do want to learn HttpUnit (among so many other things that
I need to learn :-) But thanks for providing the details, they're helpful.

Ant in Action has a special section on HttpUnit, before I get into 
Apache Cactus, which is the serious server-side test tool :)

> 
> I've worked on a few eXtreme Programming projects, and recognize the importance of test-first-design.
> 
> The main reason for using Jasper was not to verify the that the JSPs would compile but
was only to reduce
> the page load time for the customers/visitors and since we used the same version of Tomcat
accross all stages
> of development compatibility wasn't a smaller issue for that team.

HttpUnit is a functional test tool; its no so test first when you have 
to have the JSP page up on the site...its not like junit tests where 
your API itself is getting hit.

With an httpunit run straight after deployment, you can hit every single 
JSP page in turn -on the production machine-. This gets the preload hit 
out the way, and helps test the live system is working.

-steve



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



____________________________________________________________________________________
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail

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


 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

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


Mime
View raw message