Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Weblogic server error - included resource or file not found from requested resource

 
Kal Kara
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Weblogic server error - included resource or file not found from requested resource

Hi,
I am new to weblogic server and jsp. I am trying to deploy a war file in the weblogic server. Everything is working fine but i have few issues when i try to modify my url in the browser
(i.e. for example if the url is http://localhost:7001/abc.jsp and i modify it to http://localhost:7001/xyz, it should throw a 404 exception) This 404 exception is handled by my web.xml by using error code tag.
Web.xml redirects to error.jsp. That's when the problem starts. In my error.jsp I am refering to 2 other files, header.jsp and a css file. Web.xml redirects to error.jsp and the content of error.jsp comes perfect
But, for the header.jsp and css file it says "included resource or file not found from requested resource " error. I am unable to resolve this issue and make the header and styles appear in my error.jsp.
Need help for the same. Below are few snippets of the files i am using

web.xml
<error-page>
<error-code>404</error-code>
<location>/WEB-INF/jsp/error.jsp</location>
</error-page>

error.jsp
<link rel="stylesheet" type="text/css" href="styles/file.css"/>

</HEAD>

<body>
<jsp:include page="includes/header.jsp"></jsp:include>

<table width="100%" border="0" cellspacing="0" cellpadding="0">


<tr style="height:350px;">
<td class="errorMsg" valign="middle" align="center">


<c:choose>
<c:when test="${empty errorMessage}">
<center>
<font color="red" size="3">Error in the application. Please try again or Contact support central if problem persists.</font>
</center>
</c:when>

<c:otherwise>
<center>
<font color="red" size="3"><spring:message code="${errorMessage}"></spring:message></font>
</center>
</c:otherwise>
</c:choose>


</td>
</tr>

</table>

<jsp:include page="includes/footer.jsp"></jsp:include>

Structure of war file
war file
->applets
->images
->META-INF
->styles
->WEB-INF
under web-inf
->jsp(under jsp)
->includes folder(which contains header.jsp)
->error.jsp
->web.xml

Kindly help me resolve this issue. I need to get error page with header and the styles in it.
Thanks a lot in advance!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic