Re:subscribe to mail-list

2001-07-31 Thread Dwaipayan

please subscribe me.

_
For Rs. 2,000,000 worth of Aptech scholarships click below
http://events.rediff.com/aptechsch/scholarship.htm






java error window

2001-07-21 Thread Dwaipayan

To cause a servlet to load on starting tomcat, i found the load-on-startup tag has 
been used in tomcat's default web.xml in the conf directory.what does  the no. 
supplied(-2147483646) stand for?.i used the same no. for my own servlet and it worked 
fine.
Try this: Can i create a servlet which loads on tomcat startup,and access database in 
the init method?if yes--my server window showed that the servlet retrieved data from 
database as expected,but then an illegal operation window appeared  and my server 
stopped repeatedly.
if this is due memory shortage is it due my Database,jvm,tomcat being on the same 
machine(Win98,oracle personal ed.,tomcat3.2.1,jdk1.2.2). on suggested by 
Andrew([EMAIL PROTECTED]) i played with the memory settings in dos properties 
frame,but to no avail.(Incidentally can i use multiple jvms.)
this same window appears when i use a jsp page accessing database.but it disappears if 
i use only servlets accessing database.
the msgbox showed the following:

JAVA caused an invalid page fault in
module unknown at :1f6c4269.
Registers:
EAX=05d706b4 CS=0177 EIP=1f6c4269 EFLGS=00010297
EBX=05d709d4 SS=017f ESP=050dfd2c EBP=050dfd4c
ECX= DS=017f ESI=05d70080 FS=35d7
EDX=05d70080 ES=017f EDI= GS=
Bytes at CS:EIP:

Stack dump:
1f7025d1 06821528  0186 007b1ec0 00679470   050dfda4 
1f702505 05d70080  0010 01866a40 007b1ec0 50472958 

this has been a problem too old! please show me a way.(Then i shall kneel to the 
divine in u!)
thanx



[EMAIL PROTECTED]


ddr


http://www.monsterindia.com - The Best Jobs. For the Best Minds.






ssi and java heap

2001-07-17 Thread Dwaipayan

i have a few queries:
can SSI be used when i am using tomcat as stand alone container?

i am doing my first project on tomcat starting with creating a project dir and copying 
the directory structure of the examples dir. now when running jsp which have beans 
accessing my local database, i get some memory related problems.this is supposedly due 
to the jsp container,servlet container,tomcat http server and oracle db running on the 
same machine(64mb ram,433mhz).how can i increase the JVM memory area(heap) for my 
webapp?

kindly suggest.
i must say so long ,u people hve been of great help!!

 

ddr


http://www.monsterindia.com - The Best Jobs. For the Best Minds.






server side include

2001-07-12 Thread Dwaipayan

