Tomcat 5 JDBC question

Does Tomcat 5.0 only support TYPE_FORWARD_ONLY Result Sets? Ive declared my result set as
private ResultSet rs;
stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
However when I try and scroll through it using
stmt = con.createStatement();
rs = stmt.executeQuery("SELECT * FROM customer");
boolean is_true = rs.last(); //this will set the pointer in the last record of your ResultSet.
no_of_records = rs.getRow(); //return the current record number, ie last record number.
ResultSetMetaData rsmd = rs.getMetaData();
column_count = rsmd.getColumnCount();
customerArray = new String[no_of_records][column_count];
buf.append("<p align=center>#Records: "+no_of_records+"</p>");
buf.append("<p align=center>#Columns: "+column_count+"</p>");
I keep getting the error :
java.sql.SQLException: Result set type is TYPE_FORWARD_ONLY at sun.jdbc.odbc.JdbcOdbcResultSet.last(JdbcOdbcResultSet.java:2274) at EditCustomer.doPost(EditCustomer.java:55)
Where line 55 of Edit Customer is the first statement to scroll through the ResultSet
boolean is_true = rs.last(); //this will set the pointer in the last record of your ResultSet.
Do I have to scroll through the ResultSet and simply count using variables or can TYPE_SCROLL_SENSITIVE ResultSet. be used in Tomcat 5.0 as a servlet or could it be that I am simply declaring the resultset incorrectly??
Thanks for your help in advance!

Yeah....mySQL would not be a bad thing to learn at this point. Considering developing a private BB and MySQL would be ideal for that.
Anyhow back to my problem, which my the way is no longer a problem. Thanks for your help...Ill probably be back later with more questions. Just by the way if anyone wants to know how to do it here is some of the code.
PrintWriter output = response.getWriter();
response.setContentType( "text/html" );
StringBuffer buf = new StringBuffer();
buf.append("<HTML><HEAD><TITLE>\n");
try
     stmt = con.createStatement();
     rs = stmt.executeQuery("SELECT * FROM customer");
     int rows=0;
     int cols=3;
     while(rs.next())
          rows++;
     customerArray = new String[rows][cols];
     rs.close();
     rs = stmt.executeQuery("SELECT * FROM customer");
     rs.next();
     for(int i=0; i<customerArray.length; i++)
          for (int j=0; j<customerArray.length; j++)
               if(j==0)
                    customerArray[i][j] = rs.getString("Name");
               if(j==1)
                    customerArray[i][j] = rs.getString("Level");
               if(j==2)
                    customerArray[i][j] = rs.getString("Note");
               else{}
               rs.next();
          rs.close();
          buf.append("</TITLE></HEAD>\n");
          buf.append("<body bgcolor=#D7DBE7 text=#0000FF>");
          buf.append("<div align=center>");
          buf.append("<p>�</p>");
          buf.append("<form action=http://Colt/Admin/servlet/servDeleteCustomer method=post name=Delete id=Delete>");
          buf.append("<div align=center>");
          buf.append("<table width=255 border=0>");
     buf.append("<tr>");
     buf.append("<td width=109>Delete Customer: </td>");
     buf.append("<td width=76><select name=delete id=deleteName>");
     for(int i=0; i<customerArray.length; i++)
               for (int j=0; j<customerArray[i].length; j++)
                    if(j==0)
                         buf.append("<option value="+customerArray[i][j]+">"+customerArray[i][j]+"</option>");
               else{}
     buf.append("</select></td>");
     buf.append("<td width=56><input type=submit name=Submit value=Submit /></td>");
     buf.append("</tr>");
          buf.append("</table>");
          buf.appen("</div></form><p>�</p><p>�</p></div></BODY></HTML>");
          output.println(buf.toString());
          output.close();
catch(.....)

