Skip to content

Tag: servlets

JSP input comes null to servlet

I’m trying to pass parameter to jsp to servlet. And my code is : Server side : JSP side : When i run it on localhost kullanici variable comes null. Any solution ? EDİT : Answer I think you mean that you want to go FROM a jsp TO a servlet. If that’s the case, look the action attribute: If

In Java servlet, cookie.getMaxAge() always returns -1

If I set a cookie with a setMaxAge() well into the future, when I read the cookie back into memory in a subsequent request, the getMaxAge() gives me back a -1. I have checked the actual cookie via Chrome’s settings, and inspector, and I can verify that the expiration date is indeed set 60 days in the fu…

Write and Read Cookies in different Applications

I have two applications running in Jboss, can I write a cookie in a application and read in another? For example, if I have two Servlets: – WriterCookieServlet on localhost:8080/Application1 – ReaderCookieServlet on localhost:8080/Application2 WriterCookieServlet: Then on ReaderCookieServlet I wan…

Radio Button value retrieval using servlets

I’m quite new to the process of web development, so I apoligise if this seems a really silly question. Basically, I’m creating a servlet whereby a user will answer ‘yes’ or ‘no’ to three 3 questions, and then submit the form. What I wish to do is to retrieve the value of ea…