Re: vector cast to int

2002-02-27 Thread Gochwal Meenu

try
Integer.parseInt((String)pollVotecount.elementAt(i))

 -Original Message-
 From: Lai, Kenny
 Sent: Thursday, February 28, 2002 11:33 AM
 To:   [EMAIL PROTECTED]
 Subject:  vector cast to int

 i'm trying to do an explicit cast from vector object to int..

 if you look at the below stripped out code, where tempTotal is defined,
 that
 (int) conversion doesnt work..

 ultimately i'm trying to perform a division computation w/ totalVotes.
 anyone have a solution???

 
 java.sql.ResultSet regularPoll = null;
 try {
   regularPoll = db.execSQL( select votecount from sometable where
 id=someid);
 } catch (SQLException e) {
 System.err.println(e.toString());
 }
 Vector pollVotecount = new Vector();
 while(regularPoll.next()) {
pollVotecount.addElement(regularPoll.getString(votecount));
 }
 int totalNum = 100;
 int tempTotal = (int) pollVotecount.elementAt(i);
 int tempNum = tempTotal / totalVotes);

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Urgent !!!!!!!! Please help me

2001-12-12 Thread Gochwal Meenu

U can try this way also


var i=window.event.keyCode;

window.status = Ready;

if(i=!13){
//fetch ur result here
}

