Package org.apache.jsp

Source Code of org.apache.jsp.newworkflow_jsp

package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import com.opensymphony.workflow.Workflow;
import com.opensymphony.workflow.basic.BasicWorkflow;

public class newworkflow_jsp extends HttpJspBase {


  private static java.util.Vector _jspx_includes;

  static {
    _jspx_includes = new java.util.Vector(1);
    _jspx_includes.add("/nav.jsp");
  }

  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;ISO-8859-1");
      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\r\n");

    Workflow wf = new BasicWorkflow((String) session.getAttribute("username"));
    long id = wf.createEntry("example");
    //out.println(id);
  wf.initialize(id, 1, null);
      out.write("\r\n\r\nNew workflow entry ");
      out.write("<a href=\"test.jsp?id=");
      out.print(id);
      out.write("\">#");
      out.print(id);
      out.write("</a> created and initialized!\r\n\r\n");
      out.write("<hr>\n\n");
      out.write("<a href=\"default.jsp\">All Workflows");
      out.write("</a> |\n");
      out.write("<a href=\"newworkflow.jsp\">New Workflow");
      out.write("</a>\n\n");
      out.write("<form action=\"test.jsp\">\nView Workflow #:\n");
      out.write("<input type=\"text\" name=\"id\" size=\"5\">\n");
      out.write("<input type=\"submit\" value=\"View\">\n");
      out.write("</form>\n\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);
    }
  }
}
TOP

Related Classes of org.apache.jsp.newworkflow_jsp

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.