title: Android webview - shouldOverrideUrlLoading() not called in some jsp pages
body: <p>I've been developing hybrid apps for many companies with mobile websites.
  And as a matter of fact, there are some websites made with using jsp. </p>
  
  <p>I already had the knowledge that iframes and javascripts xhr requests will not fire webViewClient's shouldOverrideUrlLoading override function. I'm fine with that.</p>
  
  <p>But today I learned that SOME actions such as:</p>
  
  <ul>
  <li>JSP Page Redirects</li>
  <li>Link Clicks within a JSP page</li>
  <li>JSP/JS induced URL Loads</li>
  </ul>
  
  <p>will not ALWAYS fire this function.</p>
  
  <p>Hence, shouldOverrideUrlLoading() does not fire, when the webView is asked to load a page that it cannot load(i.e. "intent://...",) it shows an error page.</p>
  
  <p>Has anyone encountered this kind of behaviour and is there any solution to work around it ?</p>
  
  <p>Below is the code I'm using to invoke activities, where urls with 'intent:' protocol (which will fail because this function never gets called when above actions are performed)</p>
  
  <pre><code>@Override
  public boolean shouldOverrideUrlLoading(WebView view, String url) {
          // ... omitted ...
          if ( url.startsWith("intent:") ) {
              Intent intent = null;
              try {
                  intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
                  // The following flags launch the app outside the current app
                  intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
                  try {
                      getActivity().startActivity(intent);
                  } catch (ActivityNotFoundException e) {
                      e.printStackTrace();
                  }
              } catch (URISyntaxException e) {
                  e.printStackTrace();
              }
              return true;
          }
  }
  </code></pre>
  
  <p>ps. please notice that every other websites' page loads will perfectly call shouldOverrideUrlLoading(). 
  I couldn't find any JSP related bugs on android webViews so I'm asking one.</p>
  
  <p>ps. I am happily willing to provide sample websites that some gracious readers will try on.. but the website's written in Korean so I doubt it will help.</p>
  
  <p>Thank you!</p>