Win a copy of Terraform in Action this week in the Cloud forum!

mohan kannan

Greenhorn
+ Follow
since Dec 02, 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 mohan kannan

Thanks David
It worked
Regards
Mohab
19 years ago
Thaks david
I will try out
Regards
Mohan
19 years ago
Thanks david
Actually I am using a scrolling text on applet itself using paint method.
Pl indicate how to use showDocument method to open
an URL
Thanks
Mohan
19 years ago
Thanks thomas
Is it possible with applet to open a url by capturing mouse click events
thanks
mohan
19 years ago
Hi all
I am displaying content of a file in an applet
My requirement is each line must be a clickable link and must lead to different URL / web page
ie each line has some text and a url delimited by suitable character and the url part is parsed out and the entire line is constructed as a clickable link
This must be achieved for all lines of the applet content
Can it is possible to achieve this in an applet
I am not using JApplet
Thanks
Mohan
19 years ago
Hi Pranit
Thanks for your mail
I took the space from www.hostingbizz.com
They provide java space on win2000 os with tomcat
provides servlet/jsp contanier service

Also http://mx-solutions.com/ provide java space
on winnt os with mssql dB. I am not sure of their's java server (ie whether tomcat or jrun)
Thanks
Mohan
19 years ago
JSP
hi pranik
Thanks for yr reply
My situation is I cannot access dsn configuration since the server is at USA
and it is a bought out space.
The system administrator claims that dsn is configured properly.
So all I want confirm is whether the problem is with the code or he (admin) claim is wrong
Thanks
Mohan
19 years ago
JSP
I am trying to establish connection to mssql2000 on server through JSP
Server Tomcat
The code used in jsp is

It's loading the driver and "JDBC Driver Loaded " message received
I have properly replaced dsnname, username and password in url string with the exact dsn details provided by
my system administrator.
But when trying to get connection the server output is
Hello loading and connecting to dB
JDBC Driver Loaded
Error Number. 2 : SQLException: Could not connect to dB
Error Message is [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Error Code is 0
Error State is IM002
The above error received for the both url formats
The same code /jsp file when run on local machine (mssql7 and tomcat 4.0.1) with the same dsn name properly configured
(Here I used user name="sa" and password="") is able to establish connection to database.
System administrator says that the dsn is configured properly on the server.
Please indicate whether the problem is with the code or the dsn is not properly configured at the server
thanks
Mohan
[ Edited by Dave to format code and fix smilies ]
[ April 09, 2002: Message edited by: David O'Meara ]
I am trying to establish connection to mssql2000 on server through JSP
Server used is Tomcat
The code used in jsp is
//import required packages
<%@ page language="java" import="java.sql.*, java.io.*, java.util.*" %>
//urlformat one
String url="jdbc dbc snname;UID=username;PWD=password";
//url format two
//String url="jdbc dbc snname";
Connection con=null;;
try
{
// Load Driver.
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
out.println("JDBC Driver Loaded");

}
catch (Exception le)
{
out.println( "Error Number.1 : Could not Load JdbcOdbcDriver."+le.getMessage());
}

try
{
// Connect to database.
//connect using url format one
con= DriverManager.getConnection(url);
//connect using url format two
// con= DriverManager.getConnection(url,"username","password");
out.println("Connected to database");

catch (SQLException cnfe)
{
out.println( "Error Number. 2 : SQLException: Could not connect to dB\r\n");

out.println( "Error Message is "+cnfe.getMessage() + "\r\n");

out.println( "Error Code is " +cnfe.getErrorCode());
out.println( "Error State is "+cnfe.getSQLState() + "\r\n");
}
catch (Exception e)
{
out.println( "Error No. 3 : Exception: An unknown error occurred while connecting to DB."+e.getMessage());

}
It's loading the driver and "JDBC Driver Loaded " message received
I have properly replaced dsnname, username and password in url string with the exact dsn details provided by
my system administrator.
But when trying to get connection the server output is
Hello loading and connecting to dB
JDBC Driver Loaded
Error Number. 2 : SQLException: Could not connect to dB
Error Message is [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
Error Code is 0
Error State is IM002
The above error received for the both url formats
The same code /jsp file when run on local machine (mssql7 and tomcat 4.0.1) with the same dsn name properly configured
(Here I used user name="sa" and password="") is able to establish connection to database.
System administrator says that the dsn is configured properly on the server.
Please indicate whether the problem is with the code or the dsn is not properly configured at the server
thanks in advance
Mohan
19 years ago
JSP
Is it possible to establish database(mssql2000) connection without dsn. ie dsnless connection using jsp program
Server used is tomcat.
Thanks in advance
K.Mohan
Hi all
I am using jdbc-odbc driver to connect to mssql2000 database.
The code used is below

I have tested this code local system with "sa" rights (default user name and password) and works successfully for creating table, adding,listiing recpords.
But when uploading the files on server (Tomcat4.0.1) with exact user name and password provided by server administrator, and when run the related jsp's involving db connection, I am getting the following error
Error Number. 2 : SQLException: Could not connect to DB
Please suggest what's the problem.
pl suggest Whether sun.jdbc.odbc.JdbcOdbcDriver can be used on the web server?
Server administrator says the dsn is configured properly and user name and password are correct.
Thanks in advance
K.Mohan
[ Edited by Dave to format code and remove the UBB smilies ]
[ February 04, 2002: Message edited by: David O'Meara ]
how to create or write to .txt file on the server using jsp bean class.
I am able to create/open/ write to .txt file
using jsp bean on local system
But the same bean is not working properly when uploaded on to the server
JsP Server is tomcat
mohan
19 years ago
JSP
hi all
I have installed tomcat4.0.1 on win98 and have set up own context for running servlets and jsps
I am not putting the files in default examples folder.
While all jsps without usebean included in the jsp run successfully.
But I am getting error while running jsp's that contains usebean tag
The bean class has been placed under tomcat4.0.1 webapp/mycontext/web-inf/classes directory.
This directory web-inf and classes manually created for this context
error received is as below
message: Internal Server Error
description: The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception :
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 3 in the jsp file: /addmember.jsp
Generated servlet error:
C:\jakarta-tomcat-4.0.1\work\localhost\_\addmember$jsp.java:67: Class org.apache.jsp.MemberBean not found.
MemberBean bb = null;
The same jsp when uploaded to server able to locate the memberbean and compiles successfully but not in locat system
thanks in advance
mohan
19 years ago
JSP
hi all
is this one allowed in jsp
<jsp:forward page="somepic.gif" />
I am required to use this in my code to redirect to an html page in this way
The same is allowed in asp programming ie
response.redirect ("somepic.gif")
thanks
mohan
19 years ago
JSP
hi all
I am getting error while running jsp's that contains usebean tag
The bean class has been placed under tomcat4.0.1 webapp/examples/web-inf/classes directory.
error received is as below
message: Internal Server Error
description: The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception :
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 3 in the jsp file: /addmember.jsp
Generated servlet error:
C:\jakarta-tomcat-4.0.1\work\localhost\_\addmember$jsp.java:67: Class org.apache.jsp.MemberBean not found.
MemberBean bb = null;
The same jsp when uploaded to server able to locate the memberbean and compiles successfully but not in locat system
thanks in advance
mohan
19 years ago