my query is really simple:
does tomcat support server side include(SSI) in  otherwise static pages.if it does, 
then what should be the filename extension of this file.should it be .shtml, as in 
Java webserver?(i don't think so).and where should i put such files?.
[EMAIL PROTECTED]




Buy Feng Shui Package for Rs. 151/- only, at 
http://shopping.rediff.com/shopping/fengshui_mailer.htm






increasing java heap

2001-07-12 Thread Dwaipayan

my jvm seems to be out of memory as it shows page faults when accessing 
databases(oracle personal on win98) ithru tomcat.how can i increase the heap memory?
kindly suggest.


ddr


Buy Feng Shui Package for Rs. 151/- only, at 
http://shopping.rediff.com/shopping/fengshui_mailer.htm






Re:java error in database access

2001-07-06 Thread Dwaipayan

my problem concerning JdbcOdbcDriver was not solved.a friend(Randy it was u!) 
suggested that this driver is not thread safe/has problems with multithreading.(that's 
hebrew to me,coz i am a first time server programmer)

incidentally i got the following server window msgs when using jdbcodbcdriver.can any 
1 tell me what it means!!(my index page has 3 frames having first.html,second.html  
third.html.the login textboxes are in third.html which lead to login.jsp on submit.my 
app is named project)
[ 
2001-07-06 12:50:26 - Ctx( /project ): IOException in: R( /project + /jsp/first.
html + null) Connection reset by peer: socket write error
2001-07-06 12:50:26 - Ctx( /project ): 404 R( /project + /jsp/login.js + null) n
ull
2001-07-06 12:50:26 - Ctx( /project ): IOException in: R( /project + /jsp/third.
html + null) Connection reset by peer: socket write error
]

however i also tried with a type 4 driver:i-net Seropto(tm) optional package 
driver(ver1.0 for Oracle 8.0 server).classname--com.inet.ora.OraDriver.it is said to 
support the following:
Oracle Server, Java and JDBC Versions
--
Java Versions: 1.2.x or higher
JDBC Version:  2.0

Oracle Server Version: 8.0.4.0
i have Oracle8.0.4 personal edition,jdk1.2.2.i have included the jar files for both 
the driver and jdbc2.0 optional package in c:\tomcat\lib\.
i modified th login.jsp used for jdbc-odbc driver as follows:
[
%@ page session=true import=java.sql.*,java.io.* %


% 
String s1=request.getParameter(user);//username
String s2=request.getParameter(pwd);//password
String upwd=null;
FileOutputStream fos=null;
PrintStream prs=null;

try{
fos=new FileOutputStream(error.txt);
prs=new PrintStream(fos);
//DriverManager.setLogStream( System.out );
if(s1.length()==8   s2.length()==6)
{
out.println(loading driver);
 Class.forName(com.inet.ora.OraDriver).newInstance();
out.println( driver loaded);
DriverManager.registerDriver(new com.inet.ora.OraDriver());
out.println(driver registered);
Connection 
con=DriverManager.getConnection(jdbc:inetora,scott,tiger);
out.println(got connection);
Statement ps=con.createStatement();
   // ps.setString(1,s1);
ResultSet rs=ps.executeQuery(SELECT password FROM login WHERE 
username'+s1+');
if(rs!=null)
{
while(rs.next())
{
upwd=rs.getString(password);
}
}

con.close(); 
if(upwd!=null)
{

if(s2.equals(upwd))
{   
out.println(Welcome Back to this site 
+s1);
}
 

else
{
 
out.println(Incorrect password);
}
 
}
else
{ 
out.println(Incorrect username );
}






}
else
{

out.println(Invalid no. of characters in username/password);
}
}
catch(Exception ex){
ex.printStackTrace(prs);
out.println(ex.getMessage());
out.println(ex);}

 %





]

i got the following output in the browser:
loading driver driver loaded driver registered Connection refused: no further 
information com.inet.ora.SQLException: Connection refused: no further information 
what the hell??

please offer a solution.
thanx.



ddr


Buy Feng Shui Package for Rs. 151/- only, at 
http://shopping.rediff.com/shopping/fengshui_mailer.htm






Re:java error in database access

2001-07-06 Thread Dwaipayan

thanx randy
i am checking out ur solutions.


ddr


Buy Feng Shui Package for Rs. 151/- only, at 
http://shopping.rediff.com/shopping/fengshui_mailer.htm






java error in database access

2001-07-05 Thread Dwaipayan


i have been facing a problem in tomcat which i could not solve may be due to being a 
first time user . i will be pleased if u could tell me the source of this problem.
i have a login page where the user enters username and password in 2 text fields(user 
 pwd).the form action leads to login.jsp file.if  both are found in the table login 
located in Oracle8.0.4(personal edition), then the user is greeted by his username. 
else error msg is shown.when i used JdbcOdbcDriver the output was as expected.but 
immediately after the output page was displayed,an illegal operation msgbox was shown 
by java.this error does not occur sometimes.but whenever i stop tomcat and restart 
it,and acces my login page the error appears again.the error looks like the following:

[
JAVA caused an invalid page fault in
module unknown at :08412f90.
Registers:
EAX=083105d8 CS=0177 EIP=08412f90 EFLGS=00010297
EBX=08310908 SS=017f ESP=050dfd2c EBP=050dfd4c
ECX= DS=017f ESI=08310140 FS=3ca7
EDX=08310140 ES=017f EDI= GS=
Bytes at CS:EIP:

Stack dump:
1f7025d1 004151d0  0195 007b1ec0 00679470   050dfda4 
1f702505 08310140  0010 019512e8 007b1ec0 50472958 
]
my classpath has tomcat_home,java_home,and c:\jdk1.2.2\lib\tools.jar set appropriately
i am using Windows98 machine with 64mb ram,433mhz and with initial memory set to 
3072(thru dos window properties--memory tab).

i have tried in debugging by putting System.out.println() statements but to no avail.

i am enclosing the login.jsp file i used.
eagerly awaiting ur comments.

login.jsp:

%@ page session=true import=java.sql.*,sun.jdbc.odbc.*,java.io.* %


% 
String s1=request.getParameter(user);
String s2=request.getParameter(pwd);
String upwd=null;
try{

if(s1.length()==8   s2.length()==6)
{
System.out.println(loading driver);
 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
System.out.println(creating connection);
Connection 
con=DriverManager.getConnection(jdbc:odbc:login,scott,tiger);
System.out.println(creating statement);
   Statement stmt=con.createStatement();

System.out.println(executing query);
ResultSet rs=stmt.executeQuery(select password from login where 
username='+ s1+');
System.out.println(checking if rs is null);
if(rs!=null)
{
System.out.println(while rs exists);
while(rs.next())
{
System.out.println(retrieving password);
upwd=rs.getString(password);
}
}
System.out.println(closing connection);
con.close();
System.out.println(checking if upwd is null); 
if(upwd!=null)
{
System.out.println(checking if upwd=s2);
if(s2.equals(upwd))
{
System.out.println(if upwd=s2);
out.println(Welcome Back to this site 
+s1);
}
 

else
{
System.out.println(if upwd not equal to s2);
out.println(Incorrect password);
}
 
}
else
{
System.out.println(if upwd is null); 
out.println(Incorrect username );
}






}
else
{
System.out.println(if entered username/password are not valid);
out.println(Invalid no. of characters in username/password);
}
}
catch(Exception ex){System.out.println(inside catch+ex);}
System.out.println(end of jsp);

 %



Dwaipayan Datta Ray (call me Ray)
[EMAIL PROTECTED]



Buy Feng Shui Package for Rs. 151/- only, at 
http://shopping.rediff.com/shopping/fengshui_mailer.htm






java error in database access

2001-07-05 Thread Dwaipayan


i have been facing a problem in tomcat which i could not solve may be due to being a 
first time user . i will be pleased if u could tell me the source of this problem.
i have a login page where the user enters username and password in 2 text fields(user 
 pwd).the form action leads to login.jsp file.if  both are found in the table login 
located in Oracle8.0.4(personal edition), then the user is greeted by his username. 
else error msg is shown.when i used JdbcOdbcDriver the output was as expected.but 
immediately after the output page was displayed,an illegal operation msgbox was shown 
by java.this error does not occur sometimes.but whenever i stop tomcat and restart 
it,and acces my login page the error appears again.the error looks like the following:

[
JAVA caused an invalid page fault in
module unknown at :08412f90.
Registers:
EAX=083105d8 CS=0177 EIP=08412f90 EFLGS=00010297
EBX=08310908 SS=017f ESP=050dfd2c EBP=050dfd4c
ECX= DS=017f ESI=08310140 FS=3ca7
EDX=08310140 ES=017f EDI= GS=
Bytes at CS:EIP:

Stack dump:
1f7025d1 004151d0  0195 007b1ec0 00679470   050dfda4 
1f702505 08310140  0010 019512e8 007b1ec0 50472958 
]
my classpath has tomcat_home,java_home,and c:\jdk1.2.2\lib\tools.jar set appropriately
i am using Windows98 machine with 64mb ram,433mhz and with initial memory set to 
3072(thru dos window properties--memory tab).

i have tried in debugging by putting System.out.println() statements but to no avail.

i am enclosing the login.jsp file i used.
eagerly awaiting ur comments.

login.jsp:

%@ page session=true import=java.sql.*,sun.jdbc.odbc.*,java.io.* %


% 
String s1=request.getParameter(user);
String s2=request.getParameter(pwd);
String upwd=null;
try{

if(s1.length()==8   s2.length()==6)
{
System.out.println(loading driver);
 Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
System.out.println(creating connection);
Connection 
con=DriverManager.getConnection(jdbc:odbc:login,scott,tiger);
System.out.println(creating statement);
   Statement stmt=con.createStatement();

System.out.println(executing query);
ResultSet rs=stmt.executeQuery(select password from login where 
username='+ s1+');
System.out.println(checking if rs is null);
if(rs!=null)
{
System.out.println(while rs exists);
while(rs.next())
{
System.out.println(retrieving password);
upwd=rs.getString(password);
}
}
System.out.println(closing connection);
con.close();
System.out.println(checking if upwd is null); 
if(upwd!=null)
{
System.out.println(checking if upwd=s2);
if(s2.equals(upwd))
{
System.out.println(if upwd=s2);
out.println(Welcome Back to this site 
+s1);
}
 

else
{
System.out.println(if upwd not equal to s2);
out.println(Incorrect password);
}
 
}
else
{
System.out.println(if upwd is null); 
out.println(Incorrect username );
}






}
else
{
System.out.println(if entered username/password are not valid);
out.println(Invalid no. of characters in username/password);
}
}
catch(Exception ex){System.out.println(inside catch+ex);}
System.out.println(end of jsp);

 %



Dwaipayan Datta Ray (call me Ray)
[EMAIL PROTECTED]



Buy Feng Shui Package for Rs. 151/- only, at 
http://shopping.rediff.com/shopping/fengshui_mailer.htm