0 Replies Latest reply on Dec 18, 2004 5:09 PM by treespace

    Welcome page is not automatically found

    treespace Novice

      This is the CmCommon_jsp.java that generated by JBOSS:

      package org.apache.jsp.protecteddoc.CM;
      
      import javax.servlet.*;
      import javax.servlet.http.*;
      import javax.servlet.jsp.*;
      import com.fsc.util.web.Message;
      import com.fsc.util.web.MessageManager;
      import java.util.*;
      
      public final class CmCommon_jsp extends org.apache.jasper.runtime.HttpJspBase
       implements org.apache.jasper.runtime.JspSourceDependent {
      
       private static java.util.Vector _jspx_dependants;
      
       public java.util.List getDependants() {
       return _jspx_dependants;
       }
      
       public void _jspService(HttpServletRequest request, HttpServletResponse response)
       throws java.io.IOException, ServletException {
      
       JspFactory _jspxFactory = null;
       PageContext pageContext = null;
       HttpSession session = null;
       ServletContext application = null;
       ServletConfig config = null;
       JspWriter out = null;
       Object page = this;
       JspWriter _jspx_out = null;
       PageContext _jspx_page_context = null;
      
      
       try {
       _jspxFactory = JspFactory.getDefaultFactory();
       response.setContentType("text/html");
       pageContext = _jspxFactory.getPageContext(this, request, response,
       null, true, 8192, true);
       _jspx_page_context = pageContext;
       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");
      Message msg = MessageManager.getMessages(request);
       String info = null;
       StringBuffer infoResults = new StringBuffer();
       StringBuffer warnResults = new StringBuffer();
       StringBuffer errorResults = new StringBuffer();
       StringBuffer confirmResults = new StringBuffer();
       if(msg != null){
       Collection cInfoMsg = msg.getMessages(msg.INFO);
       if (cInfoMsg.size() > 0) {
       Iterator iter = cInfoMsg.iterator();
       while (iter.hasNext()) {
       Object item = iter.next();
       //results.append("- " + WebUtilities.toJavaScript(item.toString()) + "\\n");
       infoResults.append("- " + item.toString() + "\\n");
       }
       }
       Collection cWarnMsg = msg.getMessages(msg.WARNING);
       if (cWarnMsg.size() > 0) {
       Iterator iter = cWarnMsg.iterator();
       while (iter.hasNext()) {
       Object item = iter.next();
       warnResults.append("- " + item.toString() + "\\n");
       }
       }
       Collection cErrorMsg = msg.getMessages(msg.ERROR);
       if (cErrorMsg.size() > 0) {
       Iterator iter = cErrorMsg.iterator();
       while (iter.hasNext()) {
       Object item = iter.next();
       errorResults.append("- " + item.toString() + "\\n");
       }
       }
       Collection cConfirmMsg = msg.getMessages(msg.CONFIRM);
       if (cConfirmMsg.size() > 0) {
       Iterator iter = cConfirmMsg.iterator();
       while (iter.hasNext()) {
       Object item = iter.next();
       confirmResults.append("- " + item.toString() + "\\n");
       }
       }
       }
       out.write("\r\n");
       out.write("<script language=\"JavaScript\"> \r\n");
       out.write(" var info = \"");
       out.print(infoResults);
       out.write("\";\r\n");
       out.write(" if(info != \"\")\r\n");
       out.write(" {\r\n");
       out.write(" alert(\"Information : \\n\" + \"");
       out.print(infoResults.toString());
       out.write("\");\r\n");
       out.write(" } \r\n");
       out.write(" var warn = \"");
       out.print(warnResults);
       out.write("\";\r\n");
       out.write(" if(warn != \"\")\r\n");
       out.write(" {\r\n");
       out.write(" alert(\"Warning : \\n\" + \"");
       out.print(warnResults.toString());
       out.write("\");\r\n");
       out.write(" } \r\n");
       out.write(" var error = \"");
       out.print(errorResults);
       out.write("\";\r\n");
       out.write(" if(error != \"\")\r\n");
       out.write(" {\r\n");
       out.write(" alert(\"Error : \\n\" + \"");
       out.print(errorResults.toString());
       out.write("\");\r\n");
       out.write(" } \r\n");
       out.write(" var cfm = \"");
       out.print(confirmResults);
       out.write("\";\r\n");
       out.write(" if(cfm != \"\")\r\n");
       out.write(" {\r\n");
       out.write(" if(confirm(cfm)){\r\n");
       out.write(" var formName = \"");
       out.print(request.getAttribute(Message.FORM_KEY_YES));
       out.write("\";\r\n");
       out.write(" var action = \"");
       out.print(request.getAttribute(Message.ACTION_KEY_YES));
       out.write("\";\r\n");
       out.write(" if(\"");
       out.print(request.getAttribute(Message.SUBMIT_TYPE));
       out.write("\"==\"UIX\"){\r\n");
       out.write(" submitForm(formName,0,");
       out.print((request.getAttribute(Message.SUBMIT_TYPE)=="UIX"?request.getAttribute(Message.ACTION_KEY_YES):"{'':''}"));
       out.write(");\r\n");
       out.write(" }else{\r\n");
       out.write(" document.getElementById(formName).action = \"");
       out.print(request.getContextPath());
       out.write("/\" + action;\r\n");
       out.write(" document.getElementById(formName).submit();\r\n");
       out.write(" }\r\n");
       out.write(" }else{\r\n");
       out.write(" var formName = \"");
       out.print(request.getAttribute(Message.FORM_KEY_NO));
       out.write("\";\r\n");
       out.write(" var action = \"");
       out.print(request.getAttribute(Message.ACTION_KEY_NO));
       out.write("\";\r\n");
       out.write(" if(formName != \"\" && action != \"\"){\r\n");
       out.write(" if(\"");
       out.print(request.getAttribute(Message.SUBMIT_TYPE));
       out.write("\"==\"UIX\"){\r\n");
       out.write(" submitForm(formName,0,");
       out.print((request.getAttribute(Message.SUBMIT_TYPE)=="UIX"?request.getAttribute(Message.ACTION_KEY_NO):"{'':''}"));
       out.write(");\r\n");
       out.write(" }else{\r\n");
       out.write(" document.getElementById(formName).action = \"");
       out.print(request.getContextPath());
       out.write("/\" + action;\r\n");
       out.write(" document.getElementById(formName).submit();\r\n");
       out.write(" }\r\n");
       out.write(" }\r\n");
       out.write(" }\r\n");
       out.write(" } \r\n");
       out.write(" if(\"");
       out.print(request.getAttribute(Message.REPORT_PATH));
       out.write("\" != \"\" && \"");
       out.print(request.getAttribute(Message.REPORT_PATH));
       out.write("\" != \"null\"){\r\n");
       out.write(" var url = \"");
       out.print(request.getAttribute(Message.REPORT_PATH));
       out.write("\";\r\n");
       out.write(" var winName = \"");
       out.print(request.getAttribute(Message.REPORT_WIN_NAME));
       out.write("\";\r\n");
       out.write(" var param = \"");
       out.print(request.getAttribute(Message.REPORT_WIN_PARAM));
       out.write("\";\r\n");
       out.write(" window.open(url, winName, param);\r\n");
       out.write(" } \r\n");
       out.write("</script>");
       } catch (Throwable t) {
       if (!(t instanceof SkipPageException)){
       out = _jspx_out;
       if (out != null && out.getBufferSize() != 0)
       out.clearBuffer();
       if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
       }
       } finally {
       if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
       }
       }
      }