SCJP, SCJD, SCWCD, SCBCD, SCEA
SCJP
Originally posted by janapareddy ravindra:
I have a main JSP page which includes another JSP page say CSInclude.jsp.
Is there some way of executing a select query in CSInclude.jsp and pass the resultset to the the main JSP
<jsp:include page="CSInclude.jsp" flush="true">
</jsp:include>
Originally posted by Cameron Park:
When you declare variables in jsp files that are to be included in another jsp file, those variables are included in the main jsp file as if they are declared there.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
Originally posted by Bhupinder Dhillon:
Yes you can include it as an attribute in the HttpServletRequest but you would have to close the ResultSet in the main jsp which IMHO, makes a very crappy design.
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
SCEA, SCBCD, SCWCD, SCJD, SCJP
SCJP, SCJD, SCWCD, SCBCD, SCEA
Originally posted by ravindra janapareddy:
I understand JavaBeans and Java classes are a solution but I why I am trying to do like this because this is what I have been asked to do i.e use a seperate JSP for this purpose.
If I can access the variables declared in the included JSP in the main JSP like a local variable does that also mean I can access the methods declared in the included JSP in the main JSP ?
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
SCJP, SCJD, SCWCD, SCBCD, SCEA
Originally posted by janapareddy ravindra:
However , What I would like to know -- Is this approach wrong from design point of view ?
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|