Hi all,
I want to say first of all that I'm a beginner with jsp.

Now I explain my issue:
I have a page (called A) where I want to execute some code if user come from page B and other code if user came from page C.

How could I do it? What kind of tags or bean are better to do this?

Thanks

Recommended Answers

All 3 Replies

don't put business logic in your JSP.
Put it in a servlet instead and have that forward to a JSP for rendering the response to the client.

Ok.
May you give me just an example about the code to implement in the servlet? Just to understand what to do in my case...

Why should he if there is already existing example on top of this section. Login page -> get login details from user and forward it to servelet -> servlet does its magic and reply with appropriate reply -> next page loaded

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.