[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 285
  • Last Modified:

one quesiton about <jsp:include>?

in one file I write as the following:
<jsp:include page = "/test.jsp">
   <jsp:param name="user" value="Jenny">
</jsp:include>,

how can I get the user in the file:test.jsp??
0
lakeryu
Asked:
lakeryu
1 Solution
 
_marko_Commented:
It should be the same way as in any .jsp


String user = (String)request.getParameter("user");


Marko
0
 
objectsCommented:
The included page has access to all objects in the request scope as well as all original request parameters.
0
 
jetballCommented:
hi lakeryu

just a note for you to consider though, do you really want to use <jsp:include /> tag which is processed at runtime, or would you rather want to use <%@ include %> tag which is prcessed at compile time...

the performance of the compile time option is much faster...
0
 
lakeryuAuthor Commented:
Thank you for your answer!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now