Similar Messages

  • Apache - mod_jk - tomcat site filesystem question

    hi all
    we finished today to set up apache+mod_jk+tomcat togheter
    we done it because in this way apache will serve static pages and tomcat jsp + servlet right?
    now, a (maybe stupid) question:
    how to make apache serve static pages and tomcat jsp & servlets? shall we divide our site into two directories (one, with static pages and the other with servlet and jsp) or there is a way to map our site under tomcat and apache in order to avoid such a division?
    thanx a lot
    sandro

    thanx a lot for your answer
    but i need another suggestion:
    lets imagine i have my little site with this directory sistem:
    directory "mysite"
    here a lot of *.htm files and a directory named "dinamic" containing all the dinamic content (*.jsp and the WEB-INF/classes/*.class files)
    now my question is:
    can I leave this structure intact or shall i divide the *.htm files from the dinamic content?
    what do the standard tell?
    thanx a lot
    sandro

  • MySQL /JDBC Question

    I began playing with JDBC a few days ago. I set up a database using mySQL and wrote a simple java program that will connect to it. Works good from the computer that holds the database.
    I try and run the same program from my secondary computer which does not have mySQL or ODBC mySQL drivers, I get com.mysql.jdbc.Driver for an error message. (Trying to access the database on my main computer via ip/databasename)
    My Question is, do you HAVE to have mySQL or Connector/ODBC installed on a computer if you wish to connect to a database on other computer??
    Here's where it prints the error message...
    try
    Class.forName("com.mysql.jdbc.Driver");
    catch (Exception e)
    JOptionPane.showMessageDialog(null, "ERROR = " + e.getMessage());
    I use this as my url..
    private final String url = "jdbc:mysql://122.122.122.122:3306/test123";
         

    Say I want to make a simple web applet that will
    access a database on my computer. The only way my
    vistors to my website will be able to access the
    database via the web applet is by having mySQL JDBC
    driver installed on their computers?yes.
    however.
    you can package up the JDBC driver as part of your jar with your applet so it doesn't require the user to "install" anything. it's just part of your applet.

  • Newbie with JSP & JDBC questions

    Hi. I have a quick question. I have a client jsp page with a table, listing all the fields from my mySQL table called kellybclients. At the end of each row, I also have a submit button that I would like navigate the user to the campus jsp page that only shows the data associated with the client who's button they clicked on in the table. I'm trying to figure out how to pass this data from my JSP into the rowset.setCommand method in my connection/data bean. I am using a cached row set. Here's the code from my bean:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package ETS;
    import java.sql.SQLException;
    import javax.sql.rowset.CachedRowSet;
    import java.util.ArrayList;
    import com.sun.rowset.CachedRowSetImpl;
    public class CampusDataBean {
        private CachedRowSet rowSet;
      public CampusDataBean() throws Exception
        Class.forName("com.mysql.jdbc.Driver");
        rowSet = new CachedRowSetImpl();
        rowSet.setUrl("jdbc:mysql://traderseven.nmsu.edu/is470Spring08?relaxAutoCommit=true");
        rowSet.setUsername("is470Spring08");
        rowSet.setPassword("1DoNtier");
        rowSet.setCommand("SELECT campid, clientid, campname,campcounty FROM kellybCampus WHERE clientid=?");
        CampusBean camp = new CampusBean();
        rowSet.setString(1, camp.getClientID());
        rowSet.execute();
      public ArrayList<CampusBean> getCampusList() throws SQLException
        ArrayList<CampusBean> campusList = new ArrayList<CampusBean>();
        rowSet.beforeFirst();
        while(rowSet.next())
          CampusBean campus = new CampusBean();
          campus.setCampID(rowSet.getString(1));
          campus.setClientID(rowSet.getString (2));
          campus.setCampName(rowSet.getString(3));
          campus.setCounty(rowSet.getString(4));
          campusList.add(campus);
        return campusList;
    public void addCampus(CampusBean campus) throws SQLException
        rowSet.moveToInsertRow();
        rowSet.updateString(1,campus.getCampID());
        rowSet.updateString(2,campus.getClientID());
        rowSet.updateString(3,campus.getCampName());
        rowSet.updateString(4,campus.getCounty());
        rowSet.insertRow();
        rowSet.moveToCurrentRow();
        rowSet.acceptChanges();
    }I'm sorry if this is too vague. I'd appreciate any help, fixes, or pointers on where to learn how to do this. Thank you again.
    KellyJo

    So the button should be a Submit button for a form. There are a couple of different methods for doing this:
    1) Each row on the table can be a different form, each form uses the same action (servlet) target and has a hidden input with a unique identifier for each of the clients:
    <table>
      <tr><form action="selectClient" method="post"><td> etc </td><td><input type="hidden" name="id" value="1"/><input type="submit"/></td></form></tr>
      <tr><form action="selectClient" method="post"><td> etc </td><td><input type="hidden" name="id" value="2"/><input type="submit"/></td></form></tr>2) Use a single form with a button type=submit for each row with different values (Note: This is broken in IE7 so you probably shouldn't use it)
    <table><form action="selectClient" method="post">
      <tr><td> etc </td><td><button type="submit" name="id" value="1">Submit</button></td></tr>
      <tr><td> etc </td><td><button type="submit" name="id" value="2">Submit</button></td></tr>3) Use a single form, have a hidden value with a blank value. Each row has a submit button with a javascript onclick method that sets the form's hidden value to one appropriate to the row, then submits the form. I won't show you this code but there are examples on the web.
    4) Use a single form with an input="submit" element on each row. Each button would have a different name with the ID info encoded in it, then you would have server-side code that takes parameters, finds the right one and parses out the proper row to edit:
    <table><form action="selectClient" method="post">
      <tr><td> etc </td><td><input type="submit" name="submit__id_1"/></td></tr>
      <tr><td> etc </td><td><input type="submit" name="submit__id_2"/></td></tr>I think most people end up doing some variant of 3, which I don't like because I hate to rely on JavaScript to make my web apps work properly. I would prefer 4, which takes more work on the server side (which I like better) but 1 works just as well with a lot more typing and uglier HTML code. Actually, I would like 2 the best because that is pretty much what the <button> element was designed for, but Microsoft screwed that up.

  • Web Service/ JDBC question

    Hi,
    I have to design an automatic -and periodic- process that performs next tasks:
    1) Read Oracle table to build a XML file
    2) Connect with a Web Service and send the XML. (In the specification says that SOAP with attachments is not supported , so we have to use a "proxy J2EE client" to interact with this web service)
    3) Also this web service uses security sign with a X.509 v3 certificate in BASE64, which must be passed as a 'string' parameter when is invoked.
    I'm new in these subjects, and I need some help, my questions:
    1) Is it possible to define an automatic process with JDEVELOPER that connects to the DB, build the XML file and invoke the Web service?
    2) How could I make this proccess automatic and periodic, for example every friday.
    3) What are the tools I have to use:
    3.1.- To Connect with DB -> JDBC?
    3.2.- To Build XML, programmatically? or is there any tool?
    3.3.- To define it as a periodic proccess??
    4) Others alternatives? Is it possible to develope this directly in PL/SQL as a job in ORACLE?
    thanks in advance...

    This is what we call "Database Web Services" covered in chapter 15 of my book http://db360.blogspot.com/2006/08/oracle-database-programming-using-java_01.html
    See also
    a) Oracle Application Server Web Services Developer’s Guide 10g Release 3 (10.1.3.x) for a complete coverage of Oracle AS Web Services Security.
    b) Calling External Web services from stored procedure (it contains an example of batch scheduling for call-out but you are looking for call-in): http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/wsclient/Readme.html
    Kuassi

  • Basic JDBC Question

    Okay, I think this isn't supposed to be in this forum (Seeing as how there's a JDBC forum and all..), but this is so basic and I'm kicking myself over it I thought I'd put it in here. Anyways:
    I just installed mysql-connector-java-2.0.14, or at least I think I did. I keep getting the "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" error. I read a lot of the forum hits I got for the error, but none of them helped me out...
    My JDK (I'm using 1.3.1_06 for compatibility reasons) is installed to /usr/java/jdk
    I'm compiling an applet on one machine, but hosting it off another. The applet must then be viewed by the compiling machine, the hosting machine, and any other machines (which I do not have access to).
    My question is this: What the hell am I doing wrong. :) Am I not understanding applets right? Does the client viewing it have to have the mysql driver installed? Does the server need it? I would assume only the compiling computer would...
    And if I only need it on the compiling machine, what am I doing wrong? My environmental variables are set as shown, I'm compiling with the shown command, and the code snippets are from my stuff. Parts in bold are what I feel is relevent (in the paths). God I feel like an idiot...
    Thanks in advance, and sorry to waste your time...
    echo $PATH
    /bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/home/jcourts/bin:/usr/java/jdk/bin:/usr/java/jdk/jre/lib/ext:/usr/java/jdk/jre/lib/ext/mysql-connector-java-2.0.14-bin.jar
    echo $CLASSPATH
    /usr/java/jdk/jre/lib/ext:/usr/java/jdk/jre/lib/ext/mysql-connector-java-2.0.14-bin.jar
    echo $JAVA_HOME
    /usr/java/jdk
    /usr/java/jdk/bin/javac -g -deprecation *.java
    import java.sql.*;
    -and-
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection("jdbc:mysql://<<host_is_here>>/<<db_name>>?user=<<username>>");

    Hvae program to test the ODBC or JDBC Bridge and driver, so that you know you've set it up right. I gave up on applets ages ago for this sort of thing, though I do know you have to install a seperate driver for applets, perhaps someone could come in on this and guide you more
    This will teat your driver and set-up, so compile and run this code;-
    import java.sql.*;
    import java.util.*;
    public class MyConnection
         Connection con;
         MyConnection()
              try
    // ******************************Connected To Jdbc-Odbc Type - 1 Driver
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    //               con = DriverManager.getConnection("Jdbc:Odbc:dsnname","userid","password");
                   con = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=servername;Database=pubs","userid","password");
    // ******************************Connected To Ms-Access JDBC ODBC Driver .
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con = DriverManager.getConnection("Jdbc:Odbc:dsnname","","");
    //               con = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=G:/admin.mdb","","");
    // ******************************Connected To Ms-Access Type-3 Driver.
         /*          Class.forName ("acs.jdbc.Driver");
                   String url = "jdbc:atinav:servername:5000:C:\\admin.mdb";
                   String username="Admin";
                   String password="";
                   Connection con = DriverManager.getConnection(url,username,password);
    // ******************************Connected To Microsoft SQL.
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   con = DriverManager.getConnection("jdbc:microsoft:sqlserver://servername:1433","userid","password");
    // ******************************Connected To Merant.
                   Class.forName("com.merant.datadirect.jdbc.sqlserver.SQLServerDriver");
                   con = DriverManager.getConnection("jdbc:merant:sqlserver://servername:1433;User=userid;Password=password");
    // ******************************Connected To Atinav SqlServer.
                   Class.forName ("net.avenir.jdbc2.Driver");
                   con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
    // ******************************Connected To J-Turbo.
    /*               String server="servername";
                   String database="pubs";
                   String user="userid";
                   String password="password";
                   Class.forName("com.ashna.jturbo.driver.Driver");
                   con= DriverManager.getConnection("jdbc:JTurbo://"+server+"/"+database,user,password);
    /*// ******************************Connected To jk Jdbc Driver.
                   String url= "jdbc:jk:server@pubs:1433";
                   Properties prop = new Properties();
                   prop.put("user","userid");//Set the user name
                   prop.put("password","password");//Set the password
                   Class.forName ("com.jk.jdbc.Driver").newInstance();
                   con = DriverManager.getConnection (url, prop);*/
    // ******************************Connected To jNetDirect Type - 4 Driver
    /*               String sConnect = "jdbc:JSQLConnect://127.0.0.1/database=pubs&user=userid&password=password";
                   Class.forName ("com.jnetdirect.jsql.JSQLDriver").newInstance();     
                   Connection con= DriverManager.getConnection(sConnect);
    // ******************************Connected To AvenirDriver Type - 4 Driver
    //               String url= "jdbc: AvenirDriver: //servername:1433/pubs";
    //               java.util.Properties prop = new java.util.Properties ();
    //               prop.put("user","userid");
    //               prop.put("password","password");
    /*               Class.forName ("net.avenir.jdbc2.Driver");     
                   System.out.println(" Connected To AvenirDriver Type - 4 Driver");
                   con= DriverManager.getConnection("jdbc: AvenirDriver://servername:1433/pubs","userid","password");
    // ******************************Connected To iNet Sprinta2000 Type - 4 Driver
         /*          String url="jdbc:inetdae7:servername:1433";
                   String login="userid";
                   String password="password";
                   Class.forName("com.inet.tds.TdsDriver");
                   System.out.println(" Connected To iNet Sprinta2000 Type - 4 Driver");
                   con=DriverManager.getConnection(url,login,password);
    // ******************************Connected To iNet Opta2000 Type - 4 Driver
    /*               String url="jdbc:inetdae7:servername:1433";
                   String login="sagar";
                   String password="sagar";
                   Class.forName("com.inet.tds.TdsDriver").newInstance();
                   System.out.println(" Connected To iNet Opta2000 Type - 4 Driver");
                   con=DriverManager.getConnection(url,login,password);
                   DatabaseMetaData md = con.getMetaData();
                   System.out.println("Driver Name            " + md.getDriverName());
                   System.out.println("Driver Version         " + md.getDriverVersion());
                   System.out.println("Database URL is        " + md.getURL());
                   System.out.println("Database UserName is   " + md.getUserName());
                   System.out.println("Connection Name        " + md.getConnection());
                   System.out.println("Database Name          " + md.getDatabaseProductName());
                   System.out.println("Database Version       " + md.getDatabaseProductVersion());
                   System.out.println("Database ReadOnly Type " + md.isReadOnly());
                   System.out.println("MaxColumnNameLength    " + md.getMaxColumnNameLength());
                   System.out.println("MaxConnections         " + md.getMaxConnections());
                   System.out.println("");
              catch(ClassNotFoundException cnfe)
                   System.out.println(cnfe.getException());
                   System.out.println("The Specified Driver Does not Exist....");
              catch(SQLException sqle)
                   if(sqle.getErrorCode() == 0)
                        System.out.println("No Suitable Driver Found..");
                   else if(sqle.getErrorCode() == 1017)
                        System.out.println("Wrong UserName Or Password..");
                   else if(sqle.getErrorCode() == 1034)
                        System.out.println("Database not Started..");
                        System.out.println(sqle.getErrorCode());
                        System.out.println(sqle.getSQLState());
                        System.out.println(sqle);
         public static void main (String args[])
              new MyConnection();
    }

  • Sime JDBC question

    hi all,
    is it true that the JDBC-ODBC bridge doesnt work with applet ???i tried to connect to database in applet but it always hangs.
    does anyone know where i can download a free JDBC driver for DBF, i still cannot find any. I'm using Tomcat and JDK 1.3.1
    thanks ~

    one can on conditions, eg
    http://www.geocities.com/rmlchan/dba.html

  • JSF - Tomcats Realm - General Question

    Hi @ ll,
    I've written a wep app in JSF.
    Evererything works fine. Also the autentification by Tomcats JDBC Realm.
    My problem is. only the login is not written in JSF, cause every form get id prefix.
    I know its "normal" in in JSF.
    But Tomcat expect a submit "j_security_check" without a prifix like "_id0:".
    I don't know to figure it out.
    I've had a look into the Jaas dokumentation. It will take some hours/days to lean it.
    And I think Jaas is overdosed for my very simple webapp.
    Now my general Questen:
    Is it posible to write a simple form based login in Java Server Pages to use Tomcats Realm?
    Is there a simple alternative to Jaas?
    THX 4 your advise.
    esion

    It's not possible with the default set of components.
    That said, there may be a component set that provides a form-based authentication component, but off the top of my head I'm no aware of one.
    It wouldn't be that difficult to roll your own either.

  • Tomcat and jdbc?

    Hi,
    I've been using weblogic and want to make the move to tomcat. Everything has gone fine so far apart from accessing a datasource.
    from server.xml :
    <Resource driverClassName="org.gjt.mm.mysql.Driver" maxActive="4" maxIdle="2" maxWait="5000" name="MySQLPool" password="test" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/database01?autoReconnect=true" username="test" validationQuery="SELECT * From Client;"/>problematic code:
    private DataSource getJndiDataSource(String jndiName) throws Exception {
            Hashtable ht = new Hashtable();
            ht.put(Context.INITIAL_CONTEXT_FACTORY,
                    "weblogic.jndi.WLInitialContextFactory");
            ht.put(Context.PROVIDER_URL, contextProvider);
            Context initCtx = null;
            try {
                // Obtain the initial JNDI context
                initCtx = new InitialContext(ht);
                // Perform JNDI lookup to obtain resource manager
                // connection factory
                DataSource ds = (DataSource) initCtx.lookup(jndiName);
                return ds;
            } catch (NamingException e) {
                throw new Exception(e);
        }javax.servlet.ServletException: javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory]
    any ideas? I have weblogic.jar in my classpath.

    This code isn't correct:
    private DataSource getJndiDataSource(String jndiName) throws Exception {
            Hashtable ht = new Hashtable();
            ht.put(Context.INITIAL_CONTEXT_FACTORY,
                    "weblogic.jndi.WLInitialContextFactory");
            ht.put(Context.PROVIDER_URL, contextProvider);
            Context initCtx = null;
            try {
                // Obtain the initial JNDI context
                initCtx = new InitialContext(ht);
                // Perform JNDI lookup to obtain resource manager
                // connection factory
                DataSource ds = (DataSource) initCtx.lookup(jndiName);
                return ds;
            } catch (NamingException e) {
                throw new Exception(e);
        }Try this:
    * Obtain a data source
    * @param jndiName (e.g., "java:comp/env/jdbc/datasource")
    * @return DataSource for relational database
    * @throws NamingException if the lookup fails
    public static DataSource getDataSource(String jndiName) throws NamingException
       DataSource ds = null;
       Context ctx = null;
       try
          ctx = new InitialContext();
          ds = (DataSource)ctx.lookup(jndiName);
       finally
          try { if (ctx != null) ctx.close(); } catch (Exception e) { /* perhaps a log would help */ }
       return ds;
    }%

  • Tomcat security constraint question

    Hi all,
    we're using the following security constring for securing our servletts. Everything works fine so far.
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Test</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    </security-constraint>
    Now the question: We've implemented some kind of password reminder which allows you to retrieve a new password, this servlett should be accessible by anybody.
    Do we have to list all the url-mappings except the one for the password reminder or is there a special tag to exclude an url-pattern from the wildcard-rule which we haven't yet? Any hints would be appreciated...
    Regards, Florian

    Using: Tomcat 5.5.20 on Windows Server 2003
    Couple Questions:
    1. How do I prevent users from entering a double
    quote in the INPUT field on the server side?use javascript
    Also, is
    it possible to replace the double quote with single
    quote on the server side? If yes, How? I don't want
    to use JavaScript because it can be disabled.yes,
    yourVarString.replaceAll("\"","\'");
    2. Where is the best place to ack Tomcat questions?http://tomcat.apache.org/findhelp.html
    I
    had some question on security-constraint. I have a
    folder that has sercurity-constraint on it, so when
    that folder is accessed tomcat asks for credentials.
    Once user provides proper Username and Password, it
    grants them the access. Now I want to know once the
    access is granted, how come it doesn't display
    index.jsp form that folder, It displays an image. I
    don't understand why?
    Please help....i have encountered that also on tomcat 3 intalled on linux machine.. the account that was being used to start the tomcat is root.. then the resolution was the owner account of the tomcat starts the server and it worked! hope that give you an idea

  • JSTL xml is killing me... Tomcat 5.5 question - Connection refused: connec

    I have the following code in my jsp file:
    <%
    String req_url="http://localhost/nolabook/books.xml";
    //String req_url="http://www.SOMESERVER.com/books.xml";
    %>
    <c:import var="xml" url='<%= req_url %>' />
    <c:import var="xslt" url="transform.xsl" />
    <x:transform doc="${xml}" xslt="${xslt}" >
    </x:transform>If I use 'req_url' with localhost then everything is ok and I see the result I want to. The xsl is perfect, the output is flawless.
    If I try to load the same books.xml from a remote server I got the following exception:
    ...and the exception is: javax.servlet.jsp.JspException: Problem accessing the absolute URL "http://www.SOMESERVER.com/books.xml". java.net.ConnectException: Connection refused: connect
    It drives me nuts and I cannot move on with my project because of this.
    I use java 1.5 with Apache Tomcat 5.5.17
    No firewalls, no port closures, no security systems nothing on my developer machine...
    And of course, if I just place the URL(.../books.xml) into my browser it reads and shows the books.xml file.
    I need help please because I'm drained...
    Message was edited by:
    ayrtonsf1

    please see the following site for the solution:
    http://www.cs.wcupa.edu/~rkline/Java/xml_examples.html
    summary:
    You will also need the jar files from the Xalan distribution whose web site is:
    http://xml.apache.org/xalan-j/
    The latest version is 2.7.0 and the binary distribution can be downloaded from the course server at
    xalan-j_2_7_0-bin.zip
    which contains the JAR file needed for XPath and Xerces compilation usages. Extracting the zip file yields the directory xalan-j_2_7_0. Within it look for the files (also downloadable from these links):
    xalan.jar, xercesImpl.jar, serializer.jar
    These JAR files will need to be made available to Eclipse. The easiest way, as before, is to install them directly into
    apache-tomcat-5.5.17/common/lib
    good luck,
    -zak guler

  • JDBC Questions have some doubts

    hi,
      Friends i have some doubts on JDBC Adapter . plz give me answere.
    1) Wt is the use of update query in jdbc adapter?
    2) Why did u use the flag field in jdbc table?
    3) How will u send the data into multiple table?
    4) Wt is the receiver str jdbc?
    5 Wt is the jdbc configurations
    thanks in adnvace.

    Hi,
    1) Wt is the use of update query in jdbc adapter?
    --> Update query is used to update the specific record in the database table based on Key fields.
    2) Why did u use the flag field in jdbc table?
    --> the Flag field is used to mark the records which are selected by sender JDBC adapter, so next time those records should not be repeated.
    3) How will u send the data into multiple table?
    --> You can send the data to multiple tables with the help of multi-mapping in the XI.
    Accessing Multiple Tables dynamically using JDBC
    Accessing Multiple Tables dynamically using JDBC
    4) Wt is the receiver str jdbc?
    --> On receiver side JDBC, you can either Insert, Update or delete the records. The storder proceduers are the line of codes written in DB2, From XI you can directly execute these JDBC statements. It will be helpful when you will be working on synchronous scenario and need to modify or deal with multiple tables based on complex logics
    5 Wt is the jdbc configurations
    --> JDBC configuration is based on the JDBC drivers installed.
    Refer - Detail explanation
    http://help.sap.com/saphelp_nw04s/helpdata/en/22/b4d13b633f7748b4d34f3191529946/frameset.htm
    Thanks
    Swarup

  • Tomcat startup.bat question

    When execute Tomcat5/bin/startup.bat,it will appear a command window,all display information of Tomcat will appear in it.Is there a method which can put the display information in this command window into a TXT file? Because if tomcat or JVM raise fatal error,before I see the error display information of Tomcat in this command window,the command window has closed!!! Or is there a method which can keep the tomcat command window opening all time whether it raise so fatal error?
    Any idea will be appreciated!

    Open a command prompt: Start:run cmd
    This opens a dos prompt box for you.
    When you run tomcat this way, it won't close the box.
    Alternatively check the Tomcat5/logs directory for any error messages there.

  • Tomcat startup configuration question

    Can anyone tell me how I can...
    ...add the following parameter to Tomcat startup:
    -Djava.awt.headless=trueWhich file is the advice referring to (and where can I find it)?
    And in which part of the file should I make the insertion?
    Thanks,
    James

    Add JAVA_OPTS="-Djava.awt.headless=true" in $TOMCAT_HOME/bin/startup.sh

  • Super Easy Tomcat 4.0 question

    I have a bunch of JSPs at d:\rhhshn\ (Tomcat is on the same drive). How can I get them to compile and run? It was like two lines of code in Tomcat 3.2 but 4.0 is literally several dozen and cut-and-paste didn't work.
    My classpath is already set for the classes that the JSPs will need and Tomcat is properly serving its own JSP examples.

    frustrated sigh Well does anybody know how to do it in Tomcat 3.2?

Maybe you are looking for

  • Macbook Pro 13" early-2011 Fans at high speed

    Hi guys, I hope you can solve this pussle for me. My Macbook Pro (13", early 2011, Core i5 @ 2.3) started to behave weird, its fan (only the exhaust one, since it's a 13" Macbook Pro with the Intel HD integrated graphics) is running at top speed (620

  • SOAP: call failed: java.io.EOFException

    Hi all, I have build a proxy to soap scenario that generates errors during runtime. The scenario consists of an ABAP program consuming a webservice through PI. The communication channel shows the following errorlog: - Message processing started - req

  • Difference between oracle Developer suit and Oracle Application Server???

    Dear all,, If any one please tell me the main difference between Developer Suit and Oracle Application Server. I will be very thank ful. Thank you Hina.

  • Find portal oracle database host and port

    HI , We have EP 7.0 sp15 with oracle database, Is there a way to find the host and port of oracle database programatically

  • Radio feature won't work in windows. Help Please!

    I can't get the radio in itunes to work. I use Firefox and with their new update (foxy tunes) you can put your media player on the toolbar and not have to leave your browser to listen to the radio. I wanted to change from windows media player to itun