Advertisement

07.07.2003 at 12:00PM PDT, ID: 20670866
[x]
Attachment Details

JSP:Include 2 .jsp pages with different classes

Asked by SweetChastity in Java Server Pages (JSP)

Tags: include, jsp, different, class, pages

Currently I know how to call a class in only 2 ways.  One is to call it in a form using a hidden input (i.e. <input type="hidden" name="service" value="<%=SVCPREFIX%>labs.Archive">).  The other way is in a hyperlink such as <a href="<%=CONTROLLER%>?service=<%=SVCPREFIX%>labs.Archive&target=<%=WEB_NAME%>/labs/archive/listRoomSettings.jsp&RoomID=<%=RoomID%>&updatemode=<%=selectUpdate%>">
      [ Update ]</a> where Archive is my class and listRoomSettings.jsp is the target page and I send a couple parameters.

What I would like to do is set up a page accessing 2 tables in the database.  So I want to set up 2 jsp pages and call them using
<jsp:include page="displayHardware.jsp" flush="true">                                          
     <jsp:param name="hardware" value="<%=RoomID%>"/>      
</jsp:include>

I want the display pages to accept the RoomID the user has choosen and display all the hardware for only that room.  To do this I want displayHardware.jsp to call Archive.class when it is loaded up.  Then I will do the same with software.  The reason is that my database has identical column names so if I use one class and get all the results from both tables at once it may cause problems (if not it will confuse the hell out of me either way).  The Archive.class will test the mode I pass it, which will be displayhardware for one and displaysoftware for the other and return the results to the display pages that called them.  Then list these results on one page where the user can see all the software and hardware available in that particular room.

Is there a way to do this?
Any advice or a different method would be appreciated.    Start Free Trial
 
Keywords: JSP:Include 2 .jsp pages with differ…
 
Loading Advertisement...
 
[+][-]07.07.2003 at 04:39PM PDT, ID: 8873187

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Server Pages (JSP)
Tags: include, jsp, different, class, pages
Sign Up Now!
Solution Provided By: Bohumil
Participating Experts: 3
Solution Grade: A
 
 
[+][-]07.07.2003 at 06:53PM PDT, ID: 8873761

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]07.08.2003 at 05:46AM PDT, ID: 8876552

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2003 at 06:12AM PDT, ID: 8876725

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2003 at 11:10AM PDT, ID: 8879240

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2003 at 05:24PM PDT, ID: 8881521

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.02.2004 at 01:58AM PST, ID: 10251297

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.09.2004 at 10:57AM PST, ID: 10313112

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32