Jackie,
No, you don't have to stop/start JRUN server every time you make a change to
a JSP, but you do every time you make a change to a Java class object. If
you go back and re-read my previous email, you will see that is exactly what
I said. Again, when you save your JSP after making your changes, the JRUN
compiler checks the date of the JSP file against the date of the compiled
JSP file in the server subdirectory under JRUN. If the dates do not match,
it will recompile the JSP page. On occasion, I have made very minor changes
to a JSP and NOT had the compiler recompile my JSP code. In those cases, I
just go the server subdirectory and delete ALL the compiled servlet code,
and allow JRUN to recompile my JSP's every time I touch them again, or I
stop/restart the server.
For Java class objects, the compiler has no way of determining when you've
made a change to that object. Since all class objects are loaded into
server memory the first time you call them from a JSP page, you must
stop/restart the server to clear those objects from memory. At least you do
for JRUN 3.0 and 3.01. And if you think about it, it makes sense.
Otherwise, you would be reloading all your class objects and JSP's into
memory every time a user "hits" a page. That would certainly reduce your
performance for a deployed system.
Just for grins, go to the server subdirectory you defined for your project
under Allaire/JRUN, and watch the complier create your servlets from your
JSP's every time you "touch" or call them. You will also see your Java
classes loaded into memory and into the subdirectory with your servlet code
the first time your class file is called from within a JSP.
Celeste
-----Original Message-----
From: Jackie Comeau [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 02, 2001 9:05 AM
To: JRun-Talk
Subject: RE: bean newbie question
So, you recommend every time you make a JSP change to stop and restart the
server to make sure JRun recognizes the change? I have not run into this
yet, but I'm just playing around with JSP and actually developing anything
serious yet.
This is not a good thing! Is this a possible bug with JRun and has it been
reported?
I think I would test my JSP's changes anyways before putting them into
production, so hopefully I won't come up with problems of new class files
not replacing old automatically. But yeah, I see the problem if your
copying your changes over assuming the production server is going to
recompile.
Hmmm, not good!
Jackie
On Wednesday, August 01, 2001 6:00 PM, Haseltine, Celeste
[SMTP:[EMAIL PROTECTED]] wrote:
> Jay,
>
> To answer your question, I don't think you can. The server loads all
your
> classes into memory, along with your compiled JSP pages. If your in a
> development mode, JRUN will compile your JSP's to servlets the first time
> you request the JSP, and subsequently when it see's that the "saved" date
is
> newer than the compile date. But not so for class files. In order to
> replace an old class file with a new class file in memory, you have to
stop
> and restart the server. Although this is not usually required for JSP
> pages, but I have had times where minor changes in a JSP did NOT cause
JRUN
> to recompile the JSP to a servlet, and I had to stop/restart the server
in
> order to reflect the changes in the JSP page also.
>
> If you are using JRUN studio as your IDE, you can stop and restart the
> server from within the IDE using hotkeys. If not, you can assign a
shortcut
> to your desktop and stop/restart the server from the shortcut.
>
> Celeste
>
> -----Original Message-----
> From: Jay [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 01, 2001 7:45 PM
> To: JRun-Talk
> Subject: bean newbie question
>
>
> This should be simple. I have created a bean, the first time I execute a
> JSP page that calls the bean, a class file is created for the bean and
the
> jsp page in C:\test\WEB-INF\jsp. I then have to move the bean.class
file
> into the C:\test\WEB-INF\classes directory for my code to
execute.(because I
> get a java.lang.NoClassDefFoundError: getmov)
> However, if I make a change to the source code of the bean and
reexecute,
> it appears that the original class is still in memory and manifests it
self
> when the JSP is executed thereby not reflecting the new changes. I have
> remove all traces of the .java and .class files ( ie delete them) and to
> restart the default server inorder to create new classes.
>
> 1.How can I clear the old code and create a new class that reflects the
> changes to the source without restarting the server everytime
> 2. Where exactly should the .class file reside in the
> C:\test\WEB-INF\classes or in C:\test\WEB-INF\classes\beans
>
> //HERE IS THE BEAN
> import java.lang.* ;
> public class getmov {
>
> private String convert,clipnumber ;
>
> public void setConvert (String convert)
> {this.convert = convert ; }
>
> public String getConvert()
> { return convert ; }
>
> public String getClipnumber()
> { return clipnumber ; }
>
> public void setClipnumber(String clipnumber)
> {
>
> if (this.convert != "TRUE")
> { this.clipnumber = "TRUE" ; }
> else
> { this.clipnumber = "FALSE" ; }
>
> }
>
> }
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists