wood burning stoves 2.0*
The moose likes Servlets and the fly likes static and dynamic includes HELP PLEASE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "static and dynamic includes HELP PLEASE" Watch "static and dynamic includes HELP PLEASE" New topic
Author

static and dynamic includes HELP PLEASE

mary sarami
Greenhorn

Joined: Feb 11, 2001
Posts: 25
I have the following working in Tomcat and JRun, no problems works great everytime.
Then I tested it on a OS/390 system, which is where it will reside, and I am having problems.
The following is the code I am using:
String agent = request.getRemoteAddr();
// unknown clients will be internet users
String incFile = "/text/head2.html";
if ( agent != null ) {
if ( agent.length() < 1 ) {
// return content for Internet Users
incFile = "/text/head2.html";
} else if ( agent.startsWith("198.103.") | | agent.startsWith("205.192.")) {
//return content for GNET browsers
incFile = "/text/head1.html";
}
}
%>
<%-- dynamically include the file --%>
<jsp:include page="<%= incFile %>" flush="true"></jsp:include>
- on OS/390 the following works separately - but the above code does not work
<jsp:include page="/text/head1.html" flush="true"/>
<jsp:forward page="/text/head2.html"/>
I get the following message:
An error has occured while processing request:http://mvsc:8003/pbdev/m005-calculator-e.jsp
Message: Server caught unhandled exception from servlet [jsp]: Bad file argument to include
Any suggestions?
Is it possible that the file can't be found?
Is there a way to test for test?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: static and dynamic includes HELP PLEASE