Is Tomcat 4.0.1 taglib integration buggy?

2001-11-16 Thread Thomas Rickal, IOP Unternehmensberatung GmbH

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?

Thomas


Example:

### example.jsp ###

A href=myLib:url%= myBean.getURL() %/myLib:urltext/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 ###

tag
  nameurl/name
  tagclassde.iop.webrun.shared.taglib.UrlTag/tagclass
  bodycontenttagdependent/bodycontent
  inforewrite url/info
/tag


### UrlTag-Code ###

import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.*;
import java.io.IOException;

public class UrlTag extends BodyTagSupport
{
  public int doAfterBody() throws JspException
  {
BodyContent bodyContent = getBodyContent();
String baseURL  = bodyContent.getString();
bodyContent.clearBody();
try
{
  HttpServletResponse response = (HttpServletResponse)
pageContext.getResponse();
  String encodedURL = response.encodeURL(baseURL);
  this.getPreviousOut().print(encodedURL);
}
catch(IOException e)
{
  throw new JspTagException(I/O exception  + e.getMessage());
}
return SKIP_BODY;
  }
}



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: Is Tomcat 4.0.1 taglib integration buggy?

2001-11-16 Thread Thomas Rickal, IOP Unternehmensberatung GmbH

Hi Conrad,

thanx for answering.

But there is no parameter so i can't set rtexprvalue to true.

I' looked in my documentation again. Maybe bodycontent has to be set
to JSP:

bodycontentJSP/bodycontent

I tried it out but i did not work too.

Thomas



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: Is Tomcat 4.0.1 taglib integration buggy?

2001-11-16 Thread Thomas Rickal, IOP Unternehmensberatung GmbH

Hi David,

i tried to return EVAL_BODY_TAG but then tomcat was not able to
serve the page. An infinite amount of kilobytes was produced as
response.

I intensively used taglibs in the project to encapsulate und reuse
view logic for several jsps. It isn't a good idea to place the code
directly in my jsps. I could do it for the url-rewriting but i
should not do it for the other components.

Thomas



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Tomcat 4.0.1 taglib problem

2001-11-14 Thread Thomas Rickal, IOP Unternehmensberatung GmbH

Hi,

i changed from Apache 1.3.19/Tomcat 3.2.3 to Apache 1.3.19/Tomcat
4.0.1 on SUSE Linux 7.3. Now I'am encountering a taglib problem. My
dynamic bodycontents are not processed in the proper way anymore. I
put an url rewriting example example in this mail.

I hope somebody can help.

Thomas



### example.jsp ###

A href=myLib:url%= myBean.getURL() %/myLib:urltext/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 ###

tag
  nameurl/name
  tagclassde.iop.webrun.shared.taglib.UrlTag/tagclass
  bodycontenttagdependent/bodycontent
  inforewrite url/info
/tag


### UrlTag-Code ###

import javax.servlet.http.HttpServletResponse;
import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.*;
import java.io.IOException;

public class UrlTag extends BodyTagSupport
{
  public int doAfterBody() throws JspException
  {
BodyContent bodyContent = getBodyContent();
String baseURL  = bodyContent.getString();
bodyContent.clearBody();
try
{
  HttpServletResponse response = (HttpServletResponse)
pageContext.getResponse();
  String encodedURL = response.encodeURL(baseURL);
  this.getPreviousOut().print(encodedURL);
}
catch(IOException e)
{
  throw new JspTagException(I/O exception  + e.getMessage());
}
return SKIP_BODY;
  }
}



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: webapp module for combining Apache and Tomcat

2001-11-14 Thread Thomas Rickal, IOP Unternehmensberatung GmbH

Hi Thomas,

here you can find the binary distribution of mod_webapp for windows:

http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/b
in/win32/

Thomas



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: Wrap an HttpServletRequest

2001-11-14 Thread Thomas Rickal, IOP Unternehmensberatung GmbH

Hi Diego,

do it like Martin described. Or try out the RequestDispatcher:

request.setAttribute(key1, value1);
request.setAttribute(key2, value2);
[...]
RequestDispatcher rd =
getServletContext().getRequestDispatcher(myServletUrl);
rd.forward(request, response);

Thomas



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: Number of processes growing.

2001-11-14 Thread Thomas Rickal, IOP Unternehmensberatung GmbH

Hi Michenaud,

maybe not all of your connections are freed so that users open new
connections although there are should be free connections in your
connection pool. Check your code.

Thomas



winmail.dat
Description: application/ms-tnef

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]