Hi,
when I run jspc from command line

${tomcat_home}/bin/jspc.sh -s -l -uriroot
${tomcat_home}/webapps/myapp -d ${tomcat_home}/work

it generates .class files according to hierarchy* of
JSP files and that what I expected.

When I run this And task

<target name="jspc" depends="compile">
  <jspc srcdir="${myapp}"
    destdir="${work}"
    compiler="jasper41"
    verbose="1">
    <include name="**/*.jsp" />
  </jspc>
</target>

it generates .java files - and all files in the 'work'
directory, JSP hierarchy is missed.

Could you advice how to use Ant task for better
results. I consulted Ant doc, but still have the
question..

Thanks
Evgeny



--- Peter Guyatt <[EMAIL PROTECTED]>
wrote:
> Hi There,
> 
>       The memory leak was in JDK1.4.1 and was to do with
> Strings and StringBuffer
> sharing memory for performance.
> 
> Use JDK1.4.2 to ensure that this problem does not
> happen.
> 
> Pete
> 
> -----Original Message-----
> From: Nick Curry
> [mailto:[EMAIL PROTECTED]
> Sent: 25 June 2004 11:08
> To: Tomcat Users List
> Subject: RE: jspc
> 
> 
> I seem to remember something about a known memory
> leak in javac 1.4 (not
> sure which version), which might affect you if you
> use javac and have many
> JSPs to compile - so that might be another argument
> for precompiling your
> jsps...
> 
> Nick
> 
> 
> -----Original Message-----
> From: Michiel Toneman
> [mailto:[EMAIL PROTECTED]
> Sent: 25 June 2004 10:29
> To: Tomcat Users List
> Subject: Re: jspc
> 
> 
> 
> A good reason to precompile your JSP files is to
> make sure you don't
> accidentally have broken JSP files on production.
> You then know *before*
> deployment if any changes to your JSP files or the
> java classes they
> belong to cause breakage.
> 
> Michiel
> 
> 
> Paul Wallace wrote:
> 
> >Hi,
> >     Yes..that is what I thought, but I learned from a
> 'reliable'
> >source I could accomplish this on saving overhead.
> So rather than
> >looking into the whys and whats, I looked into how
> to do it, and look
> >into the performance benefits later. I will provide
> the list with my
> >sources reasoning, when it becomes available!
> >     A thought..and to answer a question with a
> question (Why would
> >you precompile jsp files?), why is jspc there? If
> only to increase
> >performance on the first hit?
> >
> >Thanks
> >
> >Paul.
> >
> >It will increase speed on the first viewing of the
> jsp, but after that I
> >
> >can't see how there will be any difference.  How
> much memory can you
> >save
> >if any?  And how would that work?
> >
> >Thanks
> >
> >On Fri, 25 Jun 2004 11:12:44 +1000, Paul Wallace
> <[EMAIL PROTECTED]>
> >wrote:
> >
> >
> >
> >>In an effort to increase speed/free up memory that
> otherwise might be
> >>consumed by Tomcat otherwise
> >>
> >>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.
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> --
> Michiel Toneman  Software Engineer   Bibit Global
> Payment Services
> Regulierenring 10  3981 LB  Bunnik      
> [EMAIL PROTECTED]
> Tel. +31-30-6595168  Fax +31-30-6564464     
> http://www.bibit.com/
> 
> 
>
---------------------------------------------------------------------
> 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]
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



                
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

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

Reply via email to