Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 4th, 2003, 12:27 AM
goldfries goldfries is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 11 goldfries User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
need help with bean.....

Quote:

<jsp:useBean id="libCheck" class="imslib.LibraryCheckBean" scope="session" />
<%libCheck.setDBConnection( conn );%>
<jsp:setProperty name="libCheck" property="marc_id" value="<%=marc_id%>" />
<jsp:setProperty name="libCheck" property="tag" value="<%=tag%>" />




Quote:
/*
* LibraryCheckBean.java
* Created on April 23, 2003, 11:25 AM
*/

package imslib;

import java.sql.*;
import java.text.*;
import javax.sql.*;
import java.beans.*;

/**
* @author me
*/
public class LibraryCheckBean extends Object implements java.io.Serializable {

private String errMsg = null;
private String sql = null;
private Connection dbConn = null;
private PreparedStatement pstmt = null;
private ResultSet rset = null;

// Variables to be set with setMethod
private String marc_id = null;
private String tag = null;

public void setDBConnection( Connection conn ){
dbConn = conn;
}

public void setMarc_id( String marc_id ){
marc_id = marc_id.trim();
}

public void setTag( String tag ){
tag = tag.trim();
}

public String getSQL(){
return sql;
}

public boolean querylibCheck ()
{ boolean status = true;

if ( marc_id == null || marc_id.compareTo( "" ) == 0 )
{
return false;
}
return status;
}

public String getErrMsg(){
return errMsg;
}

public String getMarc_id(){
return marc_id;
}
}

Reply With Quote
  #2  
Old August 4th, 2003, 12:28 AM
goldfries goldfries is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Posts: 11 goldfries User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
anything wrong with my codes?

i keep get returned same results. whether it's null or not.

Reply With Quote
  #3  
Old August 5th, 2003, 09:57 PM
FrankieShakes FrankieShakes is offline
Frank The Tank!
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Jun 2002
Location: Toronto, Canada
Posts: 1,240 FrankieShakes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 18
Send a message via ICQ to FrankieShakes Send a message via MSN to FrankieShakes
goldfries,

Try this:

Code:
public void setMarc_id( String marc_id ){
   this.marc_id = marc_id.trim();
}

public void setTag( String tag ){
   this.tag = tag.trim();
} 


Btw, goldfries... as in McD's?
__________________
____________________________________________
Developer Shed Weekly Writer | DevArticles Forum Moderator
Build Your Own KlipFolio Klip With PHP
FrankManno.com - Under Construction
Design Interactive Group - Under Construction

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > need help with bean.....


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap