after i open very first time website its show error such as this

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
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:130)
    org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:107)
    org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:78)
    org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:383)

root cause

java.lang.NullPointerException
    org.apache.jsp.index_jsp._jspService(index_jsp.java:73)
    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:331)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:130)
    org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:107)
    org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:78)
    org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:383)

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

but when i refresh then site will open perfectly but when u leave idle sometime then if u open next then also same error next if u refresh then site open perfect this is actually the problem, its using in entire application in almost any page.

java.lang.NullPointerException org.apache.jsp.index_jsp._jspService(index_jsp.java:73)

Visit the Tomcat /work/Catalina/localhost folder, then open the folder matching the webapp context title, then open /org/apache/jsp/index_jsp.java file and browse line 73. Backtrack this line for your own original index.jsp file within the web root and connect it accordingly.

Or maybe the specific code line is definitely to become backtracked for your own code and it is thus specific towards the servletcontainer's own JspServlet, then it is likely a bug or misconfiguration. Improve your question to incorporate it to ensure that we can help you further with this particular. Be sure to mention the precise Tomcat version.