本文中我們將要展現一個基于B/S結構的J2EE為基礎的在線程序判定(Online Judge)應用。這個應用使用JSP來接受用戶輸入,使用Servlet來處理用戶的請求,并使用JDBC與數據庫進行通信來管理數據,中間件使用了Apache的Tomcat服務器。在后端關鍵的編譯系統中,我們采用了Visual C++進行構建,并使用JNI技術來粘合Java技術與C/C++語言間的鴻溝。但是前端的J2EE系統與后臺的自動化編譯系統間并沒有直接的耦合,它們的關系是并行的。后端系統同樣使用JDBC對與數據庫進行通信,操作數據并處理自己的任務。本文中所描述的應用系統已在Windows 2003 Service Pack 2上通過了測試。
關鍵詞 程序設計競賽,ACM/ICPC,J2EE,Java
ABSTRACT
In this paper, we will represent an Online Judge System basically used J2EE technology which based on B/S architecture. This application use JSP for user input, use servlet for user request parsing, manufacture data through JDBC technology on the database, use Apache Tomcat as the middle-ware server. We use the Visual C++ to build the back-end compiling-judge system,and use JNI technology to join the divide between Java and C plus plus. But the front-end web system and the back-end auto-compiling system are not coupled, they are parallel running. The back-end system also use JDBC to communicate with the database, manufacturing the datas and going on its tasks. The application schemed in the paper is passed testing on Windows Server 2003 Service Pack 2.