Imbedding java code in a jsp
I am trying to put imbed some java code into a jsp (setting cookie information) using a jsp include; but it doesn't seem to work. I can do it directly in a jsp file but when I use the include in a jsp file it doesn't seem to work. (and the include page is correct as I use includes for everything else but I'm thinking it's either you can't reference java code or setting cookies can't be done in an include.)
Does anyone have any ideas? or better ways to implement cookies in a jsp file on a website? I'm still very new to this, any help would be greatly appreciated!
<jsp:include page="cookie.jsp" />
The following is the contents of cookie.jsp
Cookie cookie = new Cookie("billy","password");