We help IT Professionals succeed at work.

javax.servlet not found

adityau
adityau asked
on
We have developed a web tool that works fine on a linux server. We used JDK 1.2.2 and Apache Server 1.3.

Now our task is to deploy the same tool onto Sun Solaris and when we compile a file usinf javac, it is giving an error saying "Package javax.servlet.http not found in import".

Can any one help us. We are using Sun Solaris Sparc.

Anybody has a procedure to deploy the files onto Sun Solaris?
Comment
Watch Question

Commented:
Hi,

  Please check if your classpath is properly set in your apache config files


Commented:
That's hardly an answer badami. See the guidelines below.
Commented:
what you need to do is add the servlet.jar file into your CLASSPATH variable.
or you can set it when calling javac i.e
javac -classpath $CLASSPATH:servlet.jar myjavaclass.java

you can download the servlet.jar from the java.sun.com website but you already have it on your linux server so just copy it across from there.
You might need other jar files as well.

Commented:
Hi,
  if u r using bash shell u please open .profile file and set the classpath to the directoyr.
  If u r using c shell u please open .login file adn set the classpath to it.

Good Luck
Vasan S

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Split points between black and vasan_sr

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Venabili
EE Cleanup Volunteer

Explore More ContentExplore courses, solutions, and other research materials related to this topic.