After much 'Topeking' (googling), I am still perplexed on my issue so i am going to describe this to the forum to see if anyone here can solve this.
I am altering a JSP page that right now just calls another page directly and sends a few parameters which looks similiar to this
Now i am adding a second link to this page which will call a servlet that will do some processing before redirecting it to the same next page, which looks similiar to this
<a href="/mypage.jsp?parm1&parm2" >my page</a>
This all works fine and as expected no problem. But now on my second page "mypage.jsp", I have a getAttribute method which I am expecting this method to return a null value the first time i hit this page and returns a vector every other time.
So i have the following code
Okay so far so good. Everything works as expected when using the (2) link myVector == null, but when using the first link (1) I get an empy undelcared Vector (myVector == ) but not a null one as i am expecting. Can anyone explain this? And what would I need to do to get around this? Thanks in advance
Vector myVector = (Vector)session.getAttribute("MyValues");
int sizeOfVector = 0;
if(myVector == null)
myVector = new Vector();
sizeOfVector = myVector.size();