I guess .. What Mr.Drasko refering here is 

For example

1. You have two sub sitemaps say test1 and test2
2. Both of them have some pattern called "index" to
serve a xsp called index.xsp.
3. Both sitemaps are set up to serve the index.xsp
from their respective sub-folder called "docs".
4. But the content of the both index.xsp 's is diffent
from each other.
5. Now when you access the first sub-sitemap pattern
index. The index.xsp is compiled into
www/docs/index_xsp.java and then served

6. Funny part now is if u try to access "index"
pattern from second sitemap "test2".

7. Incase, c2 try to compile the index.xsp from this
context, the package created in tomcat work directory
would still be www/docs/index_xsp.java over writing
the first one.

8. Whats worser is for caching(or whatever reason) c2
decides NOT to compile but to serve the same class
file and serve the wrong contents.

Hope this complements Mr.Drasko's point and make the
problem clearer ..

Or may be this is not problem at all and there is some
explanation...

javaguru





 --- Berin Loritsch <[EMAIL PROTECTED]> wrote: >
Drasko Kokic wrote:
> > 
> > Okay ... after a small (but very eficient) chat
> with
> > javaguru ... I have identified background
> information
> > about the way where the generated java file is
> being
> > created:
> > 
> > It seams that the informtion suplied in the src
> > atribute of the generate element is used to define
> > where (relative to .../org/apache/cocoon/www) the
> file
> > will be created.
> > 
> > There is a possibility in a multiple sub-sitemaps
> > environment to have same "relative paths" for
> diferent
> > XSP's in different sub-sitemaps.  This means that
> > either the files will overwrite each other all the
> > time or (even worse) be mistaken!!!
> 
> 
> The generated class files are placed in a main
> package
> which you can override in cocoon.xconf.  By default,
> it
> is the package org.apache.cocoon.www.  From this
> point,
> all class names and sub packages are generated from
> the
> filename of the source document itself.  In fact,
> the
> extension is made part of the class name.  For
> example,
> the root sitemap.xmap file will be generated into:
> 
> org.apache.cocoon.www.sitemap_xmap;
> 
> If you have two other sitemaps that vary only by
> extension
> (for instance .map, and .alt) they will have a
> unique file
> and class name:
> 
> org.apache.cocoon.www.sitemap_map;
> org.apache.cocoon.www.sitemap_alt;
> 
> Also, since the actual class/filename is derived
> from the
> context directory, the sub directories are treated
> as
> sub-packages, and illegal characters are transformed
> into
> an '_' character.
> 
> The only potential conflict that remains then is one
> where
> you have two identically named files in the same
> directory
> that differ by using a period (.) instead of a
> hyphen (-).
> Niether of these characters are legal class name
> characters.
> For example, we can have the following files:
> file-one.xsp
> and file.one.xsp:
> 
> org.apache.cocoon.www.docs.file_one_xsp; //
> docs/file-one.xsp
> org.apache.cocoon.www.docs.file_one_xsp; //
> docs/file.one.xsp
> 
> It is theorhetically possible--however the
> circumstances to
> create it would require a developer who doesn't give
> a flying
> leap about maintainance.  Since Contexts cannot be
> written to
> by an outside user, we are safe from this approach.
> 
> 
> 
> > 
> > Please, could somebody give some light on this
> > problem?!
> > 
> > TIA
> > Drasko
> > 
> > --- Drasko Kokic <[EMAIL PROTECTED]> wrote:
> > > Hello again,
> > >
> > > can anybody tell me what is the path/filename
> rule
> > > applied when a java file is being generated from
> the
> > > XSP?!
> > >
> > > TIA
> > > Drasko
> > >
> > > --- Drasko Kokic <[EMAIL PROTECTED]> wrote:
> > > > I think I have found something very strange in
> the
> > > > way
> > > > Java files are being generated from the XSP
> files.
> > > >
> > > > I have situation like described in the
> attached
> > > > email.
> > > >  There is a main sitemap and a sub-sitemap for
> the
> > > > sub-URI LOOP.
> > > >
> > > > In the LOOP sub-sitemap I have the following
> code:
> > > >
> > > >    <map:match pattern="Index">
> > > >     <map:generate type="serverpages"
> > > > src="index.xsp"/>
> > > >     <map:transform src="index-html.ss"/>
> > > >     <map:serialize type="html"/>
> > > >    </map:match>
> > > >
> > > > I don't understand why is the Java file
> > > > index_xsp.java
> > > > generated under the www directory and not
> under
> > > > www/LOOP directory???
> > > >
> > > > Anybody care to explain how XSP and sitemap
> work
> > > > together.
> > > >
> > > > TIA
> > > > Drasko
> > > >
> > > > --- Drasko Kokic <[EMAIL PROTECTED]>
> wrote:
> > > > > Hello everybody,
> > > > >
> > > > > this is already the second time I am getting
> > > > stucked
> > > > > with this problem.  Unfortunately the first
> time
> > > I
> > > > > have "solved" the problem in untraceble way
> :-(
> > > > >
> > > > > I am using submaps like following
> > > > >
> > > > > context = KontoCheck
> > > > > submap  = LOOP
> > > > >
> > > > > this creates properly the sitemap_xmap.java
> in
> > > the
> > > > >  blabla...KontoCheck/org/apache/cocoon/www
> > > > > as well as in the subdirectory LOOP.
> > > > > Both get compiled and things work fine.
> > > > >
> > > > > BUT ...
> > > > >
> > > > > after I have configured the LOOP submap to
> serve
> > > > the
> > > > > URI SingleLogin/CheckIn I am getting the
> > > > > ClassNotFoundException.
> > > > >
> > > > > Looking into the work directory I can see
> that
> > > > under
> > > > > the www directory there is SingleLogin
> > > > subdirectory
> > > > > containing the java file generated thrue
> XSP.
> > > ONLY
> > > > > THERE IS NO CLASS FILE.
> > > > >
> > > > > How is it possible to fix this problem? 
> What is
> > > > > causing this misbehaviour?
> > > > >
> > > > > TIA
> > > > > Drasko
> > > > >
> > > > >
> > > > >
> > >
> __________________________________________________
> > > > > Do You Yahoo!?
> > > > > Get personalized email addresses from Yahoo!
> > > Mail
> > > > > http://personal.mail.yahoo.com/
> > > > >
> > > > >
> > > >
> > >
> 
=== message truncated ===

> ATTACHMENT part 2 application/x-pkcs7-signature
name=smime.p7s
 

=====
Thanks and have great day
srini

____________________________________________________________
Do You Yahoo!?
For regular News updates go to http://in.news.yahoo.com

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to