RE: HTML/WML from JSP

2001-03-06 Thread Daryl Hall

If you want to determine the client and apply an appropriate xsl transformation from 
the same .jsp you can request.getHeader("USER-AGENT") and parse the result - this is 
handy for formatting wap content for different phones.  

I don't know if there's an orion specific easier way to do this as there is with 
cocoon (the 'user agents' section of cocoon.properties) - does anyone else know?

As an aside this isn't always the best way to do it as you incur the overhead of the 
transformation for every hit.  See http://java.sun.com/products/jsp/html/JSPXML.html 
for more on this.

cheers
daryl
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jason Smith
Sent: 06 March 2001 16:19
To: Orion-Interest
Subject: RE: HTML/WML from JSP


Orion comes with some examples as part of it's default web site: 
Try
http://localhost/examples/xsl/doc.jsp

or look in your orion directory:
orion/default-web-app/examples/xsl

-jason


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Kiss Tibor
 Sent: Tuesday, March 06, 2001 9:00 AM
 To: Orion-Interest
 Subject: HTML/WML from JSP
 
 
 Hi!
 
 I am quite new to Orion, but have some experience with
 XML/XSL/JSP/HTML/WML.
 
 I have read in the official FAQ, that it is possible to use the XML
 output of a JSP and format it with client dependent XSL-s for WML or
 HTML. However, I was unable to find any additional information.
 
 Could anyone help me or point me to an example?
 
 Thanks
 Tibor







RE: HTML/WML from JSP

2001-03-06 Thread SCOTT FARQUHAR

Try looking at filters to parse the output using the user-agent info.

You could use a servlet / jsp to produce xml, and then a filter using a different XSL 
transformation to parse  send back to the client.

It depends on how many pages you are going to produce whether it is worth the hassle.

Scott

 [EMAIL PROTECTED] 03/07/01 08:41am 
If you want to determine the client and apply an appropriate xsl transformation from 
the same .jsp you can request.getHeader("USER-AGENT") and parse the result - this is 
handy for formatting wap content for different phones. 
I
  don't know if there's an orion specific easier way to do this as there is with 
cocoon (the 'user agents' section of cocoon.properties) - does anyone else know?

As an aside this isn't always the best way to do it as you incur the overhead of the 
transformation for every hit.  See http://java.sun.com/products/jsp/html/JSPXML.html 
for more on this.

cheers
daryl
-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]]On Behalf Of Jason Smith
Sent: 06 March 2001 16:19
To: Orion-Interest
Subject: RE: HTML/WML from JSP


Orion comes with some examples as part of it's default web site: 
Try
http://localhost/examples/xsl/doc.jsp 

or look in your orion directory:
orion/default-web-app/examples/xsl

-jason


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]]On Behalf Of Kiss Tibor
 Sent: Tuesday, March 06, 2001 9:00 AM
 To: Orion-Interest
 Subject: HTML/WML from JSP
 
 
 Hi!
 
 I am quite new to Orion, but have some experience with
 XML/XSL/JSP/HTML/WML.
 
 I have read in the official FAQ, that it is possible to use the XML
 output of a JSP and format it with client dependent XSL-s for WML or
 HTML. However, I was unable to find any additional information.
 
 Could anyone help me or point me to an example?
 
 Thanks
 Tibor









RE: HTML/WML from JSP

2001-03-06 Thread Mike Cannon-Brookes

You can also use SiteMesh (awesome product if I do say so myself ;)) -
http://www.opensymphony.com/sitemesh and use the AgentDecoratorMapper to use
different page decorators (layouts basically, very simple to build, very
advanced) based on the user agent and browser capabilities.

-mike

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of SCOTT FARQUHAR
 Sent: Wednesday, March 07, 2001 3:44 PM
 To: Orion-Interest
 Subject: RE: HTML/WML from JSP


 Try looking at filters to parse the output using the user-agent info.

 You could use a servlet / jsp to produce xml, and then a filter
 using a different XSL transformation to parse  send back to the client.

 It depends on how many pages you are going to produce whether it
 is worth the hassle.

 Scott

  [EMAIL PROTECTED] 03/07/01 08:41am 
 If you want to determine the client and apply an appropriate xsl
 transformation from the same .jsp you can
 request.getHeader("USER-AGENT") and parse the result - this is
 handy for formatting wap content for different phones.
 I
   don't know if there's an orion specific easier way to do this
 as there is with cocoon (the 'user agents' section of
 cocoon.properties) - does anyone else know?

 As an aside this isn't always the best way to do it as you incur
 the overhead of the transformation for every hit.  See
 http://java.sun.com/products/jsp/html/JSPXML.html for more on this.

 cheers
 daryl
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Smith
 Sent: 06 March 2001 16:19
 To: Orion-Interest
 Subject: RE: HTML/WML from JSP


 Orion comes with some examples as part of it's default web site:
 Try
 http://localhost/examples/xsl/doc.jsp

 or look in your orion directory:
 orion/default-web-app/examples/xsl

 -jason


  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of Kiss Tibor
  Sent: Tuesday, March 06, 2001 9:00 AM
  To: Orion-Interest
  Subject: HTML/WML from JSP
 
 
  Hi!
 
  I am quite new to Orion, but have some experience with
  XML/XSL/JSP/HTML/WML.
 
  I have read in the official FAQ, that it is possible to use the XML
  output of a JSP and format it with client dependent XSL-s for WML or
  HTML. However, I was unable to find any additional information.
 
  Could anyone help me or point me to an example?
 
  Thanks
  Tibor