Wsfilter

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/7.0.55 logs. Please can any one suggest what could be going wrong.I think this is something with Tomcat setting.I have checked the JREHOME and JAVAHOME Varible in system variables. String: key USERID doesn't exist (existing keys:cfid,cftoken,originalReferrer).

  1. Wfilter Icf
  2. Wsfilter.dofilter
  3. Wdfilter
  4. Wdfilter.sys Boot Error
  5. Wfilter
  • Description copied from interface: javax.servlet.Filter Called by the web container to indicate to a filter that it is being placed into service. The servlet container calls the init method exactly once after instantiating the filter. The init method must complete successfully before the filter.
  • Struct; ErrorCode: 156 Message MacromediaSQLServer JDBC DriverSQLServerIncorrect syntax near the keyword 'and'. SQLState: HY000 StackTrace.

Wfilter Icf

Greenhorn
posted 6 years ago
  • Optional 'thank-you' note:
Wsfilter

Wsfilter.dofilter

Hi All,
I am working on creating a web app.My Login servlet has a do post code as
try {
ps = con.prepareStatement('select id from users where id=? and password=? limit 1');
ps.setString(1, id);
ps.setString(2, password);
rs = ps.executeQuery();
if(rs != null && rs.next()){
User user = new User(rs.getString('firstname'), rs.getString('lastname'), rs.getString('id'));
HttpSession session = request.getSession();
session.setAttribute('User', user);
response.sendRedirect('home.jsp');
}else{
RequestDispatcher rd = getServletContext().getRequestDispatcher('/login.jsp');
PrintWriter out= response.getWriter();
out.println('<font color=red>No user found with given id.</font>');
rd.include(request, response);
}
} catch (SQLException e) {
e.printStackTrace();
throw new ServletException('DB Connection problem.');
}finally{
try {
rs.close();
ps.close();
} catch (SQLException e) {
}
When I run the project , I get a login page and when I enter the credentials as I have in my MySQL DB, I get the below error page
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
com.ebgt.pkg.LoginServlet.doPost(LoginServlet.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
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/7.0.55 logs.
___________________________________________________________________________________________________________________________________________
Please can any one suggest what could be going wrong.I think this is something with Tomcat setting.I have checked the JRE_HOME and JAVA_HOME Varible in system variables.

Wdfilter

Wfilter
author

Wdfilter.sys Boot Error

posted 6 years ago
  • Optional 'thank-you' note:

Wfilter

It would help if you identified which line was line 98.
One possibility: if ps.executeQuery() threw an exception, then 'rs.close()' in the finally block would get an NPE.