Ebola
02-17-2006, 07:25 AM
I'm using java servlets to create a webpage, and since I'm used to working with PHP I'm trying to mimic include_once's.
String output ="";
output = sections.top(0);
Is what I use on the index page, and in the sections class, I have this code:
public String top(int LOG) {
//LOG is Log In Status, 1 is logged in, 0 is not.
String top2 = "";
if(LOG == 0){
top2 = "...HTML here....";
return top2;
}
When I try to view the page I get a "java.lang.NullPointerException" and I just can't figure out why. Can anyone help me out here?
String output ="";
output = sections.top(0);
Is what I use on the index page, and in the sections class, I have this code:
public String top(int LOG) {
//LOG is Log In Status, 1 is logged in, 0 is not.
String top2 = "";
if(LOG == 0){
top2 = "...HTML here....";
return top2;
}
When I try to view the page I get a "java.lang.NullPointerException" and I just can't figure out why. Can anyone help me out here?