• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

problem moving from jsp to another jsp Through servlet

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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()+">"
 
Ranch Hand
Posts: 1514
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
please buy my thing and then I'll have more money:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic