Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-2008, 01:25 PM
Member
 
Join Date: Mar 2008
Posts: 1
sriavr is on a distinguished road
how to redirect the output buffer of pl/sql onto a jsp
I wish to create an rss feed that automatically updates itself.

As a first step to do that Im trying to learn redirection of pl/sql output buffer to jsp page.
First I thought i would put a html page onto the browser and later an xml and so on.

This is the hello_world procedure.

CREATE OR REPLACE PROCEDURE hello_world
IS
BEGIN
HTP.print ('<html>');
HTP.print ('<head>');
HTP.print ('<title>You knew it was coming...</title>');
HTP.print ('</head>');
HTP.print ('<!-- ');
HTP.print ('This phrase is in every computer book.');
HTP.print ('--!>');
HTP.print ('<body bgcolor=blue>');
HTP.print ('And here it is .... Hello, World!');
HTP.print ('</body>');
HTP.print ('</html>');
END;

I can understand from google searches that htp package on termination of this procedure puts the output on to the oracle output buffer.

I wish to put it onto a jsp page now.

I tried this code inside a servlet

/*
Database connection code snippet comes here
. . . . . .
. . . . . .
*/

CallableStatement cs=null;
try {
cs = conn.prepareCall("{call hello_world}");
} catch (SQLException e) {
out.println("Statement not called properly");
}

try {
cs.execute();
} catch (SQLException e) {
out.println("Statement Not executed properly");
}

I am waiting for that html to come on to the browser when i execute this servlet. But I get
" Statement Not executed properly "
on the browser screen.
Did I miss out anything in this.? Feedback appreciated.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to redirect the output Java Tip java.io 0 04-04-2008 03:36 PM
Trouble with Buffer Sizing Jeff New To Java 3 02-07-2008 02:43 PM
How to redirect the output JavaBean Java Tips 0 10-04-2007 10:30 PM
Help with String Buffer mathias AWT / Swing 1 08-07-2007 07:52 AM
how to set the value of BUFFER SIZE oregon Advanced Java 1 08-06-2007 04:16 AM


All times are GMT +3. The time now is 05:41 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org