Re: Broken pipe exception with every request!

2004-07-27 Thread Claudio Carvalho
Hi,

Does anybody know how to  hide the JDBCRealm password from server.xml?

Thanks

Claudio.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to hide the JDBCRealm password from server.xml

2004-07-27 Thread Claudio Carvalho
Hi,
 
Does anybody know how to  hide the JDBCRealm password from server.xml?
 
 Thanks
 
 Claudio.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread Claudio Carvalho
Cláudio CarvalhoHi,

I'm trying to get the CLOB working in my application and I'm having problems
with the Connection, so, does anybody knows how to use in Tomcat 5 the
oracle pool instead of using the DBCP pool?

Thanks.

Claudio Carvalho.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread Claudio Carvalho
Hi Tim,

I'm looking for an alternative directly on the application server, something
like putting an oracle-pool jar into tomcat/common/lib directory, have you
heard anything like that?

Claudio Carvalho.

- Original Message - 
From: Tim Funk [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Friday, July 02, 2004 10:52 AM
Subject: Re: How to use oracle pool instead of using DBCP pool?


 An alternative is to look at the DBCP java-docs. Cast your Connection to a
 DBCP's ppoled connection class (or approrpiate). That class has a method
 called getDelegate() which returns the real connection from Oracle. Then
cast
 that to the appropriate Oracle class.

 -Tim

 Claudio Carvalho wrote:

  Cláudio CarvalhoHi,
 
  I'm trying to get the CLOB working in my application and I'm having
problems
  with the Connection, so, does anybody knows how to use in Tomcat 5 the
  oracle pool instead of using the DBCP pool?
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to use oracle pool instead of using DBCP pool?

2004-07-02 Thread Claudio Carvalho
Hi Davi,

Thanks, but I'm trying to solve this problem without changing my J2EE
framework... using JNDI,etc...
Do you know any other approach?

Claudio Carvalho.

- Original Message - 
From: David Short [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Friday, July 02, 2004 1:55 PM
Subject: RE: How to use oracle pool instead of using DBCP pool?


 Try this.

 Here's how I do it using Struts on W2K.  Modify names and paths to suit
your
 needs.

 Upon startup, a listener servlet (ResourceManagerListener) is called (See
 listener tag in the included web.xml source).

 The listener servlet will create the connection pool based on your web.xml
 parameters (See ResourceManagerListener.java).  Once started, the listener
 servlet initializes an application scope variable (appDataSource), which
 when called from your servlets/JSPs will return a DB DataSource object (DB
 connection).

 --
--
 ---

 In your main servlet:

 try
   {
   DataSource ds = (DataSource)
 getServlet().getServletContext().getAttribute(appDataSource);
   xxxProcess = new xxxProcessBean();
   xxxInfo = new xxxInfoBean();
   xxxProcess.setDataSource(ds);
   xxxInfo = xxxProcess.getUser(userName, customerId);
   }

 In your process bean:

 public class xxxProcessBean implements Serializable
   {
   private DataSource dataSource;

   /**
* Sets the dataSource property value.
*/
   public void setDataSource(DataSource dataSource)
 {
 this.dataSource = dataSource;
 }


   public xxxInfoBean getUser(String userName, String customerId)
 throws SQLException
 {
 // Get the user info from the database
 Connection conn = dataSource.getConnection();
 xxxInfoBean xxxResult = null;

 try
   {
   xxxResult = getUserName(userName, customerId, conn);  // Execute
 actual SQL statement.
   }

 finally
   {
   try
 {
 conn.close();
 conn = null;
 }

 catch (SQLException e)
   {} // Ignore

 return xxxResult;

 --
--
 ---

 Change MachineNameHere to your machine name.
 Change OracleSIDHere to your DB SID.
 Change DBUserNameHere to your DB username.
 Change DBPasswordHere to your DB password
 Change ApplicationNameHere to a meaningful application designator.
 Change xxx to your object name.

 Copy Oracle's classes12.zip and nls_charset12.zip files (should live in
 C:\OraHome\jdbc\lib) to C:\Tomcat\common\lib.  Depending on the version of
 Tomcat, you may need to rename the .zip files to .jar.


 I'll let you read/learn about Struts on your own.

 Hoe this helps.

 Dave

 --
--
 ---
 web.xml
 ?xml version=1.0 encoding=ISO-8859-1?

 !DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com//dtd/web-app_2_3.dtd;

 web-app
   !-- Used by the JSTL I18N actions --
   context-param
 param-namejavax.servlet.jsp.jstl.fmt.fallbackLocale/param-name
 param-valueen/param-value
   /context-param

   !-- Context parameters for application --

   !-- Oracle thin JDBC driver --
   !--


param-valuejdbc:oracle:thin:@MachineNameHere:1521:OracleSIDHere/param-val
 ue
   --
   context-param
 param-namejdbcURL/param-name
 !-- Oracle OCI JDBC driver --
 param-valuejdbc:oracle:oci8:@OracleSIDHere/param-value
   /context-param

   context-param
 param-nameuser/param-name
 param-valueDBUserNameHere/param-value
   /context-param

   context-param
 param-namepassword/param-name
 param-valueDBPasswordHere/param-value
   /context-param

   context-param
 param-namemaxLimit/param-name
 param-value50/param-value
   /context-param

   !--
 will create 10 pooled connections.
   --
   context-param
 param-nameminLimit/param-name
 param-value10/param-value
   /context-param

   !-- Filter and listener configurations --
   filter
 filter-nameaccessControl/filter-name
 filter-class
   com.ApplicationNameHere.servlets.AccessControlFilter
 /filter-class
 init-param
   param-nameloginPage/param-name
   param-value/jsp/login.jsp/param-value
 /init-param
   /filter

   filter-mapping
 filter-nameaccessControl/filter-name
 url-pattern/protected/*/url-pattern
   /filter-mapping

   listener
 listener-class
   com.ApplicationNameHere.servlets.ResourceManagerListener
 /listener-class
   /listener

   !-- Struts Controller servlet --
   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 load-on-startup1/load-on-startup
   /servlet

   !-- Servlet for handling both servlet and JSP errors --
   servlet
 servlet-nameerrorDispatcher/servlet-name


servlet

Hot deploy

2004-05-26 Thread Claudio Carvalho
Cláudio CarvalhoHi,

Does anybody know how to make a deploy on a running tomcat (hot deploy)?
When I try do it using the Tomcat Web Application Manager, I got the following message
FAIL - Application already exists at path /myapplicationThanks.

Tomcat default page

2004-05-12 Thread Claudio Carvalho
Cláudio CarvalhoHi,

How can I define the default page for my server, when I type in the browser
www.myhost.com it goes to my specific www.myhost.com/project  instead of
going to the Tomcat's initial page?

Thanks

Claudio.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]