html - 404 error while refreshing using jsp servlets -
hi im new in jsp/servlets, have basic question relative or abselute path: have next hierarchy, using netbeans:
web pages | |-status | |-clientrequests.jsp | |-index.jsp | |-web-inf | |-professional.jsp index.jsp , status folder , web-inf folder in root path. within status folder have clientrequests.jsp file. within web-inf folder have professional.jsp file.
in index.jsp have done dispacher professional.jsp, within professional jsp have <iframe src="status/clientsrequests.jsp"></iframe> within clientsrequests.jsp have
<% response.setheader("refresh", "5;url=../index.jsp"); %> that means every 5 sec refresh clientsrequests.jsp file, , go "controller" index.jsp. wanted every 5 min, iframe refreshed , not hole page. problem: in second refresh gives me 404.
i tried play , did ugly like:
string = (string)session.getattribute("nav"); if(a == null){ session.setattribute("nav", "aaa"); response.setheader("refresh", "5;url=../index.jsp"); }else{ response.setheader("refresh", "5;url=index.jsp"); } and working, dont want wo leave way... have suggestions? give thanks you!
somehow response setting header parent of iframe too. set below line in of clientsrequests.jsp.
<meta http-equiv="refresh" content="5"> html jsp servlets
No comments:
Post a Comment