|
With WebSphere Application Sever, you do not need to define the Java compile command. My first guess would be that your class for the JDBC driver is incorrect. > Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); should be > Class.forName("com.ibm.db2.jdbc.app.DB2Driver"); the lowercase com being key. Also make sure the value specified for system is a valid entry in the relational database directory (WRKRDBDIRE). Also, be sure to check the standard output/error log files for the application server under which your web application is defined for errors whenever you get a Compilation failed message. For the Default Server application server these files are /QIBM/UserData/WebASAdv/default/logs/default_server_stdout.log and /QIBM/UserData/WebASAdv/default/logs/default_server_stderr.log respectively. Frances Stewart WebSphere Application Server for iSeries 400 External: (507) 253-2795 Tie-line: 8-553-2795 IBM Rochester David Gibbs <dgibbs@verticalsky.com>@midrange.com on 11/27/2000 04:06:36 PM Please respond to JAVA400-L@midrange.com Sent by: owner-java400-l@midrange.com To: "'JAVA400-L@midrange.com'" <JAVA400-L@midrange.com> cc: Subject: RE: Having trouble with a JSP compile > I keep getting the following error when I try to run this JSP "" > com.sun.jsp.JspException: Compilation failed"" I included the code > hopefully I am missing something simple. I have changed the > system name and > the userid and password fields. I was wondering if there might be an > authority issue. I am using WebSphere 3.02.2 on an AS/400 V4R5... > Thanks in advance. I'm not too familiar with websphere, but do you have your java compile command defined? The weblogic app server (which I am familiar with) requires you to tell it the command line to execute to compile the generated java source into class files. > <%@ page import="java.sql.*"%> > <%! Connection con = null;%> > <%! String system = "AS/400/LIB"; %> > <%! String userId = "USERID"; %> > <%! String password = "PASSWORD"; %> > <%! String url = "jdbc:db2://" + system; %> > > <%! public Connection getConnection() { > if(con != null) (return con;) > try { > Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); <snip snip snip> Can I suggest that you try and separate your logic from your presentation? Create another class that contains all the logic required to retrieve the data & massage it (along with methods to deliver the data to those that might inquire). Then in your JSP, import the necessary hierarchy, and call the appropriate methods to retrieve the data and display it. david +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.