This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "To embed JSP code in html file" Watch "To embed JSP code in html file" New topic
Author

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
Sheriff

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: http://aspose.com/file-tools
 
subject: To embed JSP code in html file
 
Similar Threads
Difference between servlets and JSP
Showing HTML from another page
Need solution for a query on JSP
Jasper Report in Struts JSP
Embedding a pdf file inside a JSP