Bugs item #1161757, was opened at 2005-03-11 18:10
Message generated for change (Comment added) made by jdhildeb
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=1161757&group_id=4866
Category: PSP
Group: None
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: page header failure
Initial Comment:
i am ibrahim HIDIR from Turkey, Ankara
E-Mail : [EMAIL PROTECTED]
mobile : +905364422860
i atried to populate a svg image on the fly with PSP with
code like
'''
<embed src="svg_pre.psp?act=2&stid=%s" width="50"
height="50" align="top"
type="image/svg+xml"></embed>....
'''
but in first i just see the codes of SVG not a svg image,
so i closed some lines to get svg image in page.py file
about the header of py or psp files which i generated
i attached page.py file my changes...
thankyou
----------------------------------------------------------------------
>Comment By: Jason Hildebrand (jdhildeb)
Date: 2005-03-14 16:30
Message:
Logged In: YES
user_id=173690
it appears that the Page.py has changed writeHTML to call
_only_ writeContent (not writeHead, writeBodyParts, etc.).
If you want to serve an image, I recommend using a servlet,
not PSP.
Write a servlet which subclasses Page, and override
writeHTML. Don't use writeContent().
Example:
from WebKit.Page import Page
class MyServlet(Page):
def writeHTML(self):
# generate the image and write it out
data, filename = generateMyImage()
response = self.response()
response.setHeader('Content-type', 'image/png')
response.setHeader('Content-Encoding', 'binary')
response.setHeader('Content-Length', str(len(data))
response.setHeader('Content-Disposition', 'inline;
filename=%s' % filename)
response.write(data)
response.streamOut().flush()
This can also be done from PSP (if you insist). You'd need
to use the "method" directive to tell PSP you want to
generate writeHTML instead of writeContent:
<%@ page method="writeHTML"%>
hope this helps,
Jason
----------------------------------------------------------------------
Comment By: Eric Radman (rad-man)
Date: 2005-03-14 02:02
Message:
Logged In: YES
user_id=1238667
The file you attached, Page.py appears to be part of Webkit.
How are you subclassing Webkit.Page?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=104866&aid=1161757&group_id=4866
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Webware-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/webware-devel