File tree Expand file tree Collapse file tree
flexible/postgres/src/main/java/com/cisco/la Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,8 +56,22 @@ public class UserServlet extends HttpServlet {
5656
5757 @ Override
5858 public void doGet (HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException {
59- PrintWriter out = resp .getWriter ();
59+
60+ String url ;
61+
62+ Properties properties = new Properties ();
63+ try {
64+ properties .load (
65+ getServletContext ().getResourceAsStream ("/WEB-INF/classes/config.properties" ));
66+ url = properties .getProperty ("sqlUrl" );
67+ } catch (IOException e ) {
68+ log ("no property" , e ); // Servlet Init should never fail.
69+ return ;
70+ }
71+
72+ log ("connecting to: " + url );
73+ PrintWriter out = resp .getWriter ();
6074 resp .setContentType ("text/plain" );
61- out .println ("User:test " );
75+ out .println ("connecting to: " + url );
6276 }
6377}
You can’t perform that action at this time.
0 commit comments