java的jsp java代码不知代码哪里错了,求看下哪里错了

jsp帮我看看代码哪里错了_百度知道
jsp帮我看看代码哪里错了
//f.hiphotos.baidu.hiphotos.jpg" esrc="http.jpg" target="_blank" title="点击查看大图" class="ikqb_img_alink"><img class="ikqb_img" src="/zhidao/wh%3D450%2C600/sign=cafc48bb504eeeaa9b2fd6e/be950f6f553bfaf2b40b./zhidao/wh%3D600%2C800/sign=95daad28993df8dca5eb3/b90e7bec54e736d1ca3b2fd79d504fc2d46269c1.baidu.baidu.hiphotos。<a href="http://g://f,不知道哪里错了帮我看看javabean的练习
就像jsp文件第一行引入了java.util你的huanted,因为么有引入相应的包.a类无效
来自团队:
其他类似问题
为您推荐:
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁扫描二维码,关注牛客网
下载牛客APP,随时随地刷题
扫一扫,把题目装进口袋web.xml的配置很简单啦,网上搜一下就一大堆了。
&error-page&
&error-code&500&/error-code&
&location&/error.jsp&/location& &/error-page&
这里分享一下自己刚完成的自定义错误页面error.jsp,高度可用~~~欢迎提出问题指正~~
&%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%&&%@page isErrorPage="true" %&&%@page import="java.text.SimpleDateFormat"%&&%@ page import="java.io.*"%&&%
response.setStatus(HttpServletResponse.SC_OK);%&&!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&&html xmlns="http://www.w3.org/1999/xhtml" &
&title&错误页面&/title&
&script type="text/javascript" src="./javascript/jquery-1.5.1.min.js"&&/script&
function showErrorMessage(){
$("#errorMessageDiv").toggle();
$(document).ready(showErrorMessage);
&table width="100%"&
&td style="border-bottom:dotted 1px G" colspan="2" &
&img src="images/error_title_icon.gif" id="img1" /&&&错误提示
&/td&&td&&/td&
&td style="width: 130px" &
&img src="images/sorry.gif" id="error_img" /&
&td&尊敬的用户:&br /&系统出现了异常,请重试。
&br /&如果问题重复出现,请向系统管理员反馈。&br /&&br /&
&a id="showErrorMessageButton" href="javascript:showErrorMessage();"&详细错误信息&/a&
&div id="errorMessageDiv" &
//全部内容先写到内存,然后分别从两个输出流再输出到页面和文件
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
PrintStream printStream = new PrintStream(byteArrayOutputStream);
printStream.println();
printStream.println("用户信息");
printStream.println("账号:" + request.getSession().getAttribute("userName"));
printStream.println("访问的路径: " + request.getAttribute("javax.servlet.forward.request_uri"));
printStream.println();
printStream.println("异常信息");
printStream.println(exception.getClass() + " : " + exception.getMessage());
printStream.println();
Enumeration&String& e = request.getParameterNames();
if (e.hasMoreElements()) {
printStream.println("请求中的Parameter包括:");
while (e.hasMoreElements()) {
String key = e.nextElement();
printStream.println(key + "=" + request.getParameter(key));
printStream.println();
printStream.println("堆栈信息");
exception.printStackTrace(printStream);
printStream.println();
out.print(byteArrayOutputStream);
//输出到网页
File dir = new File(request.getRealPath("/errorLog"));
if (!dir.exists()) {
dir.mkdir();
String timeStamp = new SimpleDateFormat("yyyyMMddhhmmssS").format(new Date());
FileOutputStream fileOutputStream = new FileOutputStream(new File(dir.getAbsolutePath() + File.separatorChar + "error-" + timeStamp + ".txt"));
new PrintStream(fileOutputStream).print(byteArrayOutputStream); //写到文件
} catch (Exception ex) {
ex.printStackTrace();
&/body&&/html&
阅读(...) 评论()

我要回帖

更多关于 jsp写java代码 的文章

 

随机推荐