How to set default charset?

2004-03-08 Thread vijaya prasad pala
Hi,

what is tomcat default charset?
How to set default charset in tomocat 4.x

please help

Vijay



__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



charset issues with jsp include and forward

2004-03-08 Thread vijaya prasad pala

 Hi
 
 i am reading arabic text from oracle database.
 if i am displaying that text in that page its ok.
 if i am passing the same arabic string to another
 page
 then in that page it is displaying in ?. 
 i tried like this
 
 if(request.getCharacterEncoding()==null)
request.setCharacterEncoding(windows-1256);
   
   linkString = request.getParameter(linkLine);
   userString = request.getParameter(userLine);
 
 Here my problem is passing string from one page to
 another page... 
 how can i set the page encoding and characterset and 
content type.

 please help

 vijay


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



Arabic encoding problem

2004-03-07 Thread vijaya prasad pala
Hi

i am reading arabic text from oracle database.
if i am displaying that text in that page it ok.
if i am passing the same arabic string to another page
then in that page it is displaying in ?. 
i tried like this

 if(request.getCharacterEncoding()==null)
request.setCharacterEncoding(windows-1256);
  
  linkString = request.getParameter(linkLine);
  userString = request.getParameter(userLine);

Here my problem is passing string from one page to
another page... 

Thanks in Advance
vijay


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

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



Re: SQLException when using a datasource

2003-10-25 Thread vijaya prasad pala
Hi Samuel,

I am getting same problem...
if you solve this problem send me the solution.
Thanks in advance

vijay
--- Samuel Cheung [EMAIL PROTECTED] wrote:
 
 I am trying to setup a hibernate example with Tomcat
 4.1.27. So I add a
 datasource to my server.xml. But when I access a
 connection, I got this
 exception: 
 20:56:49,072 WARN SessionFactoryImpl:171 - Could not
 obtain connection
 metadata
 java.sql.SQLException: Cannot load JDBC driver class
 'null'
 
 could some one please tell me how to fix that. I
 check the parameter of the
 DBCP connection, they are correct.
 
 Thanks in advance.
 
 Sam
 
 
 I have added the following in my server.xml of
 Tomcat:
 Context path=quickstart docBase=/quickstart
 Resource name=jdbc/quickstart scope=Shareable
 type=javax.sql.DataSource/
 ResourceParams name=jdbc/quickstart
 parameter
 namefactory/name

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 
 !-- DBCP database connection settings --
 parameter
 nameurl/name
 valuejdbc:mysql://localhost:3306/mysql/value
 /parameter
 parameter

namedriverClassName/namevalueorg.gjt.mm.mysql.Driver/value
 /parameter
 parameter
 nameusername/name
 valueremote/value
 /parameter
 parameter
 namepassword/name
 valueremote/value
 /parameter
 
 !-- DBCP connection pooling options --
 parameter
 namemaxWait/name
 value5000/value
 /parameter
 parameter
 namemaxIdle/name
 value2/value
 /parameter
 parameter
 namemaxActive/name
 value4/value
 /parameter
 
 /ResourceParams
 /Context
 
  from the Tomcat console 
 20:56:49,010 INFO DatasourceConnectionProvider:51 -
 Using datasource:
 java:comp/env/jdbc/quickstart
 20:56:49,010 INFO SessionFactoryImpl:155 - Use outer
 join fetching: true
 20:56:49,057 WARN JDBCExceptionReporter:36 - SQL
 Error: 0, SQLState: null
 20:56:49,057 ERROR JDBCExceptionReporter:44 - Cannot
 load JDBC driver class
 'null'
 20:56:49,072 WARN SessionFactoryImpl:171 - Could not
 obtain connection
 metadata
 java.sql.SQLException: Cannot load JDBC driver class
 'null'
 at

org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
 a:529)
 at

org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
 12)
 at

net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(Datas
 ourceConnectionProvider.java:60)
 at

net.sf.hibernate.impl.SessionFactoryImpl.init(SessionFactoryImpl.java:160)
 at

net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:59
 4)
 at

net.sf.hibernate.examples.quickstart.TestHibernateServlet.initHibernate(Test
 HibernateServlet.java:109)
 at

net.sf.hibernate.examples.quickstart.TestHibernateServlet.doGet(TestHibernat
 eServlet.java:26)
 at

javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at

javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



Re: java.sql.SQLException: Cannot load JDBC driver class 'null'

2003-10-22 Thread vijaya prasad pala
Hi Jason,

I tried as u said. But same exception is getting.
I am using tomcat4.1.27, sqlserver 2000.
can u send me ur connection pooling code.
Thank you.

