问题描述:

If i have two JSP-Sites and two Java-Servlets, how can i give my Paramater from my first JSP Site to my last Servlet?

As an example:

I have a registration form were i fill in my Gender and send that to a Servlet. Based on my Gender the servlet opens another JSP-Site where i can chose a suit(for women it would open a JSP site where i can chose a dress). Now after i chose my suit i want to save the gender and the suit or dress in the database. How can i do that? Long story short i want to save a parameter over more than 1 servlet/Jsp, but if i try it loses the parameter after the first servlet.

网友答案:

Reseting the parameter in every jsp should work. If that fails, then reset the parameter in the action classes. Parameters reset every action class, so you need to reset the parameter every time.

相关阅读:
Top