• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

import javax.servlet.*;

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using dr Java ide

When i try to do
import javax.servlet.*;

it is not recognizing it, what could be the problem ??

It recognizes import java.io.*; but not the above import.

Thanks
 
Ranch Hand
Posts: 479
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are not telling us what the error is; "it is not recognizing it" could mean several things. Any time you post here, post the actual error message, along with when it shows up, etc.

It is possible that you do not have your project defined to include the javax libraries, and the ide is recognizing that.

rc
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The standard JDK does not contain the classes needed for servlets. You will have to separately download them and ensure the jars are on your classpath
Recommended reading:
https://coderanch.com/how-to/java/CompilingServlets
https://coderanch.com/how-to/java/HowToSetTheClasspath
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i am not sure this jar file javax.servlet.jar or this jar file j2ee.jar.
Just download and add the jar file in your lib path.
your problem will get resolved.

Regards,
Sriram.V
 
Marshal
Posts: 76454
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sri ramvaithiyanathan wrote: . . . . Just download and add the jar file in your lib path. . . .

By "lib path", do you mean "classpath"? You will probably have to add the .jar with the -cp tag. More information here. You may have to add that classpath entry in the manifest file whenever you create a jar file.
 
Sahil Reddy
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@all Thanks , i will try and get back to you !!!
 
Campbell Ritchie
Marshal
Posts: 76454
366
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're welcome and good luck with it.
 
You save more money with a clothesline than dozens of light bulb purchases. Tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic