0

I am trying to deploy a simple struts application using jsp and am getting the following error when i try to deploy

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Exception in JSP: /index.jsp:15

12: <body>
13: 
14: 	<h1 align="center">MY FIRST JAVA STRUTS APPLICATION</h1>
15: 	<html:link page="/TestRun.jsp">Customer Form</html:link>
16: 	
17: </body>
18: 


Stacktrace:
	org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:489)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

root cause

java.lang.NullPointerException
	org.apache.struts.taglib.TagUtils.pageURL(TagUtils.java:1056)
	org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:448)
	org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:311)
	org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:463)
	org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:341)
	org.apache.jsp.index_jsp._jspx_meth_html_005flink_005f0(index_jsp.java:95)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:67)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.33 logs.

The corresponding jsp page is:

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="ISO-8859-1"%>


<%@ taglib uri="/WEB-INF/lib/struts-html.tld" prefix="html" %>

<html>

<head>
<title>MY FIRST JAVA STRUTS APPLICATION</title>
</head>

<body>

	<h1 align="center">MY FIRST JAVA STRUTS APPLICATION</h1>
	<html:link page="/TestRun.jsp">Test Run Application</html:link>
	
</body>

</html>

Any help would be highly appreciated...

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by jackisback13
0

Read the error message. It tells you exactly where the error is:

org.apache.jasper.JasperException: Exception in JSP: /index.jsp:15

File: index.jsp, line: 15

Also:

java.lang.NullPointerException
org.apache.struts.taglib.TagUtils.pageURL(TagUtils.java:1056)
org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:448)
org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:311)
org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:463)
org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:341)
org.apache.jsp.index_jsp._jspx_meth_html_005flink_005f0(index_jsp.java:95)
org.apache.jsp.index_jsp._jspService(index_jsp.java:67)

At that line you probably try to use something which is null

0

I have checked the line over and over again and I don't find anything wrong with it...

12: <body>
13: 
14: 	<h1 align="center">MY FIRST JAVA STRUTS APPLICATION</h1>
15: 	<html:link page="/TestRun.jsp">Customer Form</html:link>
16: 	
17: </body>

As you can see.. I am using the <html:link> tag to hyperlink 'Customer Form' to the TestRun.jsp that i have in the same folder... I fail to understand where there is something null in this statement :/

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.