MrBabe:
JSP files are compiled the first time they are accessed by the web server, and only again if the server is restarted or forces a refresh. So, you yourself don't have to compile the JSP as you would a servlet or Java file into a .class.
What you need however is a Web server and a Servlet Engine to connect to the Web server. These two components will allow you to serve JSP pages.
Tomcat is a very good servlet engine but it's complicated for the newbie. I suggest you try Allaire JRun (
which has a free developers version and Apache Web server from
Install Apache first, then JRun, and use the connector wizard to connect them both together. It's all self explanatory.
Once you've installed JRun, create a new web application. This is where you put your JSP files. Thankfully, you've got one of the best books by Marty Hall, so just pick one of his examples and write the JSP file in notepad or some other editor and save it in your new web application.
That should do it.
BO:
Class names are case sensitive, check you've typed it right. Check you've included the package name in the useBean tag, and make sure you're importing any required packages using <%@ page import = "java.io.*,java.util.*"> etc. Failing that, make sure your servlet engine knows about the classpath.
Here's an example useBean:
Code:
<%@page language="java" %>
<%@page import="java.io.*" %>
<jsp:useBean id="test" scope="session" class="TestBean" />
<%
String blah = test.MyFunction();
out.println(blah);
%>
Bye for now,
Tim --
Tim <tim@planetedge.co.uk>