我自己的MVC框架DWF的范例包。用实际的例子说明了如何使用我的DWF框架来开发网站。
源代码在线查看: test_jsp.java
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import dark.web.frame.Message;
import dark.web.frame.Value;
import dark.web.frame.example.littleo.Helper;
public class test_jsp extends HttpJspBase {
private static java.util.Vector _jspx_includes;
public java.util.List getIncludes() {
return _jspx_includes;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
javax.servlet.jsp.PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=gb2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
String msg = (String)request.getAttribute("msg");
if( msg != null )
{
out.print( "");
out.print( "msg = " + msg );
}
Message message = Helper.loadMessage(request);
out.print( "");
out.print("message=" + message.getMessage("name") );
Value v = Helper.loadValue(request);
out.print( "");
out.print("Value=" + v.getString("name") );
/*out.print( "");
out.print("TARGET=" + request.getParameter("TARGET") );
out.print( "");
out.print("$TARGET=" + request.getParameter("$TARGET") ); */
out.write("\r\n");
out.write("\r\n");
out.write("Test");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
} catch (Throwable t) {
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (pageContext != null) pageContext.handlePageException(t);
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
}
}
}