tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conrad Winchester <>
Subject RE: Is Tomcat 4.0.1 taglib integration buggy?
Date Fri, 16 Nov 2001 08:45:45 GMT
I think its because you havent set 


which tells JSP that the parameter is specified at run time and not compile


-----Original Message-----
From: Thomas Rickal, IOP Unternehmensberatung GmbH
Sent: 16 November 2001 08:38
To: 'Tomcat Users List'
Subject: Is Tomcat 4.0.1 taglib integration buggy?

Hi again,

i' am trying to upgrade from Tomcat 3.2.3/ Apache 1.3.19 to Tomcat
4.0.1/ Apache 1.3.19 on Linux.

All the urls in the jsps of my application are rewritten by a
UrlTag. The UrlTag Class takes the url between the tags and rewrites
it if necessary.

It works with Tomcat 4.0.1 if the url is placed in the jsp file
statically. It works not if the url is get by using the "get"-method
of a bean.

In Tomcat 3.2.3 it worked fine in both cases. Maybe this is a Tomcat
4.0.1 bug? Who can help?



### example.jsp ###

<A href="<myLib:url><%= myBean.getURL() %></myLib:url>">text</A>

### output Tomcat 3.2.3 (right) ###

<A href="http://localhost/target.jsp">text</A>

### output Tomcat 4.0.1 (wrong) ###

<A href="<%= myBean.getURL() %>">text</A>

### example.tld ###

  <info>rewrite url</info>

### UrlTag-Code ###

import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.*;

public class UrlTag extends BodyTagSupport
  public int doAfterBody() throws JspException
    BodyContent bodyContent = getBodyContent();
    String baseURL          = bodyContent.getString();
      HttpServletResponse response = (HttpServletResponse)
      String encodedURL = response.encodeURL(baseURL);
    catch(IOException e)
      throw new JspTagException("I/O exception " + e.getMessage());
    return SKIP_BODY;

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message