Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

server encountered an internal error ;while running application

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am running and application "MiniHR" on Tomcat.

but when I click on link it show me an error:

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: /search.jsp:17

14: <Font size="+1">Abc,Inc Human Resource Portal </Font>
15: <hr width="100%">
16: <html:errors/>
17: <html:form action="search">
18: <table>
19: <tr>
20: <td align="right">

root cause

javax.servlet.ServletException: Cannot retrieve definition for form bean searchForm on action search
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.search_jsp._jspService(search_jsp.java:241)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

My Struts-config.xml :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">

<struts-config>

<form-beans>
<form-bean name="searchForm" type ="com.jamesholmes.minihr.SearchForm"/>
</form-beans>


<!-- Global Forward -->
<global-forwards>
<forward name="search" path="/search.jsp"/>
</global-forwards>

<!-- Action Mapping -->
<action-mappings >
<action path ="/search"
type="com.jamesholmes.minihr.SearchAction"
name="searchForm"
scope="request"
validate ="true"
input="/search.jsp">
</action>
</action-mappings>

<message-resources parameter="com.jamesholmes.minihr.ApplicationResources" />

</struts-config>

and search.jsp

<%@ page language="java" pageEncoding="ISO-8859-1"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>


<html>
<head>
<title> Abc,Inc Human Resource Portal</title>
</head>
<body>
<Font size="+1">Abc,Inc Human Resource Portal </Font>
<hr width="100%">
<html:errors/>
<html:form action="search">
<table>
<tr>
<td align="right">
<bean:message key ="label.search.name"/>:</td>
<td><html:text property="name"/></td>
<tr>
<td align="right">
<bean:message key ="label.search.ssNum"/>:</td>
<td><html:text property="ssNum"/>(xxx-xx-xxx)</td>
</tr>

<tr>
<td> <html:submit/></td>
</tr>
</table>
</html:form>

<logic resent name="searchForm" property="results">
<hr width="100%">


<bean:size id="size" name="SearchForm" property="results"/>
<logic:equal name="size" value="0">
<center> <font color="red"><b> No Employee found</b></font></center>
</logic:equal>
<logic:greaterThan value="0" name="size">
<table border="1">
<tr>
<th> Name</th>
<th> SSN</th>
</tr>
<logic:iterate id ="result" name ="SearchForm" property="results">
<tr>
<td>
<bean:write name="results" property="name"/> </td>
<td><bean:write name="result" property="ssNum"/> </td>
</tr>
</logic:iterate>
</table>
</logic:greaterThan>

</logic resent>

</body>
</html>

Please help me to find the root cause
 
divya sharma
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
find the answer
 
Won't you be my neighbor? - Fred Rogers. tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic