Hi all,
This is the include page :
<%!
static String showInclude()
{
String vStringToShow = "This is a string to proove the inclusion !";
return vStringToShow;
};
%>
And this is the page where it is included :
<html>
<head>
<jsp:include page="../includes/CheckForConsultants.jsp" flush="true" />
</head>
<body>
...
<%
try {
String vShow = CheckForConsultants.showInclude();
} catch (Exception ex) {
out.println("Something went wrong with the include
:<BR>" + ex.getMessage());
}
%>
</body>
</html>
The compilation generates NO errors, but when I run it the server yields 1
error, saying that 'CheckForConsultants' is not defined. When I modify the
code however to :
<%
CheckForConsultants vCheck = null;
try {
vCheck = new CheckForConsultants();
} catch (Exception ex) {
out.println("Something went wrong with the
instantiation :<BR>" + ex.getMessage());
}
try {
String vShow = vCheck.showInclude();
} catch (Exception ex) {
out.println("Something went wrong with the include
:<BR>" + ex.getMessage());
}
%>
the server (jswdk1.0.1) generates the error that the class
CheckForConsultants could not be found (+ all the errors resulting from
that).
The result is that the browser gives back a 'The page could not be
displayed' error (internal server error code 500).
Does anyone know how to resolve this ?
Many thanks,
Michiel
Michiel Decancq - partner - Emalaya nv
O Tel ++32-2-340 77 30
OOO Fax ++32-2-346 42 52
OOOOO GSM ++32-476-936 315
[EMAIL PROTECTED]
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets