Deepak Kumar
How to use Java Beans in JSP?
2 Answer(s)      6 years and 3 months ago
Posted in : JSP-Servlet


I have developed a employee bean in Java:

public class Employee{

private String name;
private String code;



Please tell me how I can use Employee Java bean in JSP page?



View Answers

December 25, 2010 at 4:59 PM


Read at Java Bean in JSP.


December 25, 2010 at 5:09 PM

hi dude your qus is not clear any way iam giving so sol find it.....this code is to display the employee table vaues.. u hav to write the code for db connection in dbconnection method in javabean class and also for dbvalues to get the values..try once if u not i will give u complete prg...

<%sample.getdbconnection();%> <% sample.getdavalues();%> //dbconnection() and dbvalues() are methods in javabean classprint("code sample");