我想解决这个问题。没有价格的意义是什么?

时间:2020-01-07 13:46:48

标签: jsp

addSchedule.jsp

<%@ page contentType="text/html;charset=euc-kr" session="true" %>
<%@ page import="book.ch9.*,book.ch9.CharConversion,java.io.*" %>
<%request.setCharacterEncoding("euc-kr"); %>
<jsp:useBean id="schDb" class="book.ch9.scheduleFileDb" scope="application" />

<html>
<head>
<title>addSchedule.jsp</title>
</head>

<body bgcolor="white">

<%  
    User user = (User)session.getValue("user");

    String id = user.getUserId();
    String day = request.getParameter("day");
    String hour = request.getParameter("hour");
    String schedule = request.getParameter("schedule");     
    String korSchedule = CharConversion.E2K(schedule);

    int index = schDb.getIndex();       

    try{    
        schDb.add(id,day,hour,korSchedule);         
    } catch(Exception e){
        e.printStackTrace(new PrintWriter(out));
        return;
    }
%>

<jsp:forward page="welcome.jsp">
<jsp:param name="schedule" value="<%=korSchedule %>"/> 
</jsp:forward>

</body>

</body>
</html>

如图所示,字符串id = user.getUserId();我不知道为什么这里有错误。

我努力搜索,但找不到任何答案。

enter image description here

0 个答案:

没有答案