This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes JSP and the fly likes jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp" Watch "jsp" New topic



Joined: Jul 28, 2002
Posts: 2
I want include a htm file into my jsp file.but it cannot find my htm file.I don't know how to include it.(I want somebody can tell me!Thinks a lot!)my program:
<%@ page contentType="text/html; charset=GBK" %>
<jsp:useBean id="Jsp1BeanId" scope="session" class="project2.Jsp1Bean" />
<jsp:setProperty name="Jsp1BeanId" property="*" />
<%@include file="c:\\Index.htm" %>
JBuilder Generated JSP
<form method="post">
<br>Enter new value : <input name="sample"><br>
<input type="submit" name="Submit" value="Submit">
<input type="reset" value="Reset">
Value of Bean property is :<jsp:getProperty name="Jsp1BeanId" property="sample" />
<%@include file="c:\\Index.htm" %>[I]<%

I am a beginner,I want a response.hehe.

Joined: Jul 29, 2002
Posts: 24
Use the name of ur JSP file instead of using c://filename. And make sure that u have copied that file to ur webserver.
Regards georgie
sandeep balyan
Ranch Hand

Joined: Jul 25, 2001
Posts: 134
Put file in u r server directory in which u r placing u r jsp
and then add this line to u r code
<%@ include file="Index.html" %>

Want to do something great will do one day

Joined: Jul 28, 2002
Posts: 2
Thank you very much!
I agree. Here's the link:
subject: jsp
It's not a secret anymore!