> [EMAIL PROTECTED] wrote:
> > Hello there.  I'm using Webware 8.1 with the following apache setup:
> >   <Location /WK> SetHandler webkit-handler
> > </Location>
> > # psp
> > WKServer localhost 1114
> > AddHandler psp-handler .psp
> > 
> > I have a method in a servlet that looks like this:
> > 
> >   def forwardToWhatever(self):
> > 
> > self.transaction().application().forward(self.transaction(),
> > '/whatever.psp') 
> > 
> > But the method, when invoked, doesn't work.  I get this:
> >   File "./WebKit/Application.py", line 627, in forward
> >     urlPath = self.processURLPath(req, URL)
> >   File "./WebKit/Application.py", line 593, in processURLPath
> >     extraPath = req.siteRootFromCurrentServlet()
> >   File "./WebKit/HTTPRequest.py", line 428, in
> > siteRootFromCurrentServlet
> >     contextName = self.contextName() + '/'
> > TypeError: unsupported operand types for +
> > 
> > .. which bespeaks fundamental problems.  Is there any way to do what
> > I want to do, i.e. forward to a PSP page?  Do I need to invoke the
> > PSP servlet factory directly? 
> 
> Are the servlet and the PSP both within a Webware Context defined in your
> Application.config file?  I think that forward() and includeURL() only work
> if both the servlet and the PSP are within context directories.  I think
> they do not work if you are serving them from your Apache documents
> directory.
> 
> You should definitely never need to touch the PSP servlet factory.
> 
> - Geoff

Thanks!

I was going to complain that that would make all my URLs ugly, but
then I read this:
http://webware.colorstudy.net/twiki/bin/view/Webware/ModRewriteRecipes

Since I don't expose servlets, just .psp pages, I did this in my
Apache conf:

RewriteEngine On
RewriteRule ^(.*\.psp)$ /WK/Yammer/$1 [L,PT]
RewriteRule ^(.*)/$ /WK/Yammer/$1/index.psp [L,PT]

and everything works great.


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to