i actually read a tutorial about servlets and i saw two different ways to include javascript in servlets.
out.println("<html><head>");
RequestDispatcher dispatcher = request.getRequestDispatcher(
"/WEB-INF/javascript/functions.js");
dispatcher.include(request, response);
out.println("<title>Client Forms</title></head><body>");
and the other possiblity:
out.println("<html><head>");
out.println("<script language="text/javascript" src="functions.js">");
...
what is the difference between using an dispatcher or including directly? what is the better solution?
thx for your advices..