/    Sign up×
Community /Pin to ProfileBookmark

"package javax.servlet.jsp.tagext does not exist" problem?

Hi Guys,

I’ve noticed this topic has been brought up before and i’ve read the stickies etc…but don’t seem to be able to work out whats going on.

I can compile java classes and servlets but can’t compile this:

package taglib;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*
;
import java.io.IOException;
public class ch09_05 extends TagSupport
{
public int doStartTag() throws JspException
{
return EVAL_BODY_INCLUDE;
}
public int doAfterBody() throws JspException
{
System.out.println(“Hello!”);
return SKIP_BODY;
}
}

My classpath is set to:

C:Program FilesApache Software FoundationTomcat 5.5commonlibservlet-api.jar;C:Program FilesApache Software FoundationTomcat 5.5commonlibjsp-api.jar

Any ideas whats going wrong?

to post a comment
Java

2 Comments(s)

Copy linkTweet thisAlerts:
@EZTargetauthorFeb 16.2007 — arg, now i'm really confused. I managed to get it to compile (hurray) by copying the jsp-api.jar file from my Tomcat lib folder into my JDK lib folder.

I'd still like to understand what i've set wrong in my environment variables though:

Classpath: C:Program FilesApache Software FoundationTomcat 5.5commonlibservlet-api.jar;C:Program FilesApache Software FoundationTomcat 5.5commonlibjsp-api.jar

JAVA_HOME C:Program FilesJavajdk1.6.0

Path C:Program FilesJavajdk1.6.0lib;C:Program FilesJavajdk1.6.0bin;

Any help would be appreciated!
Copy linkTweet thisAlerts:
@EZTargetauthorFeb 16.2007 — I've sorted it...must've been a syntax error in my classpath but for the life of me I don't know what it was. After deleting jsp-api.jar in my JDK lib folder, I just deleted the link to jsp-api.jar in the classpath and retyped it and it worked
×

Success!

Help @EZTarget spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...