Hey

Is it possible to run a Java Servlet that loads a .html page that has a bunch of JS scripts in it? I know how to load a normal .html page (I believe it is correct) but not sure if it works if it has Javascript as well.

Thanks.

sure ...
there's no reason why you can't use JavaServlets and JavaScript in combination, but, if the Servlet is only supposed to 'load' the html page (when working with Servlets, I think .jsp files might be better, in case you want to pass information on from the servlet to the page), why use the servlet at all?

sure ...
there's no reason why you can't use JavaServlets and JavaScript in combination, but, if the Servlet is only supposed to 'load' the html page (when working with Servlets, I think .jsp files might be better, in case you want to pass information on from the servlet to the page), why use the servlet at all?

I miswrote my post gr...

I ment load the scripts with their functions and variables.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.