POLITECHNIKA RZESZOWSKA - '«yiMMMKh« IMmnN
import java.io.*; import java.sql..*; import javax.naminq.*T import javax.servlet.*; import javax-.servl.et.http.*; import javax.sql-DataSource;
public class JDBCServer extends HttpServlet l protected void doGet(HttpServletRequest reque3t,
HttpServletResponse response) tbrows ServłeŁException, IOException {
response-setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(>; try {
InitiaIContext context = new rnitialContext(); DataSource dataSource =
(DataSource)context.lookup("]ava:conp/env/]cŁ>c/DB");
Connection conn = dataSource.getConnectionO;
U
T
. 2022JKI PROKOP