RE: How do I precompile JSP files for final Production use?

2001-01-23 Thread Ciot, Thierry

Yep, there is a way: transform your jsp into servlet using jspc (see my
previous reply)

here is the process I follow:

1) generate java files and web.xml:

e:\tomcat321\bin\jspc -uriroot e:\tomcat321\webapps\T1 -d
e:\tomcat321\webapps\T1\web-inf\classes -webxml
e:\tomcat321\webapps\T1\WEB-INF\web.xml -webapp e:\tomcat321\webapps\T1

2) compile java files

3) manually edit web.xml to replace all \ wih /

4) restart tomcat and delete all files in the work directory

5) test my app and check that no java and class files show up in the work
directory


-Original Message-
From: Hobson, Don [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 23, 2001 9:07 AM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'
Subject: RE: How do I precompile JSP files for final Production use?


Michael,
I don't want to install the JDK onto the server either. It is too big. When
I install my app I will install Tomcat to use http as the transport
mechanism.

Is there a way around having to install the JDK at all?

-Original Message-
From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 23, 2001 7:03 AM
To: '[EMAIL PROTECTED]'
Subject: RE: How do I precompile JSP files for final Production use?


> I don't want the files to be compiled at startup. I don't want them
> to ever have to be compiled once installed on the users machine.
> I want to compile them, package the .class files and ship my
> application.
>
> Has anyone tried this with success? I don't want to install the JDK on
> the users machine, as I assume I will have to. Just the JVM.

You wouldn't have to install the JDK(or the JVM for that matter, unless you
are running applets as well as servlets) on every users machine only the
server
that is running tomcat.  The way JSP works is it is a server side technology
(hence the Server in Java Server Pages).  The servlet, or jsp, is run
on the server and the HTML/XML/WML/... that is generated is then streamed
down to the user who made the request.  The compilation would only
occur at server startup not at client startup.  This would be relatively
transparent to all users(might cause a slight bubble of time at server
startup but it wouldn't be too significant and it would only be once).


---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

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

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

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




RE: How do I precompile JSP files for final Production use?

2001-01-23 Thread Michael Wentzel

> I don't want to install the JDK onto the server either. It is 
> too big. When
> I install my app I will install Tomcat to use http as the transport
> mechanism.
> 
> Is there a way around having to install the JDK at all?

The other option is to compile the jsp's somewhere else and copy over
the class files then set up a servlet mapping in your web.xml file.

I haven't delt with this directly but I recall a couple of posts a
while back in the list regarding this I believe try checking the
archive.



---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

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




RE: How do I precompile JSP files for final Production use?

2001-01-23 Thread Hobson, Don

Michael,
I don't want to install the JDK onto the server either. It is too big. When
I install my app I will install Tomcat to use http as the transport
mechanism.

Is there a way around having to install the JDK at all?

-Original Message-
From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 23, 2001 7:03 AM
To: '[EMAIL PROTECTED]'
Subject: RE: How do I precompile JSP files for final Production use?


> I don't want the files to be compiled at startup. I don't want them
> to ever have to be compiled once installed on the users machine.
> I want to compile them, package the .class files and ship my
> application.
>
> Has anyone tried this with success? I don't want to install the JDK on
> the users machine, as I assume I will have to. Just the JVM.

You wouldn't have to install the JDK(or the JVM for that matter, unless you
are running applets as well as servlets) on every users machine only the
server
that is running tomcat.  The way JSP works is it is a server side technology
(hence the Server in Java Server Pages).  The servlet, or jsp, is run
on the server and the HTML/XML/WML/... that is generated is then streamed
down to the user who made the request.  The compilation would only
occur at server startup not at client startup.  This would be relatively
transparent to all users(might cause a slight bubble of time at server
startup but it wouldn't be too significant and it would only be once).


---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

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

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




RE: How do I precompile JSP files for final Production use?

2001-01-23 Thread Michael Wentzel

> I don't want the files to be compiled at startup. I don't want them
> to ever have to be compiled once installed on the users machine.
> I want to compile them, package the .class files and ship my 
> application.
> 
> Has anyone tried this with success? I don't want to install the JDK on
> the users machine, as I assume I will have to. Just the JVM.

You wouldn't have to install the JDK(or the JVM for that matter, unless you
are running applets as well as servlets) on every users machine only the
server
that is running tomcat.  The way JSP works is it is a server side technology
(hence the Server in Java Server Pages).  The servlet, or jsp, is run
on the server and the HTML/XML/WML/... that is generated is then streamed
down to the user who made the request.  The compilation would only
occur at server startup not at client startup.  This would be relatively
transparent to all users(might cause a slight bubble of time at server
startup but it wouldn't be too significant and it would only be once).


---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

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




Re: How do I precompile JSP files for final Production use?

2001-01-22 Thread Nick Holloway

[EMAIL PROTECTED] (Ciot, Thierry) writes:
> o  You can't have a JSP page include a file one directory level up (that is
> page.jsp using <%@include file="../xxx.jsp"%>) See my post last Friday "jspc
> problem when including files (relative)" (no answer yet)

