JSP Servlet and convert the result set of an SQL Query To XML file

Hi all
I have a problem to export my SQL query is resulty into an XML file I had fixed my servlet and JSP so that i can display all the records into my database and that the goal .Now I want to get the result set into JSP so that i can create an XML file from that result set from the jsp code.
thisis my servlet which will call the jsp page and the jsp just behind it.
//this is the servlet
import java.io.*;
import java.lang.reflect.Array;
import java.sql.*;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.naming.*;
import javax.sql.*;
public *class *Campaign *extends *HttpServlet
*private* *final* *static* Logger +log+ = Logger.+getLogger+(Campaign.*class*.getName());
*private* *final* *static* String +DATASOURCE_NAME+ = "jdbc/SampleDB";
*private* DataSource _dataSource;
*public* *void* setDataSource(DataSource dataSource)
_dataSource = dataSource;
*public* DataSource getDataSource()
*return* _dataSource;
*public* *void* init()
*throws* ServletException
*if* (_dataSource == *null*) {
*try* {
Context env = (Context) *new* InitialContext().lookup("java:comp/env");
_dataSource = (DataSource) env.lookup(+DATASOURCE_NAME+);
*if* (_dataSource == *null*)
*throw* *new* ServletException("`" + +DATASOURCE_NAME+ + "' is an unknown DataSource");
} *catch* (NamingException e) {
*throw* *new* ServletException(e);
protected *void *doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
Connection conn = *null*;
*try* {
conn = getDataSource().getConnection();
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select post_id,comments,postname from app.posts");
// out.println("Le r&eacute;sultat :<br>");
ArrayList <String> Lescomments= *new* ArrayList<String>();
ArrayList <String> Lesidentifiant = *new* ArrayList<String>();
ArrayList <String> Lesnoms = *new* ArrayList <String>();
*while* (rs.next()) {
Lescomments.add(rs.getString("comments"));
request.setAttribute("comments",Lescomments);
Lesidentifiant.add(rs.getString("post_id"));
request.setAttribute("id",Lesidentifiant);
Lesnoms.add(rs.getString("postname"));
request.setAttribute("nom",Lesnoms);
rs.close();
stmt.close();
*catch* (SQLException e) {
*finally* {
*try* {
*if* (conn != *null*)
conn.close();
*catch* (SQLException e) {
// les param&egrave;tres sont corrects - on envoie la page r&eacute;ponse
getServletContext().getRequestDispatcher("/Campaign.jsp").forward(request,response);
}///end of servlet
}///this is the jsp page called
<%@ page import="java.util.ArrayList" %>
<%
// on r&eacute;cup&egrave;re les donn&eacute;es
ArrayList nom=(ArrayList)request.getAttribute("nom");
ArrayList id=(ArrayList)request.getAttribute("id");
ArrayList comments=(ArrayList) request.getAttribute("comments");
%>
<html>
<head>
<title></title>
</head>
<body>
Liste des campagnes here i will create the xml file the problem is to display all rows
<hr>
<table>
<tr>
</tr>
<tr>
<td>Comment</td>
<td>
<%
for( int i=0;i<comments.size();i++){
out.print("<li>" + (String) comments.get(i) + "</li>\n");
}//for
%>
</tr>
<tr>
<td>nom</td>
<td>
<%
for( int i=0;i<nom.size();i++){
out.print("<li>" + (String) nom.get(i) + "</li>\n");
}//for
%>
</tr>
<tr>
<td>id</td>
<td>
<%
for( int i=0;i<id.size();i++){
out.print("<li>" + (String) id.get(i) + "</li>\n");
}//for
%>
</tr>
</table>
</body>
</html>
This is how i used to create an XML file in a JSP page only without JSP/SERVLET concept:
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<%
// Identify a carriage return character for each output line
int iLf = 10;
char cLf = (*char*)iLf;
// Create a new empty binary file, which will content XML output
File outputFile = *new* File("C:\\Users\\user\\workspace1\\demo\\WebContent\\YourFileName.xml");
//outputFile.createNewFile();
FileWriter outfile = *new* FileWriter(outputFile);
// the header for XML file
outfile.write("<?xml version='1.0' encoding='ISO-8859-1'?>"+cLf);
try {
// Define connection string and make a connection to database
Connection conn = DriverManager.getConnection("jdbc:derby://localhost:1527/SAMPLE","app","app");
Statement stat = conn.createStatement();
// Create a recordset
ResultSet rset = stat.executeQuery("Select * From posts");
// Expecting at least one record
*if*( !rset.next() ) {
*throw* *new* IllegalArgumentException("No data found for the posts table");
outfile.write("<Table>"+cLf);
// Parse our recordset
// Parse our recordset
*while*(rset.next()) {
outfile.write("<posts>"+cLf);
outfile.write("<postname>" + rset.getString("postname") +"</postname>"+cLf);
outfile.write("<comments>" + rset.getString("comments") +"</comments>"+cLf);
outfile.write("</posts>"+cLf);
outfile.write("</Table>"+cLf);
// Everything must be closed
rset.close();
stat.close();
conn.close();
outfile.close();
catch( Exception er ) {
%>

Please state your problem that you are having more clearly so we can help.
I looked at your code I here are a few things you might consider:
It looks like you are putting freely typed-in comments from end-users into an xml document.
The problem with this is that the user may enter characters in his text that have special meaning
to xml and will have to be escaped correctly. Some of these characters are less than character, greater than character and ampersand character.
You may also have a similiar problem displaying them on your JSP page since there may be special characters that JSP has.
You will have to read up on how to deal with these special characters (I dont remember what the rules are). I seem to recall
if you use CDATA in your xml, you dont have to deal with those characters (I may be wrong).
When you finish writing your code, test it by entering all keyboard characters to make sure they are processed, stored in the database,
and re-displayed correctly.
Also, it looks like you are putting business logic in your JSP page (creating an xml file).
The JSP page is for displaying data ONLY and submitting back to a servlet. Put all your business logic in the servlet. Putting business logic in JSP is considered bad coding and will cause you many hours of headache trying to debug it. Also note: java scriptlets in a JSP page are only run when the JSP page is compiled into a servlet by java. It does not run after its compiled and therefore you cant call java functions after the JSP page is displayed to the client.

Similar Messages

  • Minus and passing the result set

    I have a query in a procedure....let us say "test.prc":
    select A.VALUE from TABLE A
    where A.VALUE_ID = get_rec.VALUE_ID minus
    select B.VALUE from TABLE B
    In the above query, I am passing the "get_rec.VALUE_ID" from a cursor above the query.
    Now is there a way to capture the result set of the above minus operation and pass the result set to the calling sql program (called "call_test.sql")?
    Thanks,
    Chiru
    Message was edited by:
    Megastar_Chiru

    I got what I was trying to do...
    I have 1 more question though....I am printing out my output using dbms package from sql*plus...using the following command
    dbms_output.put_line(nvl('Flex Value set Id : '||get_rec.flex_value_set_id,0)||' values that have no corresponding alias : ' || nvl(v_flex_val,0));
    "get_rec.flex_value_set_id" gets passed in from my cursor above the dbms statement.
    and it looks like below:
    Flex Value set Id : 20118 values that have no corresponding alias : 00
    Flex Value set Id : 20118 values that have no corresponding alias : 10
    Flex Value set Id : 20118 values that have no corresponding alias : 11
    Flex Value set Id : 20118 values that have no corresponding alias : 20
    Flex Value set Id : 20118 values that have no corresponding alias : 30
    Flex Value set Id : 20124 values that have no corresponding alias : Standard
    Is there some way to neatly break when the value set id changes? ...ie., make it print output something like below:
    Flex Value set Id : 20118
    values that have no corresponding alias : 00
    values that have no corresponding alias : 10
    values that have no corresponding alias : 11
    values that have no corresponding alias : 20
    values that have no corresponding alias : 30
    Flex Value set Id : 20124
    values that have no corresponding alias : Standard
    Thanks,
    Chiru

  • How to handle large result set of a SQL query

    Hi,
    I have a question about how to handle large result set of a SQL query.
    My query returns more than a million records. However, the Query Template has a "row count" parameter. If I don't specify it, it by default returns only 100 lines of records in the query result. If I specify it, then it's limited to a specific number.
    Is there any way to get around of this row count issue? I don't want any restriction on the number of records returned by a query.
    Thanks a lot!

    No human can manage that much data...in a grid, a chart, or a direct-connected link to the brain. 
    What you want to implement (much like other customers with similar requirements) is a drill-in and filtering model that helps the user identify and zoom in on data of relevance, not forcing them to scroll through thousands or millions of records.
    You can also use a time-based paging model so that you only deal with a time "slice" at one request (e.g. an hour, day, etc...) and provide a scrolling window.  This is commonly how large datasets are also dealt with in applications.
    I would suggest describing your application in more detail, and we can offer design recommendations and ideas.
    - Rick

  • OBIEE Answers does not display the result set of a report query

    Hi,
    We have a pivot table type of report in Oracle Business Intelligence Enterprise Edition v.10.1.3.3.2 Answers that has the following characteristics:
         3 Pages
         3 Sections , 4 Columns
         18363 Rows in the result set
    As per the NQQuery.log, the query for this report executes successfully resulting in 18363 rows. However, nothing comes up in the display on Answers. Moreover, no error is reported. The instanceconfig.xml file has the following setting:
    <PivotView>
         <CubeMaxRecords>30000</CubeMaxRecords>
         <CubeMaxPopulatedCells>300000</CubeMaxPopulatedCells>
    </PivotView>
    Even with these settings, Answers just returns a blank page - nothing is displayed in the name of the result set of the report query. Has anyone encountered this problem scenario before?
    Any help is much appreciated.
    Thanks,
    Piyush

    Hi Fiston / Pradeep,
    Thanks for your inputs. A few points to note:
    -> I am actually not getting any error message in answers or the NQQuery log. Moreover I am not getting any errors related to "query governor limit exceeding in cube generation" also.
    -> I have other pivot table type of reports in the same repository that work fine. In fact the report which has this issue even works sometimes - what actually is happening is that if I alter the number of sections from 3 to 4, then the result set changes from 14755 Rows to 18363 Rows and as per the NQQuery.log in both cases the query completes successfully. However, when the result set has 14755 rows, I get to see the output in Answers; however when the result set is 18636 rows, the Answers screen just goes blank and does not show any output or error. This makes me believe that there is some parameter in instanceconfig or the NQSconfig file - I have tried a lot of changes but nothing works !
    Any help is much appreciated.
    Best Regards,
    Piyush

  • How can I show all the results returned by a sql query?

    Hi guys,
    I need your help.
    Let's say I have one table: TableA. Fields of TableA are aleg, anon, apes. The following sentence can return, in general, several rows: select anon from TableA where aleg = somevalue. I'd like to show the result of column anon but no luck. If I try to show the results in a TextArea and the origin is an sql query only shows the first row value. I tried Show as: show as text (based in PLSQL) and coding an anonymous plsql block as
    DECLARE
    v_anon TableA.anon%TYPE;
    CURSOR v_cur IS
         select anon from TableA where aleg = somevalue;
    BEGIN
    OPEN v_cur;
    LOOP
    FETCH v_cur INTO v_anon;
    EXIT WHEN v_cur%NOTFOUND;
    :FIELD_IN_FORM := v_anon;
    END LOOP;
    CLOSE v_cur;
    END;
    but in this case it's not shown any result.
    So the first question is what kind of field should I use to show the result. And the second one is what can I do to being able to show all the results returned by the query (provided that is more than one single row).
    regards

    Hi Denes,
    Just starting with apex. I think I know how to show the results in a report region. I've simplified the posted question.
    A more detailed question would be: Suppose you have a region where you have put several text areas to accommodate the result of a multi-column query (lets say for TableA) that only returns one row, each column value returned put in a different text area. Also you want to show the values of other fields in TableB that depends on some value just retrieved from TableA and that you want all values retrieved (from TableA and the linked TableB) to be show in the same region. Is that possible? If yes, how?
    Thank you in advance

  • Remote Call to Blazeds and displaying the result set in grid

    Hi,
    I want to call a remote method using Flex application from Blazeds and display the values in DataGrid. Can anyone help in this ?
    -- I am using AMFChannel
    -- The method to be called is PolicyApnVO.getPoliciesApn()
    -- Please advice any correction if required
    Here is the mxml code :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    creationComplete="initApp()" viewSourceURL="srcview/index.html">
        <!--
        Simple client to demonstrate runtime configuration of destinations.
        The "runtime-employee" destination is configured in
        EmployeeRuntimeRemotingDestination.java.
        -->
        <mx:Script>
            <![CDATA[
                import mx.messaging.ChannelSet;
                import mx.messaging.channels.AMFChannel;
                import mx.rpc.remoting.mxml.RemoteObject;
                [Bindable]
                public var srv:RemoteObject;
                public function initApp():void
                    var channel:AMFChannel = new AMFChannel("my-amf", "http://192.168.102.208:8400/policyAnalytics/messagebroker/amf");
                    var channelSet:ChannelSet = new ChannelSet();
                    channelSet.addChannel(channel);
                    srv = new RemoteObject();
                    srv.destination="runtime-policy";   
                    srv.channelSet = channelSet;
                    srv.PolicyApnVO.getPoliciesApn();
            ]]>
        </mx:Script>
        <mx:Panel title="Policy Details" width="100%" height="100%">
            <mx:DataGrid width="100%" height="100%" dataProvider="{srv.PolicyApnVO.getPoliciesApn.lastResult.data.result}"
                         showDataTips="true">
                <mx:columns>
                    <mx:DataGridColumn headerText="APN Id" dataField="apnId"/>
                    <mx:DataGridColumn headerText="APN Name" dataField="apnName"/>
                    <mx:DataGridColumn headerText="Policy ID" dataField="policyId"/>
                    <mx:DataGridColumn headerText="Policy Name" dataField="policyName"/>
                </mx:columns>
            </mx:DataGrid>
        </mx:Panel>
    </mx:Application>

    There may be other ways to do this but here's what I would do:
    1) add a results method to the remote object:
    src.result="onResult(event.result)";
    2) add the callback method: private function onResult(event : * = null)
    :void{
                                                         if(event is
    ArrayCollection)
                                                                myData =
    ArrayCollection(event);
    3) add the variable: private var myData:ArrayCollection;
    4) make the dataProvider for the grid use the my data :
    dataProvider=""
    You can probably avoid all this by adjusting your dataProvider. I am just
    not sure what it would be without experimenting. But definitely not what
    you have. Maybe just {svc.result}.

  • How to hold the result set

         We have a GUI swing screen in which we have navigation buttons.
         when the user clicks the previous ,next, last,first buttons we have to show the records accordingly.
         The min. size of the database is around 1 million.and each row has 60 columns.
         Our approach is screen--->servlet-->ejb beans --->database.
         since the database is huge how to hold the values, and where, without affecting the performance.
         If we get the resultset it holds all the data.since the data size is huge,we are looking for a solution.The user may browse through the data ,edit the data and delete the data.
         we have to perform accordingly. Also, if, for example, user1 is seeing record no.1 & user 2 has modified record no.3 in the meanwhile, when user1 goes to record no.3, he should see the
         modified record. In short, the user should always see the latest values.
         please give us the best approach to solve this problem.
    Also this is in a multi user environment.

    It seems like you need to look at threads to update current values in the display and narrow the result set that you retrieve to match the criteria needed for display. You might consider making the method to change values a syncronized one.

  • Can i store the Result set values as a Session variable

    hai,
    I want the result set values of a query to be used many times and I want the same resultset between different page calls.
    I want all those records fetched from the database to be available in the next page with out refetching from the database.
    can any one help me out. its very urgent.....
    Thanks and regards,
    Ravikiran
    mail to me at : [email protected]

    "can i store the Result set values as a Session variable "
    Practically Yes u can
    but u want be able to accesses it in other pages
    u can try it and see
    the other thing u can do is store the values from the resultset in a object say vector and put vector in seesion and u can use this any where
    for e.g
    Vector v=new Vector();
    While(rs.next())
    v.addElement(rs.getString(1));
    v.addElement(rs.getString(2));
    session.putValue("myVector",v);
    now where u want to get it do this
    Vector myvec=(Vector)session.getValue("myVector");
    do do futher

  • Call CR XI from C++ routine, need to run the report without display and send the resulting report to the printer

    <table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"></tr><tr><td height="1" style="font-size: 1pt"></td></tr></tbody></table><blockquote><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"><td id="HB_Focus_Element" width="100%" height="250" valign="top"><p>I initiate a CR XI from a C++ routine using  ShellExecute command, the report file is opened and the C++ program continues to execute, this is working fine, now I need the following two things:</p><p>1. When the report is invoked I would like it to run and print the result either to a printer or to a file.</p><p>2. I need to send the report parameters since it will not prompt for it if it runs automatically.</p><p>Thanks in advance for your help.</p></td></tr><tr></tr></tbody></table><blockquote><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" id="HB_Mail_Container"><tbody><tr width="100%" height="100%"><td id="HB_Focus_Element" width="100%" height="250" valign="top"><p>&#160;</p></td></tr></tbody></table></blockquote></blockquote>

    Please re-post if this is still an issue to the Legacy Application Development SDKs Forum or purchase a case and have a dedicated support engineer work with you directly

  • Why to need close the result set and statement

    why to need close the result set and statement

    It's best to explicitly close every ResultSet, Statement, and Connection in the narrowest scope possible.
    These should be closed in a finally block.
    Since each close() method throws SQLException, each one should be in an individual try/catch block to ensure that a failure to close one won't ruin the chances for all the others.
    You can capture this in one nice utility class, like this:
    package db;
    import java.sql.*;
    import java.util.ArrayList;
    import java.util.Map;
    import java.util.LinkedHashMap;
    import java.util.List;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    * Created by IntelliJ IDEA.
    * User: MD87020
    * Date: Feb 16, 2005
    * Time: 8:42:19 PM
    * To change this template use File | Settings | File Templates.
    public class DatabaseUtils
         * Logger for DatabaseUtils
        private static final Log logger = LogFactory.getLog(DatabaseUtils.class);
        /** Private default ctor to prevent subclassing and instantiation */
        private DatabaseUtils() {}
         * Close a connection
         * @param connection to close
        public static void close(Connection connection)
            try
                if ((connection != null) && !connection.isClosed())
                    connection.close();
            catch (SQLException e)
                logger.error("Could not close connection", e);
         * Close a statement
         * @param statement to close
        public static void close(Statement statement)
            try
                if (statement != null)
                    statement.close();
            catch (SQLException e)
                logger.error("Could not close statement", e);
         * Close a result set
         * @param rs to close
        public static void close(ResultSet rs)
            try
                if (rs != null)
                    rs.close();
            catch (SQLException e)
                logger.error("Could not close result set", e);
         * Close both a connection and statement
         * @param connection to close
         * @param statement to close
        public static void close(Connection connection, Statement statement)
            close(statement);
            close(connection);
         * Close a connection, statement, and result set
         * @param connection to close
         * @param statement to close
         * @param rs to close
        public static void close(Connection connection,
                                 Statement statement,
                                 ResultSet rs)
            close(rs);
            close(statement);
            close(connection);
         * Helper method that maps a ResultSet into a map of columns
         * @param rs ResultSet
         * @return map of lists, one per column, with column name as the key
         * @throws SQLException if the connection fails
        public static final Map toMap(ResultSet rs) throws SQLException
            List wantedColumnNames = getColumnNames(rs);
            return toMap(rs, wantedColumnNames);
         * Helper method that maps a ResultSet into a map of column lists
         * @param rs ResultSet
         * @param wantedColumnNames of columns names to include in the result map
         * @return map of lists, one per column, with column name as the key
         * @throws SQLException if the connection fails
        public static final Map toMap(ResultSet rs, List wantedColumnNames)
            throws SQLException
            // Set up the map of columns
            int numWantedColumns    = wantedColumnNames.size();
            Map columns             = new LinkedHashMap(numWantedColumns);
            for (int i = 0; i < numWantedColumns; ++i)
                List columnValues   = new ArrayList();
                columns.put(wantedColumnNames.get(i), columnValues);
            while (rs.next())
                for (int i = 0; i < numWantedColumns; ++i)
                    String columnName   = (String)wantedColumnNames.get(i);
                    Object value        = rs.getObject(columnName);
                    List columnValues   = (List)columns.get(columnName);
                    columnValues.add(value);
                    columns.put(columnName, columnValues);
            return columns;
         * Helper method that converts a ResultSet into a list of maps, one per row
         * @param rs ResultSet
         * @return list of maps, one per row, with column name as the key
         * @throws SQLException if the connection fails
        public static final List toList(ResultSet rs) throws SQLException
            List wantedColumnNames  = getColumnNames(rs);
            return toList(rs, wantedColumnNames);
         * Helper method that maps a ResultSet into a list of maps, one per row
         * @param rs ResultSet
         * @param wantedColumnNames of columns names to include in the result map
         * @return list of maps, one per column row, with column names as keys
         * @throws SQLException if the connection fails
        public static final List toList(ResultSet rs, List wantedColumnNames)
            throws SQLException
            List rows = new ArrayList();
            int numWantedColumns = wantedColumnNames.size();
            while (rs.next())
                Map row = new LinkedHashMap();
                for (int i = 0; i < numWantedColumns; ++i)
                    String columnName   = (String)wantedColumnNames.get(i);
                    Object value = rs.getObject(columnName);
                    row.put(columnName, value);
                rows.add(row);
            return rows;
          * Return all column names as a list of strings
          * @param rs query result set
          * @return list of column name strings
          * @throws SQLException if the query fails
        public static final List getColumnNames(ResultSet rs) throws SQLException
            ResultSetMetaData meta  = rs.getMetaData();
            int numColumns = meta.getColumnCount();
            List columnNames = new ArrayList(numColumns);
            for (int i = 1; i <= numColumns; ++i)
                columnNames.add(meta.getColumnName(i));
            return columnNames;
    }Anybody who lets the GC or timeouts or sheer luck handle their resource recovery for them is a hack and gets what they deserve.
    Do a search on problems with Oracle cursors being exhausted and learn what the root cause is. That should convince you.
    scsi-boy is 100% correct.
    %

  • How to call a jsp file from an servlet and access the jsp file objects??

    Hi everybody
    I have an jsp file where it contains a vector object with some data and I have a servlet that needs to access this vector object . How can my servlet call for this jsp page and get the vector object. ?
    then an applet will be calling this servlet to get some other object created with the data contained within this vector object...so each time Applet ask the servlet for the object the servlet need to call for this jsp page somehow
    My main question is the communication servlet-jsp
    please if u have any clue I will appreciate it
    thanks

    Hi
    There are several ways to share objects between JSPs/Servlets.
    You can share objects by putting them in the request-in which case the objects lifetime is limited by that of the request, Another way is to store them in the session, againg the lifetime is limited by the lifetime of the session. To have objects that have to persistent over the application life-span use the servletContext to store the objects.
    Any good tutorial should help you get started. Please see the link below for a tutorial on Servlets/JSPs
    Note: Local variables in the JSP cannot be shared with other components as their scope is limited to that particular Page/Servlet.
    Link: http://java.sun.com/docs/books/tutorial/servlets/
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc
    http://www.sun.com/developers/support

  • How to convert Smart Form into PDF format and return the result in BAPI?

    I want to convert a Smart Form into PDF format and return the result in BAPI.
    can anyone tell me how it can be done with related example
    regards
    pranay

    hi,
    smart form to pdf--
    All you have to do is call your SF to get OTF and then concert it to PDF. Works like charm:
    DATA: p_output_options TYPE ssfcompop,
    p_control_parameters TYPE ssfctrlop.
    p_control_parameters-no_dialog = 'X'.
    p_control_parameters-getotf = 'X'.
    CALL FUNCTION v_func_name "call your smartform
    EXPORTING
    output_options = p_output_options
    control_parameters = p_control_parameters
    IMPORTING
    job_output_info = s_job_output_info.
    call function 'CONVERT_OTF_2_PDF'
    tables
    otf = s_job_output_info-otfdata
    lines = t_pdf
    and if u need more u can check below links also
    Check the below links..
    Re: Smartforms to PDF
    Re: smartform (otf) as pdf and sending as email-attachment
    VISIT THIS LINK
    Re: Smartforms to PDF
    PLZ REWARD POINTS IF IT HELPS YOU
    rgds
    anver

  • Does Hibernate throw and error if the result set is above a specific #

    Does Hibernate throw and error if the result set is above a specific #
    of records?

    why do you ask?Maybe he hasn't been able to find the bug in his code yet, so he's casting further and further about for more and more esoteric explanations for what he's seeing? ;-)
    (God knows I've been there...)

  • Deploying the JSPs, Servlets and Java class files

    Hello All,
    I'm very new to the Oracle 9i AS. We are using Version 1.0.2.2.
    How do we deploy the JSPs, Servlets, and Java class files (simple class files, not EJBs)?
    plese give us the procedure and stpes how to deply or the links for the same.
    Thanks,
    Santhosh.

    Hi
    I guess u r running apache-jserv as servlet engine for your jsp and servlets. If its so, jsp files can be run without any additonal configuration by putting the jsp file under document root or any subdirectory and for running servlets u have to add classpath entries for your servlet in jserv.properties file.
    To make sure that your servlet engine is working, try
    http://servername:port/servlet/IsItWorking, if u get success msg that means servlet engine is working fine.
    Hope this will help
    Regards
    Kumaran

  • Convert this query to ABAP and display the results

    Hi Everyone,
    I have a sql query in native sql (oracle). I want execute it in ABAP editor and display the results.
    I need to get this to an internal table and display the results. How do i write the script any help will be great use to me.
    Here is the query:
    <i> select (select decode(extent_management,'LOCAL','*',' ') ||
                   decode(segment_space_management,'AUTO','a ','m ')
              from dba_tablespaces where tablespace_name = b.tablespace_name) || nvl(b.tablespace_name,
                 nvl(a.tablespace_name,'UNKOWN')) name,
           kbytes_alloc kbytes,
           kbytes_alloc-nvl(kbytes_free,0) used,
           nvl(kbytes_free,0) free,
           ((kbytes_alloc-nvl(kbytes_free,0))/
                              kbytes_alloc)*100 pct_used,
           nvl(largest,0) largest,
           nvl(kbytes_max,kbytes_alloc) Max_Size,
           decode( kbytes_max, 0, 0, (kbytes_alloc/kbytes_max)*100) pct_max_used from ( select sum(bytes)/1024 Kbytes_free,
                  max(bytes)/1024 largest,
                  tablespace_name
           from  sys.dba_free_space
           group by tablespace_name ) a,
         ( select sum(bytes)/1024 Kbytes_alloc,
                  sum(maxbytes)/1024 Kbytes_max,
                  tablespace_name
           from sys.dba_data_files
           group by tablespace_name
           union all
          select sum(bytes)/1024 Kbytes_alloc,
                  sum(maxbytes)/1024 Kbytes_max,
                  tablespace_name
           from sys.dba_temp_files
           group by tablespace_name )b
    where a.tablespace_name = b.tablespace_name order by 1;
    </i>
    Thanks,
    Prashant.

    Hi Prashant,
    Native SQL commands in ABAP are placed between EXEC SQL and ENDEXEC. You can place all your statements in between these EXEC SQL and ENDEXEC in a report.
    EXEC SQL [PERFORMING <form>].
      <Native SQL statement>
    ENDEXEC.
    Check this link to know about Native SQL
    http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm
    Thanks,
    Vinay

Maybe you are looking for

  • Adobe pdf to Flash page turning book

    First of all apologies as this isn't strictly an Indesign itself question - more the end product of Indesign brochure query. Can anyone recommend a particular professional PDF to Flash page  turning book effect software. I've googled but there's a fa

  • CSS in editable region

    I have created a website using one of the DW site designs. I have created a master.dwt and it is complete with an editable region. What I am having difficulty with is that CSS from the master.dwt is controlling the content in the ER that I am trying

  • Question re: HP Color LaserJet 3800n

    Is the HP Color JaserJet 3800n Adobe PostScript compatible and can it print at 600dpi? If so, is the current drive package available from HP?  What is the URL and name of the driver dowload? I am attempting to print from a Windows 7, 32-bit workstati

  • Is this a tell tale sign of a serious security issue?

    I believe I already know the answer, but I thought I would try the message board before I make my first ever call to an Apple "Geniuos" locale. What do you make of these logs?  (and should OpenDirectory be running?) 1. WebProcess(3830) deny file-read

  • Can't deactivate norton license from old pc to new pc.

    How do I deactivate norton license from old pc to new pc.    I  get error 115 when I try to deactivate.