Re: Doesn't anyone manually compile JSPs?

cddigg011_at_aol.com
Date: 12/29/04


Date: 29 Dec 2004 07:02:04 -0800


Tomcat uses the /tomcat/bin/jspc.bat file to make java servlets out of
the JSPs. Run this program without parameters to view the help screen.
It's pretty simple and easy to use. You can set up another bat file
to call it with parameters. Make sure to include the param "-p
org.apache.jsp" to create all servlets in the standard tomcat package
(package org.apache.jsp;)

Once you have servlets, use the java compiler (javac) to compile the
whole directory of servlets. ie. javac *.java The classpath used by
the compiler must match the classpath set for Tomcat. You'll also have
to include in the classpath any of your custom packages that the
servlets import.

Be careful about file and directory permissions. The output of all
this has to be accessible to the user account that Tomcat runs under.

Duane Morse wrote:
> With the exception of JRun, I've not seen any references to manually
> compiling JSPs; everyone expects you
> to let the servlet container do the compiling. Why is that? It may
take a
> number of request-response
> iterations to get to the point where my JSP is invoked, and I really
don't
> want to spend all that time only
> to find out that the JSP won't even compile!
>
> JRun has a standalone JSP compiler, and I've gotten it to work for
JSPs that
> don't use tag libraries, but with
> tag libraries it never can find the .tld file, even when the uri
attribute
> in the taglib tag really and truly points
> to it (not that it's supposed to point to anything -- when used in a
servlet
> container, you map the uri to a
> real location in web.xml, but the standalone compiler doesn't seem to
use
> web.xml).
>
> Does anyone developing JSPs compile them outside of the servlet
container?
> Do your JSPs use tag libraries?
> If so, what tools are you using? TIA.



Relevant Pages

  • Re: Tomcat on OpenVMS - Is source code available?
    ... >>This problem has to do with how Tomcat is compiling JSPs when it ... > the compiler and whatever error message I received didn't tell me this. ... JSPs located in the ... root folder of the webapp are compiled w/o any problems. ...
    (comp.os.vms)
  • Re: When to use server.xml or web.xml to define my webapp...
    ... load my JSPs and/or other resources from ... one path, while getting the servlet classes and libs (ie, all of the ... I'm using IntelliJ IDEA to develop some servlets and JSP's, ... Although IDEA claims to be able to launch a private version of Tomcat ...
    (comp.lang.java.programmer)
  • Application base URL
    ... I have a web/module (aka web application) deployed on tomcat. ... so, whatever is related to myApp and accessible via http (JSPs, ... servlets, static pages), is available at ...
    (comp.lang.java.help)
  • Re: free web host for jsp testing
    ... I have some jsp which call my servlets. ... I used tomcat on my desk top ... John ... I developed some jsps and they worked fine on my local machine. ...
    (comp.lang.java)
  • Re: put application on server ??!!!!
    ... >>make my application into a bean? ... > separate those two pieces into separate code bases with published APIs ... Have forms submit to servlets. ... Have servlets forward to JSPs to format output. ...
    (comp.lang.java.programmer)