• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 621
  • Last Modified:

how to slove error on "package javax.servlet.jsp does not exist"

Dear all i cannot compile the following java program, SlideTag.java

//package media;
package com.sun.estore.taglib;

import javax.servlet.jsp.*;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import RTPTransmit;


public class SlideTag extends TagSupport
{
      private String IPAddress = new String();
      private int port;
      private String type = new String();
      private String locator = new String();
      private long duration = 0;
      private String hasvideo = new String();
      private String hasaudio = new String();
      public String code = new String();
      
      public SlideTag(){super();}
      
}

the following error occurs

package javax.servlet.jsp does not exist
import javax.servlet.jsp.*;

i'm using jdk1.3.1 and SlideTag.java is saved in jdk1.3.1/bin
Any help would be greatly appreciated....

0
ahnui79
Asked:
ahnui79
  • 6
  • 2
2 Solutions
 
TimYatesCommented:
You need to add servlet.jar to your classpath....

I know servlet.jar comes with tomcat

and I think it comes with J2EE

Tim
0
 
TimYatesCommented:
PS:  Assuming you have tomcat, in version 4.1 it is in

/tomcat/common/lib

:-)
0
 
jimmackCommented:
Unless it's Tomcat 5, then you need servlet-api.jar

Also, I would strongly recommend that you change the location that you are saving your .java files!

Create a separate working directory for each of your projects and put the source files in that.  You shouldn't be adding anything to the JDK's bin directory.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
TimYatesCommented:
>  Unless it's Tomcat 5, then you need servlet-api.jar

Oooooooooh!  Tomcat 5!  Get her! ;-)  hee hee hee ;-)  (j/k) ;-)
0
 
TimYatesCommented:
> You shouldn't be adding anything to the JDK's bin directory.

This is very, very true
0
 
TimYatesCommented:
(I would like to apologise for my post 2 posts up from here -- it's late on a Friday afternoon...maybe I should go home)
0
 
jimmackCommented:
It's OK Tim ;-)

>> maybe I should go home

Hmm.  Better get a move on before the men arrive to take you away.  Can you hear the siren in the distance?

;-)
0
 
TimYatesCommented:
Eeeek! *runs* ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now