chat.jsp

来自「这是一个极其好的聊天系统(java+jsp+servlet)」· JSP 代码 · 共 36 行

JSP
36
字号
<%@ page errorPage="ErrorPage.jsp" %>
<%@ page contentType="text/html;charset=gb2312" %>
<HTML>
   <HEAD>
      <TITLE>
         聊天室--在线交流--
         <%
         String chatroom;
         chatroom=request.getParameter("chatroom");
         if (chatroom.equals("1")) out.print("聊天室A");
         if (chatroom.equals("2")) out.print("聊天室B");
         int intChatroom=Integer.parseInt(chatroom);
         %>
      </TITLE>
   </HEAD>
<jsp:useBean id="thisUser" scope="session" class="chatroom.oneUser" />
<jsp:useBean id="thischatroom" scope="application" class="chatroom.ChatRoom" />
<%
  if (thisUser.getUserName() != null)
    {thisUser.setPosition(chatroom);
     //thischatroom.addUserList(thisUser.getUserId(),thisUser.getUserName(),thisUser.getUserTime(),thisUser.getUserPosion(),thisUser.getUserSwjg(),thisUser.getUserSfks(),intChatroom);
     thischatroom.addUserList(thisUser.getUserId(),thisUser.getUserName(),thisUser.getUserTime(),thisUser.getUserPosion(),intChatroom);
     thischatroom.addSpeaking("","","",thisUser.getUserName(),"","","red","system",intChatroom);
%>
    <frameset rows="415,111" frameborder="YES" border="1" framespacing="1" cols="*">
       <frameset cols="623,160" frameborder="YES" border="1" framespacing="1" rows="*">
          <frame name="mychat" src="/mytest/jsp/mychat.jsp?isret=yes">
          <frame name="user" src="user.jsp">
       </frameset>
       <frame name="manage" scrolling="NO" src="manage.jsp">
    </frameset>
<%
    }
    else out.print("尚未登录,进入<a href='/mytest/jsp/login.jsp'>用户登录</a>");
%>
</HTML>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?