Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JSP (http://www.go4expert.com/forums/jsp/)
-   -   ServeletException in .jsp (http://www.go4expert.com/forums/serveletexception-in-jsp-t21700/)

imegha 8Apr2010 10:26

ServeletException in .jsp
 
If I click on a tab in our application [intern is a JSP page] I et an error saying " [ServletException in :/WEB-INF/pages/main/main.jsp] null' ".But in another instance the same jsp page doesn't give any error ,the page content will b displayed properly.

I wanted to know what all the reasons to cause this exception.

I hav also removed all th comments written in th jsp page .

Following is th JSP page code:

Code:

<%@ taglib uri="/tag/struts-html" prefix="html" %>
<%@ taglib uri="/tag/struts-logic" prefix="logic" %>
<%@ taglib uri="/tag/struts-bean" prefix="bean" %>
<%@ taglib uri="/tag/exxor" prefix="exxor" %>

<script language="javascript">
function submitSearch(id)
{
        document.searchResultSubmit.cancelSearch.value="false";
        document.searchResultSubmit.ID.value=id;
        document.searchResultSubmit.submit();
}
function validateSearch()
{
        if (document.searchSubmit.SEARCHVALUE.value.length < 2)
        {
                alert("Please enter atleast two characters for search");
                document.searchSubmit.SEARCHVALUE.focus();
                return false;
        }
        if (checkWildChar("searchSubmit", "SEARCHVALUE") == false) return false;
        return true;       
}
function cancelSearch()
{
        document.searchResultSubmit.cancelSearch.value="true";
        document.searchResultSubmit.submit();
}
</script>
<div align="center">
<%String resp=(String)session.getAttribute("RESPONSIBILITY");
 if("XXOR_CA_GMS".equalsIgnoreCase(resp))
 {%>
        <form name="searchSubmit" onSubmit="return validateSearch()" action="<%=request.getContextPath()%>/do/garnishor/ca/vendor/search" method="post"> 
 <%}
  else
 {%>
        <form name="searchSubmit" onSubmit="return validateSearch()" action="<%=request.getContextPath()%>/do/garnishor/vendor/search" method="post"> 
 <%}
%>
<input type="hidden" name="SORT_COLUMN" value="<%=request.getParameter("SORT_COLUMN") == null?"":request.getParameter("SORT_COLUMN")%>"/>
<input type="hidden" name="SORT_ORDER"  value="<%=request.getParameter("SORT_ORDER") == null?"":request.getParameter("SORT_ORDER")%>"/>
<input type="hidden" name="DATEFROM" value="<%=session.getAttribute("effectiveDate")%>" />
<input type="hidden" name="OPERATINGUNIT" value="<%=request.getParameter("OPERATINGUNIT") == null?"":request.getParameter("OPERATINGUNIT")%>"/>
<table>
        <tr>
        <td>
                <fieldset>
                <legend style="font-weight:bolder;font-size:14px">Vendor Search</legend>               
                <table>
                        <td>
                                <exxor:createHTMLOptions property="SEARCHCRITERIA" scope="request" propertyId="SEARCHCRITERIA" empty="false" SQLCommand="dd-vendor-search">
                                </exxor:createHTMLOptions>
                        </td>
                        <td>
                                <input type="text" name="SEARCHVALUE" size="15" maxlength="50" value="<%=request.getParameter("SEARCHVALUE") == null?"":request.getParameter("SEARCHVALUE")%>"/>
                        </td>
                        <td>
                                <input type="submit" value="Search"/>
                        </td>
                        <td>
                                <input type="button" value="Cancel" onClick="javascript:cancelSearch();"/>
                        </td>
                        </tr>
                </table>
                </fieldset>
                </td>
        </tr>
</table>
<input type="hidden" name="redirectURL" value="<%=request.getParameter("redirectURL")%>">
</form>
<script language="javascript">setFocus("searchSubmit", "SEARCHVALUE");</script>
<%if("XXOR_CA_GMS".equalsIgnoreCase(resp))
 {%>
        <form name="searchResultSubmit"  action="<%=request.getContextPath()%>/do/garnishor/ca/vendor/search/submit" method="post"> 
 <%}
  else
 {%>
        <form name="searchResultSubmit"  action="<%=request.getContextPath()%>/do/garnishor/vendor/search/submit" method="post"> 
 <%}
%>
        <input type="hidden" name="ID" />
        <input type="hidden" name="cancelSearch" />
        <input type="hidden" name="redirectURL" value="<%=request.getParameter("redirectURL")%>">
        <input type="hidden" name="OPERATINGUNIT" value="<%=request.getParameter("OPERATINGUNIT") == null?"":request.getParameter("OPERATINGUNIT")%>"/>
</form>
<% if (request.getParameter("SEARCHCRITERIA") != null && request.getParameter("SEARCHCRITERIA").length() > 0)
        {
%>
<exxor:transformer SQLCommand="sr-vendor" XSL="DBSearchList.xsl">
        <exxor:param name="form-name">searchSubmit</exxor:param>
        <exxor:param name="sort-column"><%=request.getParameter("SORT_COLUMN")%></exxor:param>
        <exxor:param name="sort-order"><%=request.getParameter("SORT_ORDER")%></exxor:param>
</exxor:transformer>
<%
        }
%>
</div>



All times are GMT +5.5. The time now is 06:43.