Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JSP link not working on first run

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my login.jsp page:



Here when I load this page for the first time the image as well as the link to another jsp with div id ="changePasswordLinkId" doesn't work. The image is not shown and clicking the anchor link displays the login page again.however if I login once and use the back button of the browser they work. Please help me on this. I will be very thankful. Thanks In advance.

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see any kind of problem in your code.

Just make sure you place your content like jsp's and images under Webcontent directory structure. It should work for you.

Thanks,
Ashwini Kashyap | www.infocepts.com
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ashwini Kashyap wrote:... under Webcontent directory structure



be aware that "Webcontent" is an Eclipse convention and is not a real folder specified by the Servlet Specification. You will not have this folder unless using eclipse. Rather, you will have a context root folder,(usually named the same as the context path, but which can be named pretty much anything.
 
Ashwini Kashyap
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are right Bear :-)

Thanks,
Ashwini
 
Whip out those weird instruments of science and probe away! I think it's a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic