This week's book giveaway is in the Testing forum.
We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line!
See this thread for details.
  • 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

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.
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic