File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes To embed JSP code in html file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "To embed JSP code in html file" Watch "To embed JSP code in html file" New topic

To embed JSP code in html file

Raj Puri
Ranch Hand

Joined: Apr 24, 2003
Posts: 189
I have an HTML file called menu.html.
Now, for some reason I want to embed a JSP code in menu.html. Seems it does not parse that. Is it right that file name needs to be .jsp to have any JSP code. I tried to include JSP code in <script language="javascript"> tag hoping it will take it. This did not work also.
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

It does need to be ".jsp" or ".jspf" (jspf is for fragments that will be included in ".jsp" pages).
[ March 30, 2005: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Javasciprt is something else and JSP is something else.
You can try to change it to .jsp.
Niki Nono
Ranch Hand

Joined: Mar 20, 2005
Posts: 256
JSP stands for JAVA SERVER PAGES and it is not related to javascript in any way.
jsp gets executed on the server and html is run by ur browser. so u need to do the reverse and rename the file to .jsp and embed html in it.

Life called,so here I am.<br />Cheers<br />Niki.:-)
I agree. Here's the link:
subject: To embed JSP code in html file
It's not a secret anymore!