Sample question about java bean and how to make it work!
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   tommys_Poet
Posted On:   Monday, October 1, 2001 11:54 AM

To All, I am new in java bean and vaj and i have a very question that i wish to get your helps. Here is my sample bean program ================================ package itso2.servjsp.servletapi; import java.util.*; /** * Insert the type's description here. * Creation date: (9/26/2001 10:16:13 AM) * @author: Administrator */ public class Album { String name; String address; String phone; /** * Album constructor comment. */ public Album() { super(); } public String getAddress() { return address; } public String getName() {   More>>

To All,

I am new in java bean and vaj and i have a very question that i wish to get your helps.


Here is my sample bean program

================================
package itso2.servjsp.servletapi;

import java.util.*;
/**
* Insert the type's description here.
* Creation date: (9/26/2001 10:16:13 AM)
* @author: Administrator
*/
public class Album {
String name;
String address;
String phone;


/**
* Album constructor comment.
*/
public Album() {
super();
}
public String getAddress()
{
return address;
}
public String getName()
{
return name;
}
public String getPhone()
{
return phone;
}
public void setAddress(String newAddress)
{
address = newAddress;
}
public void setName(String newName)
{
name = newName;
}
public void setPhone(String newPhone)
{
phone = newPhone;
}
}




================================
I stored my sample bean program and class file under "D:Program FilesIBMVisualAge for Javaideproject_resourcesIBM WebSphere Test Environmenthostsdefault_hostdefault_appservletsitso2servjspservletapi"


Here is my sample jsp that calls the above bean program


===================================




<%@ page import="java.io.*"%>
<%@ page import="java.util.*"%>


<% int i;
int mcnt;

mcnt = 5;

for (i = 0; i < mcnt ; i ++)
{

out.println ("This is the test from the jsp. please see where is it going?!!!!");

}
%>






================================

I stored it under D:Program FilesIBMVisualAge for Javaideproject_resourcesIBM WebSphere Test Environmenthostsdefault_hostdefault_appweb


============================

I loaded IE browser and try to run the jsp http://127.0.0.1:8080/very_simple.jsp.


It try to load and it took forever.

It could not load and i thing it tried
to look for my Album bean.


I think i surely miss some important steps here. So if you could, please
expalin to me what i need to fix.

Thanks in advance,
Tommys

   <<Less

Re: Sample question about java bean and how to make it work!

Posted By:   rohit_mahendra  
Posted On:   Wednesday, October 3, 2001 10:50 PM

Hi.. r u sure that the bean class file should be kept under the servlet folder in the ibm websphere test environment? kindly clarify on this... b'cos i think the error "Album.class is not a servlet class" would appear.
Kindly check in where to place the bean class file.
bye.
About | Sitemap | Contact