• Post Reply Bookmark Topic Watch Topic
  • New Topic

Validation for user, email and password doesn't works  RSS feed

 
Aoi Region
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys, I having problem on validating email and password whether does it belongs to a registered members or not. I'm using NetBeans and created a database, table name as members. I have done setting up connection pool and fill in data to my members table. After implementing the code, solves error and watched a few videos about NetBeans tutorial, I still can't figure it out where I miss out.
Stuck there for 4 days already and kinda lost now.
Hope you guys could help me out with it, thanks in advance.

This is my members table data
#|id|email|password|name
1|1|what@what.com|what|Number 1
2|2|fireup@fire.com|fire|Number 2

This is my index.jsp

This is the code for my LoginServlet

This is the GlassFish Server log I been getting
Info: WEB0671: Loading application [Project] at [/Project]
Info: Project was successfully deployed in 286 milliseconds.
Info: WEB0671: Loading application [Project] at [/Project]
Info: Project was successfully deployed in 247 milliseconds.
Info: Invalid User, Password or Email
Info: Invalid User, Password or Email
Warning: StandardWrapperValve[org.jedlibrary.lola.loan.ValidationServlet]: PWC1406: Servlet.service() for servlet org.jedlibrary.lola.loan.ValidationServlet threw exception
java.lang.IllegalStateException
at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:524)
at org.jedlibrary.lola.loan.ValidationServlet.doPost(ValidationServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:688)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1550)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:281)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:331)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
at com.sun.enterprise.v3.services.impl.ContainerMapper$AdapterCallable.call(ContainerMapper.java:317)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:745)
 
Rob Spoor
Sheriff
Posts: 20903
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpServletResponse.sendRedirect can throw an IllegalStateException
If the response was committed or if a partial URL is given and cannot be converted into a valid URL

Especially make sure that no content was written to the response yet.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!