You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Neo Gigs <gi...@yahoo.com> on 2002/03/09 04:52:45 UTC
Help in JSP
Hi there all,
I had a JSP page that talks to a JBeans, but the problem is my Bean is actually doing DB connectivity to a Oracle db, as no result returned from the Bean.
As I had tested with the application of the same codes.
Could anyone help me to scan thru, whats wrong with this?
package com.mbf.beans;
import java.sql.*;
import java.math.*;
import java.io.*;
import oracle.jdbc.driver.*;
public class SpTest
{
private int interString;
private String output;
public String getInput()
{
// First detect class existance
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
} catch (java.lang.ClassNotFoundException e){
System.err.print("Class Not Found error!" + e.getMessage());
}
// Now try to open db connection and do the fetching
try{
// DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
String url = "jdbc:oracle:thin:@10.97.2.50:1521:REL4";
String scall = "begin sp_GetClatTypeIE(?, ?); end;";
Connection conn = DriverManager.getConnection(url, "tux", "tux");
CallableStatement cs = conn.prepareCall(scall);
cs.registerOutParameter(2, Types.VARCHAR);
cs.setInt(1, interString);
cs.execute();
cs.close();
conn.close();
output = cs.getString(2);
} catch (SQLException e) {
System.err.println("Error: " + e.getMessage());
}
return output;
}
public void setInput(String s)
{
// Here to assign input parameters
interString = Integer.parseInt(s);
}
}
Thanks
Regards,
Neo Gigs
========
VB?
http://communities.msn.com.my/VisualBasicwithNeo
http://www.vbcity.com/forum
http://www.vbweb.co.uk
Get paid cash receive email?
http://www.MintMail.com/?m=1414418
Reading SMS got paid?
http://www.dynamicsms.com.au/intro.asp?ref=0123502385&refc=348
Malaysianshop.com http://www.malaysianshop.com
More Traffic? http://www.exitblaze.com/cgi-bin/intro_track.pl?b=25924&c=xbad1
================================================
Note:This is intended to addressees only, if you wanna be removed, let me know.
Re: Help in JSP
Posted by Neo Gigs <gi...@yahoo.com>.
I found out that my problem is really coz by the Oracle driver cannot be
recognized by Tomcat, but i had been doing it and solve the problem, see
"Help In JSP" posts.
Anyway thanks everyone...
----- Original Message -----
From: "August Detlefsen" <au...@yahoo.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, March 12, 2002 2:00 AM
Subject: Re: Help in JSP
> You specify your statement as this:
>
> String scall = "begin sp_GetClatTypeIE(?, ?); end;";
>
> Which has 2 ?s, but you are only setting the first one:
>
> cs.setInt(1, interString);
>
> What does your error message say? If this is the problem, Oracle should
> return something like 'Invalid parameters specified'.
>
>
> --- Neo Gigs <gi...@yahoo.com> wrote:
> > hi there,
> >
> > thanks for the reminder, yet there is no results return as output. I
> > tried
> > to replace the line:
> >
> > return output;
> >
> > with
> >
> > return "" + interString;
> >
> > and it return my input value...
> >
> > ----- Original Message -----
> > From: "Karthikeyan .K.V" <ka...@attbi.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Saturday, March 09, 2002 12:34 PM
> > Subject: RE: Help in JSP
> >
> >
> > > Think use the "output=" statement before u use the close
> > function
> > > statement.
> > >
> > > Karthik
> > >
> > > -----Original Message-----
> > > From: Neo Gigs [mailto:gigsvoo@yahoo.com]
> > > Sent: Friday, March 08, 2002 9:53 PM
> > > To: Tomcat Users List
> > > Subject: Help in JSP
> > >
> > >
> > > Hi there all,
> > >
> > > I had a JSP page that talks to a JBeans, but the problem is my Bean
> > is
> > > actually doing DB connectivity to a Oracle db, as no result
> > returned from
> > > the Bean.
> > >
> > > As I had tested with the application of the same codes.
> > >
> > > Could anyone help me to scan thru, whats wrong with this?
> > >
> > > package com.mbf.beans;
> > >
> > > import java.sql.*;
> > > import java.math.*;
> > > import java.io.*;
> > > import oracle.jdbc.driver.*;
> > >
> > > public class SpTest
> > > {
> > > private int interString;
> > > private String output;
> > >
> > > public String getInput()
> > > {
> > > // First detect class existance
> > > try{
> > > Class.forName("oracle.jdbc.driver.OracleDriver");
> > > } catch (java.lang.ClassNotFoundException e){
> > > System.err.print("Class Not Found error!" +
> > e.getMessage());
> > > }
> > >
> > > // Now try to open db connection and do the fetching
> > > try{
> > > // DriverManager.registerDriver(new
> > > oracle.jdbc.driver.OracleDriver());
> > > String url = "jdbc:oracle:thin:@10.97.2.50:1521:REL4";
> > > String scall = "begin sp_GetClatTypeIE(?, ?); end;";
> > > Connection conn = DriverManager.getConnection(url,
> > "tux",
> > > "tux");
> > > CallableStatement cs = conn.prepareCall(scall);
> > > cs.registerOutParameter(2, Types.VARCHAR);
> > > cs.setInt(1, interString);
> > > cs.execute();
> > > cs.close();
> > > conn.close();
> > > output = cs.getString(2);
> > > } catch (SQLException e) {
> > > System.err.println("Error: " + e.getMessage());
> > > }
> > > return output;
> > > }
> > >
> > > public void setInput(String s)
> > > {
> > > // Here to assign input parameters
> > > interString = Integer.parseInt(s);
> > > }
> > > }
> > >
> > > Thanks
> > >
> > > Regards,
> > >
> > > Neo Gigs
> > > ========
> > > VB?
> > > http://communities.msn.com.my/VisualBasicwithNeo
> > > http://www.vbcity.com/forum
> > > http://www.vbweb.co.uk
> > > Get paid cash receive email?
> > > http://www.MintMail.com/?m=1414418
> > > Reading SMS got paid?
> > > http://www.dynamicsms.com.au/intro.asp?ref=0123502385&refc=348
> > > Malaysianshop.com http://www.malaysianshop.com
> > > More Traffic?
> > > http://www.exitblaze.com/cgi-bin/intro_track.pl?b=25924&c=xbad1
> > > ================================================
> > > Note:This is intended to addressees only, if you wanna be removed,
> > let me
> > > know.
> > >
> > >
> > >
> > > --
> > > To unsubscribe:
> > <ma...@jakarta.apache.org>
> > > For additional commands:
> > <ma...@jakarta.apache.org>
> > > Troubles with the list:
> > <ma...@jakarta.apache.org>
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > To unsubscribe: <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
>
> --
> To unsubscribe: <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Help in JSP
Posted by August Detlefsen <au...@yahoo.com>.
You specify your statement as this:
String scall = "begin sp_GetClatTypeIE(?, ?); end;";
Which has 2 ?s, but you are only setting the first one:
cs.setInt(1, interString);
What does your error message say? If this is the problem, Oracle should
return something like 'Invalid parameters specified'.
--- Neo Gigs <gi...@yahoo.com> wrote:
> hi there,
>
> thanks for the reminder, yet there is no results return as output. I
> tried
> to replace the line:
>
> return output;
>
> with
>
> return "" + interString;
>
> and it return my input value...
>
> ----- Original Message -----
> From: "Karthikeyan .K.V" <ka...@attbi.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Saturday, March 09, 2002 12:34 PM
> Subject: RE: Help in JSP
>
>
> > Think use the "output=" statement before u use the close
> function
> > statement.
> >
> > Karthik
> >
> > -----Original Message-----
> > From: Neo Gigs [mailto:gigsvoo@yahoo.com]
> > Sent: Friday, March 08, 2002 9:53 PM
> > To: Tomcat Users List
> > Subject: Help in JSP
> >
> >
> > Hi there all,
> >
> > I had a JSP page that talks to a JBeans, but the problem is my Bean
> is
> > actually doing DB connectivity to a Oracle db, as no result
> returned from
> > the Bean.
> >
> > As I had tested with the application of the same codes.
> >
> > Could anyone help me to scan thru, whats wrong with this?
> >
> > package com.mbf.beans;
> >
> > import java.sql.*;
> > import java.math.*;
> > import java.io.*;
> > import oracle.jdbc.driver.*;
> >
> > public class SpTest
> > {
> > private int interString;
> > private String output;
> >
> > public String getInput()
> > {
> > // First detect class existance
> > try{
> > Class.forName("oracle.jdbc.driver.OracleDriver");
> > } catch (java.lang.ClassNotFoundException e){
> > System.err.print("Class Not Found error!" +
> e.getMessage());
> > }
> >
> > // Now try to open db connection and do the fetching
> > try{
> > // DriverManager.registerDriver(new
> > oracle.jdbc.driver.OracleDriver());
> > String url = "jdbc:oracle:thin:@10.97.2.50:1521:REL4";
> > String scall = "begin sp_GetClatTypeIE(?, ?); end;";
> > Connection conn = DriverManager.getConnection(url,
> "tux",
> > "tux");
> > CallableStatement cs = conn.prepareCall(scall);
> > cs.registerOutParameter(2, Types.VARCHAR);
> > cs.setInt(1, interString);
> > cs.execute();
> > cs.close();
> > conn.close();
> > output = cs.getString(2);
> > } catch (SQLException e) {
> > System.err.println("Error: " + e.getMessage());
> > }
> > return output;
> > }
> >
> > public void setInput(String s)
> > {
> > // Here to assign input parameters
> > interString = Integer.parseInt(s);
> > }
> > }
> >
> > Thanks
> >
> > Regards,
> >
> > Neo Gigs
> > ========
> > VB?
> > http://communities.msn.com.my/VisualBasicwithNeo
> > http://www.vbcity.com/forum
> > http://www.vbweb.co.uk
> > Get paid cash receive email?
> > http://www.MintMail.com/?m=1414418
> > Reading SMS got paid?
> > http://www.dynamicsms.com.au/intro.asp?ref=0123502385&refc=348
> > Malaysianshop.com http://www.malaysianshop.com
> > More Traffic?
> > http://www.exitblaze.com/cgi-bin/intro_track.pl?b=25924&c=xbad1
> > ================================================
> > Note:This is intended to addressees only, if you wanna be removed,
> let me
> > know.
> >
> >
> >
> > --
> > To unsubscribe:
> <ma...@jakarta.apache.org>
> > For additional commands:
> <ma...@jakarta.apache.org>
> > Troubles with the list:
> <ma...@jakarta.apache.org>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe: <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Help in JSP
Posted by Neo Gigs <gi...@yahoo.com>.
There is no problem with the statement of the parameters, coz i had tested
with a application.
----- Original Message -----
From: "August Detlefsen" <au...@yahoo.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, March 12, 2002 2:00 AM
Subject: Re: Help in JSP
> You specify your statement as this:
>
> String scall = "begin sp_GetClatTypeIE(?, ?); end;";
>
> Which has 2 ?s, but you are only setting the first one:
>
> cs.setInt(1, interString);
>
> What does your error message say? If this is the problem, Oracle should
> return something like 'Invalid parameters specified'.
>
>
> --- Neo Gigs <gi...@yahoo.com> wrote:
> > hi there,
> >
> > thanks for the reminder, yet there is no results return as output. I
> > tried
> > to replace the line:
> >
> > return output;
> >
> > with
> >
> > return "" + interString;
> >
> > and it return my input value...
> >
> > ----- Original Message -----
> > From: "Karthikeyan .K.V" <ka...@attbi.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Saturday, March 09, 2002 12:34 PM
> > Subject: RE: Help in JSP
> >
> >
> > > Think use the "output=" statement before u use the close
> > function
> > > statement.
> > >
> > > Karthik
> > >
> > > -----Original Message-----
> > > From: Neo Gigs [mailto:gigsvoo@yahoo.com]
> > > Sent: Friday, March 08, 2002 9:53 PM
> > > To: Tomcat Users List
> > > Subject: Help in JSP
> > >
> > >
> > > Hi there all,
> > >
> > > I had a JSP page that talks to a JBeans, but the problem is my Bean
> > is
> > > actually doing DB connectivity to a Oracle db, as no result
> > returned from
> > > the Bean.
> > >
> > > As I had tested with the application of the same codes.
> > >
> > > Could anyone help me to scan thru, whats wrong with this?
> > >
> > > package com.mbf.beans;
> > >
> > > import java.sql.*;
> > > import java.math.*;
> > > import java.io.*;
> > > import oracle.jdbc.driver.*;
> > >
> > > public class SpTest
> > > {
> > > private int interString;
> > > private String output;
> > >
> > > public String getInput()
> > > {
> > > // First detect class existance
> > > try{
> > > Class.forName("oracle.jdbc.driver.OracleDriver");
> > > } catch (java.lang.ClassNotFoundException e){
> > > System.err.print("Class Not Found error!" +
> > e.getMessage());
> > > }
> > >
> > > // Now try to open db connection and do the fetching
> > > try{
> > > // DriverManager.registerDriver(new
> > > oracle.jdbc.driver.OracleDriver());
> > > String url = "jdbc:oracle:thin:@10.97.2.50:1521:REL4";
> > > String scall = "begin sp_GetClatTypeIE(?, ?); end;";
> > > Connection conn = DriverManager.getConnection(url,
> > "tux",
> > > "tux");
> > > CallableStatement cs = conn.prepareCall(scall);
> > > cs.registerOutParameter(2, Types.VARCHAR);
> > > cs.setInt(1, interString);
> > > cs.execute();
> > > cs.close();
> > > conn.close();
> > > output = cs.getString(2);
> > > } catch (SQLException e) {
> > > System.err.println("Error: " + e.getMessage());
> > > }
> > > return output;
> > > }
> > >
> > > public void setInput(String s)
> > > {
> > > // Here to assign input parameters
> > > interString = Integer.parseInt(s);
> > > }
> > > }
> > >
> > > Thanks
> > >
> > > Regards,
> > >
> > > Neo Gigs
> > > ========
> > > VB?
> > > http://communities.msn.com.my/VisualBasicwithNeo
> > > http://www.vbcity.com/forum
> > > http://www.vbweb.co.uk
> > > Get paid cash receive email?
> > > http://www.MintMail.com/?m=1414418
> > > Reading SMS got paid?
> > > http://www.dynamicsms.com.au/intro.asp?ref=0123502385&refc=348
> > > Malaysianshop.com http://www.malaysianshop.com
> > > More Traffic?
> > > http://www.exitblaze.com/cgi-bin/intro_track.pl?b=25924&c=xbad1
> > > ================================================
> > > Note:This is intended to addressees only, if you wanna be removed,
> > let me
> > > know.
> > >
> > >
> > >
> > > --
> > > To unsubscribe:
> > <ma...@jakarta.apache.org>
> > > For additional commands:
> > <ma...@jakarta.apache.org>
> > > Troubles with the list:
> > <ma...@jakarta.apache.org>
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> > --
> > To unsubscribe: <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
>
> --
> To unsubscribe: <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Help in JSP
Posted by August Detlefsen <au...@yahoo.com>.
You specify your statement as this:
String scall = "begin sp_GetClatTypeIE(?, ?); end;";
Which has 2 ?s, but you are only setting the first one:
cs.setInt(1, interString);
What does your error message say? If this is the problem, Oracle should
return something like 'Invalid parameters specified'.
--- Neo Gigs <gi...@yahoo.com> wrote:
> hi there,
>
> thanks for the reminder, yet there is no results return as output. I
> tried
> to replace the line:
>
> return output;
>
> with
>
> return "" + interString;
>
> and it return my input value...
>
> ----- Original Message -----
> From: "Karthikeyan .K.V" <ka...@attbi.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Saturday, March 09, 2002 12:34 PM
> Subject: RE: Help in JSP
>
>
> > Think use the "output=" statement before u use the close
> function
> > statement.
> >
> > Karthik
> >
> > -----Original Message-----
> > From: Neo Gigs [mailto:gigsvoo@yahoo.com]
> > Sent: Friday, March 08, 2002 9:53 PM
> > To: Tomcat Users List
> > Subject: Help in JSP
> >
> >
> > Hi there all,
> >
> > I had a JSP page that talks to a JBeans, but the problem is my Bean
> is
> > actually doing DB connectivity to a Oracle db, as no result
> returned from
> > the Bean.
> >
> > As I had tested with the application of the same codes.
> >
> > Could anyone help me to scan thru, whats wrong with this?
> >
> > package com.mbf.beans;
> >
> > import java.sql.*;
> > import java.math.*;
> > import java.io.*;
> > import oracle.jdbc.driver.*;
> >
> > public class SpTest
> > {
> > private int interString;
> > private String output;
> >
> > public String getInput()
> > {
> > // First detect class existance
> > try{
> > Class.forName("oracle.jdbc.driver.OracleDriver");
> > } catch (java.lang.ClassNotFoundException e){
> > System.err.print("Class Not Found error!" +
> e.getMessage());
> > }
> >
> > // Now try to open db connection and do the fetching
> > try{
> > // DriverManager.registerDriver(new
> > oracle.jdbc.driver.OracleDriver());
> > String url = "jdbc:oracle:thin:@10.97.2.50:1521:REL4";
> > String scall = "begin sp_GetClatTypeIE(?, ?); end;";
> > Connection conn = DriverManager.getConnection(url,
> "tux",
> > "tux");
> > CallableStatement cs = conn.prepareCall(scall);
> > cs.registerOutParameter(2, Types.VARCHAR);
> > cs.setInt(1, interString);
> > cs.execute();
> > cs.close();
> > conn.close();
> > output = cs.getString(2);
> > } catch (SQLException e) {
> > System.err.println("Error: " + e.getMessage());
> > }
> > return output;
> > }
> >
> > public void setInput(String s)
> > {
> > // Here to assign input parameters
> > interString = Integer.parseInt(s);
> > }
> > }
> >
> > Thanks
> >
> > Regards,
> >
> > Neo Gigs
> > ========
> > VB?
> > http://communities.msn.com.my/VisualBasicwithNeo
> > http://www.vbcity.com/forum
> > http://www.vbweb.co.uk
> > Get paid cash receive email?
> > http://www.MintMail.com/?m=1414418
> > Reading SMS got paid?
> > http://www.dynamicsms.com.au/intro.asp?ref=0123502385&refc=348
> > Malaysianshop.com http://www.malaysianshop.com
> > More Traffic?
> > http://www.exitblaze.com/cgi-bin/intro_track.pl?b=25924&c=xbad1
> > ================================================
> > Note:This is intended to addressees only, if you wanna be removed,
> let me
> > know.
> >
> >
> >
> > --
> > To unsubscribe:
> <ma...@jakarta.apache.org>
> > For additional commands:
> <ma...@jakarta.apache.org>
> > Troubles with the list:
> <ma...@jakarta.apache.org>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe: <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
Re: Help in JSP
Posted by Neo Gigs <gi...@yahoo.com>.
hi there,
thanks for the reminder, yet there is no results return as output. I tried
to replace the line:
return output;
with
return "" + interString;
and it return my input value...
----- Original Message -----
From: "Karthikeyan .K.V" <ka...@attbi.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Saturday, March 09, 2002 12:34 PM
Subject: RE: Help in JSP
> Think use the "output=" statement before u use the close function
> statement.
>
> Karthik
>
> -----Original Message-----
> From: Neo Gigs [mailto:gigsvoo@yahoo.com]
> Sent: Friday, March 08, 2002 9:53 PM
> To: Tomcat Users List
> Subject: Help in JSP
>
>
> Hi there all,
>
> I had a JSP page that talks to a JBeans, but the problem is my Bean is
> actually doing DB connectivity to a Oracle db, as no result returned from
> the Bean.
>
> As I had tested with the application of the same codes.
>
> Could anyone help me to scan thru, whats wrong with this?
>
> package com.mbf.beans;
>
> import java.sql.*;
> import java.math.*;
> import java.io.*;
> import oracle.jdbc.driver.*;
>
> public class SpTest
> {
> private int interString;
> private String output;
>
> public String getInput()
> {
> // First detect class existance
> try{
> Class.forName("oracle.jdbc.driver.OracleDriver");
> } catch (java.lang.ClassNotFoundException e){
> System.err.print("Class Not Found error!" + e.getMessage());
> }
>
> // Now try to open db connection and do the fetching
> try{
> // DriverManager.registerDriver(new
> oracle.jdbc.driver.OracleDriver());
> String url = "jdbc:oracle:thin:@10.97.2.50:1521:REL4";
> String scall = "begin sp_GetClatTypeIE(?, ?); end;";
> Connection conn = DriverManager.getConnection(url, "tux",
> "tux");
> CallableStatement cs = conn.prepareCall(scall);
> cs.registerOutParameter(2, Types.VARCHAR);
> cs.setInt(1, interString);
> cs.execute();
> cs.close();
> conn.close();
> output = cs.getString(2);
> } catch (SQLException e) {
> System.err.println("Error: " + e.getMessage());
> }
> return output;
> }
>
> public void setInput(String s)
> {
> // Here to assign input parameters
> interString = Integer.parseInt(s);
> }
> }
>
> Thanks
>
> Regards,
>
> Neo Gigs
> ========
> VB?
> http://communities.msn.com.my/VisualBasicwithNeo
> http://www.vbcity.com/forum
> http://www.vbweb.co.uk
> Get paid cash receive email?
> http://www.MintMail.com/?m=1414418
> Reading SMS got paid?
> http://www.dynamicsms.com.au/intro.asp?ref=0123502385&refc=348
> Malaysianshop.com http://www.malaysianshop.com
> More Traffic?
> http://www.exitblaze.com/cgi-bin/intro_track.pl?b=25924&c=xbad1
> ================================================
> Note:This is intended to addressees only, if you wanna be removed, let me
> know.
>
>
>
> --
> To unsubscribe: <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>
RE: Help in JSP
Posted by "Karthikeyan .K.V" <ka...@attbi.com>.
Think use the "output=" statement before u use the close function
statement.
Karthik
-----Original Message-----
From: Neo Gigs [mailto:gigsvoo@yahoo.com]
Sent: Friday, March 08, 2002 9:53 PM
To: Tomcat Users List
Subject: Help in JSP
Hi there all,
I had a JSP page that talks to a JBeans, but the problem is my Bean is
actually doing DB connectivity to a Oracle db, as no result returned from
the Bean.
As I had tested with the application of the same codes.
Could anyone help me to scan thru, whats wrong with this?
package com.mbf.beans;
import java.sql.*;
import java.math.*;
import java.io.*;
import oracle.jdbc.driver.*;
public class SpTest
{
private int interString;
private String output;
public String getInput()
{
// First detect class existance
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
} catch (java.lang.ClassNotFoundException e){
System.err.print("Class Not Found error!" + e.getMessage());
}
// Now try to open db connection and do the fetching
try{
// DriverManager.registerDriver(new
oracle.jdbc.driver.OracleDriver());
String url = "jdbc:oracle:thin:@10.97.2.50:1521:REL4";
String scall = "begin sp_GetClatTypeIE(?, ?); end;";
Connection conn = DriverManager.getConnection(url, "tux",
"tux");
CallableStatement cs = conn.prepareCall(scall);
cs.registerOutParameter(2, Types.VARCHAR);
cs.setInt(1, interString);
cs.execute();
cs.close();
conn.close();
output = cs.getString(2);
} catch (SQLException e) {
System.err.println("Error: " + e.getMessage());
}
return output;
}
public void setInput(String s)
{
// Here to assign input parameters
interString = Integer.parseInt(s);
}
}
Thanks
Regards,
Neo Gigs
========
VB?
http://communities.msn.com.my/VisualBasicwithNeo
http://www.vbcity.com/forum
http://www.vbweb.co.uk
Get paid cash receive email?
http://www.MintMail.com/?m=1414418
Reading SMS got paid?
http://www.dynamicsms.com.au/intro.asp?ref=0123502385&refc=348
Malaysianshop.com http://www.malaysianshop.com
More Traffic?
http://www.exitblaze.com/cgi-bin/intro_track.pl?b=25924&c=xbad1
================================================
Note:This is intended to addressees only, if you wanna be removed, let me
know.
--
To unsubscribe: <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>