aspose file tools*
The moose likes Servlets and the fly likes JSP and javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP and javascript" Watch "JSP and javascript" New topic
Author

JSP and javascript

vasudevan gopalan
Greenhorn

Joined: Jul 09, 2000
Posts: 7
Is it possible to write JSP inside javascript ? If so tell me with an example?
chanoch wiggers
Author
Ranch Hand

Joined: May 24, 2001
Posts: 245
I am not quite sure what you mean by this. Do you mean, can you create javascript dynamically using JSP scriptlets?
if so then yes. Here is an example I use. I have a function that preloads images but I want to determine the images to preload dynamically. I therefore add the list to the function call parameters using jsp. (real code not used, am paraphrasing here)
<SCRIPT>
imagePreloader(<%=imageListToLoad%> )
</SCRIPT>


chanoch<p><a href="http://www.amazon.com/exec/obidos/ASIN/1861007736/" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a></p>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP and javascript