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%>?serv
ice=<%=SVC
PREFIX%>la
bs.Archive
&target=<%
=WEB_NAME%
>/labs/arc
hive/listR
oomSetting
s.jsp&Room
ID=<%=Room
ID%>&updat
emode=<%=s
electUpdat
e%>">
[ 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