问题描述
每一段的详细意思,拜托各位高手了<%@pagecontentType="text/html;charset=gb2312"%><%@pagelanguage="java"%><%@pageimport="java.sql.*"%><jsp:useBeanid="td_pjm"class="td.personaljob"/><jsp:useBeanid="td_pjm_data"class="td.personaljobdata"/><%@includefile="lib/config.jsp"%><%if(!td_pjm.init(mysqlDriver,mysqlUrl,mysqlUser,mysqlPsw)){out.println("<scriptlanguage="JavaScript"type="text/javascript">alert("FailtoConnectMySQLServer!Pleasecheckthesettings!");window.close();</script>");}HttpSessionmysession=request.getSession();Stringusername=(String)mysession.getAttribute("td_pjm_user");Stringpassword=(String)mysession.getAttribute("td_pjm_pass");td_pjm.setUsername(username);td_pjm.setPasswrod(password);//验证未通过if(!td_pjm.logcheck()){out.println("<scriptlanguage="JavaScript"type="text/javascript">alert("Wrongusernameorpassword!");window.close();location.href="index.jsp";</script>");}Stringaction=request.getParameter("action");if(action==null||action.equals("")){out.println("<scriptlanguage="JavaScript"type="text/javascript">alert("Wrongaction!");window.close();location.href="index.jsp";</script>");}elseif(action.equals("showcop")){//getID//intid=Integer.parseInt((String)request.getParameter("id"));Stringid=request.getParameter("id");if(id==null||id.equals("")){out.println("<scriptlanguage="JavaScript"type="text/javascript">alert("MissjobID!");window.close();</script>");}else{ResultSetres=null;res=td_pjm.getCopInfo(id);if(res==null){out.println("<scriptlanguage="JavaScript"type="text/javascript">alert("没有对应的公司信息!");window.close();</script>");}else{res.next();Stringcop_name=res.getString("cop_name");Stringcop_mann=td_pjm_data.cop_mann[res.getInt("cop_mann")];Stringcop_cont=res.getString("cop_cont");Stringcop_tel=res.getString("cop_tel");Stringcop_mail=res.getString("cop_mail");if(cop_mail!=null&&!cop_mail.equals("")){cop_mail="<ahref="mailto:"+cop_mail+""target="_blank">"+cop_mail+"</a>";}Stringcop_fax=res.getString("cop_fax");Stringcop_addr=res.getString("cop_addr");Stringcop_zip=res.getString("cop_zip");Stringcop_www=res.getString("cop_www");if(cop_www!=null&&!cop_www.equals("")){cop_www="<ahref=""+cop_www+""target="_blank">"+cop_www+"</a>";}Stringcop_desc=res.getString("cop_desc");Stringinfo="<ahref="detail.jsp?action=showjob&id="+id+""title="查看该公司的职位信息"><fontcolor="#FF0000">查看职位信息</font></a>";%><%@includefile="lib/detail_cop.htm"%><%}}}elseif(action.equals("showjob")){//getID//intid=Integer.parseInt((String)request.getParameter("id"));Stringid=request.getParameter("id");if(id==null||id.equals("")){out.println("<scriptlanguage="JavaScript"type="text/javascript">alert("MissjobID!");window.close();</script>");}else{ResultSetres=null;res=td_pjm.getJobInfo(id);if(res==null){out.println("<scriptlanguage="JavaScript"type="text/javascript">alert("没有对应的职位信息!");window.close();</script>");}else{res.next();Stringjob_name=res.getString("job_name");Stringjob_mann=td_pjm_data.job_mann[res.getInt("job_mann")];Stringjob_addr=res.getString("job_addr");intjob_num=res.getInt("job_num");Stringjob_get=res.getString("job_get");Stringtime="从"+res.getInt("job_sta")+"至"+res.getInt("job_end");Stringjob_grad=td_pjm_data.job_grad[res.getInt("job_grad")];Stringage=res.getInt("job_age1")+"~"+res.getInt("job_age2");Stringjob_expe=td_pjm_data.job_expe[res.getInt("job_expe")];Stringjob_lang=td_pjm_data.job_lang[res.getInt("job_lang")];Stringjob_odem=res.getString("job_odem");Stringjob_oget=res.getString("job_oget");Stringinfo="<ahref="detail.jsp?action=showcop&id="+id+""title="查看该职位的公司信息"><fontcolor="#FF0000">查看公司信息</font></a>";%><%@includefile="lib/detail_job.htm"%><%}}}else{out.println("<scriptlanguage="JavaScript"type="text/javascript">alert("Wrongaction!");window.close();location.href="index.jsp";</script>");}%>
解决方案
解决方案二:
其实就是根据提交的动作分别处理,直接输出JavaScript代码提示。。
解决方案三:
我是JAVA白痴,一点都不会所以麻烦各位高手一段一段的帮我详细解答这段明天毕业答辩要用的。。。