• Post Reply Bookmark Topic Watch Topic
  • New Topic

static and dynamic includes HELP PLEASE  RSS feed

Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!