How to use Java Beans in JSP?

How to use Java Beans in JSP?

Hi,

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?

Thanks

View Answers

December 25, 2010 at 4:59 PM

Hi,

Read at Java Bean in JSP.

Thanks


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");









Related Tutorials/Questions & Answers:
how to create own tld and use it in jspx file
how to create own tld and use it in jspx file
Advertisements
JSP1
JSP2
How to use Java Beans in JSP?
ModuleNotFoundError: No module named 'jspp'
ModuleNotFoundError: No module named 'JSPy'
how to write jsps and databasetables,umldiagrams in fuelmanagement system project
servlet n jsps - Java Beginners
How to display data in jsp from dao using java beans?
Java Beans
How to access Enterprise Beans
Maven dependency for org.springframework - spring-beans version 5.2.13.RELEASE is released. Learn to use spring-beans version 5.2.13.RELEASE in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.2.14.RELEASE is released. Learn to use spring-beans version 5.2.14.RELEASE in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.2.15.RELEASE is released. Learn to use spring-beans version 5.2.15.RELEASE in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.3 is released. Learn to use spring-beans version 5.3.3 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.4 is released. Learn to use spring-beans version 5.3.4 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.5 is released. Learn to use spring-beans version 5.3.5 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.6 is released. Learn to use spring-beans version 5.3.6 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.7 is released. Learn to use spring-beans version 5.3.7 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.8 is released. Learn to use spring-beans version 5.3.8 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.16 is released. Learn to use spring-beans version 5.3.16 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.16 is released. Learn to use spring-beans version 5.3.16 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.16 is released. Learn to use spring-beans version 5.3.16 in Maven based Java projects
Maven dependency for org.apache.servicemix.bundles - org.apache.servicemix.bundles.spring-beans version 5.2.20.RELEASE_1 is released. Learn to use org.apache.servicemix.bundles.spring-beans version 5.2.20.RELEASE_1 in Maven based Java projects
Maven dependency for org.apache.servicemix.bundles - org.apache.servicemix.bundles.spring-beans version 5.3.17_1 is released. Learn to use org.apache.servicemix.bundles.spring-beans version 5.3.17_1 in Maven based Java projects
Maven dependency for org.apache.servicemix.bundles - org.apache.servicemix.bundles.spring-beans version 5.3.18_1 is released. Learn to use org.apache.servicemix.bundles.spring-beans version 5.3.18_1 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.2.21.RELEASE is released. Learn to use spring-beans version 5.2.21.RELEASE in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.19 is released. Learn to use spring-beans version 5.3.19 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.2.20.RELEASE is released. Learn to use spring-beans version 5.2.20.RELEASE in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.18 is released. Learn to use spring-beans version 5.3.18 in Maven based Java projects
Maven dependency for org.apache.servicemix.bundles - org.apache.servicemix.bundles.spring-beans version 5.3.15_1 is released. Learn to use org.apache.servicemix.bundles.spring-beans version 5.3.15_1 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.15 is released. Learn to use spring-beans version 5.3.15 in Maven based Java projects
Maven dependency for org.apache.servicemix.bundles - org.apache.servicemix.bundles.spring-beans version 5.3.14_1 is released. Learn to use org.apache.servicemix.bundles.spring-beans version 5.3.14_1 in Maven based Java projects
Maven dependency for org.apache.servicemix.bundles - org.apache.servicemix.bundles.spring-beans version 6.0.2_1 is released. Learn to use org.apache.servicemix.bundles.spring-beans version 6.0.2_1 in Maven based Java projects
Maven dependency for org.apache.servicemix.bundles - org.apache.servicemix.bundles.spring-beans version 5.3.24_1 is released. Learn to use org.apache.servicemix.bundles.spring-beans version 5.3.24_1 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 6.0.3 is released. Learn to use spring-beans version 6.0.3 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 6.0.2 is released. Learn to use spring-beans version 6.0.2 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 6.0.1 is released. Learn to use spring-beans version 6.0.1 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 6.0.0 is released. Learn to use spring-beans version 6.0.0 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.24 is released. Learn to use spring-beans version 5.3.24 in Maven based Java projects
Maven dependency for org.apache.servicemix.bundles - org.apache.servicemix.bundles.spring-beans version 5.3.19_1 is released. Learn to use org.apache.servicemix.bundles.spring-beans version 5.3.19_1 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 2.0-m1 is released. Learn to use spring-beans version 2.0-m1 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 3.2.15.RELEASE is released. Learn to use spring-beans version 3.2.15.RELEASE in Maven based Java projects
Maven dependency for org.apache.servicemix.bundles - org.apache.servicemix.bundles.spring-beans version 5.3.16_1 is released. Learn to use org.apache.servicemix.bundles.spring-beans version 5.3.16_1 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.17 is released. Learn to use spring-beans version 5.3.17 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.16 is released. Learn to use spring-beans version 5.3.16 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.3.14 is released. Learn to use spring-beans version 5.3.14 in Maven based Java projects
Maven dependency for org.springframework - spring-beans version 5.2.19.RELEASE is released. Learn to use spring-beans version 5.2.19.RELEASE in Maven based Java projects
Maven dependency for org.apache.servicemix.bundles - org.apache.servicemix.bundles.spring-beans version 5.3.13_1 is released. Learn to use org.apache.servicemix.bundles.spring-beans version 5.3.13_1 in Maven based Java projects

Ads