FrostyGirl
asked on
JSP NullPointer Error
Hi,
I'm pretty new to JSP troubleshooting. I'm receiving the following error. Any ideas?
I'm pretty new to JSP troubleshooting. I'm receiving the following error. Any ideas?
exception
org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException
com.monumental.trampoline.utilities.forms.multipart.MultipartRequest.getFile(MultipartRequest.java:72)
org.apache.jsp.admin.productfamilies.process_005fnavigation_jsp._jspService(process_005fnavigation_jsp.java:199)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
ASKER
Hi... thanks for your help. Code is below:
<%@ page language="java" %>
<%@ page import="com.vlm.productfamilies.*" %>
<%@ page import="com.vlm.producttypes.*" %>
<%@ page import="com.monumental.trampoline.security.*" %>
<%@ page import="com.monumental.trampoline.component.*" %>
<jsp:useBean id="dbResources" class="com.monumental.datasources.rdbms.DbResources" />
<jsp:useBean id="userbean" class="com.monumental.trampoline.security.UserBean"/>
<% userbean.init(pageContext); %>
<% User user = userbean.getUser(); %>
<% userbean.onlyUsers( "../reload.jsp"); %>
<% CompProperties props = new CompProperties(); %>
<% boolean htmlHelp = userbean.getUser().getHtmlHelp(); %>
<%
int contid = 0;
if(request.getParameter(ProductFamily.PARAM)!=null) {
contid = Integer.parseInt(request.getParameter(ProductFamily.PARAM));
}
ProductFamilyController control = new ProductFamilyController(dbResources,props.getAdminConfiguration());
ProductFamily content = (ProductFamily)control.get(contid);
boolean add = false;
Permission permission = new Permission();
if( user.getGroup().hasData() ) {
permission = user.getGroup().getPermission( new ProductFamily() );
}
if(permission.getAdd()) {
add = true;
}
boolean edit = false;
if(content.isNew() && content.getUserId()==user.getId()) {
edit = true;
} else if(content.getLockedBy()==user.getId() ) {
edit = true;
}
SpecGroupController sgControl = new SpecGroupController(dbResources, props.getAdminConfiguration());
SpecificationController specControl = new SpecificationController(dbResources, props.getAdminConfiguration());
OptionController optionControl = new OptionController(dbResources, props.getAdminConfiguration());
TypeGroupLinkController linkControl = new TypeGroupLinkController(dbResources, props.getAdminConfiguration());
SpecAnswerController answerControl = new SpecAnswerController(dbResources, props.getAdminConfiguration());
CompEntities allSpecGroups = linkControl.getByType(content.getTypeId());
%>
<% int userid = userbean.getUser().getId(); %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<title></title>
<style type="text/css">
@import url(../common/main.css);
@import url(../common/vlm.css);
</style>
</head>
<body>
<div id="bodycontent">
<% if(content.getId()==0) { %>
<p>No Content Exists With Content Id: <%= contid %></p>
<% } else { %>
<script language="javascript">parent.header.menuOn('specs',<%= contid %>,"<%= content.getTitle() %>");</script>
<% int tabindex = 1; %>
<div class="fieldsetholder">
<fieldset>
<legend>edit product family <%= content.getTitle() %></legend>
<% while(allSpecGroups.hasNext())
{
TypeGroupLink thisGroup = (TypeGroupLink)allSpecGroups.next();
SpecGroup justTitle = (SpecGroup)sgControl.get(thisGroup.getGroupId());
CompEntities allSpecs = specControl.getByLinkId(thisGroup.getId());
%>
<h2><%= justTitle.getTitle() %></h2>
<table>
<% while(allSpecs.hasNext())
{
Specification spec = (Specification)allSpecs.next();
SpecAnswer answer = (SpecAnswer)answerControl.getByFamilyIdAndSpecId(contid, spec.getId());
%>
<tr>
<td>
<form method="post" action="process_specs.jsp">
<label for="<%= Specification.TITLE_COLUMN %>"><%= spec.getTitle() %></label>
</td>
<% if(spec.getSelectType().equals(Specification.whichSelect[0]))
{ %>
<td>
<input type="text" name="<%= SpecAnswer.VALUE_COLUMN %>" <% if(answer.hasData()) { %> value="<%= answer.getValue() %>" <% } %>/>
</td>
<% }
else
{ %>
<td>
<select name="<%= SpecAnswer.VALUE_COLUMN %>">
<% Option option = new Option();
CompEntities allOptions = optionControl.getBySpecId(spec.getId());
while(allOptions.hasNext())
{
option = (Option)allOptions.next();
%>
<option value="<%= option.getValue() %>" <% if(answer.hasData() && answer.getValue().equals(option.getValue())) { %> selected="selected" <% } %>><%= option.getTitle() %></option>
<% } %>
</select>
</td>
<% } %>
<% if(answer.hasData())
{ %>
<td>
<input type="hidden" name="action" value="update_spec" />
<input type="hidden" name="answer_id" value="<%= answer.getId() %>" />
<input type="submit" value="update spec" />
<input type="hidden" name="family_id" value="<%= contid %>" />
<input type="hidden" name="spec_id" value="<%= spec.getId() %>" />
</form>
</td>
<td>
<form method="post" action="process_specs.jsp">
<input type="hidden" name="action" value="delete_spec" />
<input type="hidden" name="answer_id" value="<%= answer.getId() %>" />
<input type="submit" value="Delete Spec" />
<input type="hidden" name="family_id" value="<%= contid %>" />
<input type="hidden" name="spec_id" value="<%= spec.getId() %>" />
</form>
</td>
<% }
else
{ %>
<td>
<input type="hidden" name="action" value="add_spec" />
<input type="submit" value="add spec" />
<input type="hidden" name="family_id" value="<%= contid %>" />
<input type="hidden" name="spec_id" value="<%= spec.getId() %>" />
</form>
</td>
<% } %>
</tr>
<% } %>
</table>
<% } %>
</fieldset>
</div>
<% } %>
</div>
</body>
</html>
<% dbResources.close(); %>
I believe, this is not the jsp which is getting error ?
do you have some jsp called "process_005fnavigation.js p" ?
do you have some jsp called "process_005fnavigation.js
ASKER
I have a page called process_navigation.jsp... code below:
<%@ page language="java" %>
<%@ page import="com.monumental.trampoline.component.*" %>
<%@ page import="com.monumental.trampoline.navigation.*" %>
<%@ page import="com.monumental.trampoline.security.*" %>
<%@ page import="com.vlm.productfamilies.*" %>
<%@ page import="com.monumental.trampoline.utilities.forms.multipart.*" %>
<%@ page import="java.io.*" %>
<jsp:useBean id="dbResources" class="com.monumental.datasources.rdbms.DbResources" />
<jsp:useBean id="userbean" class="com.monumental.trampoline.security.UserBean" />
<% userbean.init(pageContext, dbResources); %>
<% userbean.onlyUsers( "/trampoline/admin/reload.jsp"); %>
<% User user = userbean.getUser(); %>
<% CompProperties props = new CompProperties(); %>
<%
ProductFamilyNavigationController navcontrol = new ProductFamilyNavigationController(dbResources,props.getAdminConfiguration());
ProductFamilyNavigation navigation = new ProductFamilyNavigation();
navigation.clearData();
String action = request.getParameter("action");
String redirect = request.getHeader("referer");
String onlypages = request.getParameter("only");
MultipartRequest multipart = null;
String basePath = pageContext.getServletContext().getRealPath("/");
int contid = 0;
if (request.getParameter("action")==null) {
String uploadDir = basePath + navigation.getComponentUploadDirectory() + "/" + user.getId();
File createDir = new File(uploadDir);
if(!createDir.exists()) {
createDir.mkdirs();
}
multipart = new MultipartRequest(request,uploadDir,105242880);
action = multipart.getParameter("action");
if(multipart.getParameter(ProductFamilyNavigation.PARAM)!=null) {
contid = Integer.parseInt(multipart.getParameter(ProductFamilyNavigation.PARAM));
}
} else {
if(request.getParameter(ProductFamilyNavigation.PARAM)!=null) {
contid = Integer.parseInt(request.getParameter(ProductFamilyNavigation.PARAM));
}
}
if (action!=null && action.equals("add")) {
navigation.setParentId(Integer.parseInt(multipart.getParameter(ProductFamilyNavigation.PARENT_ID_COLUMN)));
navigation.setName(multipart.getParameter(ProductFamilyNavigation.NAME_COLUMN));
navigation.setDescription(multipart.getParameter(ProductFamilyNavigation.DESCRIPTION_COLUMN));
int myId = navcontrol.addNavigation(navigation);
navigation.setId(myId);
//Do some file uploading here for the picture
File upload = multipart.getFile(ProductFamilyNavigation.PICTURE_COLUMN);
if(upload != null)
{
String newName = upload.getName().replace(' ','_');
navcontrol.deleteFileFromContentDirectory(basePath, navigation, navigation.getPicture());
boolean success = navcontrol.saveFileToContentDirectory(upload, basePath, navigation, newName,true);
upload.delete();
navigation.setPicture(newName);
}
//Do some file uploading here for the picture
upload = multipart.getFile(ProductFamilyNavigation.ROLLOVER_COLUMN);
if(upload != null) {
String newName = upload.getName().replace(' ','_');
navcontrol.deleteFileFromContentDirectory(basePath, navigation, navigation.getRollOver());
boolean success = navcontrol.saveFileToContentDirectory(upload, basePath, navigation, newName,true);
upload.delete();
navigation.setRollOver(newName);
}
navcontrol.updateNavigation(navigation);
}
if (action!=null && action.equals("status")) {
navigation.setId(Integer.parseInt(request.getParameter(ProductFamilyNavigation.PARAM)));
if( request.getParameter(ProductFamilyNavigation.STATUS_COLUMN).equals("active") ) {
navigation.setActive(true);
} else {
navigation.setActive(false);
}
navcontrol.updateNavigation(navigation);
}
if (action!=null && action.equals("location")) {
navigation.setId(Integer.parseInt(request.getParameter(ProductFamilyNavigation.PARAM)));
navigation.setParentId(Integer.parseInt(request.getParameter(ProductFamilyNavigation.PARENT_ID_COLUMN)));
navigation.setPosition(1);
navcontrol.updateNavigation(navigation);
navcontrol.setNavigationPosition(navigation);
if(onlypages != null) {
redirect = "navigation.jsp?" + ProductFamilyNavigation.PARAM + "=" + navigation.getParentId() + "&only=pages";
} else {
redirect = "navigation.jsp?" + ProductFamilyNavigation.PARAM + "=" + navigation.getParentId();
}
}
if (action!=null && action.equals("order")) {
navigation.setId(Integer.parseInt(request.getParameter(ProductFamilyNavigation.PARAM)));
navigation.setPosition(Integer.parseInt(request.getParameter(ProductFamilyNavigation.POSITION_COLUMN)));
navcontrol.setNavigationPosition(navigation);
}
if (action!=null && action.equals("edit")) {
navigation.setId(Integer.parseInt(multipart.getParameter(ProductFamilyNavigation.PARAM)));
navigation.setName(multipart.getParameter(ProductFamilyNavigation.NAME_COLUMN));
navigation.setDescription(multipart.getParameter(ProductFamilyNavigation.DESCRIPTION_COLUMN));
File upload = multipart.getFile(ProductFamilyNavigation.PICTURE_COLUMN);
if(upload != null)
{
String newName = upload.getName().replace(' ','_');
navcontrol.deleteFileFromContentDirectory(basePath, navigation, navigation.getPicture());
boolean success = navcontrol.saveFileToContentDirectory(upload, basePath, navigation, newName,true);
upload.delete();
navigation.setPicture(newName);
}
//Do some file uploading here for the picture
upload = multipart.getFile(ProductFamilyNavigation.ROLLOVER_COLUMN);
if(upload != null) {
String newName = upload.getName().replace(' ','_');
navcontrol.deleteFileFromContentDirectory(basePath, navigation, navigation.getRollOver());
boolean success = navcontrol.saveFileToContentDirectory(upload, basePath, navigation, newName,true);
upload.delete();
navigation.setRollOver(newName);
}
navcontrol.updateNavigation(navigation);
}
if (action!=null && action.equals("link")) {
navigation.setId(Integer.parseInt(request.getParameter(ProductFamilyNavigation.PARAM)));
navigation.setReferenceId(Integer.parseInt(request.getParameter(ProductFamilyNavigation.REFERENCE_ID_COLUMN)));
navcontrol.updateNavigation(navigation);
}
/*
if (action!=null && action.equals("template")) {
navigation.setId(Integer.parseInt(request.getParameter(ProductFamilyNavigation.PARAM)));
navigation.setTemplateId(Integer.parseInt(request.getParameter(ProductFamilyNavigation.TEMPLATE_ID_COLUMN)));
//navigation.setContentTemplateId(Integer.parseInt(request.getParameter(ProductFamilyNavigation.CONTENT_TEMPLATE_ID_COLUMN)));
navcontrol.updateNavigation(navigation);
}
*/
if (action!=null && action.equals("delete")) {
navigation.setId(Integer.parseInt(request.getParameter(ProductFamilyNavigation.PARAM)));
ProductFamilyNavigationContent navContent;
//delete page navigation
navContent = new com.vlm.productfamilies.ProductFamilyNavigationContent();
navContent.setNavigationId(navigation.getId());
navcontrol.deleteNavigationContentByNavigation(navContent);
navcontrol.deleteNavigation(navigation.getId());
redirect = "navigation.jsp";
}
ProductFamilyNavigationCacheBean cache = new ProductFamilyNavigationCacheBean();
cache.init( pageContext, dbResources );
cache.resetCache();
dbResources.close();
response.sendRedirect(redirect);
%>
Here is the problem in your jsp.
You create object of multipart object inside an if condition "if (request.getParameter("act ion")==nul l) {"
And you access multipart object in another if condition "if (action!=null && action.equals("add")) {"
Both conflict with each other, hence null pointer exception.
You create object of multipart object inside an if condition "if (request.getParameter("act
And you access multipart object in another if condition "if (action!=null && action.equals("add")) {"
Both conflict with each other, hence null pointer exception.
ASKER
How can I fix?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That made 1 error go away but then another appear. I can 'accept as solution' and open a new question if you can continue to help?
What error you are getting ?
ASKER
The page is now displaying information about the navigation item. When I click 'edit this navigation item,'' a new navigation bar temporarily appears, then disappears. this 'nav bar' needs to remain. Also, if I'm fast enough to scroll up to the 'spawned nav bar' before it disappears, and I click on status (status of the item) it reports:
No Content Exists With Content Id: 0
If I click on ''details" (another nav choice from the 'spawned nav bar')', which takes you to a different page, I receive this error:
org.apache.jasper.JasperEx ception
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 72)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:292)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:236)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
root cause
java.lang.NullPointerExcep tion
org.apache.jsp.admin.produ ctfamilies .navigatio n_005fdeta ils_jsp._j spService( navigation _005fdetai ls_jsp.jav a:86)
org.apache.jasper.runtime. HttpJspBas e.service( HttpJspBas e.java:94)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
org.apache.jasper.servlet. JspServlet Wrapper.se rvice(JspS ervletWrap per.java:3 24)
org.apache.jasper.servlet. JspServlet .serviceJs pFile(JspS ervlet.jav a:292)
org.apache.jasper.servlet. JspServlet .service(J spServlet. java:236)
javax.servlet.http.HttpSer vlet.servi ce(HttpSer vlet.java: 802)
No Content Exists With Content Id: 0
If I click on ''details" (another nav choice from the 'spawned nav bar')', which takes you to a different page, I receive this error:
org.apache.jasper.JasperEx
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
root cause
java.lang.NullPointerExcep
org.apache.jsp.admin.produ
org.apache.jasper.runtime.
javax.servlet.http.HttpSer
org.apache.jasper.servlet.
org.apache.jasper.servlet.
org.apache.jasper.servlet.
javax.servlet.http.HttpSer
looks like you have similar kind of error in navigation_details.jsp
ASKER
Code for the ...details.jsp page below:
<%@ page language="java" %>
<%@ page import="com.monumental.trampoline.component.*" %>
<%@ page import="com.monumental.trampoline.component.rdbms.*" %>
<%@ page import="com.monumental.trampoline.navigation.*" %>
<%@ page import="com.monumental.trampoline.content.*" %>
<%@ page import="com.monumental.trampoline.security.*" %>
<%@ page import="com.vlm.productfamilies.*" %>
<jsp:useBean id="dbResources" class="com.monumental.datasources.rdbms.DbResources" />
<jsp:useBean id="userbean" class="com.monumental.trampoline.security.UserBean" />
<jsp:useBean id="catbean" class="com.vlm.productfamilies.ProductFamilyNavigationCacheBean" />
<% userbean.init(pageContext, dbResources); %>
<% userbean.onlyUsers( "../reload.jsp"); %>
<% CompProperties props = new CompProperties(); %>
<%
boolean edit = true;
Permission permission = new Permission();
User user = userbean.getUser();
if( user.getGroup().hasData() ) {
permission = user.getGroup().getPermission( new Navigation() );
}
if(permission.getEdit()) {
edit = true;
}
%>
<%
catbean.init(pageContext, dbResources);
ProductFamilyNavigationCache catcache = catbean.getCache();
CompEntities navigations = catcache.getTree();
CompEntities tree;
ProductFamilyNavigation tempNav;
ProductFamilyNavigation navigation = catcache.getNavigation(Integer.parseInt(request.getParameter(Navigation.PARAM)));
TemplateCache tempcache = new TemplateCache(dbResources,props.getAdminConfiguration());
TemplateController tempcontrol = new TemplateController(dbResources,props.getAdminConfiguration());
CompEntities templates2 = tempcontrol.getTemplates( true );
Template template;
CompEntities templates = new CompEntities();
while(templates2.hasNext()) {
template = (Template)templates2.next();
template = (Template)tempcache.getTemplate(template.getId());
templates.add(template);
}
dbResources.close();
%>
<% boolean onlypages = false; %>
<% if(request.getParameter("only") != null) {
onlypages = true;
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" />
<title></title>
<style type="text/css">
@import url(../common/main.css);
</style>
</head>
<body>
<div id="bodycontent">
<% if(!onlypages) { %>
<script language="javascript">parent.header.location.href = 'header.jsp';</script>
<% } %>
<% int tabindex = 1; %>
<h1 id="navigationdetailssheader">navigation details</h1>
<form method="post" action="process_navigation.jsp" class="miscform" enctype="multipart/form-data">
<fieldset>
<legend>general information</legend>
<label for="<%= Navigation.NAME_COLUMN %>">name:</label>
<input type="text" size="50" id="<%= Navigation.NAME_COLUMN %>" name="<%= Navigation.NAME_COLUMN %>" tabindex="<%=tabindex++%>" value="<%= navigation.getName() %>"/>
<br />
<label for="<%= ProductFamilyNavigation.DESCRIPTION_COLUMN %>">description:</label>
<textarea type="text" cols="50" rows="2" id="<%= ProductFamilyNavigation.DESCRIPTION_COLUMN %>" name="<%= ProductFamilyNavigation.DESCRIPTION_COLUMN %>" tabindex="<%=tabindex++%>" /><%= navigation.getDescription() %></textarea>
<br />
<label for="<%= ProductFamilyNavigation.PICTURE_COLUMN %>">picture:</label>
<% if((navigation.getId()!=0) && (navigation.getPicture().length() > 0))
{ %>
<input type="file" id="<%= ProductFamilyNavigation.PICTURE_COLUMN %>" name="<%= ProductFamilyNavigation.PICTURE_COLUMN %>" tabindex="<%=tabindex++%>" />
<a href="<%= request.getContextPath() %>/<%= navigation.getContentDirectory() %>/<%= navigation.getPicture() %>" target="_blank">Picture</a>
<% }
else
{ %>
<input type="file" id="<%= ProductFamilyNavigation.PICTURE_COLUMN %>" name="<%= ProductFamilyNavigation.PICTURE_COLUMN %>" tabindex="<%=tabindex++%>" />
<% } %>
<br />
<br />
<% if(onlypages) {%>
<input type="hidden" name="only" value="pages" />
<% } %>
<input type="hidden" name="<%= ProductFamilyNavigation.PARAM %>" value="<%= navigation.getId() %>" />
<input type="hidden" name="action" value="edit" />
<input class="submit" type="submit" name="submit" value="edit" tabindex="<%=tabindex++%>" />
</fieldset>
</form>
<br />
<form method="get" action="process_navigation.jsp" class="miscform">
<fieldset>
<legend>set location</legend>
<label for="<%= Navigation.PARENT_ID_COLUMN %>">location</label>
<select name="<%= Navigation.PARENT_ID_COLUMN %>" tabindex="<%=tabindex++%>">
<option value="0">Top Level</option>
<option value="<%= navigation.getParentId() %>">------------</option>
<% int insert = 0; %>
<% boolean safe = true; %>
<% while(navigations.hasNext()) { %>
<% safe = true; %>
<% tempNav = (ProductFamilyNavigation)navigations.next(); %>
<% tree = catcache.getNavigationHierarchy(tempNav); %>
<% while(tree.hasNext()) { %>
<% if( ((ProductFamilyNavigation)tree.next()).getId() == navigation.getId() ) { safe = false; break;} %>
<% } %>
<% if(safe) { %>
<% insert = tree.howMany()-1; %>
<option value="<%= tempNav.getId() %>" <% if(tempNav.getId()==navigation.getParentId()) { %>selected<% } %>><% for( int z=0; z<insert; z++ ) { %> <% } %><%= tempNav.getName() %></option>
<% } %>
<% } %>
</select>
<br />
<% if(onlypages) {%>
<input type="hidden" name="only" value="pages" />
<% } %>
<input type="hidden" name="<%= Navigation.PARAM %>" value="<%= navigation.getId() %>" />
<input type="hidden" name="action" value="location" />
<input class="submit" type="submit" value="set location" tabindex="<%=tabindex++%>"/>
</fieldset>
</form>
<br />
<form method="post" action="process_navigation.jsp" class="miscform">
<fieldset>
<legend>link to another navigation</legend>
<label for="<%= Navigation.REFERENCE_ID_COLUMN %>">navigation:</label>
<select name="<%= Navigation.REFERENCE_ID_COLUMN %>" tabindex="<%=tabindex++%>">
<option value="0">none</option>
<option value="<%= navigation.getReferenceId() %>">------------------</option>
<% while(navigations.hasNext()) { %>
<% ProductFamilyNavigation listnav = (ProductFamilyNavigation)navigations.next(); %>
<% tree = catcache.getNavigationHierarchy(listnav); %>
<% insert = tree.howMany()-1; %>
<option value="<%= listnav.getId() %>" <% if(navigation.getReferenceId()==listnav.getId()) { %>selected<% } %>><% for( int x=0; x<insert; x++ ) { %> <% } %><%= listnav.getName() %></option>
<% } %>
</select>
<br />
<% if(onlypages) {%>
<input type="hidden" name="only" value="pages" />
<% } %>
<input type="hidden" name="<%= Navigation.PARAM %>" value="<%= navigation.getId() %>" />
<input type="hidden" name="action" value="link" />
<% if(edit) { %>
<input class="submit" type="submit" value="link" tabindex="<%=tabindex++%>"/>
<% } %>
</fieldset>
</form>
<% CompEntities deleteSubs = catcache.getAllSubNavigations(navigation.getId()); %>
<% if(deleteSubs.howMany()==0) { %>
<br />
<form method="post" action="process_navigation.jsp" class="miscform">
<fieldset>
<legend>delete navigation</legend>
<label for="">delete:</label>
<input type="hidden" name="<%= Navigation.PARAM %>" value="<%= navigation.getId() %>">
<% if(onlypages) {%>
<input type="hidden" name="only" value="pages" />
<% } %>
<% if(edit) { %>
<input type="checkbox" name="action" value="delete" tabindex="<%=tabindex++%>"/>
<input type="submit" value="delete" tabindex="<%=tabindex++%>"/>
<% } %>
</fieldset>
</form>
<% } %>
<br />
<form method="post" action="navigation.jsp" class="miscform">
<fieldset>
<legend>return to navigation list</legend>
<% if(onlypages) {%>
<input type="hidden" name="only" value="pages" />
<% } %>
<input class="submit" type="submit" value="done" tabindex="<%=tabindex++%>"/>
</fieldset>
</form>
<br />
<br />
</div></body>
</html>
it is not clear from the above jsp, where exactly the error is coming.
You need to look into 86th line of navigation_005fdetails_jsp .java, to figure out what is coming as null.
You need to look into 86th line of navigation_005fdetails_jsp
ASKER
Excellent help.
Hence you are getting Null Pointer exception.
Please post your jsp, We can tell you which line the error is coming.