每访问调用一次接口,数值就加一

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/zZoOoOJaVa/article/details/88242349

首先写一个全局类Num,里面定义一个静态变量num

public class Num {
    public static int num=0;
}

 

在接口中使用时: int num=Num.num;

                             ++Num.num;

这样就可以了。

展开阅读全文

一加页面就出错

09-02

HTTP Status 500 - rnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnorg.apache.jasper.JasperException: Exception in JSP: /form/email.jsp:37rnrn34: file :rn35: rn36: rn37: rn38: rn39: rn40: rnrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:467)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn com.mypack.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:37)rnrnrnroot cause rnrnjavax.servlet.ServletException: No getter method for property file of bean org.apache.struts.taglib.html.BEANrn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)rn org.apache.jsp.form.email_jsp._jspService(email_jsp.java:85)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn com.mypack.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:37)rnrnrnroot cause rnrnjavax.servlet.jsp.JspException: No getter method for property file of bean org.apache.struts.taglib.html.BEANrn org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:973)rn org.apache.struts.taglib.html.BaseFieldTag.prepareValue(BaseFieldTag.java:121)rn org.apache.struts.taglib.html.BaseFieldTag.renderInputElement(BaseFieldTag.java:102)rn org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:81)rn org.apache.jsp.form.email_jsp._jspx_meth_html_005ffile_005f0(email_jsp.java:222)rn org.apache.jsp.form.email_jsp._jspx_meth_html_005fform_005f0(email_jsp.java:137)rn org.apache.jsp.form.email_jsp._jspService(email_jsp.java:74)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn com.mypack.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:37)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.rnrnrn--------------------------------------------------------------------------------rnrnApache Tomcat/5.5.23 论坛

没有更多推荐了,返回首页