Hi all,
Can anyone guide me how to create JSP page on condition. I'm trying to call two different .jsp pages in one index.html page. I tried different conditions to achieve this bt did not succesed. Kindly help me. Its urgent.
Hi all,
Can anyone guide me how to create JSP page on condition. I'm trying to call two different .jsp pages in one index.html page. I tried different conditions to achieve this bt did not succesed. Kindly help me. Its urgent.
Jump to Poststart with a index.jsp page, instead of a .html page. html is static, not dynamic.
then, in the servlet of your action, choose, based on the conditions you pass, what url to go to.
start with a index.jsp page, instead of a .html page. html is static, not dynamic.
then, in the servlet of your action, choose, based on the conditions you pass, what url to go to.
You can use JSTL tag library.
Import it:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
and then you can call "if" method from taglib:
<c:choose>
<c:when test="${ok}">
...
</c:when>
<c:otherwise>
...
</c:otherwise>
</c:choose>
You have much more examples on this link.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.
You're trying to visit a URL that doesn't currently exist on the web. Most likely, a member posted a link a long time ago to a web page that has since been removed. It's also possible that there was a typo when posting the URL. We redirect you to this notice instead of stripping out the link to preserve the integrity of the post.