hi,Vilish, I try on Tomcat6 and revised web.xml and head.jsp,it still don't bring me nothing from included file,can you post your translated Contact_jsp.java on tomcat\work\Catalina\localhost\IncludeTest\org\apache\jsp,here is mine,please compare the code in bold.
vitesse, I think I know the answer to your problem. The container is not able to find your file to include. I have a theory why.
I believe your header file has an extension in the filename that Windows is not displaying (or you are not noticing). Browse to your directory that contains the header file. Each file in the directory should say the file type in addition to the name. It could say "JSP File", "JSPF File", "Text Document", "Rich Text Format", or another type. If your type says "Text Document" then your file is really named something like header1.jspf.txt even though it looks like header1.jspf - which would explain why the container can't find the file.
By the way, your original posted code works great on my machine (aside from me not having a copy of that image) and I'm using Tomcat 5.
Someone said the servlet mapping is pointless but it is not pointless in Tomcat I don't think. I believe Tomcat doesn't understand the .jspf extension convention and that mapping can be added to the web.xml to make it treat jspf files like a jsp.
thanks for reply, I checked file extension,it's fine,I restarted server,reload the app from tomcat manager,delete IE temp file,restarted IE,access this app from remote,it's still not working,anybody help check the code: Contact.jsp:
marc,thanks for reply, I have two file Contact.jsp and Header.jsp(I change back to from jspf to jsp) in app root,and web.xml in WEB-INF,I checked translated code and class file,there are two java code files(Contact_jsp.java and Header_jsp.java) and two class files(Contact_jsp.class and Header_jsp.class).only two files,they are in same directory and both are translated and compiled,how could it can't find header file,I think maybe something wrong with my container setup.but no clues with this?