vijay
--- El Toro [EMAIL PROTECTED] wrote:
 Where are your jdbc for sql server jars?  Put all
 three under /%TOMCAT_HOME%/common/lib.
 
 Also, your factoryClassName should be:
 

factoryClassName=org.apache.naming.factory.ResourceFactory
 
 I'm currently using connection pooling with sql
 server
 and thats the only things i can see that might cause
 you problems.  Also, make sure you don't have any
 duplicate entries for the jdbc for sql server jars
 in
 your classpath.
 
 Hope That Helps,
 
 Jason
 
 --- vijaya prasad pala [EMAIL PROTECTED]
 wrote:
  Hi,
  
  From one week i am trying to solve this problem.
  Please any one help me.
  if i am connection directly its ok. but if i am
  using
  connection pooling this exception is comming.
  
  my connection pooling syntax in server.xml is
 

--
 Resource name=jdbc/edmsCP auth=Container
  type=javax.sql.DataSource/
 ResourceParams name=jdbc/edmsCP
   parameter
 namefactory/name

 

valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
 namedriverClassName/name

 

valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
   /parameter
   parameter
 nameurl/name

 

valuejdbc:microsoft:sqlserver://vijay2k:1433;databasename=eDMS/value
   /parameter
   parameter
 nameusername/name
 valuesa/value
   /parameter
   parameter
 namepassword/name
 valuesa/value
   /parameter
   parameter
 namemaxActive/name
 value20/value
   /parameter
   parameter
 namemaxIdle/name
 value10/value
   /parameter
   parameter
 namemaxWait/name
 value-1/value
   /parameter
 /ResourceParams
 

-
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
  resource-ref
res-ref-namejdbc/edmsCP/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref
  /web-app
 

---
  Here is my code.. 
  ---
   public Connection getConnection()
   {
Connection conn = null;
try
{
 Context initCtx = new InitialContext();
 Context envCtx = (Context)
  initCtx.lookup(java:comp/env);
  
 if(envCtx == null )
   throw new Exception(No Context);
 else
   System.out.println(Context Ok -  +
 envCtx);
  
 DataSource ds = (DataSource)
  envCtx.lookup(jdbc/edmsCP);
  
 System.out.println(DataSource - + ds);
  
 if (ds != null)
  conn = ds.getConnection();
  
}
catch(Exception ex)
{
 System.out.println(ex.getMessage());
 //ex.printStackTrace();
}finally
{
 return conn;
}
   }
  ---
  
  
  
  __
  Do you Yahoo!?
  The New Yahoo! Shopping - with improved product
  search
  http://shopping.yahoo.com
  
 

-
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 __
 Do you Yahoo!?
 The New Yahoo! Shopping - with improved product
 search
 http://shopping.yahoo.com
 

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


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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



java.sql.SQLException: Cannot load JDBC driver class 'null'

2003-10-21 Thread vijaya prasad pala
Hi,

From one week i am trying to solve this problem.
Please any one help me.
if i am connection directly its ok. but if i am using
connection pooling this exception is comming.

my connection pooling syntax in server.xml is
--
   Resource name=jdbc/edmsCP auth=Container
type=javax.sql.DataSource/
   ResourceParams name=jdbc/edmsCP
 parameter
   namefactory/name
  
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 parameter
   namedriverClassName/name
  
valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
 /parameter
 parameter
   nameurl/name
  
valuejdbc:microsoft:sqlserver://vijay2k:1433;databasename=eDMS/value
 /parameter
 parameter
   nameusername/name
   valuesa/value
 /parameter
 parameter
   namepassword/name
   valuesa/value
 /parameter
 parameter
   namemaxActive/name
   value20/value
 /parameter
 parameter
   namemaxIdle/name
   value10/value
 /parameter
 parameter
   namemaxWait/name
   value-1/value
 /parameter
   /ResourceParams
-
  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
resource-ref
  res-ref-namejdbc/edmsCP/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref
/web-app
---
Here is my code.. 
---
 public Connection getConnection()
 {
  Connection conn = null;
  try
  {
   Context initCtx = new InitialContext();
   Context envCtx = (Context)
initCtx.lookup(java:comp/env);

   if(envCtx == null )
 throw new Exception(No Context);
   else
 System.out.println(Context Ok -  + envCtx);

   DataSource ds = (DataSource)
envCtx.lookup(jdbc/edmsCP);

   System.out.println(DataSource - + ds);

   if (ds != null)
conn = ds.getConnection();

  }
  catch(Exception ex)
  {
   System.out.println(ex.getMessage());
   //ex.printStackTrace();
  }finally
  {
   return conn;
  }
 }
---



__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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