Hi Mansour,
Well, Jetspeed's table called 'mimetype' holds the know mimetype, of which the entry with id 1 stands for application/xhtml+xml and 2 for text/html. In the table called 'client', various browsers for different platforms can be identified. Each entry has a value preferred_mimetype_id that sets the default mimetype to be set as content type of the response.

So to change it you need to update your client table.
Using SQL this would be:
> update client set preferred_mimetype_id=1 where preferred_mimetype_id=2;


HTH
Jeroen


Mansour Al Akeel wrote:
Jeroen, thank you for your help. I really need any help in this regard. I decided to go away from using SVG because simply I couldn't find a way to set the contents type to XHTML. I didn't understand the client table part, so can you please kindly elaborate on this, and give me the step and the rsources I need to change to get achieve this ?

Thank you in advance.



Jeroen Hoffman wrote:
Hi,
I know that in the client table there is a preferred (default) mimetype id, pointing to an entry in the mimetype table. Changing this id to 1 for application/xhtml+xml this should work I think.
Regards
Jeroen
________________________________

Van: Mansour Al Akeel [mailto:[EMAIL PROTECTED]
Verzonden: di 30-9-2008 19:08
Aan: Jetspeed Users List
Onderwerp: Re: mime type for the psml pages



Woonsan Ko wrote:
Hi Mansour,

Actually, I don't have any concrete solution on that, but just a idea.
AFAIK, the capability valve will read the client user agent information and decide a content type to set for the response. For example, Jetspeed will set a proper content type for each client, such as normal browser or PDA.
There are some tables: client, mediatype, mimetype and associations.
I'm not sure but I guess you can try to change the default mime type to xhtml instead of html.
Good luck. :)

That is exactly what I have been trying to figure out, How to change the
default mime type, and where ? LOL.
I tried all possibilities but no luck. I will keep on trying, and see
where do I go from there. However, I think this indicates the need for a
new functionality in jetspeed. The ability to configure the mime types
easily, if this doesn't already exist. I will post any useful thing I find.

Thank you, Woonsan.
Regards,

Woonsan


--- On Tue, 9/30/08, Mansour Al Akeel <[EMAIL PROTECTED]> wrote:

From: Mansour Al Akeel <[EMAIL PROTECTED]>
Subject: Re: mime type for the psml pages
To: "Jetspeed Users List" <[email protected]>
Date: Tuesday, September 30, 2008, 6:40 PM
Woonsan, thank you.
can you elaborate on this, please ?

Woonsan Ko wrote:
Hi Mansour,

Jetspeed is setting the content type explicitly by
calling response.setContentType(). AFAIK, it will probably
decide a proper content type according to the tables such as
CLIENTS, MIMETYPES and MEDIATYPES. I think you can try those
if you want.
Try what exactly? And how? How can I over write
jetspeed's decision to
set the content type to text/html for the web browsers ?

Regards,

Woonsan


--- On Mon, 9/29/08, Mansour Al Akeel
<[EMAIL PROTECTED]> wrote:
From: Mansour Al Akeel
<[EMAIL PROTECTED]>
Subject: Re: mime type for the psml pages
To: "Jetspeed Users List"
<[email protected]>
Date: Monday, September 29, 2008, 11:28 PM
No progress yet. I have tried the following:

* mime-mapping in web.xml

<*mime-mapping*>
   <extension>psml</extension>

     <mime-type>application/xhtml+xml</mime-type>
</*mime-mapping*>

* In the layout decorator :

<head>
......
<meta

http-equiv="content-type"    content="application/xhtml+xml;
charset=iso-8859-1" />
</head>

* In velocity.properties
default.contentType=application/xhtml+xml

* In
WEB-INF/apps/jetspeed-layouts/WEB-INF/portlet.xml
for the VelocityTwoColumns, I have added this :


<mime-type>application/xhtml+xml</mime-type>
* and of course, changed the jetspeed_macros.vm
#macro (ContentType) which sets the contents in
the html
header.


That's what I am getting in firebug:
=================================================
Response Headers
Server    Apache-Coyote/1.1
Cache-Control    no-cache,no-store,private
Pragma    no-cache
Expires    0
Content-Type    text/html;charset=UTF-8
Transfer-Encoding    chunked
Date    Mon, 29 Sep 2008 21:25:15 GMT

------------------------------------------------------------------------
Request Headers
Host    pluto:8080
User-Agent    Mozilla/5.0 (X11; U; Linux i686;
en-US;
rv:1.8.1.16)
Gecko/20080715 Fedora/2.0.0.16-1.fc8
Firefox/2.0.0.16
Accept
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language    en-us,en;q=0.7,ar;q=0.3
Accept-Encoding    gzip,deflate
Accept-Charset    ISO-8859-6,utf-8;q=0.7,*;q=0.7
Keep-Alive    300
Connection    keep-alive
Cookie
JSESSIONID=A4EEA1A463C5459B8FDD2EB25EE0254C
Cache-Control    max-age=0

====================================================
And the svg can not be displayed. Now I am out of
ideas.
Can anyone help ?



Mansour Al Akeel wrote:
Ok, I found it. It's in jetspeed-macro.vm
but this
didn't help
displaying the svg. when save the contents
with xhtml
extension and
veiw it in browser it shows, but not when
it's
served. Any ideas ?
Mansour Al Akeel wrote:
Where or how to change the mime type for
the psml.
I know I can
change it in the layout portlet.xml but I
need it
for all the
layouts. I need to use svg in the
decoration and I
need to have
application/xhtml+xml as the mime type.
any ideas
?
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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




------------------------------------------------------------------------

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


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


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

Reply via email to