This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet unable to retrieve the package why??  RSS feed

 
Siddharth Ramavat
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I am developing a chat applicatiion in which I require to add the entry fof the user to LDAP directory after the authentication via servlet.

Now I am using Apache tomcat as the web server to execute the servlet and I include the netscape.ldap.* in the servlet to import the necessary classes of the netscape sdk.

But the servlet is not able to find the package when the package is very much present and the required classpath is also set

Actually I am having a LoginServlet which calls Add.java class (which includes all the necessary steps to make the ldap entry ie LDAPEntry,LdAPConnection as well as adds the entry to ldap directory) by making an object of the same.

But the LoginServlet after importing the netscaoe.ldap.* package is not able to find classes (ie LDAPEntry,LDAPConnection)

Questions:::::::::::::::::::::::::::::::

1. So where should I place the package netscape.ldap.*

2. What to include in the servlet code

3. Where to put netscape .jars files in the container of Apache

4. How to make netscape.ldap.* reachable

Regards
Siddharth
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Siddharth,

Are you getting errors at compile time, or at runtime?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and the required classpath is also set

Tomcat pays no attention to your CLASSPATH variable - see the documentation typically installed under tomcat-docs as class-loader-howto.html for the details of where Tomcat looks for packages.
Bill
 
Siddharth Ramavat
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
thanks for the replies

Actually the scenario is that even when i have placed the .jars from the netscape package which contains all the necessary classes to build a application to add the entries , into the servlet container ie i could say in "lib" folder even thn its not able to find that package

It is a compile time error ::::
constructor LDAPEntry(String dn,LDAPAttributeSet attrib)
not found
LDAPEntry class error

But the contructor that is showing error is already present in LDAPEntry class of netscape source

And when after this comment this line of the code to ad the entry then there appears another error of class not found

What might be the problem according to u all

Regards
Siddharth
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Double check your classpath and the package names for classes you are trying to import.
 
Siddharth Ramavat
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
thanks for the replies. now the application runs fine

Thank you once again

Regards
Siddharth
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!