3
Contributors
5
Replies
24
Views
4 Years
Discussion Span
Last Post by anisha.silva
0

I'm not gonna download files.

But You can do this:

request.getRequestDispatcher("../folder/index.jsp").forward(request, response);

Regarding about drop down box that's pretty interesting you can try this:

@WebServlet("customer")
public class customer extends HttpServlet {

@EJB
private customer service;

@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    List<customer> customer = service.list();
    request.setAttribute("customer", customer);
    request.getRequestDispatcher("../folder/index.jsp").forward(request, response);
}
}
0

do i include the

    request.getRequestDispatcher("../folder/index.jsp").forward(request, response);

in the servlet?

but how do i call a servlet from a jsp page link

<td><a href="Vehicle.jsp"><strong>Vehicle</strong></a>   
0

find the <url_pattern> tag value of your servlet in the web.xml and provide that value/path in the href='your_servlet' tag as shown bellow

<a href="url_pattern_of_your_servlet"><strong>Vehicle</strong></a>

let me know status as well as if you have any doubt in my clarification

happy coding

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.