• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem moving from jsp to another jsp Through servlet

 
asaf shay
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have several files
index.jsp -> CouponsShortList.jsp
CouponsShortList.jsp -> SpecificCupon.jsp

Arrow indicates which page to a page I can move.
in the CouponsShortList.jsp i have link (a href) to go to the other jsp file)
the problem :
If I try to go that route : index -> CouponsShortList.jsp -> SpecificCupon.jsp . it goes to the servlet every time.
but if i load the page CouponsShortList.jsp from favorite it goes to servlet but if i try to move to SpecificCupon.jsp it goes direct to the jsp file and not Through servlet .

Means that there are two ways to get to a particular page but once moving Through the servlet and the other one not .
Does anyone have any idea what could be the problem? Thanks in advance
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I try to go that route : index -> CouponsShortList.jsp -> SpecificCupon.jsp . it goes to the servlet every time.
but if i load the page CouponsShortList.jsp from favorite it goes to servlet but if i try to move to SpecificCupon.jsp it goes direct to the jsp file and not Through servlet .


"the servlet" - what servlet?

Is this a servlet you wrote? Some other servlet?

"move to" - how move to? are you talking about clicking a link on an HTML page or doing some sort of redirect in the servlet

Bill
 
asaf shay
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1)i have servlet that i didn't I mentioned his name .

2)"move to" it mean like you said pressing on link .

i solve the problem , insted of the Regular Link - "<a href=showSpecificCoupon.jsp?id="+value.getId()+">"
i now wrote the link with the servlet name before - "<a href=../WebstoreController/showSpecificCoupon.jsp?id="+value.getId()+">"
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. For clean separation of concerns, you usually want to route through your controller/servlet, rather than going directly to another view from one view.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!