• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

please help in this tag problem

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tag class:-

package foo;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.IOException;
public class SimpleTagTest1 extends SimpleTagSupport{

public void doTag()throws JspException,IOException{
getJspContext().getOut().print("This is the lamest use of a custom tag");
}
}

Simple.tld under WEB_INF:-

<?xml version="1.0" encoding="UTF-8" ?>
<taglib>

<tlib-version>1.2</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>mine</short-name>

<uri>simpleTags</uri>


<tag>
<name>simple1</name>
<tag-class>foo.SimpleTagTest1</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>

call.jsp:-

<%@ taglib uri="simpleTags" prefix="mine" %>
<html><body>
<mine:simple1/>
</body></html>

servlet-api.jar and jsp-api.jsr is properly been set.

Please help me in this case
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the problem?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please don't duplicate threads. I've removed the other one.

Tell us more about your problem. What is it ?
 
Abhra Kar
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I try to run this program by http://localhost:7777/ctd5/call.jsp ,where "ctd5" is the web application ,it gives the error "javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver"
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI Abhra Kar, I don't have much idea about the code. But for running the jstl we need more two jar files i.e., jstl.jar and standard.jar.

If you have not included these jar files then try by includig these jar files
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which web container are you using ? Which version ?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver


That means you're using a JSP version that requires Servlet API 2.5/JSP 2.1. Tomcat 6 is a servlet container that supports that, but not Tomcat 5 or earlier.
[ December 18, 2008: Message edited by: Ulf Dittmer ]
 
Abhra Kar
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using tomcat version 6
 
Abhra Kar
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a question to Mr.ShaikSalam Bashoeb

Sir, Here I haven't use any jstl code. So why i will put the jstl.jar and standard.jar files into
WEB_INF\lib in my web application?
 
Abhra Kar
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still haven't solved .
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you should add the "jsp-api.jar" to your CLASSPATH
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
javax/el/ELResolver is inside el-api.jar .

Check if the lib folder of tomcat directory is having this jar.


-HTH

SORRRY!!! Did not check the date before posting!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
just put the el-api.jar jsp.jar and servlet-api.jar into java/jre/lib/ext/

(if you to lazy/ or confuse to set the path)
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic