File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes server encountered an internal error ;while running application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "server encountered an internal error ;while running application" Watch "server encountered an internal error ;while running application" New topic
Author

server encountered an internal error ;while running application

divya sharma
Ranch Hand

Joined: Jan 25, 2007
Posts: 87
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
divya sharma
Ranch Hand

Joined: Jan 25, 2007
Posts: 87
find the answer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: server encountered an internal error ;while running application
 
Similar Threads
Error:No valid collection specified for size tag
JspTranslate: End of content reached while more parsing required: tag nesting error?.
Missing message for key
problem with action mapping
doubt in Struts application