ridhabh ssrtrt
method returning null on JSP page.Plz HELP!!!
0 Answer(s)      5 years and 10 months ago
Posted in : Java Beginners

public String getServerAddress(String sName,int sPort,String pKey) { String sAddress = null; if(sPort>=0) { sAddress="http"+"://"+sName+":"+sPort+"/browser/"+pKey; } else { sAddress="http"+"://"+sName+"/browser/"+pKey;

        System.out.println("sAddress at getServer method::::"+sAddress);
        return sAddress;


When I am calling this method on the jsp page it is returning null while the parameter values are successfully passed.while I am trying to print the sAddress value here it is printing correct here. I am new to Java, so please help me as it could also because of some silly mistake. Thanks


View Answers

Related Tutorials/Questions & Answers: