This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.

Divya Mehrotra

Greenhorn
+ Follow
since Mar 01, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Divya Mehrotra

see in jsf framework the mangedbean object creation and maintainanace is done by server if we want to take this job in our hand how can we handle?
16 years ago
JSF
We have ActionListeners in JSF,while developing JSF web application we are giving view page as an extension of .jsp,so it should be on jSP technology,so jspc should generate sevlet internolly but the servlet technology not support EVENTS so how the jspc will generate servlet
16 years ago
JSF
I am trying to access ldap server from java. I am giving following properties :-

Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");

env.put(Context.PROVIDER_URL, "ldap://morganstanley.com:/");

//My ldap server is using SASL security authentication mechanism.
env.put(Context.SECURITY_AUTHENTICATION,"sasl_mech");

env.putContext.SECURITY_PRINCIPAL,"cn=Manager,ou=People,o=organizationalunit"); // specify the username

env.put(Context.SECURITY_CREDENTIALS,"morganstanley"); // specify the password

try
{
// Create initial context

DirContext ctx = new InitialDirContext(env);
//Specify the attributes to match
Attributes matchAttrs = new BasicAttributes(true);
//ignore case
matchAttrs.put(new BasicAttribute("ou", "People"));
//Search for objects that have those matching attributes
NamingEnumeration answer = ctx.search("ou=users", matchAttrs);
//Print the answer
ldap.printSearchEnumeration(answer,ctx);

//Close the context when we're done
ctx.close();
}

But I am getting the following exception at runtime in the following line
DirContext ctx = new InitialDirContext(env);


javax.naming.CommunicationException: morganstanley.com:389. Root exception is java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:331)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:196)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:183)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.connect(Socket.java:428)
at java.net.Socket.<init>(Socket.java:335)
at java.net.Socket.<init>(Socket.java:150)
at com.sun.jndi.ldap.Connection.createSocket(Connection.java:376)
at com.sun.jndi.ldap.Connection.<init>(Connection.java:211)
at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:136)
at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1685)
at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2616)
at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:307)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:190)
at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:208)
at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:151)
at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:81)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:675)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:257)
at javax.naming.InitialContext.init(InitialContext.java:233)
at javax.naming.InitialContext.<init>(InitialContext.java:209)
at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:94)
at com.user.ldap.main(ldap.java:45) // This is my class name.


Please help me.
Can JMS talk with non java applications?
17 years ago
Please tell me the difference between JMS and Web services in details. Where we will use JMS and web services?
17 years ago
Can anybody help me in telling how to send an attachement using domino.jar through java code?


Thanks in advance

Divya
18 years ago
Can any body tell me the links from wher i can get the good reference material and sample code for jaxb.

I want to use jaxb without using any web server.


Thanks in advance,

Divya
Please provide me the link for Visitor pattern.

or

provide the site links from where i can download the reference for this.

Thanks,

Divya
I have a java String object which contains

String lsStr = "8=FIX.4.2|9=189|34=7|35=8|49=putnam|50=putnam|52=20050603-08:30:10|56=putnam|57=putnam|6=0|11=ClOrderId_1|14=0|15=USD|17=ExecId_1|20=0|21=3|22=1|31=0|32=0|37=GSCO123|38=10000|39=0|48=459200101|54=1|55=IBM|58=Test Text|60=20050603-11:30:30|75=20050526|76=putnam|150=0|151=10000|10=999|"

I need to transform this java object into an xml file through XSLT. The xslt should read the message and then on the fly generate the xml file. Each key-value pair(8=FIX.4.2) will be a tag in xml file.

Please help me in transforming this string object into xml file.
class ArrayTest
{
public static void main(String[] args)
{
int k,arr=100;
String sfiles = " ",cfiles=" ";
String missing=" ";
String children[]=new String[]{"a","b","c","d","e","f"};
String files[]=new String[]{"f","c","e"};

for (k=0;k<children.length;k++)
{
sfiles=children[k];
boolean found=false;
for(int l=0;l<files.length;l++)
{
cfiles=files[l];
if(sfiles.equals(cfiles))
{
found=true;
break;
}
}
if (!found)
{
missing=sfiles;
System.out.println("missing files "+missing);
}
}
}
}
[ March 21, 2005: Message edited by: Divya Mehrotra ]
18 years ago
If you do not specify public modifier, your interface will be accessible only to classes that are defined in the same package as the interface.

please refer the following link :-

http://java.sun.com/docs/books/tutorial/java/interpack/interfaceDef.html
18 years ago
The NUllPointerException is coming at

addressFile.add(entry);

line as addressFile is Null and you are trying to access method of this object.
18 years ago
Please chek the following link :-

http://maven.apache.org/


Divya
18 years ago
StringBuffer class DOES NOT override the equals() method. Therefore, it uses Object class' equals(), which only checks for equality of the object references. StringBuffer.equals() does not return true even if the two StringBuffer objects have the same contents:
18 years ago