Hi all, I have a session validaion function that I would like to include in each servlet. I know the syntax to do this in jsp but how do I do it in a servlet. Also should the file just be a simple text file or a jsp file? thank you david allen
david- I do not understand your question. If you say you have the validation in your jsp, then it'll be almost the same in your servlet (assuming it's a java-validation). Also should the file just be a simple text file or a jsp file? what file?
OK my question is. What is the syntax that allows one to include a file into a servlet. Just say I have some code that is required by each servlet and I want to embed the code at the beginning of the servlet. How do I do that? Regards david
Ok here it is. In a JSP page you can can use the include directive to include the contents of a file in the jsp page. The file that you want to include may contain a function of some kind. This is all I want to do but do it in a server. I have several servlets that all require a function in them. I want to write that function in a single file then include the file in all of the servlets thus including the function. The function will validate a session that is all. Thanks david
I finally got you (I think so). the solution is what Sainudheen suggested. the include will execute the "included" file and it will return to the page from where it was called. HTH
Post by:autobot
Where does a nanny get ground to air missles? Protect this tiny ad:
a bit of art, as a gift, that will fit in a stocking