Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp

 
kreven.z
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" %>
<html>
<head>
<title>
Jsp1
</title>
</head>
<jsp:useBean id="Jsp1BeanId" scope="session" class="project2.Jsp1Bean" />
<jsp:setProperty name="Jsp1BeanId" property="*" />
<body>
<%@include file="c:\\Index.htm" %>
<h1>
JBuilder Generated JSP
</h1>
<form method="post">
<br>Enter new value : <input name="sample"><br>
<br><br>
<input type="submit" name="Submit" value="Submit">
<input type="reset" value="Reset">
<br>
Value of Bean property is :<jsp:getProperty name="Jsp1BeanId" property="sample" />
</form>
</body>
</html>
<%@include file="c:\\Index.htm" %>[I]<%
 
georgejk
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai
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
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" %>
cheers
regards
 
kreven.z
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic