title: Apache Derby not giving response
body: <p>I am trying out a sample using Apache Derby.</p>
  
  <p>I have created a web project in which on my servlet i am creating Derby 
  connection as:</p>
  
  <pre><code>private static String dbURL = "jdbc:derby:resultDataDB;create=true";
      private static String tableName = "RESULTMAPPING";
  
  private void createConnection(){
          try {
              Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();
              //Get a connection
              conn = DriverManager.getConnection(dbURL);
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>Then i am creating the Table as :</p>
  
  <pre><code>private void createTableStructure() {
          try{
              stmt = conn.createStatement();
              stmt.execute("create table " +tableName+ " (id integer,resultName varchar(200),resutlValue varchar(300))");
          }catch(Exception ex){
              ex.printStackTrace();
          }
      }
  </code></pre>
  
  <p>The above piece of code runs once only.
  Then i insert some records and then i am trying to fetch the records with the below method:</p>
  
  <pre><code>protected String getResultName(String resultValue){
          String resultVal=null;
          if(resultValue.contains("#")){
              resultVal = resultValue.split("#")[1];
          }else{
              resultVal = resultValue;
          }
          System.out.println("query parameter: " + resultVal);
          String resultName=null;
          try
          {
              String query = "select resultName from APP." + tableName + " where RESUTLVALUE=?";
              PreparedStatement preStmt = conn.prepareStatement(query);
              preStmt.setString(1, resultVal);
              ResultSet results = preStmt.executeQuery();
              while(results.next())
              {
                  resultName= results.getString(1);
                  System.out.println("resultName : " + resultName);
  
              }
              results.close();
              preStmt.close();
          }
          catch (SQLException sqlExcept)
          {
              sqlExcept.printStackTrace();
          }
          return resultName;
      }
  </code></pre>
  
  <p>I have created a JAVA Project as well with the above piece of code. Now here comes the strange part. When i run the above method in JavaProject then i get the expected result but when i try to invoke the Same method when invoking the web project. I don't get any result.</p>