Meenu


 -Original Message-
 From: ShriKant Vashishtha [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, December 13, 2001 12:57 PM
 To:   [EMAIL PROTECTED]
 Subject:  Urgent  Please help me

 Hi,

 My JSP contains the following things

 A text box
 and a GO button which fetches the result based on the criteria entered in
 textbox.

 The GO button has a validation for a blank search criteria and displayes
 alert
 message if we press GO without entering anything.

 But the problem is, if I hit on ENTER, it fetches me the result even if I
 haven't entered anything in the text box. It does not go through the
 validation which executes on pressing on GO button.

 Please help...
 -ShriKant

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: returning values...

2001-11-18 Thread Gochwal Meenu

function()
{
hashmap mp=new HashMap();
try{
//do some calcs
mp.put(x,y);

}
catch(Exception e)
{

}
return HashMap;
}if it goes inside catch then
check for the return value hashTable's isEmpty method
if isEmpty is true then some error else success
 -Original Message-
 From: Papo Napolitano [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 1:12 AM
 To:   [EMAIL PROTECTED]
 Subject:  returning values...

 Hi!

 If have a function that returns some kind of object (a HashMap for
 example)... How can I do to return an error value if the function fails ??


 Cheers,

 Papo

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



help please(javascript)

2001-11-17 Thread Gochwal Meenu

 We have two list boxes..list box 1 contains all the data from the system.
 On click of the button whatever data is selected from the list box 1 it
 moves to the list box 2. The data in the list box 1 is such that it also
 contains related data uptil n level of hierarchy displayed in the list box
 1 only.
 Our problem is if we select a data from the list box 1 , all its related
 data till n level of hierarchy should move to list box 2.

 E.g data in list box one is

 Data  Related Data
 A -
 B A
 C A
 D B
 E A

 Now if I want to move A then B,C, D, and E should also move to list box 2
 even if they are not selected.



===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Limiting number of records returned to be displayed

2001-11-14 Thread Gochwal Meenu

Hi

You can store the records in the resultSet n put that resultset in the
session.
on the click of the next button forward the jsp to the same one n pass a
parameter which keeps on incrementing on the click of the button.
Now for displaying a particular row use rs.absolute(int row)

 -Original Message-
 From: Kwan, William [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, November 15, 2001 5:35 AM
 To:   [EMAIL PROTECTED]
 Subject:  Limiting number of records returned to be displayed

 Hi,

 I'm new to JSP and I have a couple of questions.

 1) how do I display only one record on the page??
 2) the user can scroll to the next or previous records by pressing a
 next/previous button, get the next record to be displayed??

 thanks,
 Will

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: jdbc VERSIOIN PROBLME

2001-11-12 Thread Gochwal Meenu

Sun maintains a fairly current list of JDBC drivers that support the JDBC
2.x and JDBC 1.x APIs, at:
http://industry.java.sun.com/products/jdbc/drivers



 -Original Message-
 From: srinivas tadikonda [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, November 12, 2001 2:01 PM
 To:   [EMAIL PROTECTED]
 Subject:  jdbc VERSIOIN PROBLME

 hi,

   I have some problem with using jdbc1.0.   If i use jdbc1.0 ResultSet its
 not scrollable that mean its forward scroll only.  Actually in my
 programming I want to use previous and absolute position.
 How can I solve this problem. If I  search jdbc2.0 for downloadble I can't
 find where it is.
 How can I update my jdbc1.0 to 2.0.  Here I am using oracle thin driver.

 Please help me(its urgent)
 Regards
 Srinivas



   _

 Get your FREE download of MSN Explorer at http://explorer.msn.com
 http://go.msn.com/bql/hmtag_itl_EN.asp

 ==
 = To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set
 JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at:
 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: How to make two virtual tomcats to work on different ports?

2001-11-04 Thread Gochwal Meenu

Check out the URL
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/uguide/tomcat_ug.html
In  that look for Configuring for Multiple Tomcat JVMs 

 -Original Message-
 From: Alex Kachanov [SMTP:[EMAIL PROTECTED]]
 Sent: Sunday, November 04, 2001 1:12 PM
 To:   [EMAIL PROTECTED]
 Subject:  How to make two virtual tomcats to work on different ports?

 I would like o create ... virtual servers

 one on port 80
 another one on port 8081
 and another one on port 8082

 All FAQs tell how to create virtual servers using different
 site domain names or different IP-addresses, but in my case
 the IP-address and domain name is the same - only the ports
 should be different


 Is it possible?


 with best wishes
 Alexander Kachanov

 ==
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Tomcat: jsp : JDBC ORACLE

2001-11-04 Thread Gochwal Meenu

Hi

use addBatch(String sql)
then executeBatch() which Submits a batch of commands to the database for
execution and if all commands execute successfully, returns an array of
update counts.This can be used incase u want to know the no of rows updated.


 -Original Message-
 From: SriHari [SMTP:[EMAIL PROTECTED]]
 Sent: Saturday, November 03, 2001 3:54 PM
 To:   [EMAIL PROTECTED]
 Subject:  Tomcat: jsp : JDBC  ORACLE
 
 Hai all
 
  By using JDBC CallableStatement  i am executing Oracle Stored Functions
 and
 Procedures 
  In Procedures like Insert Update and Delete I have to know the no of
 records updated 
  When i am calling a Oracle Stored Procedure processing(DML operations
 like
 insert,update,delete)   
  commands
  How can i get the Inserted/Deleted/Updated no of Record  as 
  callablestatement.getUpdateCount method dosent return no of rows effected
 
 
 
  
 
 Thanks 
 Srihari
 -Original Message-
 From: SriHari 
 Sent: Wednesday, October 31, 2001 6:47 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Tomcat: jsp : JDBC  ORACLE
 
 
 Thanks for the code  
 i am using classes111.zip 
 i was not getting 
 OracleTypes from oracle.jdbc.OracleTypes 
 can u point me to the resource 
 
 
 Thanks Again 
 
 Srihari
 
 
 -Original Message-
 From: Jan Arenö [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 31, 2001 6:09 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Tomcat: jsp : JDBC  ORACLE
 
 
 Here is how I do
 
 rs = ResultSet
 cstmt = CallableStatement
 
 
 cstmt = conn.prepareCall(begin PACKAGE.procedure(?,?,?); end;);
 
 cstmt.registerOutParameter(1, OracleTypes.CURSOR);
 cstmt.setString(2, para1);
 cstmt.setString(2, para2);
 
 cstmt.execute();
 
 rs = ((OracleCallableStatement)cstmt).getCursor(1);
 
 while(rs.next())
 {
 // Like a normal rs
 }
 
 As you can see I have the Cursor as a parameter, but if you have a
 storedFunction I guess you could return the Cursor also...
 
 Hoped it helped
 
 // Jan Arenö
 
 -Ursprungligt meddelande-
 Från: A mailing list about Java Server Pages specification and reference
 [mailto:[EMAIL PROTECTED]]För SriHari
 Skickat: den 31 oktober 2001 12:06
 Till: [EMAIL PROTECTED]
 Ämne: Tomcat: jsp : JDBC  ORACLE
 
 
 I am using Stored(Functions) in oracle which return cursors type(multiple
 rows)
 
 How can i allot them to resultset in jsp /Java code
 How to call the function in java code so that i can use the rows just like
 i
 have used the result using SQL server/Access as my database
 
 ie i have used Resultset in SQL database  (Result set in java code)
 how can i use Cursors in Oracle to use them in jsp/java  (???);
 
 
 Regards
 SriHari
 
 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:
 
  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com
 
 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:
 
  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com
 
 ==
 To
 unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:
 
  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com
 
 ==
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:
 
  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

==To 
unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 

Re: Tomcat: jsp : JDBC ORACLE

2001-11-04 Thread Gochwal Meenu

There is some error in ur code
Use it this way
l_Stmt.registerOutParameter(1,Types.INTEGER);
  l_Stmt.execute();
   int l_Return = l_Stmt.getInt(1);
 now check what l_Return returns

What i mean to say was that instead of using this stored procedure
use addBatch(String sql).In this pass the query which is to be executed.
Then use updateBatch() which returns u the int[] array i.e the no of rows
that where updated/inserted
 -Original Message-
 From: SriHari [SMTP:[EMAIL PROTECTED]]
 Sent: Monday, November 05, 2001 10:45 AM
 To:   [EMAIL PROTECTED]
 Subject:  Tomcat: jsp : JDBC  ORACLE
 
 Hai
 
 by bean which executes the oracle stored procedure looks some thing like
 this
 
 i am calling procedure from jsp
 ===
   int param1=3;
   String param2=testdhjkhghghjhgh;
   String squery2=ProxyzInsert +param1+,'+param2+';
   out.println(db.execDMLProc(squery2));  // i am getting -1 here i expect
 1
 or some interger
 ===
 public int execDMLProc(String s) throws---
 {
  
  if (procedure with out params) 
  {
  cstmt = dbcon.prepareCall({ call +s+}); // where s is the string 
  } 
  
  if (procedure with params)
   {
 
   SEPERATE PARAMETERS()
   cstmt.setInt(1,Integer.parseInt(param1));
   cstmt.setString(2,param2;  // setting parameters
   ...
   ...
 //Now i tried 
  cstmt.getUpdatCount();  // returning -1 
  or
  cstmt.addBatch();  // getting -1 result 
  cstmt.executeBatch();  
   }
  
 }
 
 
 
 
 
 can any one explain me how to get no of records updated by  executing
 Oracle
 stored Procedure
 
 
 
 Regards
 Srihari
 -Original Message-
 From: Gochwal Meenu [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 05, 2001 10:05 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Tomcat: jsp : JDBC  ORACLE
 
 
 Hi
 
 use addBatch(String sql)
 then executeBatch() which Submits a batch of commands to the database for
 execution and if all commands execute successfully, returns an array of
 update counts.This can be used incase u want to know the no of rows
 updated.
 
 
  -Original Message-
  From: SriHari [SMTP:[EMAIL PROTECTED]]
  Sent: Saturday, November 03, 2001 3:54 PM
  To:   [EMAIL PROTECTED]
  Subject:  Tomcat: jsp : JDBC  ORACLE
  
  Hai all
  
   By using JDBC CallableStatement  i am executing Oracle Stored Functions
  and
  Procedures 
   In Procedures like Insert Update and Delete I have to know the no of
  records updated 
   When i am calling a Oracle Stored Procedure processing(DML operations
  like
  insert,update,delete)   
   commands
   How can i get the Inserted/Deleted/Updated no of Record  as 
   callablestatement.getUpdateCount method dosent return no of rows
 effected
  
  
  
   
  
  Thanks 
  Srihari
  -Original Message-
  From: SriHari 
  Sent: Wednesday, October 31, 2001 6:47 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Tomcat: jsp : JDBC  ORACLE
  
  
  Thanks for the code  
  i am using classes111.zip 
  i was not getting 
  OracleTypes from oracle.jdbc.OracleTypes 
  can u point me to the resource 
  
  
  Thanks Again 
  
  Srihari
  
  
  -Original Message-
  From: Jan Arenö [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 31, 2001 6:09 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Tomcat: jsp : JDBC  ORACLE
  
  
  Here is how I do
  
  rs = ResultSet
  cstmt = CallableStatement
  
  
  cstmt = conn.prepareCall(begin PACKAGE.procedure(?,?,?); end;);
  
  cstmt.registerOutParameter(1, OracleTypes.CURSOR);
  cstmt.setString(2, para1);
  cstmt.setString(2, para2);
  
  cstmt.execute();
  
  rs = ((OracleCallableStatement)cstmt).getCursor(1);
  
  while(rs.next())
  {
  // Like a normal rs
  }
  
  As you can see I have the Cursor as a parameter, but if you have a
  storedFunction I guess you could return the Cursor also...
  
  Hoped it helped
  
  // Jan Arenö
  
  -Ursprungligt meddelande-
  Från: A mailing list about Java Server Pages specification and reference
  [mailto:[EMAIL PROTECTED]]För SriHari
  Skickat: den 31 oktober 2001 12:06
  Till: [EMAIL PROTECTED]
  Ämne: Tomcat: jsp : JDBC  ORACLE
  
  
  I am using Stored(Functions) in oracle which return cursors
 type(multiple
  rows)
  
  How can i allot them to resultset in jsp /Java code
  How to call the function in java code so that i can use the rows just
 like
  i
  have used the result using SQL server/Access as my database
  
  ie i have used Resultset in SQL database  (Result set in java code)
  how can i use Cursors in Oracle to use them in jsp/java  (???);
  
  
  Regards
  SriHari
  
 
 ==
  =
  To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
  JSP-INTEREST.
  For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
  DIGEST.
  Some relevant FAQs on JSP/Servlets can be found at:
  
   http://archives.java.sun.com/jsp-interest.html
   http://java.sun.com/products/jsp/faq.html
   http://www.esperanto.org.nz

Re: How to make tomcat to work in port 80 not 8080

2001-11-02 Thread Gochwal Meenu

look into
 ur tomact dir/doc/tomcat-apache-howto.html

 -Original Message-
 From: Rama [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 3:20 PM
 To:   [EMAIL PROTECTED]
 Subject:  How to make tomcat to work in port 80 not 8080

 Hi,

 I have installed tomcat 4.0.1 in my pc and it worked perfectly.
 I wonder how to make tomcat to work with apache server in port 80.

 I couldn't find any information about this one, even in Wrox books.


 Thanks,

 Rama


 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com


 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: generation of textbox thro' java script

2001-11-02 Thread Gochwal Meenu

why don't u make the textbox invisible and then make it visible on the click
of the button

 -Original Message-
 From: Badrinarayan K. Melkote [SMTP:[EMAIL PROTECTED]]
 Sent: Friday, November 02, 2001 3:16 PM
 To:   [EMAIL PROTECTED]
 Subject:  generation of textbox thro' java script

 Hi,
 I have a small problem.
 Can anyone tell me how to generate a textbox in a form (HTML) using Java
 Scripts.
 i.e when i click on a button. i need a text box to be generated in the
 same
 form.
 I tried out document.write('input=text name=textbx'). but it just
 does
 not work.

 with regards,
 Badri

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: Populate Struts' Action Form Bean's Date field by a String in put

2001-10-25 Thread Gochwal Meenu

Use dateFormat.parse(String text) wich parses a date/time String to Date

Meenu





 -Original Message-
 From: Peter Pilgrim [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, October 25, 2001 3:48 PM
 To:   [EMAIL PROTECTED]
 Subject:  Populate Struts' Action Form Bean's Date field by a String
 input

 Hi

 I have a form bean with a Date field with accessor  and mutators
 `Date getCurrentDate()' , `void setCurrentDate( Date )' ?

 I have written a custom subclass of the html:text to do the following

 pp:text property=currentDate  trim=yes 
  pp:dateFormat format=mm-DDD-  name=dataForm
 property=currentDate /
 /pp:text

 Which produces this HTML

  input type=text name=currentDate value=25-Oct-2001 

 How do write an ActionForm method mutator that converts the
 String form 25-Oct-2001 to a proper java.util.Date.
 Should I write a void setCurrentDate( String ) method?

 --
 Peter Pilgrim ++44 (0)207-545-9923
   //_\\
 Mathematics is essentially the study of islands of  ===
 disparate subjects in a sea of ignorance.   || ! ||
 Andrew Wiles __/\/\__||_!_||__



 --

 This e-mail may contain confidential and/or privileged information. If you
 are not the intended recipient (or have received this e-mail in error)
 please notify the sender immediately and destroy this e-mail. Any
 unauthorized copying, disclosure or distribution of the material in this
 e-mail is strictly forbidden.

 ==
 =
 To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff
 JSP-INTEREST.
 For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST
 DIGEST.
 Some relevant FAQs on JSP/Servlets can be found at:

  http://archives.java.sun.com/jsp-interest.html
  http://java.sun.com/products/jsp/faq.html
  http://www.esperanto.org.nz/jsp/jspfaq.jsp
  http://www.jguru.com/faq/index.jsp
  http://www.jspinsider.com

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com



Re: help me with this numberformat exception please

2001-10-18 Thread Gochwal Meenu

Hi

Try with .equals() and initialize i=0



 -Original Message-
 From: yilmaz [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, October 18, 2001 6:28 PM
 To:   [EMAIL PROTECTED]
 Subject:  help me with this  numberformat exception please

 hi everybody,
 i spent my whole afternoon with a stupid numberformat exception.
 at last i gave up,and decided to bring here.
  can someone help me with this please, or I will get crazy.
 i am using tomcat 4 on windows 2000.
 this jsp file takes a request parameter no, which is an integer.
 but it seems that it can't receive or read this parameter correctly.
 i call this jsp from my from browser as :
 http://localhost:8080/new/newscont.jsp?no=1
 but i always have the same exception ( numberformat exception)

 below is my code:

 %@ page language=java contentType=text/html; charset=BIG5  %
 %@ page import=java.sql.*,java.util.*,org.gjt.mm.mysql.* %
 HTMLHEADTITLENEWS/TITLE
 META content=text/html; charset=big5 http-equiv=Content-Type
 /HEAD
 BODY  bgColor=pink leftMargin=0 text=#00 topMargin=0 marginheight='0'
 marginwidth='0'BR

 %! Connection conn;
  String ndate,subject,news;
   int no;
   Statement stmt;
   ResultSet rs;
   String sql; %
  %

  Class.forName(org.gjt.mm.mysql.Driver);
  if ((request.getParameter(no)!=null)
 (request.getParameter(no)!=)){
  try {


conn = DriverManager.getConnection(jdbc:mysql:///yilmaz);
 no=Integer.parseInt(request.getParameter(no));
 sql=select ndate,subject,news from new+no;
  stmt = conn.createStatement (sql);

 rs = stmt.executeQuery ();
while (rs.next() ) {
 ndate=rs.getString(1);
 out.println(ndate);
 subject=rs.getString(2);
 out.println(subject);
 news=rs.getString(3);
 out.println(news);
 }
 }

catch (SQLException e)  {
   out.println(SQLException caught + e.getMessage());
   e.printStackTrace();
   }
   catch (NumberFormatException nfe) {
   out.println(NumberFormatException
 caught +nfe.getMessage());
}
finally {
   rs.close();
stmt.close();
conn.close();
} }
%

 
 the whole other followings are normal html code
 
 when i run my JSP it throws :
 org.apache.jasper.JasperException: Unable to compile class for JSP
 ...
 root cause :
 java.lang.NumberFormatException: mysql
 at java.lang.Integer.parseInt(Integer.java:414)
 at java.lang.Integer.parseInt(Integer.java:463)
 ...
 
 I AM LOOKING FORWARD TO YOUR HELP OR SUGGESTIONS
 THANKS A LOT IN ADVANCE

===
To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST.
For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST.
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com