wood burning stoves 2.0*
The moose likes JSP and the fly likes Using WML & Java Bean in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Using WML & Java Bean in JSP " Watch "Using WML & Java Bean in JSP " New topic

Using WML & Java Bean in JSP

Richard Lawrence

Joined: Jan 22, 2002
Posts: 10
Hi All,
I currently have a JSP that contains WML content.
I would like call a method on a java bean so that
I can get data from a database and place this data
into wml.
Every time I call the JSP, I get the following
The Parser could NOT parse the current Deck.
Please check the WML code.
-Not WML content.
I have also tested the bean in a JSP that does not
contain any WML and it calls the bean ok.
Part of the code in the jsp looks as follows:-
<%@ page language="java" %>
<%@page import="bean.*";%>
<jsp:useBean id="getStockCheck" class="bean.GetStockCheck"/>
<%@ page contentType="text/vnd.wap.wml" %>
<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12806
It sounds like something is not quite right about the WML. If it was my problem I would start with a JSP page that simply wrote a WML mockup of what you are trying to create. After you get the WML parsing right, try adding bits of code.
It is sorta covered in the JavaRanch Style Guide.
subject: Using WML & Java Bean in JSP