I want to open the jsp page without accessing my servlet code. those. I do not need to enter my url in (action = "url") my jsp code and not have access to my Servlete code.
<form id="main" method="post" name="main" action="dpRegPost" onsubmit="return validate();">
Can someone help me with this?
Try the following:
<form id="main" method="post" name="main" action="" onsubmit="redirect(this);"> <input type="submit" name="submit"/> </form> function redirect(elem){ elem.setAttribute("action","somepage.jsp"); elem.submit(); }
You can also try this.
<jsp:forward page = "abc.jsp" />
javascript jsp
<script type="text/javascript"> window.location.href = "www.google.com"; </script>
jsp
<% response.sendRedirect("www.google.com"); %>
jstl taglibrary jsp. ,
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:redirect url="/xxx.jsp"/>
:
<jsp:redirect page="xyz.jsp" />
use the following code to redirect on another page in js... $('#abc_id').click(function() { updateSubContent("abc.jsp"); });
Source: https://habr.com/ru/post/1539571/More articles:Alter Stored Procedure in DB Migration EF 6 Code First - how to pass the default null value for a parameter - c #How to determine the current iPhone call level? - objective-cAttributeError: Settings object does not have the ROOT_URLCONF attribute on Heroku - pythonProblem with background button - htmlFastMM and implicit dll delay - externalViewPager getScrollX returns 0 when fragment resumes / recreates - androidread array from plist through shell script plist buddy - shellThe problem of emulating external storage in am335xevm - androidGet an array of values ββusing plistBuddy - arraysHow to execute asynchronous methods for each document returned in a mongoose request - javascriptAll Articles