|
|
JAVA, JSP, SERVLETS, TOMCAT, SERVLETS MANAGER,
Private JVM (Java Virtual Machine),
Private Tomcat Server
Alden Hosting offers private JVM (Java Virtual Machine), Java Server Pages (JSP), Servlets, and Servlets Manager with our Web Hosting Plans
WEB 4 PLAN and
WEB 5 PLAN ,
WEB 6 PLAN .
At Alden Hosting we eat and breathe Java! We are the industry leader in providing
affordable, quality and efficient Java web hosting in the shared hosting marketplace.
All our sites run on our Java hosing platform configured for
optimum performance using Java 1.6, Tomcat 6.0.X, MySQL 5.0.x, Apache 2.2.xx and web
application frameworks such as Struts, Hibernate, Cocoon, Ant, etc.
We offer only one type of Java hosting - Private Tomcat. Hosting accounts on the Private
Tomcat environment get their very own Tomcat server. You can start and re-start
your entire Tomcat server yourself.
Manage Referral Control (The Java™ Tutorials >
Java Naming and Directory Interface(TM). > New features in JDK 5.0 and JDK 6)
Home Page
>
Java Naming and Directory Interface(TM).
>
New features in JDK 5.0 and JDK 6
Manage Referral Control
The Manage Referral control (RFC3296)
enables manipulation of the referral and other special
objects as normal objects when performing an LDAP operation.
In other words, Manage Referral control tells the LDAP server to
return referral entries as ordinary entries instead of returning
"referral" error responses or continuation references.
The new class in JDK 5.0 below enables you to send Manage Referral Control
along with an LDAP request:
javax.naming.ldap.ManageReferralControl
The Sun LDAP service provider will send this control automatically along with any request. You can also explicitly enable it setting Context.REFERRAL
environment property to "ignore".
For more information on Referral handling check the
Referrals in the JNDI section of the JNDI Tutorial.
Here is an example that sends Manage Referral control along with an
LDAP request.
// Create initial context
LdapContext ctx = (LdapContext) new InitialDirContext(env);
ctx.setRequestControl(new Control[] new ManageReferralControl());
// Set controls for performing subtree search
SearchControls ctls = new SearchControls();
ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
// Perform search
NamingEnumeration answer = ctx.search("", "(objectclass=*)", ctls);
// Print the answer
while (answer.hasMore()) {
System.out.println(">>>" + ((SearchResult)answer.next()).getName());
}
// Close the context when we're done
ctx.close();
The complete example can be found here.
Note 1:
The above example will require you to set up a second server using
the configuration file refserver.ldif.
The server must support LDAP v3 and RFC 3296. If the server does not support
referrals in this way,
then the example won't work as shown. The configuration file contains
referrals that point to the original server that you've set up.
It assumes that the original server is on port 389 on the local machine.
If you have set up the server on another machine or port,
then you need to edit the "ref" entries in the refserver.ldif file
and replace "localhost:389" with the appropriate setting.
The second server is to be set up on port 489 on the local machine.
If you set up the second server on another machine or port, then you
need to adjust the setting of the Context.PROVIDER_URL environment property
for the initial context accordingly.
Setting up a directory server is typically performed by the directory or
system administrator. See the Software Setup lesson for more information.
Note 2: Windows Active Directory: Because Active Directory does not support the
Manage Referral control, none of the examples in this lesson will work
against Active Directory.
JAVA, JSP, SERVLETS, TOMCAT, SERVLETS MANAGER,
Private JVM (Java Virtual Machine),
Private Tomcat Server
Alden Hosting offers private JVM (Java Virtual Machine), Java Server Pages (JSP), Servlets, and Servlets Manager with our Web Hosting Plans
WEB 4 PLAN and
WEB 5 PLAN ,
WEB 6 PLAN .
At Alden Hosting we eat and breathe Java! We are the industry leader in providing
affordable, quality and efficient Java web hosting in the shared hosting marketplace.
All our sites run on our Java hosing platform configured for
optimum performance using Java 1.6, Tomcat 6.0.X, MySQL 5.0.x, Apache 2.2.xx and web
application frameworks such as Struts, Hibernate, Cocoon, Ant, etc.
We offer only one type of Java hosting - Private Tomcat. Hosting accounts on the Private
Tomcat environment get their very own Tomcat server. You can start and re-start
your entire Tomcat server yourself.
|