html - Include JSP on menu item click -


i have main jsp page header , footer, while content of pages located in jsp pages. want click on menu item , load linked page via

<jsp:include page="page.jsp"> 

what do:

this index.jsp:

<header>     <ul>         <li><a href="index.jsp">index</a></li>         <li><a href="page.jsp">page</a></li>     </ul> </header>   /*dynamic content*/  <footer></footer> 

if click on second link want include page.jsp contains code central part of page

i resolved request object in way:

in jsp page:

<header> <ul>     <li><a href="?page=home">index</a></li>     <li><a href="?page=search">search</a></li> </ul> 

<%if(request.getparameter("page").equals("home")){%>     <jsp:include page="index.jsp">  <%}else %>     <jsp:include page="search.jsp"> 

that's it!


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -