We have an android app using webview to display a page called
login.jsp.  This same page authenticates a user, via a servlet, and
forwards them to another page called index.jsp.  It is in the
index.jsp page where we get an error message that reads:

"The page cannot be displayed because an internal server error has
occurred"

(We are running Windows 2008 R2 Standard SP1/Apache Tomcat 5.5.28, by
the way.)

I browsed the Tomcat log files and the error is:

java.lang.ClassCastException: java.lang.Object cannot be cast to
java.lang.String...

Now, before I post any code, we pinpointed the problem to a
proprietary Java method being called inside the index.jsp page.  The
method is part of a closed-source class provided by a third-party
vendor.  That is, it is a black-box to us; we don't have the source
code, and it is provided to us by a third-party vendor (who is of no
help, because the class was not explicitly designed for mobile
platforms).

Here's the weird thing: The index.jsp page works on desktop browsers
and mobile browsers (i.e. Android, Safari), in both emulators and the
device.  The error above ONLY occurs when launched from the app.  We
confirmed it fails with Android version 2.3.6, 2.3.7, and 4.x on
emulators and devices; however, it does work on Android SDK Emulator
2.3.3.

I'm not asking to diagnose why the class is failing because, frankly,
I think that might be a dead-end, unless someone here is familiar with
BMC Remedy.  I'd rather not waste anybody's time.

But what I am asking is why on Earth would a paged served by Apache
Tomcat get an error in an android app webview, yet it works in the
browser?  It's not just that the error occurs in the app that doesn't
make sense.  What's bizarre is there's an error in the first place.
webview is just an extenion of the webkit engine and behaves as a
browser -- it's a client.  So, the app is the client.  And the jsp
code is parsed by Tomcat and the request is sent to the app's webview,
which would parse the html, right??? Or, am I completely wrong on the
model?

Maybe someone can explain how webview works under the covers?  Does
webview act as a true client?  Why would it cause Tomcat to throw an
error.  webview shouldn't have any business processing jsp code --
isn't that Tomcat's responsibility?  I would love to hear an
explanation on the full process of how webview works, because it seems
like it's not a true client-model relationship inside the app.

Thank you.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to