0

I have some JAVA Servlets that pass some variables to JSP files, the requirement is to convert JSP files to use only HTML and JAVASCRIPT, because the files will reside on the client side so they wont get compiled if JSP is used.

JavaScript(ajax, jQuery, etc...) needs to act as a connector between the server side and the client side...

How can i access JSP variables such as ${beanName.propertyName} purely with JavaScript?

The article How to use Servlets and Ajax? almost answers this question, but it shows examples if the return type of Servlets are JSON objects, however in my case they are TEXT/HTML

Community
  • 1
  • 1
zalis
  • 1,191
  • 1
  • 11
  • 20
  • I doubt this is possible, you may reconsider the use of JSPs at all – Dici Jun 29 '15 at 01:40
  • Read this: https://en.wikipedia.org/wiki/JavaScript_templating – ControlAltDel Jun 29 '15 at 01:43
  • @Dici, well im not using JSP at all, its purly HTML pages with Javascript, however the backend is still Java Servlets that can not be changed, which means we need to access whatever it is throwing to the front end with JavaScript – zalis Jun 29 '15 at 02:03

0 Answers0