tomcat « Tag « JSP-Servlet Q&A

1. JSP.13.8 Example Simple Tag Handler Scenario doesn't work?

This test was prompted by reading a question on the Sun java forums and thought I would try it out. The JSP2.0 specification section JSP.13.8 contains an "Example Simple Tag ...

2. Problem in running Classic tag handler

I want to display the body value of JSP in custom tag name Simple from the tag handler by extending the class, BodyTagSupport, but getting a runtime exception ;o) The JSP code ...

3. JavaBean Introspection in Servlets [Tomcat]

What is the equivalent "servlet code" for this:

<jsp:useBean id="user" class="beans.UserBean" scope="session"/>
<jsp:setProperty name="user" property="*"/>
Tomcat translates this to:
beans.UserBean user = null;
synchronized (session) {
    user = (beans.UserBean) _jspx_page_context.getAttribute("user", PageContext.SESSION_SCOPE);

4. How to define an example in a JSP taglib element?

I'm currently writing a bunch of JSP tags for our designers to use. In my .tld file I have some <tag> and many more <tag-file> elements. Now, I want to give the ...

5. how to prevent jsp tags from being reused after being classloaded

I have a problem where certain attributes in tag files stick around for the next time the tag is used. I think this is because the Tag class is being classloaded, and ...

6. Tomcat JSP(2.0) Document how to stop automaticly closing empty body tags with /> instead of

The question is. If I use JSP Documents (or JSP 2.0) and If I put a TAG without a BODY it is automaticly closed I dont want that. so If I have <div ...

7. Unable to compile class for JSP in tomcat

Symptoms: Any JSP pages in the project produce error messages as below:

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 5 in the jsp file: /check.jspf
Generated servlet error:
*Duplicate local ...

8. BodyContentImpl jsp tag memory leak problem

I am using Tomcat version 5.0.28, i was analyzing the heap dump. It shows the memory leak is due to the BodyContentImpl objects, which seems (not sure) it caches the content ...

9. How to debug tag?

Is there a way to debug <jsp:include> tag? I have a container.jsp that jsp:includes a servlet. container.jsp has a form within. When I get container.jsp by a GET request, jsp:include works fine ...

10. jsp jar Failed to load

In the /var/lib/tomcat6/webapps/ROOT I have the following structure =>

META-INF  teiExample.jsp  WEB-INF


exampleTags.tld  lib  web.xml

Content of the example.jar =>
teiExample.jsp =>
<%@ taglib prefix="example" uri="exampleURI" %>

    <title>Welcome and ...

11. Tomcat 7 - Servlet 3.0: Invalid byte tag in constant pool

  • tomcat 7.0.16
  • Java 1.6.0_22
  • CentOS 5.6
I just switched the web.xml to servlet 3.0 (from a app running 2.4 previously) and now I'm seeing the following error (turned on fine logging for ...

12. JSP Custom Tag :TagHandlerPool can not access a member of class Tag.QueryTag with modifiers "" Error?

I`ve created a custom tag class QueryTag and created required tld file. and specified in respective file using @taglib and tag is suggested by Eclipse IDE. I implemented custom tag class by implementing ...

13. Custom tags on Tomcat 4.0.3

Hello, I have been trying to get an example from a book to work, but I cannot get the JSP page to compile. I get the message: SimpleTag.jsp [4:0] Unable to open taglibrary /WEB-INF/simpletaglib.tld : Could not locate TLD META-INF/taglib.tld I have found a number of resources, but none are explicit enough for me to get this to work. Obviously I ...

14. tag library error without using tags on starting tomcat

Hi javarancher, I am not using any tag library in this package. I compiled it in war and when i putting it in tomcat webapp and restart tomcat I am getting lots of erros . From the log lines are like this 2003-09-03 10:30:50 HostConfig[localhost]: Expanding web application archive LOGIN.WAR 2003-09-03 10:30:50 StandardHost[localhost]: Installing web application at context path /LOGIN from ...

15. tomcat 4.1.24 and custom tags

Sad, but true, I have to quote from another java forum to answer my question. ;-) > (...)is using introspection for creating setter and getter methods. > Every class implicitly or explicitly extends java.lang.Object which contains > a method called getClass() which returns a Class object. Since your > setClass() method is not likely to be doing anything with a Class ...

16. Tomcat not stable ? -- JSP tag

19. Tomcat 5 compiles jsp with wrong argument type for a tag on a Mac OSX

Hi, After we upgraded java from 1.5 to 1.6 on a development machine, we started getting alot of the following exception in the log, and several pages didn't display properly. 2011-06-16 11:04:01 ApplicationDispatcher[] Servlet.service() for servlet jsp threw exception javax.servlet.jsp.el.ELException: Attempt to coerce a value of type "neo.xredsys.presentation.PresentationArticleImpl" to type "neo.xredsys.api.Article" at org.apache.commons.el.Logger.logError( at org.apache.commons.el.Logger.logError( at org.apache.commons.el.Logger.logError( at org.apache.commons.el.Coercions.coerceToObject( at org.apache.commons.el.Coercions.coerce( ...