You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Jeroen Hoffman <j....@onehippo.com> on 2008/10/01 10:27:25 UTC
RE: mime type for the psml pages
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:mansour.alakeel@gmail.com]
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 <ma...@gmail.com> wrote:
>
>
>> From: Mansour Al Akeel <ma...@gmail.com>
>> Subject: Re: mime type for the psml pages
>> To: "Jetspeed Users List" <je...@portals.apache.org>
>> 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
>>>
>> <ma...@gmail.com> wrote:
>>
>>>
>>>
>>>> From: Mansour Al Akeel
>>>>
>> <ma...@gmail.com>
>>
>>>> Subject: Re: mime type for the psml pages
>>>> To: "Jetspeed Users List"
>>>>
>> <je...@portals.apache.org>
>>
>>>> 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:
>>>> jetspeed-user-unsubscribe@portals.apache.org
>>>> For additional commands, e-mail:
>>>> jetspeed-user-help@portals.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>>
>> ---------------------------------------------------------------------
>>
>>> To unsubscribe, e-mail:
>>>
>> jetspeed-user-unsubscribe@portals.apache.org
>>
>>> For additional commands, e-mail:
>>>
>> jetspeed-user-help@portals.apache.org
>>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail:
>> jetspeed-user-help@portals.apache.org
>>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: mime type for the psml pages
Posted by Mansour Al Akeel <ma...@gmail.com>.
David Sean Taylor wrote:
>
> On Oct 3, 2008, at 7:45 PM, Mansour Al Akeel wrote:
>
>> David,
>>
>> The problem I am facing is using svg in my theme. As you know svg is
>> an xml format, and I am trying to embed it in my decotartor. However,
>> browsers don't display these images because they are receiving a
>> content type in the http header showing that the content is
>> "text/html". When I save the pages as static files through the
>> browser save dialog and modify the contents type to
>> "application/xhtml+xml" , I get the images to display correctly. I
>> tried to change this mime type in multiple locations in jetspeed but
>> the header still contains text/html in the response. I am using
>> firebug to check the http header.
>>
>> In an earlier email, I was advised to change the DB table. I will try
>> this soon, since it's the only option I have, however, I prefer not
>> to use or modify anything in the DB, as I am looking to keep the
>> deployments easy and simple. I have worked before with CMS that
>> stores contents and configuration in the DB, and deployment were
>> nightmares because I had to sync the DB, while if the configurations
>> are only in the files, deployments can be smooth.
>>
>> As I said, I will try the option of modifying the db table, however,
>> I like to hear your input.
>>
> Have you tried putting the SVG in an IFrame? Im sorry but I need to
> test this out and I really haven't had time. If you could send me an
> example of your decorator it might help
>
I tried but it didn't work. What I did is putting SVG in a separate html
file, and then link the iFrame to it using @src . Now it looks like,
jetspeed doesn't serve xhtml pages from the decorator folders, so what
happened here is it replaced the contenets of the html file by the
contents of the default-page.psml serverd by jetspeed. I will organize
my decorator a bit and send you a copy to have a look at and see what I
mean.
thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: mime type for the psml pages
Posted by David Sean Taylor <dt...@onehippo.com>.
On Oct 3, 2008, at 7:45 PM, Mansour Al Akeel wrote:
> David,
>
> The problem I am facing is using svg in my theme. As you know svg is
> an xml format, and I am trying to embed it in my decotartor.
> However, browsers don't display these images because they are
> receiving a content type in the http header showing that the content
> is "text/html". When I save the pages as static files through the
> browser save dialog and modify the contents type to "application/
> xhtml+xml" , I get the images to display correctly. I tried to
> change this mime type in multiple locations in jetspeed but the
> header still contains text/html in the response. I am using firebug
> to check the http header.
>
> In an earlier email, I was advised to change the DB table. I will
> try this soon, since it's the only option I have, however, I prefer
> not to use or modify anything in the DB, as I am looking to keep the
> deployments easy and simple. I have worked before with CMS that
> stores contents and configuration in the DB, and deployment were
> nightmares because I had to sync the DB, while if the configurations
> are only in the files, deployments can be smooth.
>
> As I said, I will try the option of modifying the db table, however,
> I like to hear your input.
>
Have you tried putting the SVG in an IFrame? Im sorry but I need to
test this out and I really haven't had time. If you could send me an
example of your decorator it might help
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: mime type for the psml pages
Posted by Mansour Al Akeel <ma...@gmail.com>.
David,
The problem I am facing is using svg in my theme. As you know svg is an
xml format, and I am trying to embed it in my decotartor. However,
browsers don't display these images because they are receiving a content
type in the http header showing that the content is "text/html". When I
save the pages as static files through the browser save dialog and
modify the contents type to "application/xhtml+xml" , I get the images
to display correctly. I tried to change this mime type in multiple
locations in jetspeed but the header still contains text/html in the
response. I am using firebug to check the http header.
In an earlier email, I was advised to change the DB table. I will try
this soon, since it's the only option I have, however, I prefer not to
use or modify anything in the DB, as I am looking to keep the
deployments easy and simple. I have worked before with CMS that stores
contents and configuration in the DB, and deployment were nightmares
because I had to sync the DB, while if the configurations are only in
the files, deployments can be smooth.
As I said, I will try the option of modifying the db table, however, I
like to hear your input.
Thank you in advance.
David Sean Taylor wrote:
>
> On Oct 3, 2008, at 10:13 AM, Jeroen Hoffman wrote:
>
>> 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;
>
>
> Im not sure if I understand the problem, but I thought I would give a
> little history that might help
>
> Device configuration is imported with Jetspeed XML. We have the
> following mime types:
>
> <MimeTypes>
> <MimeType>application/xhtml+xml</MimeType>
> <MimeType>text/html</MimeType>
> <MimeType>text/vnd.wap.wml</MimeType>
> <MimeType>text/vxml</MimeType>
> <MimeType>text/xhtml</MimeType>
> <MimeType>text/xml</MimeType>
> </MimeTypes>
>
> You can add an additional mime type, for ex:
>
> <MimeType>image/svg+xml</MimeType>
>
> Whereas your browser's headers provide mime types, Jetspeed maps them
> to a more generic media type. You can create your own media type:
>
> <MediaTypes>
> <MediaType name="svg">
> <charcterSet value="UTF-8"/>
> <title value="SVG"/>
> <description value="SVG Media Type"/>
> <capabilities></capabilities>
> <mimeTypes>image/svg+xml</mimeTypes>
> </MediaType>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: mime type for the psml pages
Posted by David Sean Taylor <dt...@onehippo.com>.
On Oct 3, 2008, at 10:13 AM, Jeroen Hoffman wrote:
> 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;
Im not sure if I understand the problem, but I thought I would give a
little history that might help
Device configuration is imported with Jetspeed XML. We have the
following mime types:
<MimeTypes>
<MimeType>application/xhtml+xml</MimeType>
<MimeType>text/html</MimeType>
<MimeType>text/vnd.wap.wml</MimeType>
<MimeType>text/vxml</MimeType>
<MimeType>text/xhtml</MimeType>
<MimeType>text/xml</MimeType>
</MimeTypes>
You can add an additional mime type, for ex:
<MimeType>image/svg+xml</MimeType>
Whereas your browser's headers provide mime types, Jetspeed maps them
to a more generic media type. You can create your own media type:
<MediaTypes>
<MediaType name="svg">
<charcterSet value="UTF-8"/>
<title value="SVG"/>
<description value="SVG Media Type"/>
<capabilities></capabilities>
<mimeTypes>image/svg+xml</mimeTypes>
</MediaType>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
RE: mime type for the psml pages
Posted by Jeroen Hoffman <j....@onehippo.com>.
Sorry to hear it didn't work. It seems that the preferred mime type id as set in your detected client (browser) can't be found from the available mime types. From the code I see that Jetspeed should give an error logging with text: "Could not find preferred Mime Type for <prefMimeTypeId>", do you see that?
Jeroen
________________________________
Van: Mansour Al Akeel [mailto:mansour.alakeel@gmail.com]
Verzonden: ma 13-10-2008 22:46
Aan: Jetspeed Users List
Onderwerp: Re: mime type for the psml pages
Jeroen, thnk you for your help.
I tested this method but unforetunately, It didn't work for me. Here's
the error:
=================================================================================
*type* Exception report
*message*
*description* _The server encountered an internal error () that
prevented it from fulfilling this request._
*exception*
java.lang.NullPointerException
org.apache.jetspeed.capabilities.impl.JetspeedCapabilities.getCapabilityMap(JetspeedCapabilities.java:243)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy0.getCapabilityMap(Unknown Source)
org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(CapabilityValveImpl.java:65)
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.java:146)
org.apache.jetspeed.engine.JetspeedEngine.service(JetspeedEngine.java:227)
org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java:242)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jetspeed.engine.servlet.XXSUrlAttackFilter.doFilter(XXSUrlAttackFilter.java:52)
*note* _The full stack trace of the root cause is available in the
Apache Tomcat/5.5.23 logs._
=====================================================================
Can you tell, what is going on ?
Jeroen Hoffman wrote:
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: mime type for the psml pages
Posted by Mansour Al Akeel <ma...@gmail.com>.
Jeroen, thnk you for your help.
I tested this method but unforetunately, It didn't work for me. Here's
the error:
=================================================================================
*type* Exception report
*message*
*description* _The server encountered an internal error () that
prevented it from fulfilling this request._
*exception*
java.lang.NullPointerException
org.apache.jetspeed.capabilities.impl.JetspeedCapabilities.getCapabilityMap(JetspeedCapabilities.java:243)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
$Proxy0.getCapabilityMap(Unknown Source)
org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(CapabilityValveImpl.java:65)
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext(JetspeedPipeline.java:167)
org.apache.jetspeed.pipeline.JetspeedPipeline.invoke(JetspeedPipeline.java:146)
org.apache.jetspeed.engine.JetspeedEngine.service(JetspeedEngine.java:227)
org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java:242)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jetspeed.engine.servlet.XXSUrlAttackFilter.doFilter(XXSUrlAttackFilter.java:52)
*note* _The full stack trace of the root cause is available in the
Apache Tomcat/5.5.23 logs._
=====================================================================
Can you tell, what is going on ?
Jeroen Hoffman wrote:
> 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
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: mime type for the psml pages
Posted by Jeroen Hoffman <j....@onehippo.com>.
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:mansour.alakeel@gmail.com]
>> 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 <ma...@gmail.com> wrote:
>>>
>>>
>>>
>>>> From: Mansour Al Akeel <ma...@gmail.com>
>>>> Subject: Re: mime type for the psml pages
>>>> To: "Jetspeed Users List" <je...@portals.apache.org>
>>>> 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
>>>>>
>>>> <ma...@gmail.com> wrote:
>>>>
>>>>>
>>>>>
>>>>>> From: Mansour Al Akeel
>>>>>>
>>>> <ma...@gmail.com>
>>>>
>>>>>> Subject: Re: mime type for the psml pages
>>>>>> To: "Jetspeed Users List"
>>>>>>
>>>> <je...@portals.apache.org>
>>>>
>>>>>> 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:
>>>>>> jetspeed-user-unsubscribe@portals.apache.org
>>>>>> For additional commands, e-mail:
>>>>>> jetspeed-user-help@portals.apache.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>>
>>>>> To unsubscribe, e-mail:
>>>>>
>>>> jetspeed-user-unsubscribe@portals.apache.org
>>>>
>>>>> For additional commands, e-mail:
>>>>>
>>>> jetspeed-user-help@portals.apache.org
>>>>
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail:
>>>> jetspeed-user-unsubscribe@portals.apache.org
>>>> For additional commands, e-mail:
>>>> jetspeed-user-help@portals.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org
Re: mime type for the psml pages
Posted by Mansour Al Akeel <ma...@gmail.com>.
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:mansour.alakeel@gmail.com]
> 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 <ma...@gmail.com> wrote:
>>
>>
>>
>>> From: Mansour Al Akeel <ma...@gmail.com>
>>> Subject: Re: mime type for the psml pages
>>> To: "Jetspeed Users List" <je...@portals.apache.org>
>>> 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
>>>>
>>>>
>>> <ma...@gmail.com> wrote:
>>>
>>>
>>>>
>>>>
>>>>
>>>>> From: Mansour Al Akeel
>>>>>
>>>>>
>>> <ma...@gmail.com>
>>>
>>>
>>>>> Subject: Re: mime type for the psml pages
>>>>> To: "Jetspeed Users List"
>>>>>
>>>>>
>>> <je...@portals.apache.org>
>>>
>>>
>>>>> 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:
>>>>> jetspeed-user-unsubscribe@portals.apache.org
>>>>> For additional commands, e-mail:
>>>>> jetspeed-user-help@portals.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>>
>>>
>>>> To unsubscribe, e-mail:
>>>>
>>>>
>>> jetspeed-user-unsubscribe@portals.apache.org
>>>
>>>
>>>> For additional commands, e-mail:
>>>>
>>>>
>>> jetspeed-user-help@portals.apache.org
>>>
>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> jetspeed-user-unsubscribe@portals.apache.org
>>> For additional commands, e-mail:
>>> jetspeed-user-help@portals.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org