Hi guys, i written a servlet function to incorporate a DH key exchange.
However i keep getting a null pointer exception on a BigInteger variable.
I know that you can`t initalize a BigInteger with a null variable , however i checked that the string that i`m initialising
it with contains a value.
As i am a novice in servlet writing, i`m rather confused what is going on with my code. Hope you guys can help me out here because i`m really stumped on this.
Bear Bibeault wrote:SEVERE: Servlet.service() for servlet [DHServlet] in context with path [/MyServletProject] threw exception
Which line is 165?
this is the line
biPK = new BigInteger(pk2.toString());
Bear Bibeault wrote:It's always easy to think that something has happened. But the exception proves otherwise. Put the checking code into the servlet and see where things go from there.
But you haven't answered the question, what do you want to happen when a null value is detected?
i am thinking of checking whether the public key of the server is null.
If it is null, i will ask for a re transmission.
If it is still null, i will assign it a random value and also convey it to the client side.
A magnificient life is loaded with tough challenges. En garde tiny ad: