C/C++ source code to connect to 8i!

There is plenty of SQL source, but as I can find nothing
explaining how to make a connection to an 8i Listener in C. All
I'd like to do is open a port, submit my SQL, get my data, close
my port and leave... Pretty much in the same manner one uses
Postgress.
any source is greatly appreciated!
null

Do you want to call a web service in a remote system, or do you want to provide a web service?
If you want to call a web service you should create a proxy object via SE80. Open your development package, right click on the tree entry and choose: Create -> Enterprise Service / Web Service -> Proxy Object and provide the needed information (including the WSDL description file). You may then use the proxy object to call the web service (if the connection and everything else works right).
See [http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm]

Similar Messages

  • ABAP source code to connect to third party systems using web service calls?

    Hi all,
              can any one provide an example ABAP source code to connect to third party systems using web service calls? The base system is CRM.

    Do you want to call a web service in a remote system, or do you want to provide a web service?
    If you want to call a web service you should create a proxy object via SE80. Open your development package, right click on the tree entry and choose: Create -> Enterprise Service / Web Service -> Proxy Object and provide the needed information (including the WSDL description file). You may then use the proxy object to call the web service (if the connection and everything else works right).
    See [http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm]

  • How can I print source code with connecting lines on control structures?

    Anyone know of any programs that will format source code printouts and print connecting lines from the start to the end of control structures (such as: if--"end if", while-"end while" etc.)?

    Indentations and comments do help read source code. However, when you have a large program with many levels of nesting of control structures the readability of the code (even with indentations) becomes very difficult.

  • VB6 source code cannot connect to Oracle database after compile to file.exe

    Hi All,
    I have a problem about VB6 connect with Oracle database. It can connect as normal when run on VB program. After compiled to file.exe and execute, it cannot connect to Oracle database. What's going on ? Please advise? Thank you.
    Here is sample of my code connection.
    Option Explicit
    Private wsData As New ADODB.Connection
    wsData.ConnectionString = _
    "Provider=MSDAORA.1;User ID=lsp;Password=lsp2007;Data Source=prd01;Persist Security Info=False"
    wsData.Open
    End sub
    Rgads,
    Ats.

    Hi,
    I believe you're in the wrong forum, this forum is for Oracle Application Express.

  • Unwanted source code appears in browser but not in Dreamweaver Code Window

    I am using templates and css, and Dreamweaver to build a new website of about 20 pages. With the first several pages, everything was working well. Then as I continued to add pages, I started to notice some code appearing at the bottom of web pages (under the footer), and then, a page duplicating the footer, and then, the drop-down function on the index page not working (pulls down and pops right back up) while headers on other pages work fine. I viewed the source code in the browsers (IE and Firefox) and I see the extra code at the bottom. However, this code doesn't show up in Dreamweaver, or, when I open the files in Notepad.
    Following is an example of the different bottom-most lines of code in the Firefox browser compared to what I see in Dreamweaver or Notepad (note the highlighted line that is not showing up in Notepad or Dreamweaver).
    Firefox Browser:
    </div>
          </div>
          <div class="clear"></div>
        </div>
      </div>
    </div>
    <!-- InstanceEndEditable --><script src="http://brandbar.oit.duke.edu/footer/videos_podcasts_full.php" type="text/javascript"></script>
    <script type="text/javascript"  src="http://brandbar.oit.duke.edu/header/js/jquery.min.js"></script>
    <script type="text/javascript" src="http://brandbar.oit.duke.edu/header/js/globalHeader.js"></script> 
    <script type="text/javascript"  src="http://brandbar.oit.duke.edu/footer/js/footer.js"></script>
    </body>
    <!-- InstanceEnd --></html>ript> 
    <script type="text/javascript"  src="http://brandbar.oit.duke.edu/footer/js/footer.js"></script>
    </body>
    <!-- InstanceEnd --></html>
    Notepad or Dreamweaver code screen:
    </div>
          </div>
          <div class="clear"></div>
        </div>
      </div>
    </div>
    <!-- InstanceEndEditable --><script src="http://brandbar.oit.duke.edu/footer/videos_podcasts_full.php" type="text/javascript"></script>
    <script type="text/javascript"  src="http://brandbar.oit.duke.edu/header/js/jquery.min.js"></script>
    <script type="text/javascript" src="http://brandbar.oit.duke.edu/header/js/globalHeader.js"></script> 
    <script type="text/javascript"  src="http://brandbar.oit.duke.edu/footer/js/footer.js"></script>
    </body>
    <!-- InstanceEnd --></html>

    this answer is a bit late, but i think i have figured this problem out and it is probably still bugging someone out there.
    i was having the same issues through many dreamweaver upgrades and kept running into the same problem (only on my Mac though - PC never gave me trouble). anyway, my hard drive recently died and i had a brand new one installed and then i installed a fresh version of CS5. started building a page and ran into the same problem. now that this is happening on a new drive with a fresh OS and reinstalled software, i needed to look elsewhere.
    the problem is so simple you will more than likely cry at the amount of time you have wasted on it. more than likely if this is happening to you, you are working off of a network drive or a server. all my files are stored on a server locally, so when i make a change it is saving to the server. either a bad or slow connection to the server and/or a server going bad will cause this issue.
    take the same file that you are having problems with and save down to your desktop - then preview in a browser. so the solution is to build the entire site on your local drive and then FTP up to the live site when complete.
    hope this helps.

  • How to display the source code for this friggin' file.

    Below is a rather lengthy bit of code that provides the behavior and attributes of a web server for OpenCyc. I need to know if I can enter some java to have the HTML source code displayed in a separate text file whenever this class returns some resulting webpage. If you have any ideas it will be greatly appreciated.
    -"Will code for foo."
    package org.opencyc.webserver;
    * Class WebServer is simple multithreaded HTTP server
    * with CGI limited to a Cyc connection on default port 3600.
    * <p>
    import java.net.*;
    import java.io.*;
    import java.util.*;
    import java.util.jar.*;
    import java.text.*;
    import org.opencyc.util.*;
    public class WebServer extends Thread {
         * Singleton WebServer instance.
        public static WebServer current;
         * Default HTTP port.
        protected static int DEFAULT_PORT = 80;
         * Default Cyc base port.
        protected static int DEFAULT_CYC_PORT = 3600;
         * Default directory to serve files from on non-Windows OS.
        protected static String DEFAULT_DIR = "/";
         * Default directory to serve files from on Windows.
        //protected static String DEFAULT_WIN_DIR = "C:\\";
        protected static String DEFAULT_WIN_DIR = "k:\\opencyc\\run\\httpd\\htdocs";
         * File cache capacity.
        protected static final int CACHE_CAPACITY = 100;
         * File cache to improve file serving performance.
        protected static Hashtable fileCache = new Hashtable(CACHE_CAPACITY);
         * Number of files served from this web server.
        protected static long nbrFilesServed = 0;
         * Number of files served from this web server that were found in the cache.
        protected static long nbrCacheHits = 0;
         * Server socket for accepting connections.
        protected ServerSocket server;
         * Directories to serve files from.
        protected ArrayList dirs;
         * Map from String (jar root) to JarFile[] (jar class path).
        protected HashMap map;
         * Webserver HTTP port.
        protected int port;
         * Cyc HTML host.
        protected String cycHost = "localhost";
         * Cyc HTML port.
        protected int cycPort;
         * Expand jar tress.
        protected boolean trees;
         * Requests flag.
        protected boolean traceRequests;
         * Constructs a WebServer object.
         * @param port the port to use
         * @param directories the directory to serve files from
         * @param trees true if files within jar files should be served up
         * @param traceRequests true if client's request text should be logged.
         * @exception IOException if the listening socket cannot be opened, or problem opening jar files.
        public WebServer() throws IOException {
            getProperties();
            server = new ServerSocket(port);
            processDirectories();
         * Class Task processes a single HTTP request.
        protected class Task extends Thread {
             * Socket for the incoming request.
            protected Socket sock;
             * Client socket to the Cyc KB HTML server.
            protected Socket cycHtmlSocket;
             * Output tcp stream.
            protected DataOutputStream out;
             * Contains the file request path for a not-found error message.
            protected String notFoundPath;
             * Contains the first line of a request message.
            protected String methodLine;
             * Contains the body of a POST method.
            protected String bodyLine;
             * Constructs a Task object.
             * @param sock the socket assigned for this request.
            public Task(Socket sock) {
                this.sock = sock;
             * Processes the HTTP request.
            public void run() {
                if (traceRequests)
                    Log.current.println("connection accepted from " + sock.getInetAddress());
                notFoundPath = "";
                try {
                    out = new DataOutputStream(sock.getOutputStream());
                    try {
                        getBytes();
                    catch (Exception e) {
                        Log.current.println("file not found: " + notFoundPath);
                        try {
                            out.writeBytes("HTTP/1.1 404 Not Found\r\n");
                            out.writeBytes("Server: Cyc WebServer\r\n");
                            out.writeBytes("Connection: close\r\n");
                            out.writeBytes("Content-Type: text/html\r\n\r\n");
                            out.writeBytes("<HTML><HEAD>\n");
                            out.writeBytes("<TITLE>404 Not Found</TITLE>\n");
                            out.writeBytes("</HEAD><BODY>\n");
                            out.writeBytes("<H1>404 - Not Found</H1>\n");
                            out.writeBytes("</BODY></HTML>");
                            out.flush();
                        catch (SocketException se) {
                catch (Exception e) {
                    Log.current.printStackTrace(e);
                finally {
                    try {
                        sock.close();
                    catch (IOException e) {
             * Reads the HTTP request and obtains the response.
             * @exception IOException when HTTP request has an invalid format.
            private void getBytes() throws IOException {
                // Below logic is complex because web browsers do not close the
                // socket after sending the request, so must parse message to find
                // the end.
                BufferedReader in = new BufferedReader(new InputStreamReader(sock.getInputStream()));
                ArrayList inBytes = new ArrayList(200);
                int ch = 0;
                boolean postMethod;
                methodLine = in.readLine();
                //if (traceRequests)
                //    Log.current.println("methodLine=" + methodLine);
                bodyLine = "";
                if (methodLine.startsWith("POST /"))
                    postMethod = true;
                else
                    postMethod = false;
                //if (traceRequests)
                //    Log.current.println("postMethod=" + postMethod);
                int ch1 = -1;
                int ch2 = -1;
                int ch3 = -1;
                int ch4 = -1;
                // Read the HTTP request headers.
                while (true) {
                    ch = in.read();
                    inBytes.add(new Integer(ch));
                    ch1 = ch2;
                    ch2 = ch3;
                    ch3 = ch4;
                    ch4 = ch;
                    if (ch1 == '\r' && ch2 == '\n' && ch3 == '\r' && ch4 == '\n')
                        break;
                    if ((! postMethod) &&
                        (! in.ready()) &&
                        ch1 == -1 &&
                        ch2 == -1 &&
                        ch3 == '\r' &&
                        ch4 == '\n') {
                        inBytes.add(new Integer('\r'));
                        inBytes.add(new Integer('\n'));
                        break;
                byte[] byteArray = new byte[inBytes.size()];
                for (int i = 0; i < inBytes.size(); i++) {
                    Integer ich = (Integer) inBytes.get(i);
                    byteArray[i] = ich.byteValue();
                String headers = new String(byteArray);
                if (postMethod) {
                    String lcHeaders = headers.toLowerCase();
                    int i = lcHeaders.indexOf("content-length: ");
                    String contentLength = lcHeaders.substring(i + 16);
                    int j = contentLength.indexOf("\r\n");
                    contentLength = contentLength.substring(0, j);
                    int bodyLen = (new Integer(contentLength)).intValue();
                    for (int k = 0; k < bodyLen; k++) {
                        bodyLine = bodyLine + (new Character((char) in.read())).toString();
                String line = methodLine + "\r\n" + headers + bodyLine;
                if (traceRequests)
                    Log.current.println(line);
                if (postMethod)
                    processHttpPost();
                else
                    if (line.startsWith("GET /"))
                        processHttpGet(line.substring(4));
                    else {
                        Log.current.println("Invalid request = " + line);
                        throw new IOException();
             * Processes an HTTP GET method.
             * @param httpGetPath the path of the file to get.
             * @exception IOException if the file is not found.
            private void processHttpGet(String httpGetPath) throws IOException {
                int i = httpGetPath.indexOf(' ');
                if (i > 0)
                    httpGetPath = httpGetPath.substring(0, i);
                Log.current.println(methodLine + " from " + sock.getInetAddress().getHostName());
                i = httpGetPath.indexOf("cg?");
                if (i > 0) {
                    cycHtmlRequest(httpGetPath.substring(i + 3));
                    return;
                notFoundPath = httpGetPath;
                i = httpGetPath.indexOf('/');
                if (i < 0 || map == null) {
                    if (map == null || httpGetPath.endsWith(".jar")) {
                        for (int j = 0; j < dirs.size(); j++) {
                            String dir = (String) dirs.get(j);
                            String nativePath = dir + httpGetPath;
                            nativePath = nativePath.replace('/', File.separatorChar);
                            if (fileCache.containsKey(nativePath)) {
                                writeDataBytes((byte[]) fileCache.get(nativePath));
                                Log.current.println("...cached");
                                nbrCacheHits++;
                                nbrFilesServed++;
                                return;
                            try {
                                File f = new File(nativePath);
                                byte[] fileBytes = getBytes(new FileInputStream(f), f.length());
                                writeDataBytes(fileBytes);
                                if (fileCache.size() >= CACHE_CAPACITY)
                                    fileCache.clear();
                                fileCache.put(nativePath, fileBytes);
                                Log.current.println("...from " + nativePath);
                                nbrFilesServed++;
                                return;
                            catch (IOException e) {
                    throw new IOException();
                String jar = httpGetPath.substring(0, i);
                httpGetPath = httpGetPath.substring(i + 1);
                JarFile[] jfs = (JarFile[]) map.get(jar);
                if (jfs == null)
                    throw new IOException();
                for (i = 0; i < jfs.length; i++) {
                    JarEntry je = jfs.getJarEntry(httpGetPath);
    if (je == null)
    continue;
    writeDataBytes(getBytes(jfs[i].getInputStream(je), je.getSize()));
    nbrFilesServed++;
    return;
    throw new IOException();
    * Processes an HTTP POST method.
    * @exception IOException if the file is not found.
    private void processHttpPost() throws IOException {
    Log.current.println("POST " + bodyLine + " from " + sock.getInetAddress().getHostName());
    cycHtmlRequest(bodyLine);
    * Reads the specified number of bytes and always close the stream.
    * @param in the file to be read for subsequent downloading.
    * @param length the number of bytes to read from the file.
    * @return An array of bytes from the file.
    * @exception IOException if an error occurs when processing the file.
    private byte[] getBytes(InputStream in, long length) throws IOException {
    DataInputStream din = new DataInputStream(in);
    byte[] bytes = new byte[ (int) length];
    try {
    din.readFully(bytes);
    finally {
    din.close();
    return bytes;
    * Sends the HTML request to Cyc.
    * @param cycPath the portion of the URL which is given to the Cyc HTML server.
    private void cycHtmlRequest(String cycPath) {
    String request = sock.getInetAddress().getHostName() + "&" + cycPath + "#";
    System.out.println("request=" + request);
    ArrayList bytes = new ArrayList(10000);
    try {
    cycHtmlSocket = new Socket(cycHost, cycPort);
    System.out.println("cycHost=" + cycHost + " cycPort=" + cycPort);
    BufferedReader cycIn = new BufferedReader(new InputStreamReader(cycHtmlSocket.getInputStream()));
    PrintWriter cycOut = new PrintWriter(cycHtmlSocket.getOutputStream(), true);
    cycOut.println(request);
    cycOut.flush();
    int ch = 0;
    while (ch >= 0) {
    ch = cycIn.read();
    bytes.add(new Integer(ch));
    catch (Exception e) {
    Log.current.printStackTrace(e);
    byte[] byteArray = new byte[bytes.size()];
    for (int i = 0; i < bytes.size() - 1; i++) {
    Integer ich = (Integer) bytes.get(i);
    byteArray[i] = ich.byteValue();
    try {
    writeTextBytes(byteArray);
    catch (Exception e) {
    Log.current.println(e.getMessage());
    * Responds to the HTTP client with data content from the requested URL.
    * @param bytes the array of bytes from the URL.
    * @exception IOException if there is an error writing to the HTTP client.
    public void writeDataBytes(byte[] bytes) throws IOException {
    out.writeBytes("HTTP/1.1 200 OK\r\n");
    out.writeBytes("Server: Cyc WebServer\r\n");
    out.writeBytes("Connection: close\r\n");
    out.writeBytes("Content-Length: " + bytes.length + "\r\n");
    String prefix = (new String(bytes)).toLowerCase();
    if (prefix.indexOf("<html>") > -1)
    out.writeBytes("Content-Type: text/html\r\n\r\n");
    else
    out.writeBytes("Content-Type: application/java\r\n\r\n");
    out.write(bytes);
    out.flush();
    * Respond to the HTTP client with text content from the requested URL.
    * @param bytes the array of bytes from the URL.
    * @exception IOException if there is an error writing to the HTTP client.
    public void writeTextBytes(byte[] bytes) throws IOException {
    out.writeBytes("HTTP/1.1 200 OK\r\n");
    out.writeBytes("Server: Cyc WebServer\r\n");
    out.writeBytes("Connection: close\r\n");
    out.writeBytes("Content-Length: " + bytes.length + "\r\n");
    out.writeBytes("Content-Type: text/html\r\n\r\n");
    out.write(bytes);
    out.flush();
    * Gets properties governing the web server's behavior.
    private void getProperties() {
    port = DEFAULT_PORT;
    String portProperty = System.getProperty("org.opencyc.webserver.port", "");
    if (! portProperty.equalsIgnoreCase(""))
    port = (new Integer(portProperty)).intValue();
    Log.current.println("Listening on port " + port);
    cycPort = DEFAULT_CYC_PORT;
    String cycPortProperty = System.getProperty("org.opencyc.webserver.cycPort", "");
    if (! cycPortProperty.equalsIgnoreCase(""))
    cycPort = (new Integer(cycPortProperty)).intValue();
    Log.current.println("Cyc connections directed to port " + cycPort);
    String dirsProperty = System.getProperty("org.opencyc.webserver.dirs", "");
    dirs = new ArrayList(3);
    StringTokenizer st = new StringTokenizer(dirsProperty, ";", false);
    while (st.hasMoreTokens()) {
    String dir = st.nextToken();
    dirs.add(dir);
    trees = false;
    String treesProperty = System.getProperty("org.opencyc.webserver.trees", "");
    if (! treesProperty.equalsIgnoreCase(""))
    trees = true;
    traceRequests = false;
    String traceRequestsProperty = System.getProperty("org.opencyc.webserver.traceRequests", "");
    if (! traceRequestsProperty.equalsIgnoreCase("")) {
    traceRequests = true;
    Log.current.println("tracing requests");
    * Adds transitive Class-Path jars to jfs.
    * @param jar the jar file
    * @param jfs the list of jar files to serve.
    * @param dir the jar file directory.
    * @exception IOException if an I/O error has occurred with the jar file.
    private void addJar(String jar, ArrayList jfs, String dir) throws IOException {
    Log.current.println("Serving jar files from: " + dir + jar);
    JarFile jf = new JarFile(dir + jar);
    jfs.add(jf);
    Manifest man = jf.getManifest();
    if (man == null)
    return;
    Attributes attrs = man.getMainAttributes();
    if (attrs == null)
    return;
    String val = attrs.getValue(Attributes.Name.CLASS_PATH);
    if (val == null)
    return;
    dir = dir + jar.substring(0, jar.lastIndexOf(File.separatorChar) + 1);
    StringTokenizer st = new StringTokenizer(val);
    while (st.hasMoreTokens()) {
    addJar(st.nextToken().replace('/', File.separatorChar), jfs, dir);
    * Administrative accessor method that obtains list of directories from which files are served.
    public ArrayList getDirs() {
    return dirs;
    * Administrative method that updates the list of directories from which files are served.
    public synchronized void setDirs(ArrayList dirs) throws IOException {
    this.dirs = dirs;
    fileCache.clear();
    processDirectories();
    * Administrative accessor method that obtains number of files served.
    * @return The number of files served.
    public long getNbrFilesServed() {
    return nbrFilesServed;
    * Administrative accessor method that obtains number of files served from cache.
    * @return The number of files served from the cache.
    public long getNbrCacheHits() {
    return nbrCacheHits;
    * Administrative method that clears the file cache.
    public synchronized void clearFileCache() {
    Log.current.println("Clearing file cache");
    fileCache.clear();
    nbrFilesServed = 0;
    nbrCacheHits = 0;
    * Processes the directories from which files are served, expanding jar trees if
    * directed.
    * @exception IOException if problem occurs while processing the jar files.
    private void processDirectories() throws IOException {
    if (dirs.size() == 0)
    if (File.separatorChar == '\\')
    dirs.add(DEFAULT_WIN_DIR);
    else
    dirs.add(DEFAULT_DIR);
    Iterator directories = dirs.iterator();
    while (directories.hasNext())
    Log.current.println("Serving from " + directories.next());
    if (trees) {
    map = new HashMap();
    for (int j = 0; j < dirs.size(); j++) {
    String dir = (String) dirs.get(j);
    String[] files = new File(dir).list();
    for (int i = 0; i < files.length; i++) {
    String jar = files[i];
    if (!jar.endsWith(".jar"))
    continue;
    ArrayList jfs = new ArrayList(1);
    addJar(jar, jfs, dir);
    map.put(jar.substring(0, jar.length() - 4), jfs.toArray(new JarFile[jfs.size()]));
    * Provides the command line interface for creating an HTTP server.
    * The properties are:
    * <pre>
    * org.opencyc.webserver.port=<HTTP listening port>
    * </pre>
    * which defaults to 80.
    * <pre>
    * org.opencyc.webserver.cycPort=<Cyc connection port>
    * </pre>
    * which defaults to 3600.
    * <pre>
    * org.opencyc.webserver.dirs=<path>;<path> ... ;<path>
    * </pre>
    * with the argument enclosed in quotes if any path contains an
    * embedded space.
    * The default directory on Windows is C:
    * and the default on other systems is / the default
    * can be overridden with this property. By default, all files
    * under this directory (including all subdirectories) are served
    * up via HTTP. If the pathname of a file is <var>path</var> relative
    * to the top-level directory, then the file can be downloaded using
    * the URL
    * <pre>
    * http://<var>host</var>:<var>port</var>/<var>path</var>
    * </pre>
    * Caching of file contents is performed.
    * <pre>
    * org.opencyc.util.log=all
    * </pre>
    * If the all value is given, then all attempts to download files
    * are output.
    * <pre>
    * org.opencyc.webserver.traceRequests
    * </pre>
    * If this property has any value, then the client HTTP requests are
    * output.<p>
    * <pre>
    * org.opencyc.webserver.trees
    * </pre>
    * This property can be used to serve up individual files stored
    * within jar files in addition to the files that are served up by
    * default. If the property has any value, the server finds all jar files
    * in the top-level directory (not in subdirectories). For each
    * jar file, if the name of the jar file is <var>name</var>.jar, then any
    * individual file named <var>file</var> within that jar file (or within
    * the jar or zip files referenced transitively in the Class-Path manifest
    * attribute, can be downloaded using a URL of the form:
    * <pre>
    * http://<var>host</var>:<var>port</var>/<var>name</var>/<var>file</var>
    * </pre>
    * When this property has any value, an open file descriptor and cached
    * information are held for each jar file, for the life of the process.
    * @param args an unused array of command line arguments.
    public static void main(String[] args) {
    Log.makeLog();
    System.out.println("OpenCyc Web Server");
    try {
    // Launch thread to accept HTTP connections.
    current = new WebServer();
    current.start();
    catch (IOException e) {
    e.printStackTrace();
    * Just keep looping, spawning a new thread for each incoming request.
    public void run() {
    try {
    while (true) {
    // Launch thread to process one HTTP request.
    new Task(server.accept()).start();
    catch (IOException e) {
    e.printStackTrace();

    JLundan,
    I want to thank you for responding to the thread I started on the forum at java.sun.com. Your solution to my problem of needing to print the code of the html pages that the file I included generates was just what I was looking for. However, I have some further questions to ask, if you don't mind. To clarify my task I should say that your rephrasing of the problem is accurate: "You wan't to display the contents of the HTML file that the web server produces in response of client's request?"
    Yes, this is what I need to do, but also it needs to display the source code of that html file that the server produces in response to the client's request. Also, in this case, I am the client requesting that the server return some html file, and I'm not sure where the server is. But the webserver.java file that I shared on the forum is on my local machine. I was wondering if I could modify this webserver.java file at my home so that any html file the server returns to me would automatically display the source code. This is a school project of mine and I am stuck on this one thing here.
    Further, where would I put the "foo.html" file so it can be written to?
    FileOuputStream fos = new FileOutputStream("foo.html");
    fos.write(bytes);
    fos.close();
    Thanks so much for your help. I look forward to your response, at your convenience.
    Regards

  • Real-Time Application doesn't run; source code works fine

    The short version is I'm programming a cRIO and apparently the RT code isn't running after being deployed and I can't figure out why. This is further complicated that I'm doing all this remotely and I don't have direct access to the unit since I'm 500 miles away. I'm working through a couple of other guys who know some LabVIEW, but neither works at the site so they have to explicitely travel out there every time I have a bright idea.
    I was out there a few weeks ago. During this time I created a simple cRIO code, since I'm new to cRIO, that allowed the user to move a control and change a graph. It worked fine, but I should note it did not have an FPGA component. After that I worked on the real code, which reads some sensors, displays the results on a UI and logs the results. This did have FPGA. I used it in the LabVIEW environment and it worked fine, but I ran out of time before I could complete a release version and deploy the RT as a compiled application. I sent them the release version later, my contact deployed it but got network stream errors when running the UI.
    After hours of looking at network problems and sending over debug versions, I tried creating a log on the RT level so I could see what was going on. The log doesn't even open, even if it's the first command in the code. I pored through the forums and found http://forums.ni.com/t5/LabVIEW/cRIO-Troubleshooting-creation-and-deployment-of-startup/td-p/1956475... which took me in a new direction.
    I had my contact use the RT debug console and when he pulls up the RT front panel, it shows a broken run arrow. He clicks it and nothing happens -- no running, no bug list. If he pulls up the bug list manually, it's empty. Again the RT works fine if you run it through LabVIEW and not as a compiled real-time application. He also noticed that the Open FPGA VI was grayed out on the block diagram. No other icons are.
    So the problem appears to be that the compiled RT application is getting some kind of error but not telling me what it is, and it seems to be related to opening the FPGA. I've recompiled the FPGA and RT. I've had him recompile the RT himself, but not the FPGA because it would take hours. He's downloading everything correctly to the cRIO. The RT is set to run automatically. He's rebooting the cRIO every time he deploys the RT. They have LabVIEW on a computer there but it doesn't have the right drivers to run the code from the LV environment. I'm resisting having them install the dirvers because downloading big files is complicated there due to security restrictions and a lousy network connection at a remote site. Besides that doesn't solve the problem of the RT executable not running the same as the source code, which according to the thread above appears to be a thing.
    The latest thing I'm trying is that I sent him instructions for how to build a source distribution from the project I sent and try deploying that to the cRIO. Even if that works I'm not sure that's an acceptable solution because I assume running the VI rather than the EXE is slower, and they need speed on this project.
    I simply have no idea where to go from here. I probably need to get direct acess to the cRIO and I might be able to convince them to ship it to me so I can figure this out, but I'm not sure where I'd even start other than the standard voodoo debugging of "try stuff at random until something works". I'm open to suggestions if anyone has managed to solve this before.
    Code snippet of the first part of the project is attached, though I'm not sure how much good it will do. I'm really stumped and the client is getting frustrated with how much of the budget is going to fix this.
    Solved!
    Go to Solution.
    Attachments:
    RTMainSnippet.png ‏623 KB

    Have you checked the cRIO error log? Usually I'd access it through the LabVIEW project (right-click on the target, don't remember the exact menu options and I don't have the RT toolkit installed on this machine to check), but it must be stored somewhere on the cRIO as well, although I don't know if it's in a human-readable format.
    Which cRIO are you using? What exactly do you mean by "debug console"? (This may be related to the cRIO - the newer ones have video out, although I don't know if that's what you're referring to.) With a broken run arrow, you won't get an error list unless you're running in the development environment.
    Have you confirmed that the software installed on the cRIO matches the version you're using for development, including patch level? Get someone to connect to the cRIO with Measurement and Automation Explorer, and get a list of the software installed on the cRIO.
    Sounds like the ability to connect with a remote debugger would be helpful here, if you can get the right drivers installed on the machine with LabVIEW that's connected to the cRIO. Make sure all driver versions match what you're using. Any chance you could then do a remote desktop connection from your work site to the remote LabVIEW machine?

  • If I Use JavaFX to Create a Game Do I Have to Release the Source Code?

    Hello,
    I've asked this question before, but I just thought I would try it again now
    that version 1.0 is out.
    If I Use JavaFX to Create a Game Do I Have to Release the Source Code?
    Thanx in advance.

    Could you please point me to a resource describing "the JavaFX Runtime license"? I'm trying to find answers to the following questions:
    1. I'd like to use Scenario.jar from the JavaFX project in a desktop app that is not using Webstart and is not an applet. Will I be able to ship the jar with my software?
    2. Can JavaFX applications be distributed as commercial software in the absence of a Web connection?
    What's not clear to me is which is the real license for Scenario.jar (as shipped with JavaFX). Is it the one in openjfx-compiler's trunk, or the one that comes with the JavaFX SDK (which is very vague about redistribution)?

  • How to get the source code of an HTML page in Text file Through java?

    How to get the source code of an HTML page in Text file Through java?
    I am coding an application.one module of that application is given below:
    The first part of the application is to connect our application to the existing HTML form.
    This module would make a connection with the HTML page. The HTML page contains the coding for the Form with various elements. The form may be a simple form with one or two fields or a complex one like the form for registering for a new Bank Account or new email account.
    The module will first connect through the HTML page and will fetch the HTML code into a Text File so that the code can be further processed.
    Could any body provide coding hint for that

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • 2.1 RC1 - Search Source Code results - Go To package name doesn't work

    Hi.
    When I perform a search through Reports -> Data Dictionary -> PLSQL -> Search Source Code and I right-click -> Go To ... on a row of the results, nothing happens.
    Regards.
    Alessandro
    Edited by: archimede on Dec 2, 2009 12:29 PM

    Sorry Vadim, but the procedure to reproduce the bug is different:
    1) Open the Reports tab
    2) Expand Data Dictionary node
    3) Expand PLSQL node
    4) Click on Search Source Code
    5) Select a Connection
    6) Click on Text Search, enter a string to search and click Apply
    7) On the results page, right-click any line and select Go To <package name>
    8) The package opens on line 1, not the line shown on step 7
    While we're at it, do you think it would be possible to make the above process more user-friendly? Like, for example, right-clicking on a Connection and have the Search Source Code option there (that would take me directly to step 6)?
    Regards.
    Alessandro

  • Visual basic 6.0 source code for reading DAQ 6015 USB

    I am doing a specific software in Visual Basic 6.0 to measure some characteristics of a filter.
    To do that I use a NI DAQ 6015 for USB; I need to drive a pressure controller by an analogic output with an increasing (step by step) tension DC.
    Can anyone give me the source code to do this.
    It seems that I have another problem : the sensors give me a right tension DC, but after the MAX software gives me always +10 Volts : is it a malfunction of the card or of the software; in this last case, can anyone give me the good code.
    Thanks a lot.

    Hello!
    Visual Basic 6.0 is now supported by NI-DAQmx 7.5, so you can directly use the NI-DAQmx drivers to use your DAQPad-6015.
    You can find an analog output example in the following folder "C:\Program Files\National Instruments\NI-DAQ\Examples\Visual Basic 6.0\Analog Out\Generate Voltage\Cont Gen Volt Wfm-Int Clk". This will show you how to generate a continuous waveform.
    Concerning the voltage that is at 10 volts, it looks like you misconfigure the external connection. You should take a look at the NI-DAQmx help file in the section "Measurement Fundamentals >> Signals >> Analog >> Connecting Analog Input Signals" to check that you use the correct configuration.
    Best regards!

  • Dynamic-side Box? Can't read source code with java

    Hi all,
    I am trying to read a source code of a web page with a java program. I can connect to the page and read a part of the source code without any problems however after a while when it comes to a part where mozilla and opera identifies as "dynamic-side box" my java program fails to read the source code and stops reading the rest of the page.
    Here is the part of the output I get from mozilla:
    <body id="city">
              <script type="text/javascript" src="/js/wz_tooltip.js"></script>
              <div id="container">
                   <div id="container2">
                        <div id="header">
                             <h1>Ikariam</h1>
                             <h2>Antik �a&#287;&#305; Ya&#351;a!</h2>
                        </div>
    <div id="breadcrumbs"><h3>Bulundu&#287;un nokta:</h3><a href="?view=worldmap_iso&islandX=78&islandY=80" title="D�nya haritas&#305;na d�n"><img src="skin/layout/icon-world.gif" alt="D�nya" /></a> > <a href="?view=island&id=2444" class="island" title="Adaya d�n">Sterios[78:80]</a> > <span class="city">ProPolis</span></div><!-- -------------------------------------------------------------------------------------
         ///////////////////////////// dynamic side-boxes. //////////////////////////////////
         //////////////////////////////////////////////////////////////////////////////////// -->
         <div id="information" class="dynamic">
              <h3 class="header">Info</h3>
              <div class="content">And here is the corresponding part in java console output:
    <div id="breadcrumbs">
        <h3>Bulundu&#287;un nokta:</h3>
         <span class="textLabel">Hata!</span>
    </div>
    <div id="information" class="dynamic"></div>
    <div id="mainview">
        <div class="buildingDescription">
            <h1>Hata!</h1>
        </div>
        <div class="contentBox01h">
            <h3 class="header"><span class="textLabel">Hata mesaj&#305;</span></h3>
            <div class="content">
                <ul class="h�bsch">
    <li><a href="http://ikariam.net"></a></li>            </ul>
            </div><!-- end #content -->
            <div class="footer"></div>
        </div><!-- end #contentbox -->
    </div><!-- end #mainview -->Is there a way to skip this dynamic-side boxes in java. Because I need to read an information that is located at the near end of the source code however since it stops when it hits to a dynamic-side box I can't.
    Thanks in advance, regards...

    Hi,
    That is what I was trying in deed! I was trying with a Scanner but I also tried with the link you have given. That also failed. Somehow java stops reading the source when it hits "dynamic-side box". However there has to be a way to skip this. If mozilla can do that, I know that java also can. I wonder how....
    Cheers...

  • 30EA2 - Search Source Code results - Go To package name problem

    As mentioned here 2.1 RC1 - Search Source Code results -> Go To <package name> doesn't work , Reports -> Data Dictionary -> PLSQL -> Search Source Code -> right-click -> Go To doesn't go to the specific line: can this be fixed?
    Alessandro

    Sorry Vadim, but the procedure to reproduce the bug is different:
    1) Open the Reports tab
    2) Expand Data Dictionary node
    3) Expand PLSQL node
    4) Click on Search Source Code
    5) Select a Connection
    6) Click on Text Search, enter a string to search and click Apply
    7) On the results page, right-click any line and select Go To <package name>
    8) The package opens on line 1, not the line shown on step 7
    While we're at it, do you think it would be possible to make the above process more user-friendly? Like, for example, right-clicking on a Connection and have the Search Source Code option there (that would take me directly to step 6)?
    Regards.
    Alessandro

  • How can one encrypt the source code of a given web page(html, jsp, etc.) ?

    Good Day! I'm just having a hard time of thinking how to encrypt the source code of a given web page(html, jsp, etc.) without affecting how it is previewed in an Internet Browser. What I plan is to disable the capabilities of some malicious Internet users of copying the source codes of my web pages by using the "View Source" option of Internet Explorer and the equivalent function in Netscape Navigator. Please somebody help me in this matter (I'm planning to use an IDEA algorithm using JCE)....
    It would be big help if a running code is supplied.
    Thank you very much in advance.
    God Bless!!!
    - Jonathan Untalan([email protected])

    don't know theses softs. What i know about encrypted web pages, is that you need a secure socket connection (https).
    Your web page will be ciphered, send to the user, and decipher by the browser with the signature file associated to your https connexion.
    It isn't possible to encrypt your page directly, and then decrypt them when requested.
    For the download time, only the server is responsible for this.
    if it is overloaded, then it will slow down its upload.
    Maybe you use some encryption method that require a lot of CPU time.
    For summary : you can only cipher the pipe transport, but not the transported pages.
    Good luck in your search.

  • Source Code

    Hi All,
    I have a unique issue.
    If I log on to Production using Oracle Tools (Forms/Reports/Procedure Builder) I can view the souce code (in the "Stored Porgram Unit Editor" window) for all procedures, functions, triggers etc. (Object Navigator/Database Objects) .
    But if I log on to Development I cannot view the souce code, the editor is blank.
    The editor window has the Owner (Schema Name), Name (Procedure Name), it even shows the errors, but the main panel is blank.
    Any suggestions?
    Thanks
    Habeeb

    Here is what I did:
    1) Connected with UserA in TOAD and created a procedure TEST.
    2) Then connected in Oracle Forms with UserB.
    3) Opened object navigator and clicked Database Objects node
    4) Browsed Stored Program Units for UserA and I DID NOT see TEST listed.
    I went back to TOAD (UserA), and granted execute rights on UserA.TEST to UserB.
      GRANT EXECUTE ON test TO UserB;Now after granting rights, I went back to Oracle Forms.
    a) Disconnected UserB
    b) Reconnected UserB
    c) Opened object navigator and clicked Database Objects node
    d) Browsed Stored Program Units for UserA and I DID see TEST procedure listed.
    e) Double clicking the procedure name opened its source code.
    If you are doing all the above and still didn't see the object listed or its source code, it may be your Forms installation or Forms version or TNSNAMES pointing to different DB.
    Forms/Reports have their own TNSNAMES file and it should point to the same database where your TOAD/SQL Developer are pointing to.
    Hope it helps!

Maybe you are looking for