Solved

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

Posted on 2003-11-21
10
562 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Way to decrease size of apk file 9 104
Problem to Alipay 10 67
dao vs facade design patterns 2 29
Where to place postgres JDBC driver jar on tomcat 8 24
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
The viewer will learn how to implement Singleton Design Pattern in Java.

685 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