Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JSP+XSL -> WML ??

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a problem creating WML with JSP and XSL. I am not able to change the content type from 'text/html' to 'text/vnd.wap.wml'.
If I change the contentType line below to 'text/vnd.wap.wml' then the output is the desired WML, but the JSP file seems to ignore my XSL file. If I run the JSP file like it is written below, the XSL file is read correctly and my errorlogin tags are replaced with the WML tags. I assume that you can change the content type from within the XSL file, but how you do that is a mystery to me. I tried to insert JSP code in to the XSL file, but all that that resulted in was a XSL parser error...
As you can propably see I'm fairly new to XML/XSL ;-)
I'm using Resin 1.2.1 for JSP/XML/XSL and M3Gate WAP emulator.
I have tried the application also with IE and Netscape.

---->8--->8-----JSP file---->8--->8-----
<%@ page language="java"%>
<%@ page contentType='x-application/xsl' %>
<?xml version="1.0"?>
<?xml-stylesheet type='text/xsl' href='time.xsl'?>
---->8--->8-----JSP file---->8--->8-----
---->8--->8-----XSL file---->8--->8-----
<?xml version="1.0"?>
<xsl:stylesheet type="text/vnd.wap.wml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="error_login">
<wml>
<card>
<p>
<xsl:value-of select='.'/>
</p>
</card>
</wml>
</xsl:template>
---->8--->8-----XSL file---->8--->8-----
// Sami
 
Sami Laitio
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Few words were left out..
....are replaced with the WML tags, but the content type is 'text/html'.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic