/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: Apache Tomcat/7.0.19
 * Generated at: 2012-12-24 00:43:51 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp.addons.Skill_0020HexGen;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;

public final class skill_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {


 	String toHexString(int x)
  	{
		String result = Integer.toHexString(x);
		if(result.length() == 1)
		{
			result = "0" + result;
		}

		result += "000000";

		return result;
  	}

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  private javax.el.ExpressionFactory _el_expressionfactory;
  private org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
    _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
  }

  public void _jspDestroy() {
  }

  public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;


    try {
      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('\n');
      out.write('\n');
      out.write('\n');
      out.write('\n');

	String skillName;
	int skillValue;
	String skillList = "";
	int skillCount=0;

	for(Enumeration e = request.getParameterNames(); e.hasMoreElements();)
	{
		skillName = (String)e.nextElement();
		skillValue = Integer.parseInt(request.getParameter(skillName));
		if(skillValue>0 && skillCount<256 && skillValue<11 && skillName.length()==8)
		{
			//out.println(skillName + "=" + toHexString(skillValue) + "<br>");
			skillList += skillName + "00000000" + toHexString(skillValue);
			skillCount++;
		}
	}

      out.write("\n");
      out.write("\n");
      out.write("<html>\n");
      out.write("\n");
      out.write("<head>\n");
      out.write("\t<link rel=\"shortcut icon\" href=\"../../include/fav.ico\">\n");
      out.write("\t<link rel=\"stylesheet\" type=\"text/css\" href=\"../../include/style.css\">\n");
      out.write("</head>\n");
      out.write("\n");
      out.write("<body>\n");
      out.write("\n");
      out.write("<table width=\"500px\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" style=\"table-layout: fixed; border: 1px solid #cccccc;\">\n");
      out.write("\n");
      out.write("<tr>\n");
      out.write("\t<th align=\"center\" style=\"padding: 5px;\">XML</th>\n");
      out.write("</tr>\n");
      out.write("\n");
      out.write("<tr bgcolor=\"#f0f0f0\">\n");
      out.write("\t<td align=\"center\"><b>&lt;variable name=\"skills\" type=\"Octets\"&gt;</b></td>\n");
      out.write("</tr>\n");
      out.write("\n");
      out.write("<tr>\n");
      out.write("\t<td align=\"center\" valign=\"top\"><textarea name=\"skill\" wrap=\"hard\" rows=\"5\" style=\"width: 100%;\">");
out.println(toHexString(skillCount)+skillList);
      out.write("</textarea></td>\n");
      out.write("</tr>\n");
      out.write("\n");
      out.write("<tr bgcolor=\"#f0f0f0\">\n");
      out.write("\t<td align=\"center\"><b>&lt;/variable&gt;</b></td>\n");
      out.write("</tr>\n");
      out.write("\n");
      out.write("</table>\n");
      out.write("\n");
      out.write("<br>\n");
      out.write("<br>\n");
      out.write("<center>\n");
      out.write("<a href=\"javascript: history.back()\">back</a>\n");
      out.write("</center>\n");
      out.write("\n");
      out.write("</body>\n");
      out.write("\n");
      out.write("</html>");
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try { out.clearBuffer(); } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
