-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

I have an odd problem with my classpath and servlet class reloading.

To start off, my desired goal is getting my servlet classes to reload.
I found a valid entry in the faq (see, someone does read it from time
to time) and discovered that servlets will only be reloaded if they
are outside your system classpath.  Well, mine aren't.

I tried to take them out, but ran into a problem. Specifically...

I have the following set of packages:
  edu.okstate.thomppj.chemweb           <- main project package
  edu.okstate.thomppj.chemweb.*         <- supporting subpackages
  edu.okstate.thomppj.chemweb.servlet   <- servlet package

Apparently I have discovered (through vigorous testing) that once
JDK/Apache/JServ has found the path to a class, it will not look
anywhere else for those packages.  Let's call my packages this:

  main = edu.okstate.thomppj.chemweb +
         edu.okstate.thomppj.chemweb.*
  servlets = edu.okstate.thomppj.chemweb.servlet

If I either put the main in one place and servlets in another
(jarred or not) then the system finds main, but then can not find
servlets. However, if I destroy my nice package setup and rip
servlets out of edu.okstate.thomppj.chemweb.servlets and put them
into their own package (such as foo.servlets) -- THEN everything
works.

This has caused me to come to the conclusion that java is crazy...

No, no...I mean...that once the JVM (or something) finds the path
edu.okstate.thomppj.chemweb in the classpath, it will only look there
for classes and subpackages. So if I have main in one place and
servlets in another, it finds edu.okstate.thomppj.chemweb in main,
can't find edu.okstate.thomppj.chemweb.servlets in main, and never
looks in servlets for it because it thinks all classes and subpackages
of edu.okstate.thomppj.chemweb should be in main.

(This is really rotten)

This basically means that (among other things) I don't even need to
set a repository and servlet class reloading DOES NOT work.

Well, I am tired of having to restart Apache (and it has to kill all
those servlets and kill itself and restart itself and restart JServ)
just to view a change to one servlet.

So please, have mercy on me and find me a magical answer.
(Please? I promise to add it to the faq...)

;) Paul

ps. The faq entry I found was at
    http://java.apache.org/faq/fom-serve/cache/29.html


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to