This week's giveaway is in the Java/Jakarta EE forum. We're giving away four copies of Java EE 8 High Performance and have Romain Manni-Bucau on-line! See servlet from another servlet. How can i implement it.
Servlet A has checkbox which post to servlet B then i want to go back to servlet A again and modify the checkbox that i selected before.
So how do i maintain the previously selected checkboxes [i want the checkbox to be checked when it reloads] ???
you should use the encodeRedirectURL() method in conjunction with sendRedirect() when redirecting to another part of your website. This must be done in order to property retain the session ID. From the JavaEE API:
All URLs sent to the HttpServletResponse.sendRedirect method should be run through this method. Otherwise, URL rewriting cannot be used with browsers which do not support cookies.
Can you also post the code that sets the attribute? If the attribute name you're using to set the attribute doesn't match the name you're using to get the attribute, then it would make sense that it's returning null.
SCJP 6 || SCWCD 5
posted 7 years ago
I have even try using forward but still its not working.
Below is the link where i was discussing the issue :