#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    1
    Rep Power
    0

    Post Invoking COM Objects from JSP


    I am interested in invoking COM objects from my JSP Page. Can anyone help me !


    Bye
    Martin !
  2. #2
  3. No Profile Picture
    PHP Coder
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Ontario
    Posts
    66
    Rep Power
    14
    The JNI is probably the only chance you have which means you'll need to know some C++... why would you want to use COM anyway?
    Click here and wait. It's a kewl effect, trust me.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    Irving, Texas USA
    Posts
    1
    Rep Power
    0
    I would look at J-Integra's (www.j-integra.com) COM-Java bridging tool. It allows you call COM objects from Java code without having to write C++ or native code. You need a pretty good understanding of how the COM object is suppose to work, but if you have that then it should work. It is pricy (about $3K) but if you are going commercial work then it will be work your time.

    (BTW, I evaluated their product and it worked for the evaluation, but we were able to come up with a pure Java solution and didn't need the COM library. So I haven't bought it to use in a production environment and can't comment on that).
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    Brazil
    Posts
    4
    Rep Power
    0

    Lightbulb Reading excell files


    create a DNS connection employee_xls
    and try the code below...

    import java.io.*;
    import java.net.*;
    import java.sql.*;
    import java.util.*;

    public class ReadExcell{
    public static final String DRIVER_NAME = "sun.jdbc.odbc.JdbcOdbcDriver";
    public static final String DATABASE_URL = "jdbc:odbc:employee_xls";

    public static void main(String[] args)
    throws ClassNotFoundException, SQLException{
    Class.forName(DRIVER_NAME);
    Connection con = null;
    try {
    con = DriverManager.getConnection(DATABASE_URL);
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery
    ("select 1stcol, 2ndcol, 3rdcol, etc... from [NAME_OF_SHEET$]");
    while (rs.next()) {
    String ONE = rs.getString(1);
    String TWO = rs.getString(2);
    String THREE = rs.getString(3);
    int ETC = rs.getInt(4); //If it is int

    System.out.println("First: " + 1stcol + " Second: " + 2ndcol + " Third: " + 3rdcol...);
    }
    rs.close();
    stmt.close();
    }
    finally {
    if (con != null)
    con.close();
    }
    }
    }

IMN logo majestic logo threadwatch logo seochat tools logo