Liebe JSPer

I just tested the output in MS Excel and it does not produce
what is expected. Looks like I will have to write a special adaptor
JavaBean to output the CSV format or write
a ``blinking'' Java Servlet from scratch!!! Aarrgh!

I would like JSP to have a page directive:

     <%@  page packSpace=tightly %>


So it would remove all the spaces when the XML or <% %>  tags were parsed
Ideally you'd have a set of values packSpace={none, normal, tightly, columns }

And also we need this directive

     <jsp:newLine />               == `pageContext.getOut().println()'

Sheesh!!!

You'd  though that any one was listening already.
--
Peter Pilgrim
G.O.A.T
                    "the Greatest Of All Time"



---------------------------------------- Message History 
----------------------------------------


From: Peter Pilgrim/DMGIT/DMG UK/DeuBa@DMG [EMAIL PROTECTED]> on 29/01/2001 15:39

Please respond to A mailing list about Java Server Pages specification and reference 
<[EMAIL PROTECTED]>

DELEGATED - Sent by:     A mailing list about Java Server Pages specification and 
[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:
Subject:  Re: How get a JSP to write CSV file?


Perhaps I should make my problem clearer.
The output I'm getting from my Comma-Separated-Value JSP is like this

^M
^M
    ^M
        EG_NAME,^M
    ^M
        EG_ENT_CODE,^M
    ^M
^M
^M
    ^M
        DB-LN-BOOKS,^M
    ^M
        ARB-OPT,^M
    ^M
    </tr>^M
^M
    ^M
        DB-LN-BOOKS,^M
    ^M
        ATS,^M
    ^M
    </tr>^M
^M

but the output should really be like this.

     EG_NAME,  EG_ENT_CODE,  ^M
     DB-LN-BOOKS,  ARB-OPT,  ^M
     DB-LN-BOOKS, ATS, ^M

How can force the JSP to stop adding extra spaces or lines when it comes across
<% .. %> or <tag .. /tag>?
 Is there an XML flag I can set (particular in TOMCAT 3.2.1 )?

--
Peter Pilgrim
G.O.A.T
                    "the Greatest Of All Time"



---------------------------------------- Message History 
----------------------------------------


From: Peter Pilgrim/DMGIT/DMG UK/DeuBa@DMG [EMAIL PROTECTED]> on 29/01/2001 15:12

Please respond to A mailing list about Java Server Pages specification and reference 
<[EMAIL PROTECTED]>

DELEGATED - Sent by:     A mailing list about Java Server Pages specification and 
[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:
Subject:  How get a JSP to write CSV file?


How do get a JSP to write a properly formatted CSV file?
Is there a way to make JSP stop adding new lines or spaces?
Can JSP pack spaces tightly between <% .. %> and <tag> ...</tag>?

Conversely can JSP be to told print a new line directly
( java.io.PrintStream.println() )?

Any help appreciated?


BTW: This is my JSP and it uses O'Reilly Taglib library to do the
iteration from DB SQL Query.

<%@ taglib uri="/orataglib" prefix="ora" %>
<%@ taglib uri="/emistaglib" prefix="emis" %>
<%@ page import="com.ora.jsp.util.*" %>
<%@ page import="com.ora.jsp.sql.*" %>
<%@ page language="java" contentType="application/vnd.ms-excel" %>
<jsp:useBean id="detailBean"
        class="com.db.gdd3.emis.report.ReportDetailBean"
        scope="request" />
<jsp:useBean id="sqlBean"
        class="com.db.gdd3.emis.sql.ExpressoSQLCommandBean"
        scope="request" />

    <ora:loop name="sqlBean" property="columnNameList"
        loopId="columnName" className="java.lang.String" >
        <%= columnName %>,
    </ora:loop>

<ora:loop name="rowsetData" loopId="row" className="Row" >
    <ora:loop name="row" property="columns"
        loopId="col" className="Column" >
        <jsp:getProperty name="col" property="string" />,
    </ora:loop>
</ora:loop>

--
Peter Pilgrim
G.O.A.T
                    "the Greatest Of All Time"



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets



--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorised copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to