Why would you precompile jsp files?

On Fri, 25 Jun 2004 09:32:38 +1000, Paul Wallace <[EMAIL PROTECTED]> wrote:

(sorry, wrong key!)

Hi Jason,
        Thanks for that. Yes, it does make sense. A couple of things
though, I just ran it with -compile - great. But my query about the work
directory and was more towards what I am being 'encouraged' to do from
the powers that be. I.e not WAR the app., but put it in the work
directory. Is this ill-advised/poor practice?
        To accomplish this, is it as simple as dragging the compiled
source under my work directory, and modifying my web.xml as advised?
        Why does -compile work, but not appear in the usage?!
        Also, can I specify a path for the compilation, rather than the
classes be placed in the same dirs as the source? (I tried adding a path
after the -compile switch, but it constructed and compiled a file with
the same name as the class directory destination).

Do I make sense?!

Paul.

Paul,

I just use the -compile option and have jspc do the
compilation from .java to .class for me.  It seems to
work fairly well.  Once all the fully compiled (ie
.class) files are placed in you applications
WEB-INF/classes directory you just need to place the
generated web.xml file in WEB-INF.  There is an option
to create a complete web.xml file that you can place
in WEB-INF or, if you already have a web.xml file you
want to keep, you can have jspc create an xml fragment
that just contains the servlet definitions and
mappings that you then add (in the appropriate place)
to your existing web.xml.  Then just war up you
application directory in the normal way (you can even
delete the jsps once your certain the servlet mappings
are working).
   If you try to put the generated files in your
working directory you won't be able to war them up and
deploy them in the normal "put war file under webapps
directory and tomcat will expand it when it starts"
way.  You'd have to ship a complete tomcat directory
structure with the work directory already filled in
with your compiled jsps.  Does that make sense?

Jason

--- Paul Wallace <[EMAIL PROTECTED]> wrote:
Hello,
    I have compiled my JSPs thus:

jspc -webapp C:\src\site -d C:\src\site\classes -s
-l -uriroot
C:\src\site

this builds the Java source files to the specified
location, but how
might I deploy them?

What is a typical deployment after a JSP
compilation? Compilation of
Java source files, then WAR/JAR? Can I not define
the JSP compile to go
under my work directory?

The purpose of my efforts is to try and speed up /
make TC less memory
consumptive.

cheers

Paul.






__________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--
They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.
-- Benjamin Franklin (1755)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to