Hi all,
I have a servlet that creates an instance of a command bean like so:
myLogController = new TransactionLogController();
I have located a code snippet that looks like this:
this.getClass().getClassLoader().loadClass("a.class").newInstance();
when I replaced my old code with the new syntax above it works:
myLogController = (TransactionLogController)
this.getClass().getClassLoader().loadClass("reloadPattern.TransactionLogCont
roller").newInstance();
What is the difference/benefits/disadvantages of the new code??
Marc
-----Original Message-----
From: Kate Hocking [mailto:[EMAIL PROTECTED]]
Sent: Monday, 25 September 2000 1:03 PM
To: [EMAIL PROTECTED]
Subject: JSPs/Mapping in JSDK2.1
Can anyone give me a few pointers on setting up my servlets to FWDing to
JSPs??
I have used the request dispatcher:
****************************************************************************
************************
goToPage("/jsp/Web-inf/jsp/enquiry.jsp", request,
response);
}
//---------------------------------------------
//gotoPage method for fwding JSPs
//---------------------------------------------
private void goToPage(String address, HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher(address);
dispatcher.forward(request, response);
}
****************************************************************************
************************
...but am having trouble with my mapping???
tia,
rgds,
k8
____________________________________________________________________________
________________________________________
IMPORTANT: This email is intended only for the use of the individual or
entity named above and may contain information that is confidential and
privileged. The views expressed in this e-mail are those of the author and
not of the company unless otherwise clearly indicated. When addressed to
our clients, any information or quotes contained in this e-mail are subject
to the terms and conditions relevant at that time to the matter being
addressed. If you are not the intended recipient and have received this
e-mail in error, please notify us immediately by return email or telephone
+61 8 93235555 and delete the e-mail and any attachments without using or
disclosing the contents in any way. If you are not the intended recipient
any dissemination, distribution or copying of this e-mail is strictly
prohibited. Before opening or using attachments, check them for viruses and
defects. Our liability is limited to re-supplying any affected attachments.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html