Hi all. Let me simplify the problem I'm thinking of and offer a small example. Say I have a struts action that happens when a user clicks a link on my site. The action fills a resultset and some other variables related to paging and such. These variables are stuck in the request and passed to the jsp page using struts. The jsp page then loops through the result set, prints the data, and then prints all the info for paging from the variables in the request.
So, my question, is what if the user bypasses the links on the site and entered in the browser mysite.com/results.jsp - and the action didn't run so there are no variables in the request? If every variable isn't checked for null, then the page will error out. What is the correct way to program for this?
Thanks!
So, my question, is what if the user bypasses the links on the site and entered in the browser mysite.com/results.jsp - and the action didn't run so there are no variables in the request? If every variable isn't checked for null, then the page will error out. What is the correct way to program for this?
Thanks!