I didn't see your original message, but I have reported this particular
bug already.  It only affects platforms where the file seperator char
is not '/' (i.e. Windows).

http://znutar.cortexity.com/BugRatViewer/ShowReport/714

The underlying problem may also be the cause of:

> o  -webxml switch works but the  contains a \ instead of / (On
> Windows, I suppose there is no problem on unix)

> How does one go about reporting a bug (or bugs I should say :)?

The link "Bug Database" off the Jakarta homepage.

http://jakarta.apache.org/site/bugs.html

-- 
 `O O'  | [EMAIL PROTECTED]
// ^ \\ | http://www.pyrites.org.uk/

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




RE: How do I precompile JSP files for final Production use?

2001-01-22 Thread Ciot, Thierry

I am also trying to figure the same exact thing but have not resolved all
the issues.

First, here are the bugs I found:

o  -webapp switch did not work in 3.1 (ArrayOutOfBoundException).  It works
in 3.2.1 (did not try 3.2)
o  -webxml switch works but the  contains a \ instead of / (On
Windows, I suppose there is no problem on unix)
o  You can't have a JSP page include a file one directory level up (that is
page.jsp using <%@include file="../xxx.jsp"%>) See my post last Friday "jspc
problem when including files (relative)" (no answer yet)
o  When I try to use a combination of uriroot and uribase switches I get an
ArrayOutOfBoundException

I don't understand the usage of both uriroot and uribase switches.  could
someone explain?

How does one go about reporting a bug (or bugs I should say :)?

Other than that, here is the process I follow:

1) generate java files and web.xml:

e:\tomcat321\bin\jspc -uriroot e:\tomcat321\webapps\T1 -d
e:\tomcat321\webapps\T1\web-inf\classes -webxml
e:\tomcat321\webapps\T1\WEB-INF\web.xml -webapp e:\tomcat321\webapps\T1

2) compile java files

3) manually edit web.xml to replace all \ wih /

4) restart tomcat and delete all files in the work directory

5) test my app and check that no java and class files show up in the work
directory

Hope this helps you out.

Thierry


-Original Message-
From: Hobson, Don [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 12:12 PM
To: '[EMAIL PROTECTED]'
Subject: RE: How do I precompile JSP files for final Production use?


I don't want the files to be compiled at startup. I don't want them
to ever have to be compiled once installed on the users machine.
I want to compile them, package the .class files and ship my application.

Has anyone tried this with success? I don't want to install the JDK on
the users machine, as I assume I will have to. Just the JVM.

-Don

-Original Message-
From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 6:47 AM
To: '[EMAIL PROTECTED]'
Subject: RE: How do I precompile JSP files for final Production use?


Another way to do this is write a servlet that will make a
request to all jsp's in your webapp at startup.  This takes
care of the class name translations and such.

---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

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

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

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




RE: How do I precompile JSP files for final Production use?

2001-01-22 Thread Hobson, Don

I don't want the files to be compiled at startup. I don't want them
to ever have to be compiled once installed on the users machine.
I want to compile them, package the .class files and ship my application.

Has anyone tried this with success? I don't want to install the JDK on
the users machine, as I assume I will have to. Just the JVM.

-Don

-Original Message-
From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 22, 2001 6:47 AM
To: '[EMAIL PROTECTED]'
Subject: RE: How do I precompile JSP files for final Production use?


Another way to do this is write a servlet that will make a
request to all jsp's in your webapp at startup.  This takes
care of the class name translations and such.

---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

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

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




RE: How do I precompile JSP files for final Production use?

2001-01-22 Thread Michael Wentzel

Another way to do this is write a servlet that will make a
request to all jsp's in your webapp at startup.  This takes
care of the class name translations and such.

---
Michael Wentzel
Software Developer
http://www.aswethink.com">Software As We Think
mailto:[EMAIL PROTECTED]">Michael Wentzel

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