Professional Documents
Culture Documents
Marchant of
Below is the source code for a JSP Java-Bean I wrote to assist element construction relating to HTML GUI elements
1. The class file sits in a JSP Server type-: JSP2.0 Web Application container in a directory called “guicontrols”
2. The Bean is called from a jsp page by a <jsp:setProperty> element after the <jsp:useBean> element sets
3. The Calculation parts for the co-efficient are set by a <jsp:setProperty> by taking a page parameter on
page loading from the url address as with CGI “method=GET” system. The parameter value must be
4. The calls for the element width or height are done inside the HTML elements by JSP EL(Expression
Language) e.g.
===
package guicontrols;
public Resobean(){
} //enconstrct NOTE: screen width determines the resizing set this at begining of page (resolution co-eff denominator)
fEmVal*=makeCoeff(susrs);
wEmVal*=makeCoeff(susrs);
} //enset
return this.susrs;
}//enget
return this.hstres;
}//enget
return this.wstres;
}//enget
float a=1599.0000F;
float b=1279.0000F;
float c=1151.0000F;
float usrs=0.0000F;
if(busrs>a){
usrs=1600.0000F/1024.0000F;
}else if(busrs>b){
usrs=1280.0000F/1024.0000F;
}else if(busrs>c){
usrs=1152.0000F/1024.0000F;
}else{
} //enifels
return usrs;
} //enmke
} //enclss