I am developing a JSP project in Eclipse and have chosen File -> New -> Other -> Web -> Dynamic Web Project.
In my project I have the following files:
- NewFile.jsp (This is where my presentation logic resides)
- NewFile.css
- JavaBean.java (My java class) (This is where my business logic resides)
In my java class there’s a method which pulls data from a MySQL database and some attributes to communicate between the .jsp file and the java class itself.
My JSP file looks like the following:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="controllerbean.JavaBean"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
JavaBean.MyMethod();
if (JavaBean.sqlresult != null)
{
out.println(JavaBean.sqlresult);
}
%>
</body>
</html>
What kind of Java design model is this example?
Model 1 (btw is this homework?)
http://en.wikipedia.org/wiki/Model_1