White space problems

From: C (cammclaren_at_tiscali.co.uk)
Date: 02/09/05


Date: Wed, 9 Feb 2005 09:20:08 -0000

I'm trying to display the rows of a sql database in a web page, but the row
called "Bedlington station",
having a space in, is causing problems. How do I fix this? I've tried
enclosing single quotes in the double quotes,
and using \" also tried %20 but nothing works. Any ideas?

code:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
 <%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
   <sql:query var="queryresults" dataSource="jdbc/poolDB">
    SELECT * FROM x31
  </sql:query>
<html>
    <head><title>JSP Page</title></head>
    <body>

        <table border=1>
      <tr>
  <th>Arrive</th>
      </tr>
      <c:forEach var="row" items="${queryresults.rows}">
  <tr>
      <td><c:out value="${row.NORCAT}" /></td>
    // <td><c:out value="${row.Bedlington Station}" /></td>
  </tr>
      </c:forEach>
      </table>

    </body>
</html>



Relevant Pages

  • white space problems with java-sql code
    ... called "Bedlington station", ... having a space in, is causing problems. ... enclosing single quotes in the double quotes, ...
    (comp.lang.java.help)
  • Re: White space problems
    ... > I'm trying to display the rows of a sql database in a web page, ... is causing problems. ... > enclosing single quotes in the double quotes, ... definitely work is to rename columns. ...
    (comp.lang.java.databases)
  • Re: white space problems with java-sql code
    ... > I'm trying to display the rows of a sql database in a web page, ... is causing problems. ... > enclosing single quotes in the double quotes, ...
    (comp.lang.java.help)
  • Re: White space problems
    ... > I'm trying to display the rows of a sql database in a web page, ... is causing problems. ... > enclosing single quotes in the double quotes, ...
    (comp.lang.java.databases)