Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

request.getServerName

Status
Not open for further replies.

dennisGuru

Programmer
Sep 14, 2001
37
NL
In my application I use request.getServerName. It returns a null pointer exception. Is there anywhere I can set the server name? For example in server.xml. And how can I set it?

Dennis
 
>>>> request.getServerName. It returns a null pointer exception.

This method returns a String of the server's name - not a "NullPointerException". You need to work out whether your application is barfing on an NPE because you have done an operation on the String set from that method, or whether the request object is null .... print out the request object alone, and then the getServerName() method's return value to check this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top