Subbu Aswathanarayan

Ranch Hand
+ Follow
since Jun 22, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Subbu Aswathanarayan

hi,
after the user successfully logs on, put an object (probably containing his user id) in to the session.in all ur "secret pages" try to retrieve this object from the session.if u cant, redirect the user to an error page.
hope this helps.
Subbu
19 years ago
thanks bill for your response.
is there anyway i can prevent the execution of the code after the forward statement.can i use something like exit just after the forward statement.is it advisable?
thanks.
Subbu
19 years ago
hi all,
i found out something very strange thing abt servlets.i dont know if i am right but anyway....
in one of my servlets, if a particular condition is met i forward the request to a certain jsp page

and if the condition is not met i do some other processing in the servlet itself.today i realized that the request comes back to this servlet after the jsp page execution is over.till now i believed that once request has been forwarded, the control passes on to the called servlet/jsp page.
am i right?if i am right what should i do so that the request doesn't come back to the calling servlet.i know i can use the else condition.but in my case there are situations where i cannot use else condition
any help would be greatly appreciated.
Subbu
19 years ago
Hi all,
i have got a very basic question. i have a servlet which a number of users access. my question is, if a user closes the browser window in the middle of the servlet execution(i mean before the entire servlet is executed) will the servlet be killed instantly or will the servlet get fully executed before it is killed.
i hope my question is clear.
any help would be greatly appreciated.
Subbu
19 years ago
hi thomas,
u should not set session=false in ur jsp page.doing this means that no further sessions will be created, even if u try to .try removing that statement from ur jsp page and try again.i think it will work.
Subbu
19 years ago
hi all,
this is my system info
NT 4.0
IIS 4.0
JRun 3.1
I have written a few servlets and jsp pages for a project i am working on.
i am using session tracking for user authentication.everything is working fine but sometimes i lose the session information.when i checked the JRun log files i found the following error
08/07 12:44:42 error (session) Session data is not serializable (ID=103726997202377538) - session is lost
08/07 12:44:42 error (session) Session data is not serializable (ID=278050997202666173) - session is lost
does anyone know whats happening here?
any help would be greatly appreciated.
Subbu

[This message has been edited by Subbu Aswathanarayan (edited August 07, 2001).]
19 years ago

Renusagar.
This was where I was born.A very small township in the State of UP in northern India.
Subbu
19 years ago
Hi Jeff,
I think i didn't word my question correctly.i will explain it once again.
my problem is not connection pooling.as a matter of fact i am using connection pooling.my question is, what if two users try to update two different records of the same table.will the table get locked or just the record.someone mentioned to me that we can control if the entire table gets locked or just the record being updated.
i want to know how can this be done using java.
thanks for ur reply.
Subbu
19 years ago
Hi all,
i am new to jdbc as well as servlets.
i am using MS SQL Server as my db and drivers provided by "JRun " in one of my servlet.my servlet may be accessed by more than one user at the same time.
they may try to write to different records of the same table.
i was told that to avoid conflict between the two statements, we have to set up buffering to either optimistic or pesimistic while getting the resultset.
i have no idea what that means or how to set it up.
any help in this regard will be greatly appreciated.
my system info
JRun3.1/IIS 4.0/NT 4.0/MS SQL Server
Subbu
19 years ago
Hi all,
i am using MS SQL Server and JDBC-ODBC bridge.i am having a very strange problem while trying to execute an insert statement.
i get an saying database is busy with the results of another hstmt.
by trial and error i found out that this was because of a SELECT statement a couple of lines above the INSERT statement.i was getting the result of the SELECT statement in a resultset.so i thought, probably the resultset was engaging the connection and explicitly closed it using rs.close().but even that doesn't help.
when i removed the rs = select ...... statement, everything seems to be working fine.but i need that select statement.its a must.
please help me out.
thanks in advance.
Subbu
Hi trevor,
but i do have a db name right.cant i connect to a ms sql server using the JDBC-ODBC bridge without creating a dsn for it.just as we do with 3rd party JDBC drivers for ms sql server.everything is going to be the same here, except for the driver.
i hope i am clear now.
Subbu
19 years ago
hi all,
i was just wondring if i can connect to a MS sql server database without using a dsn using the JDBC-ODBC bridge, just as we do with other jdbc drivers.
any help is greatly appreciated.
Subbu
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not fou
nd and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at msjdmc.main(msjdmc.java:16)
19 years ago
hi,
i have a question.
can i connect to a MS sql server datbase without using a dsn.if yes how?a sample code would be great.
thanks.
Subbu
19 years ago
Hi,
I have written a simple java code to connect to a MS sql server db.here is the code
import java.sql.*;
import java.io.*;
public class createSecurityTable
{
public static void main(String args[]) throws SQLException
{
String username = "aswaths";
String password = "cufs1";
String url = "jdbc:jrun:sqlserver://servername:1433;databaseName=db";
try
{
Class.forName("allaire.jrun.jdbc.JRunDriver");
// Establish Connection to the database at URL with usename and password
Connection conn = DriverManager.getConnection(url, username, password);
System.out.println ("Ok, connection to the DB is working.");
}
catch(Exception e) // (ClassNotFoundException and SQLException)
{
e.printStackTrace();
}
}
}
i am not getting any compilation error but i am getting this error message while running it.
Exception in thread "main" java.lang.NoClassDefFoundError: allaire/jrun/servlet/JRunSE
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at createSecurityTable.main(createSecurityTable.java:14)
i have no idea why this is happening.
i have the jar file containing the driver in my classpath.
any help is greatly appreciated.
Subbu
[This message has been edited by Subbu Aswathanarayan (edited July 25, 2001).]
19 years ago
Hi,
I have written a simple java code to connect to a MS sql server db.here is the code
import java.sql.*;
import java.io.*;
public class createSecurityTable
{
public static void main(String args[]) throws SQLException
{
String username = "aswaths";
String password = "cufs1";
String url = "jdbc:jrun:sqlserver://servername:1433;databaseName=db";
try
{
Class.forName("allaire.jrun.jdbc.JRunDriver");
// Establish Connection to the database at URL with usename and password
Connection conn = DriverManager.getConnection(url, username, password);
System.out.println ("Ok, connection to the DB is working.");
}
catch(Exception e) // (ClassNotFoundException and SQLException)
{
e.printStackTrace();
}
}
}
i am not getting any compilation error but i am getting this error message while running it.
Exception in thread "main" java.lang.NoClassDefFoundError: allaire/jrun/servlet/JRunSE
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at createSecurityTable.main(createSecurityTable.java:14)
i have no idea why this is happening.
any help is greatly appreciated.
Subbu