aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes please help in this tag problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "please help in this tag problem" Watch "please help in this tag problem" New topic
Author

please help in this tag problem

Abhra Kar
Ranch Hand

Joined: May 22, 2008
Posts: 122
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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42292
    
  64
What is the problem?


Ping & DNS - my free Android networking tools app
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Please don't duplicate threads. I've removed the other one.

Tell us more about your problem. What is it ?


[My Blog]
All roads lead to JavaRanch
Abhra Kar
Ranch Hand

Joined: May 22, 2008
Posts: 122
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"
ShaikSalam Bashoeb
Greenhorn

Joined: Dec 10, 2008
Posts: 24
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

Joined: Nov 24, 2005
Posts: 14688
    
  16

Which web container are you using ? Which version ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42292
    
  64

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

Joined: May 22, 2008
Posts: 122
I am using tomcat version 6
Abhra Kar
Ranch Hand

Joined: May 22, 2008
Posts: 122
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

Joined: May 22, 2008
Posts: 122
Still haven't solved .
Oren Ben
Greenhorn

Joined: Nov 19, 2008
Posts: 6
you should add the "jsp-api.jar" to your CLASSPATH
Ranjit Gopinathan
Ranch Hand

Joined: Jul 03, 2007
Posts: 46
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!
chan set
Greenhorn

Joined: Jun 09, 2009
Posts: 1
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)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: please help in this tag problem