Solved

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

Posted on 2003-11-21
10
546 Views
Last Modified: 2013-11-24
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
Comment
Question by:ahnui79
  • 6
  • 2
10 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 63 total points
ID: 9797999
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
 
LVL 35

Expert Comment

by:TimYates
ID: 9798022
PS:  Assuming you have tomcat, in version 4.1 it is in

/tomcat/common/lib

:-)
0
 
LVL 15

Assisted Solution

by:jimmack
jimmack earned 62 total points
ID: 9798030
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
 
LVL 35

Expert Comment

by:TimYates
ID: 9798047
>  Unless it's Tomcat 5, then you need servlet-api.jar

Oooooooooh!  Tomcat 5!  Get her! ;-)  hee hee hee ;-)  (j/k) ;-)
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 35

Expert Comment

by:TimYates
ID: 9798051
> You shouldn't be adding anything to the JDK's bin directory.

This is very, very true
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9798099
(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
 
LVL 15

Expert Comment

by:jimmack
ID: 9798131
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
 
LVL 35

Expert Comment

by:TimYates
ID: 9798179
Eeeek! *runs* ;-)
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now