【问题标题】:linking one jsp page to another jsp page将一个jsp页面链接到另一个jsp页面
【发布时间】:2013-12-13 21:48:59
【问题描述】:

这是一个非常简单的问题,但作为一个新手...

我有两个文件:login.jsp 和 report.jsp 它们都在同一个 WebContent 文件夹中。

我想要一个关于report.jsp 的链接,点击它后,我会转到login.jsp

页面的jsp部分如下:

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...

谢谢你,

非常感谢

【问题讨论】:

    标签: java html jsp servlets anchor


    【解决方案1】:

    尝试输入您的文件夹名称:

    out.print("<a href='/foldername/login.jsp'>Click here to go to login page</a>");
    

    【讨论】:

    • 我真傻。当然... out.print 可以发送html代码...谢谢!
    猜你喜欢
    • 2013-02-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-30
    • 1970-01-01
    • 2014-06-24
    • 1970-01-01
    • 2017-05-26
    相关资源
    最近更新 更多