Skip to content
Advertisement

JSP input comes null to servlet

I’m trying to pass parameter to jsp to servlet. And my code is :

Server side :

JavaScript

JSP side :

JavaScript

When i run it on localhost kullanici variable comes null. Any solution ?

EDİT :

JavaScript

Advertisement

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:

JavaScript

If you are going FROM a Servlet TO a jsp then you could reuse current request attribute. You do it by settng the value directly in the . Something similar to this:

JavaScript

in your servlet. Then, in your jsp this:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement