Reputation: 45
This is a very simple question, but as I am a newbie...
I have two files: login.jsp and report.jsp they are both within the same WebContent folder.
I want a link on report.jsp that when clicked, will take me to login.jsp
The jsp part of the page looks like:
Connection conn = (Connection)session.getAttribute("conn"); //retrieves the connection from the session
String lot_id = request.getParameter("lotnum");
session.setAttribute("lot_id",lot_id);
out.print("Report on Lot Number: ");
out.print(request.getParameter("lotnum")+"<br>");
//<a href="login.jsp">Click here to go to login page</a>
// this is supposed to be an anchor tag linking this page to login.jsp, and where I am getting my error...
Statement sql = conn.createStatement(); //create statement using the connection
//... ... code for the rest of the page goes here...
thank you,
much appreciated
Upvotes: 3
Views: 20872
Reputation: 5092
try put your folder name:
out.print("<a href='/foldername/login.jsp'>Click here to go to login page</a>");
Upvotes: 2