De : Mike Davis [mailto:[EMAIL PROTECTED]] > > > Hi David, > Thanks for the reply and the info. I have a few follow-on questions: > - media.xreg seems to setup and map media-type to mime-type. > Just to clarify, whatever the literal string is used for > media-type, that exact same literal string is used to resolve > the template directory name right?
yes. > - media.xreg (from the basic WAR at least) contains no > references to actual user-agents, such as these three: > Mozilla/4.0 (compatible; MSIE 4.01; Windows 95) > > Opera/5.0 (Linux 2.0.38 i386; U) [en] > > UP.Browser > > I am most interested in how these are mapped to a media-type, > if at all. Or does Jetspeed use the "Accept" HTTP header > to map to the appropriate media-type? Where (in the code) > does this mapping occur? > They are defined in clients.xreg. There's a matching algorithm that will try to find the best media type for any given client based on its capabilities description in clients.xreg. The idea behind this architecture is to promote coding against "features" and not against user agents, especially in the current context where you'll find many user agents with similar capabilities because they are based on the same engine (gecko-based, khtml based, etc...). For more info, check out: http://jakarta.apache.org/jetspeed/site/client-media.html The main limitation of the implementation in 1.4b3 is that I could not commit the media fallback algorithm to the PSML and template search paths because of a crash and I've not yet recreated the code... > Thanks, > Mike > David Sean Taylor <[EMAIL PROTECTED]> wrote: > On Tuesday, February 18, 2003, at 07:08 PM, Mike Davis wrote: > > > > > Sorry if this is a repeat, I thought I hit send on the last > version, > > but Yahoo disagrees with me at I did, so once again unto > the breach... > > > > I would like to render XHTML and I need help with: > > > > - How to map user-agents to media-types? > > > see media.xreg > > > = Is there a single mapping file? > > > > = Is yes, where is it? > > > > = If no, which is the key (.java I assume) file(s) to update? > > > > - Does the media-type-entry in media.xreg, such as : > > > > > > > > imply the template subdirectory name? such as: > > > > .../templates/jsp/layouts/wml > > > you have to create the directories yourself, and the JSP or vm > you can also break down the PSML by media type if you like by > creating > the directories or database entries > in both cases, the resolution algorithm is built in > > > Or is this mapped somewhere else? > > > > - Are there other files like .../util/MimeType.java that need to be > > updated to add new media-types? > > > > - Any other "gotcha's"? > > > Make sure your portlet checks for the media type. > I did this for XML last year. It was pretty easy then, and we didn't > have a working media type registry then > > -- > David Sean Taylor > Bluesunrise Software > [EMAIL PROTECTED] > +01 707 773-4646 > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------- > Do you Yahoo!? > Yahoo! Shopping - Send Flowers for Valentine's Day > ********************************************** Vivendi Universal - HTTP://www.vivendiUniversal.com: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material of Vivendi Universal which is for the exclusive use of the individual designated above as the recipient. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact immediately the sender by returning e-mail and delete the material from any computer. If you are not the specified recipient, you are hereby notified that all disclosure, reproduction, distribution or action taken on the basis of this message is prohibited. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
