Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp

 
sendil kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
I'm new to JSP and Tomcat.am wondering about Bean using in tomcat.am able to run only simple programs (which is using scriplets) in tomcat.i can't able to run a application which is
using Bean. i don't know,where to put my bean class under tomcat.

I'm totally new, so pl bear with me incase my questions make no sense...

regards
sendil
 
Pranav Jaidka
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi sendil
the beans can go into the classes directory and may be made available to the JSP application by using the import tag as below
<%@ page import="salary.EmpDet,java.util.*" %>
where the name of the Bean class is EmpDet it is in the salary package .
after the immport statement you can use the following tag
<jsp:useBean id="dbbean" scope="application" class="salary.EmpDet" />
this makes a bean called dbbean available to you which is using the above EmpDet class .
hope this makes things clearer
regards
pranav
 
sendil kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi pranav,
T'x for ur kind help pranav.my application is working properly now.
am having one more doubt - about jsp. ie.if the DB interface is possible in scriplets.i have to use the Servlets
for exclusively this purpose.
if .. it's possible in scriplets means.can u give the
idea about this...and one more thing which one is the best way to
proceed with DB operations.
my advance T'x pranav...
regards
sendil
 
Brett Knapik
Ranch Hand
Posts: 255
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it doesnt matter how you do database operations you can put it in a bean for jsp or a package for servlets if i am not explaining it correctly try to explain in more detail what you are saying.
------------------
I wish there was a button on my monitor to turn up the intellegince.
Theres a button called 'brightness' but it doesn't work
 
sendil kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Brett ,
what i expect from u ...is ...
am created one jsp file here..ie.get the user information just
like the ordinary Registration.html.am going to do ..the collected information from the user is to be stored in my
backend(am using MySql).
here my doubt is...what am going to do for that?
regards
sendil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic