Bugs item #636699, was opened at 2002-11-11 12:39
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=636699&group_id=4866
Category: WebKit
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: includeURL and paths
Initial Comment:
I've found the following bug (or maybe its a feature)
using includeURL:
Suppose we have a directory structure as follows:
/bla/mycontext
/pageTemplates
/application1
/application2
and inside pageTemplates we have a BasePage
subclassed from Page. This is the page from which
pages are subclassed in application1 and application2
at 'root level' in mycontext we have components that
are used from BasePage like footer.psp, header.html,
as well as a stylesheet file. All of this components are
included using includeURL at the proper methods.
Everything works fine when using a page (subclassed
from BasePage) at mycontext level.
the problem here is that the call
includeURL('header.html')
when we are in a page from the directory application1
will actually look for 'header.html' inside application1,
and if we use includeURL('/header.html') will not have
the disired effect of including the file from mycontext.
If its a feature, we do not know how to get that effect,
since we do not want to duplicate our files in every
directory of application#
We have temporarly fixed the problem with the
following change to includeURL inside Application.py:
def includeURL(self, trans, URL):
req = trans.request()
#Save the things we're gonna change.
currentPath=req.urlPath()
currentServlet=trans._servlet
urlPath = req.urlPath()
# ***************************** IMPORTANT
********************************
# the following condition was changed to 'accept'
an absolute path
# defined within the URL, that is: '/servlet' will
NOT be looked
# in the relative parent directory
#
# LCJ --- Oct 17th 2002
#
# original code: get rid of the first if condition and
leave the else code
# unconditioned
if (URL.startswith('/')):
urlPath = URL
else:
if urlPath=='':
urlPath = '/' + URL
elif urlPath[-1]=='/':
urlPath = urlPath + URL
else:
lastSlash = string.rfind(urlPath, '/')
urlPath = urlPath[:lastSlash+1] + URL
#
*******************************************************
*****************
req.setURLPath(urlPath)
req.addParent(currentServlet)
#Get the new servlet
self.createServletInTransaction(trans)
#call the servlet, but not session, it's already
alive
trans.servlet().awake(trans)
trans.servlet().respond(trans)
trans.servlet().sleep(trans)
self.returnInstance(trans,trans.request
().serverSidePath())
#replace things like they were
#trans.request()._serverSidePath=currentPath
req.setURLPath(currentPath)
req.popParent()
trans._servlet=currentServlet
----------------------------------------------------------------------
>Comment By: Geoff Talvola (gtalvola)
Date: 2003-01-15 16:04
Message:
Logged In: YES
user_id=88162
Assigning to Stuart because he's currently improving
forward(), includeURL(), and callMethodOfServlet().
----------------------------------------------------------------------
Comment By: Stuart Donaldson (stuartd)
Date: 2003-01-03 02:13
Message:
Logged In: YES
user_id=326269
How are pages under application1 and application2
referenced, if they are not in a context? Are the items
under application1 and application2 only PSP and HTML?
What defines /bla/mycontext as the "root level"?
----------------------------------------------------------------------
Comment By: Stuart Donaldson (stuartd)
Date: 2003-01-02 04:18
Message:
Logged In: YES
user_id=326269
How are pages under application1 and application2
referenced, if they are not in a context? Are the items
under application1 and application2 only PSP and HTML?
What defines /bla/mycontext as the "root level"?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=636699&group_id=4866
-------------------------------------------------------
This SF.NET email is sponsored by: A Thawte Code Signing Certificate
is essential in establishing user confidence by providing assurance of
authenticity and code integrity. Download our Free Code Signing guide:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0028en
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel