Skip to content

Tag: jsp

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

if else statement not working jsp

Is there anything wrong with my code? My if else statement is not working. Answer You need to use the .equals method to test for string equality. Try this instead:

Storing integer as attribute in jsp

I want to pass an Integer value as an attribute in JSP. But when i try an error is returned. Could you tell me a method to store Integer numbers as attributes in JSP? I am getting a casting error saying parseInt() is not suited for handling objects. Answer request.getAttribute returns an Object. you need to c…

NoSuchMethodError when using submitting form in Struts 2

I’m currently working through the tutorial found on the Apache Struts website. Currently, whenever I press submit on the form, or when I click the Bruce Philips hyperlink, I get a NoSuchMethodError. I’m not too sure what the issue is either and I believe I’ve included everything the tutorial…

Changing value of <c:set jstl tag

I am using the following expression on my jsp I have a condition inside a for each loop where I might want to change this variable to true. Is there a way to do this. I’ve looked everywhere but unable to find a solution. Answer Here is the sample code you are looking for: