Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Creating a .js file dynamically

 
sudin prans
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can a javascript file be generated dynamically in a web application using Java?Pls help.
 
Stefan Evans
Bartender
Posts: 1712
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same was as JSP generates HTML dynamically.
A javascript file is just a text file at the end of the day.

You could probably do <script language="javascript" src="myDynamicScript.jsp">
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic