Re: Tomcat 4.0.4 on OS/390?

2002-10-21 Thread Simon T
Rich,
   You may need to run tomcat on top of  linux on your 
mainframe
  
   Suse linux has some 390 stuff you may be able to get beta 
version for free?

http://www.suse.de/en/business/products/sles/sles_s390/

Good luck.
Regards,
Simon

[EMAIL PROTECTED] wrote:


I've been looking into getting Tomcat 4.0.4 running on OS/390 for a 
day or so now.  I've found various references to doing this, but 
nothing conclusive yet. 
Could someone please let me know if they have it running themself 
and/or know what would be involved in doing this.

I've also been working on getting Tomcat 3.3.1 running on the same 
machine (just in case I can't get 4.0.4 going). So information on 
3.3.1 on OS/390 would he helpful as well.

Current notes:
- may have to convert certain files such as 
catalina.policy/tomcat.policy, tomcat.conf, and tomcat.propeties... 
from ascii to EBCDIC.
- I'm under the impression that all served up files should remain in 
ascii.

I'm currently (today) focussing on even getting Tomcat 3.3.1 going.  
All of the JSP examples run great, but I'm running into the following 
error when I run the servlet examples:
Error: 500
Location: /examples/servlet/HelloWorldExample
Internal Servlet Error:

java.util.MissingResourceException: Can't find resource for bundle 
java.util.PropertyResourceBundle, key helloworld.title
at java.util.ResourceBundle.getObject(ResourceBundle.java(Compiled 
Code))
at java.util.ResourceBundle.getString(ResourceBundle.java:342)
at HelloWorldExample.doGet(Unknown Source)
etc...

The properties file, LocalStrings.properties, is in the default 
location and seems fine.  It is stored in ascii, which I'm assuming is 
correct, just like all the other files.

I've looked on the web via google and through this list's archives and 
unfortiontely still haven't found solid information regarding this 
Tomcat on OS/390.  I couldn't even tell if this scenario is officially 
supported by the Tomcat group. Tomcat has rocked for me, I'm using it 
at work and for personal projects at home.

Any input would be greatly appreciated. Thank you so much!
Cheers,
Rich

--
To unsubscribe, e-mail:   

For additional commands, e-mail: 






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: tomcat JDNI DB connection pool to Oracle

2002-09-03 Thread Simon T

I am running ok with tomcat 4.1.9  using the oracle thin driver.

Tomcat 4.1 JNDI datasource examples doc say -

Use of the OCI driver should simply involve a changing thin to oci in 
the URL string.

url
jdbc:oracle:thin:[EMAIL PROTECTED]:1521:mysid

Your url in server.xml is 
jdbc:oracle:oci8@homebank

If homebank is in your tnsname.ora maybe tomcat is having problems locating it.


Or

Do you have the commons jar files e.g. commons-dbcp.jar in  common\lib

The commons jar file were installed for me when i installed tomcat 4.1.9.

Good luck.

Simon


Isabel Lameda wrote:

>Anabody could help me, i´ve been trying to do this for days
>
>I've been successfully making JDBC connections directly in my JSP 
>
>DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
>Connection con =
>DriverManager.getConnection("jdbc:oracle:oci8:"+login+"/"+passwd+"@"+databas
>e)
>
>Now I'm trying to setup my Tomcat 4.0.9's JDNI DB connection pool, but I
>can't get it to work
>
>Here is what I've done so far
>
>1. Move the Oracle Drivers (classes12.zip) into \common\lib 
>directory and rename it to classes12.jar
>
>2. Added the following codes to my webapp's web.xml
>
>
>jdbc/homebank
>javax.sql.DataSource
>Container
>
>
>
>3. Added the following codes within the 
> tag
>   of \conf\server.xml
>
>  type="javax.sql.DataSource"/> 
>
>
>  
>factory
>org.apache.commons.dbcp.BasicDataSourceFactory
>  
>  
>driverClassName
>oracle.jdbc.driver.OracleDriver
>  
>  
>url
>jdbc:oracle:oci8@homebank
>  
>  
>username
>scott
>  
>  
>password
>tiger
>  
>  
>maxActive
>20
>  
>  
>maxIdle
>10
>  
>  
>maxWait
>-1
>  
>
>
>4. try to make connection within my JSP
>
><%@ page import="java.net.*" %>
><%@ page import="java.io.*" %>
><%@ page import="java.sql.*" %>
><%@ page import="javax.sql.*" %>
><%@ page import="java.util.*" %>
><%@ page import="javax.naming.*" %>
>
><%
>try {
>Context initCtx = new InitialContext();
>Context envCtx = (Context) initCtx.lookup("java:comp/env");
>DataSource ds = (DataSource) envCtx.lookup("jdbc/homebank");
>Connection conn1 = ds.getConnection();
>out.println("Oracle Connected!");
>} 
>catch (SQLException E) {
>out.println("unable to get connection on ora !"); 
>out.println("SQLException: " + E.getMessage());
>out.println("SQLState: " + E.getSQLState());
>out.println("VendorError: " + E.getErrorCode());
>}
>%>
>
>Results :
>unable to get connection on ora ! 
>SQLException: Cannot load JDBC driver class 'null' 
>SQLState: null 
>VendorError: 0 
>
>Why? I'm able to make connection call JDBC directly in my other JSP, 
>but not when I try to get the connection via JDNI Context ...??
>
>Thank you in advance
> 
>P.S.: i´ve search the archives and found nothing that could help me.
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>  
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: DBCP borrowObject failed

2002-08-18 Thread Simon T

Your server xml is missing usersname and password, mybe you left this 
out in the email.
web.xml is fine, but it need to be the one under PSI/WEB-INF

I am running oracle fine wtih JDK1.3.1 as a window service, have not got 
going with JDK1.4.0 yet.
My url has no username in front of it.
jdbc:oracle:thin:@localhost:1521:test

Yours has

value>jdbc:oracle:thin:CUST0@short200:1521:PSIP

is CUSTO correct? Maybe you could leave it out.

Did you use the correct tomcat.exe, the LE one is for JDK1.4.


This is from my server.xml


  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
driverClassName
oracle.jdbc.driver.OracleDriver
  
  
url
jdbc:oracle:thin:@localhost:1521:test
  
  
username
test
  
  
password

  
  
maxActive
20
  
  
maxIdle
10
  
  
maxWait
-1
  


Simon

Short, Dave wrote:

>I am having a problem getting a connection from JNDI.  I set up my
>server.xml and web.xml files per the instructions in the JNDI Resources
>HOW-TO and JNDI DataSource Examples on the Tomcat 4.1 Documentation Page.
>
>Configuration:
>
>W2K
>Tomcat 4.1.9 (Stand Alone)
>Oracle 8.1.7
>
>Here's my Tomcat console output, server.xml and web.xml snippets.
>
>Any help would be much appreciated.
>
>Dave
>
>Console Output
>
>*
>
>[INFO] Registry - -Loading registry information
>[INFO] Registry - -Creating new Registry instance
>[INFO] Registry - -Creating MBeanServer
>[INFO] Http11Protocol - -Initializing Coyote HTTP/1.1 on port 8080
>Starting service Tomcat-Standalone
>Apache Tomcat/4.1.9
>[INFO] Http11Protocol - -Starting Coyote HTTP/1.1 on port 8080
>[INFO] ChannelSocket - -JK2: ajp13 listening on tcp port 8009
>[INFO] JkMain - -APR not loaded, disabling jni components:
>java.io.IOException:
>
>[INFO] JkMain - -Jk running ID=0 time=60/60
>config=C:\Tomcat\conf\jk2.properties
>DBCP borrowObject failed: null
>java.lang.NullPointerException
>at
>org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnect
>ion.java:237)
>at
>org.apache.commons.dbcp.PoolableConnectionFactory.activateObject(PoolableCon
>nectionFactory.java:273)
>at
>org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source)
>at
>org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
>.java:117)
>at
>org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
>va:110)
>at
>org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
>12)
>at foo.DBTest.init(Unknown Source)
>at org.apache.jsp.test_jsp._jspService(test_jsp.java:52)
>at
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>at
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
>02)
>at
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
>at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
>FilterChain.java:247)
>at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
>ain.java:193)
>at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
>va:260)
>at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
>eNext(StandardPipeline.java:643)
>at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
>va:191)
>at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
>eNext(StandardPipeline.java:643)
>at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>at
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2350)
>at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
>)
>at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
>eNext(StandardPipeline.java:643)
>at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
>java:170)
>at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
>eNext(StandardPipeline.java:641)
>at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171
>)
>at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
>eNext(StandardPipel

Re: BasicDataSourceFactory and TC 4.1.9

2002-08-18 Thread Simon T

Paul,

I have mysql working ok with mm.mysql-2.0.11-bin.jar 
file in the common/lib
I am using the jdk1.3.1 with the full tomcat 4.1.19 
installation.
   
Which JDK are you using?   

The context web.xml needs to be updated for the context in the server.xml 
e.g in the tomcat example they created DBTest  



<%@page language="java" import="javax.sql.*"%>
<%@page import="javax.naming.*" %>
<%@page import="java.util.*" %>
<%@page import="java.sql.*" %>
<%
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
DataSource ds = (DataSource)envCtx.lookup("jdbc/mysql");
Connection conn = ds.getConnection();
Statement StatementRecordset1 = conn.createStatement();
ResultSet Recordset1 = StatementRecordset1.executeQuery("select * from 
abc");
boolean Recordset1_isEmpty = !Recordset1.next();
boolean Recordset1_hasData = !Recordset1_isEmpty;
int Recordset1_numRows = 0;
int Repeat1__numRows = 100 ;
int Repeat1__index = 0 ;
Recordset1_numRows += Repeat1__numRows;
%>

<% while ((Recordset1_hasData)&&(Repeat1__numRows-- != 0))
{
%>

  <%= (String) Recordset1.getObject("name") %>

<%Repeat1__index++;
Recordset1_hasData = Recordset1.next();}
Recordset1.close();
conn.close();
%>

I am having probelms getting a Connection from the DataSource I get out of 
>JNDI. I set up the Resource section of my server.xml as described in the 
>HOW-TO for 4.1.9 and am using mm.mysql 2.0.14 with MySQL 3.23.51. The DB and 
>dirver seem to work fine together.
>
>It seems I can get the DataSource from the JNDI context as expected, but 
>calling getConnection() yeilds an SQLException that says, "Cannot load JDBC 
>driver class 'null'". The driver is sitting in common/lib and can be seen and 
>used by servlets in my context if I do it 'by hand'. A quick look through 
>DBCP's BasicDataSourceFactory confirms 'driverClassName' is the correct 
>parameter name for the driver class, and the exception is being generated in 
>BasicDataSource:
>
>// Load the JDBC driver class
>Class driverClass = null;
>try {
>driverClass = Class.forName(driverClassName);
>} catch (Throwable t) {
>String message = "Cannot load JDBC driver class '" +
>driverClassName + "'";
>logWriter.println(message);
>t.printStackTrace(logWriter);
>throw new SQLException(message);
>}
>
>Any help would be greatly appreciated.
>
>
>>From my server.xml:
>type="javax.sql.DataSource"/>
> 
> 
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>
>   maxActive100
>   maxIdle3
>   maxWait100
>   usernametcuser
>   passwordX
>   
> driverClassName
> org.gjt.mm.mysql.Driver
>   
>  
>url
>jdbc:mysql://localhost:3306/form_rev
>  
>
>
>>From my web.xml:
>  
>  DB Connection
>  jdbc/form_rev_DB
>  javax.sql.DataSource
>  Container
>  
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>  
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: how can a client upload file via an applet

2002-07-16 Thread Simon T

Hi,
this is an example of  html code for the file upload


Which file do you want to upload? 





You just need a servlet to the processing.

I did a google search and got this url.
http://www.jguru.com/faq/view.jsp?EID=160

Regards,
Simon

[EMAIL PROTECTED] wrote:

>A problem will be an applet cannot, by default, read a file on the client unless 
>explicitely authorized...
>
>Another is it can only communicate with the server it comes from.
>
>-Original Message-
>From: Irina Lishchenko [mailto:[EMAIL PROTECTED]]
>Sent: 16 July 2002 10:27
>To: Tomcat Users List
>Subject: Re: how can a client upload file via an applet
>
>
>On Tuesday 16 July 2002 09:38, you wrote:
>  
>
>>hello,
>>i am trying to write an applet that has an file upload service. Users will
>>able to give the full path of their files to the applet (c:\files\file1.txt
>>for instance) as input and applet will going to get the contents of this
>>file and write the content to the database which is in the server. how can
>>i accomplish this task?
>>
>>thanks in advance,
>>
>>serdar
>>
>>
>
>Actually I think that much easier to acomplish this task through servlet/jsp 
>technology. Although if you are very good at applet writing, then may be...
>
>What about servlet or jsp for file uploading. At www.servlets.com you can 
>find libraries which are necessary for file uploading and most likely some 
>useful articles on this subject.
>
>ilis
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
> DISCLAIMER  
>"This e-mail and any attachments thereto may contain information 
>which is confidential and/or protected by intellectual property 
>rights and are intended for the sole use of the recipient(s) named above. 
>Any use of the information contained herein (including, but not limited to, 
>total or partial reproduction, communication or distribution in any form) 
>by persons other than the designated recipient(s) is prohibited. 
>If you have received this e-mail in error, please notify the sender either 
>by telephone or by e-mail and delete the material from any computer. 
>Thank you for your cooperation."
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>  
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: jdk1.4 vs jdk1.2

2002-07-14 Thread Simon T

Hi,
The problems with 4.1.7 and i fixed it by removing all the 
.class and .java in the $CATALINA_HOME/work directory.

If they are exisiting jsp give it a go.
Regards,
Simon


Luminous Heart wrote:

>When I start tomcat I get these messages at the
>prompt:
> ../bin/startup.sh 
>Using CATALINA_BASE:   /usr/local/tomcat
>Using CATALINA_HOME:   /usr/local/tomcat
>Using CATALINA_TMPDIR: /usr/local/tomcat/temp
>Using JAVA_HOME:   /usr/local/j2sdk1.4.0
>
>As you can see, JAVA_HOME is set to
>usr/local/j2sdk1.4.0. Which is the correct jdk1.4. I
>have JAVA_HOME defined in the catalina.sh script.
>Should I do anything else/different?
>
>--- Clay Graham <[EMAIL PROTECTED]> wrote:
>  
>
>>it seems to me that your compiler is not being
>>called. the root cause is 
>>probably your JAVA_HOME specification. secondly make
>>sure you are pointing 
>>to the JDK1.4 not JRE1.4 because there is no javac
>>in JRE...
>>
>>maybe helps you?
>>
>>clay
>>
>>
>>-Original Message-
>>From: Luminous Heart [SMTP:[EMAIL PROTECTED]]
>>Sent: Sunday, July 14, 2002 2:12 PM
>>To:   Tomcat Users List; [EMAIL PROTECTED]
>>Subject:  RE: jdk1.4 vs jdk1.2
>>
>>Hope the log is not too excessive!
>>
>>== Error ==
>>
>>HTTP Status 500 -
>>
>>
>>
>>
>
>  
>
>> 
>>
>>
>>type Exception report
>>
>>message
>>
>>description The server encountered an internal error
>>() that prevented it from fulfilling this request.
>>
>>exception
>>
>>org.apache.jasper.JasperException: Unable to compile
>>class for JSP
>>  at
>>
>>
>>
>org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
>  
>
>> 
>>va:481)
>>  at
>>
>>
>>
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
>  
>
>> 
>>va:182)
>>  at
>>
>>
>>
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
>  
>
>>  at
>>
>>
>>
>org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
>  
>
>>  at
>>
>>
>>
>javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>  
>
>>  at
>>
>>
>>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>  
>
>> 
>>tionFilterChain.java:247)
>>  at
>>
>>
>>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>  
>
>> 
>>erChain.java:193)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>  
>
>> 
>>e.java:260)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>  
>
>> 
>>nvokeNext(StandardPipeline.java:643)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  
>
>>  at
>>
>>
>>
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  
>
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
>  
>
>> 
>>e.java:191)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>  
>
>> 
>>nvokeNext(StandardPipeline.java:643)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  
>
>>  at
>>
>>
>>
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  
>
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2350)
>  
>
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
>  
>
>> 
>>:180)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>  
>
>> 
>>nvokeNext(StandardPipeline.java:643)
>>  at
>>
>>
>>
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
>  
>
>> 
>>lve.java:170)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>  
>
>> 
>>nvokeNext(StandardPipeline.java:641)
>>  at
>>
>>
>>
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
>  
>
>> 
>>:171)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>  
>
>> 
>>nvokeNext(StandardPipeline.java:641)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  
>
>>  at
>>
>>
>>
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  
>
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>  
>
>> 
>>java:174)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>  
>
>> 
>>nvokeNext(StandardPipeline.java:643)
>>  at
>>
>>
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
>  
>
>>  at
>>
>>
>>
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>  
>
>>  at
>>
>>
>>
>org.apache.coyote.tom