I have a problem with this xml that I would run to a web server. the xml file has an error like this:
http://localhost:8080/chap1/pdf/tryk.xml:4: expected tag name after `<'
at `%'. Open tag names must immediately follow the open brace like `<foo
...>'
Here is my code:
<?xml version="1.0"?>
<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<%@ page language="java" import="java.sql.*, java.util.*, java.text.*" contentType="text/xml; charset=UTF-8"%>
<jsp:useBean id="dbase" class="PhoneDatabase" scope="session" />
<%
Vector vc= new Vector();
Vector vc1= new Vector();
vc.clear();
vc1.clear();
try{
Connection c = dbase.getConnection();
Statement s = c.createStatement();
ResultSet r = s.executeQuery("Select * from inventory_list");
while (r.next()) {
vc.add(r.getString("item_name"));
vc1.add(r.getString("quantity"));
}
%>
<pdf>
<head>
</head>
<body size="A4">
<table width="637" border="1">
<tr>
<th><div align="center">Equipment Status </div></th>
</tr>
</table>
<table width="637" border="1">
<tr>
<td width="72" >Item</td>
<td width="207">Quantity</td>
</tr>
<% for(int e="0"; e<vc.size(); e++) {%>
<tr>
<td width="72"><%=vc.elementAt(e)%></td>
<td width="207"><%=vc1.elementAt(e)%></td>
</tr>
<%}
r.close();
s.close();
c.close();
}
catch(Exception e)
{
out.println(e);
}
%>
</table>
<table>
<tr>
<td>Displaying the Page Number</td>
<td><pagenumber idref="pagenumbers"/></td>
</tr>
</table>
</body>
</pdf>