Look at the books Core Servlets and JSPs and More Servlets and JSPs, both free downloads
from
http://books.coreservlets.com/ - they are somewhat dated, but they give many basics
on servlet and JSP development.
If you are just now getting into JSPs, I recommend that you avoid scriptlets (server-side
Java script). Instead, all of your processing (looking up or saving the entity bean, in
your case (actually, I would put that logic within a stateless session bean EJB)) should
be done in a servlet, and then you should use JSP Expression Language (EL) and tag
libraries (JSTL) to render the data.
For an example of what I mean, download the source code for JBoss in Action
(
http://www.manning.com/jbossinaction), and look at these files:
jbia-src/ch03/src/video/java/org/jbia/har/Video.java (the entity bean)
jbia-src/ch03/src/video/java/org/jbia/har/VideoServlet.java (the servlet)
jbia-src/ch03/src/video/webapp/index.jsp (the JSP)
While that represents a Hibernate example, the concepts are the same. There are more
example in that source code bundle.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216980#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...