As my last post, I'm used to PHP and done hardly any Java/JSP, so please forgive my ignorance.
I'm wanting to check if a GET parameter exists, and assign that value to a string if it does or doesn't. Basically I want it so that the following actions happen:
page.jsp?t=helloworld
String myvariable = "helloworld";
page.jsp
String myvariable = null;
I thought the below code would work, but apparently the syntax is wrong in someway. Does the if() condition I'm using check if the param exists? Or is the error occurring because the t param doesn't exists, and it has no value to compare it against? Can somebody fix this? Thanks!
I'm wanting to check if a GET parameter exists, and assign that value to a string if it does or doesn't. Basically I want it so that the following actions happen:
page.jsp?t=helloworld
String myvariable = "helloworld";
page.jsp
String myvariable = null;
I thought the below code would work, but apparently the syntax is wrong in someway. Does the if() condition I'm using check if the param exists? Or is the error occurring because the t param doesn't exists, and it has no value to compare it against? Can somebody fix this? Thanks!