kishore
kishore

Reputation: 85

How to get path of servlet to include in .jsp file?

I'm trying to call a servlet in a jsp file by using the following tag to read some data sent by the servlet.

<jsp:include page="../View_Accountant.java" flush = "true" /> 

It's not working, I think the URL of servlet is wrong.

My project directory.

project directory image

Upvotes: 1

Views: 1258

Answers (2)

Anchit
Anchit

Reputation: 171

All the Project Servlet's names are stored in the web.xml file. Just take the servlet URL from there and use it instead of View_Accountant.java

Upvotes: 0

Ori Marko
Ori Marko

Reputation: 58774

jsp include page need to get as parameter a JSP file (or other file) and not the Servlet class file

The jsp:include element is processed when a JSP page is executed

Upvotes: 2

Related Questions