HTTP Status 500 - Servlet execution threw an exception 哪位大侠帮解决一下
HTTPStatus500-ServletexecutionthrewanexceptiontypeExceptionreportmessageServletexecut...
HTTP Status 500 - Servlet execution threw an exception
type Exception report
message Servlet execution threw an exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
java.lang.Error: Unresolved compilation problems:
SalaryBean cannot be resolved to a type
SalaryBean cannot be resolved to a type
Syntax error on token "Invalid Character", ; expected
The method shui(int, int) is undefined for the type Controler
servlet.Controler.doPost(Controler.java:49)
javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.18 logs.
Apache Tomcat/8.0.18
package javabean;
public class SalaryBean {
public int Shui(int start,int salary){
if(salary<start){
return 0;
}else if(salary<start+1500){
return (int)(0.03*(salary-start));
}else {
return (int)(0.1*(salary-start-1500))+45;
}
}
} 展开
type Exception report
message Servlet execution threw an exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
java.lang.Error: Unresolved compilation problems:
SalaryBean cannot be resolved to a type
SalaryBean cannot be resolved to a type
Syntax error on token "Invalid Character", ; expected
The method shui(int, int) is undefined for the type Controler
servlet.Controler.doPost(Controler.java:49)
javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.18 logs.
Apache Tomcat/8.0.18
package javabean;
public class SalaryBean {
public int Shui(int start,int salary){
if(salary<start){
return 0;
}else if(salary<start+1500){
return (int)(0.03*(salary-start));
}else {
return (int)(0.1*(salary-start-1500))+45;
}
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询