Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: JDeveloper and JSP question

Re: JDeveloper and JSP question

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 2 May 2003 10:07:05 -0800
Message-ID: <3eb2a5b9@news.victoria.tc.ca>


Lieven (denlieven_at_hotmail.com) wrote:
: I am working with JDeveloper on a website project. Because I'm not a
: experienced JSP developer I encounter some problems. People can see a table
: with a lot of biological elements. I have made a button next to every
: element and by pressing the button people can see the sequence of that
: element printed in a jsp page. The sequence is a very large string with more
: than 5000 characters, that is calcuted from different tables in my database.
: Now I want to open that string in a new window and not in a jsp page but in
: a txt file (or other extension), so that vistors can easily click the button
: see the txt file, save it to disk and import it into there program (that
: supports the sequence in txt format). So the txt file will be created at
: runtime. How can I do that in jsp??? Better would be that the visitors by
: pressing the button see the download dialog box with the choice between save
: to disk or run. But I think that's browser dependant.

Try something like

        <%@ page language="java" contentType="application/octet-stream" %>

in the JSP page. You may want a different contentType for your data.

There may be some magic involved to get this to work. I notice that in the application that this example comes from, the content type is also set (earlier) from within the java before calling the jsp page

        response.setContentType(APPLICATION_OCTET_STREAM); Received on Fri May 02 2003 - 13:07:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US