• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

The requested resource is not available  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got error like this

org.apache.jasper.JasperException: An exception occurred processing [admin/addItem.jsp] at line [10]

7: </head>
8: <body>
9: <c:import url="../IventoryController?action=edit" />
10:
11: <form action="../InventoryController" method="post">
12: <table><tr><td><b>Add New Item/ Update Item</b> </td></tr></table>
13:


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:607)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)


Root Cause
javax.servlet.ServletException: javax.servlet.jsp.JspException: java.io.FileNotFoundException: The requested resource [/Inventory/admin/../IventoryController] is not available
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:664)
org.apache.jsp.admin.addItem_jsp._jspService(addItem_jsp.java:263)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:458)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)


Root Cause
java.io.FileNotFoundException: The requested resource [/Inventory/admin/../IventoryController] is not available
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:797)
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:454)
javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
org.apache.catalina.servlets.DefaultServlet.service(DefaultServlet.java:434)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:314)
org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:171)
org.apache.jsp.admin.addItem_jsp._jspx_meth_c_005fimport_005f0(addItem_jsp.java:286)
org.apache.jsp.admin.addItem_jsp._jspService(addItem_jsp.java:141)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:458)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)


Note The full stack trace of the root cause is available in the server logs.


this is my JSP FILE code :

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<c:import url="../IventoryController?action=edit" />

<form action="../InventoryController" method="post">
<table><tr><td><b>Add New Item/ Update Item</b> </td></tr></table>

<input type="hidden" name="ID" value="<c:out value="${item.itemID}"/>"/>

<table style="width:500px">

<tr>
<td style="width:150px">Item ID</td>
<td style="width:350px"><input type="text" name="itemID" value="<c:out value="${item.itemID}"/>"/></td>
</tr>

<tr>
<td style="width:150px">Item Name</td>
<td style="width:350px">
<input type="text" size="40" name="itemName" value="<c:out value="${item.itemName}"/>"/></td>
</tr>

<tr>
<td style="width:150px">Item Price</td>
<td style="width:350px">
<input type="text" size="40" name="itemPrice" value="<c:out value="${item.itemPrice}"/>"/></td>
</tr>

<tr>
<td style="width:150px"></td>
<td style="width:350px">
<select name="itemType">
<option value="">--Select--</option>
<option value="Computer" <c:if test="${item.itemType=='Computer'}"><c:out value="selected"/></c:if>>Computer</option>
<option value="Camera" <c:if test="${item.itemType=='Camera' }"><c:out value="selected"/></c:if>>Camera</option>
</select>
</td>
</tr>

<tr>
<td style="width:150px"></td>
<td style="width:350px">
<select name="itemBRand">
<option value="">--Select--</option>
<option value="Dell" <c:if test="${item.itemBrand=='Dell' }"><c:out value="selected"/></c:if>>Dell</option>
<option value="Hitachi" <c:if test="${item.itemBrand=='Hitachi' }"><c:out value="selected"/></c:if>>Hitachi</option>
</select>
</td>
</tr>

<tr>
<td style="width:150px">Item Desc.</td>
<td style="width:350px">
<textarea name="itemDesc" cols="50" rows="5">${item.itemDesc}</textarea>
</td>
</tr>

<tr>
<td style="width:150px"></td>
<td style="width:350px">
<select name="itemStatus">
<option value="">--Select--</option>
<option value="0" <c:if test="${item.itemStatus=='0' }"><c:out value="selected"/></c:if>>Available</option>
<option value="1" <c:if test="${item.itemStatus=='1' }"><c:out value="selected"/></c:if>>Not Available</option>
</select>
</td>
</tr>

<tr>
<td style="width:150px"> </td>
<td style="width:350px">
<input type="submit" size="40" name="submit" value="Submit"/>
</td>
</tr>

</table>
</form>
</body>
</html>

hope anyone can solve this problem!!
 
Marshal
Posts: 67197
169
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using page-relative URLs is a recipe for disaster. Use server-relative URLs that start with the context path. See the JspFaq for more details.
 
Rancher
Posts: 3797
40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also double check for typos.
Are you sure your controller is called IventoryController, and not InventoryController.
 
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!