Hi all...

I've been using VisualAge for Java 2.0 Enterprise Edition, with EJB/JSP
addition.  JSDK 2.0, JSP 0.91.

I have servlets which forward request on to JSPs which are to display
non-HTML content--in particular, Handheld Device Markup Language
(HDML content).  Here is a simple example:

<%@ content_type = "text/x-hdml" %>

<HDML VERSION=2.0 MARKABLE=TRUE TTL=0>
  <DISPLAY NAME=Welcome>
  Hello world.
  </DISPLAY>
</HDML>

When I hit the servlet that forwards on to this JSP from VAJ WebSphere
test environment, all is well.
When I hit the same servlet installed in WebSphere 2.03 (JSDK 2.0/JSP 0.91),
I see a <BASE> HTML tag getting crammed into the output stream.  Naturally,
my HDML-enabled devices have no idea what that tag is, so the browser
on those devices chokes.

>From looking at the servlet code generated from the JSP, it does this check:

String url = HttpUtils.getRequestURL(request).toString();
if ( (request.getAttribute("__XXcallPageXX__") != null) &&
     ! url.endsWith(".jsp") )
{
  out.println("<base href=\"" + url.substring(0, url.indexOf("/", 8)) +
    request.getPathInfo() + "\">");
}

So to see what this servlet thought the requested URL was, I changed my JSP
thusly:

<%@ import = "javax.servlet.*,javax.servlet.http.*" %>
<%@ content_type = "text/x-hdml" %>

<HDML VERSION=2.0 MARKABLE=TRUE TTL=0>
  <DISPLAY NAME=Welcome>
  <%= HttpUtils.getRequestURL(request).toString() %>
  </DISPLAY>
</HDML>

Now, when I hit the servlet from VAJ WebSphere test environment,
it shows the URL of the JSP which the servlet got compiled from....
when I hit the servlet installed in WebSphere 2.03, it shows the
URL of the original servlet.

Who's right?  Are there hooks into the JSP page compile servlet
that will allow me to disable the insertion of the <BASE> tag into
the output stream?  I guess it thinks it's doing me a favor by doing
so, but it's really messing me up.

Any and all commentary appreciated.

Thanks,
p

--
Paul Holser -- Designer/Developer, Consulting
ObjectSpace, Inc.  http://www.objectspace.com
14850 Quorum Dr. Ste. 500, Dallas TX 75240
972.726.4560 / 1.800.OBJECT1 x4560

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to