<%@ t" name="description">

Redirect page

Redirect page

In this code redirect tag is not work, so please help me ,how to redirect page in Tiles With JSTL .

<%@ taglib prefix="tiles"uri="http://jakarta.apache.org/struts/tags-tiles" %> <%@ taglib prefix="c"uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> <%@page contentType="text/html" pageEncoding="UTF-8"%>

</head>
<body  text="wite">
    <center>
    <form method="post">
    <table border="0">
        <tbody align="left">
            <tr><br/>
                <td>Email ID</td>
                <td><input type="text" name="email" size="40"></td>
                <td width="60"></td>
                 <td>
                     Already a Register Member?<br/>
                    <center><input type="submit" value="Login Now" onclick="document.location.href='<c:url value="/pages/login.jsp" />';return false;"style="width:75pt; height:20pt; background:green;color:white; font-size:13pt;"></center>
                </td>
            </tr>
            <tr>
                <td valign="top">Password</td>
                <td><input type="password" name="password" size="40"><br/>  <font size="2pt">Password must be atleast 6 characters</font></td>
            </tr>
            <tr>
                <td>Confirm <br/>Password</td>
                <td><input type="password" name="con_password"  size="40"></td>
            </tr>
            <tr>
                <td>FirstName</td>
                <td><input type="text" name="fname" size="40"></td>
            </tr>
            <tr>
                <td>LastName</td>
                <td><input type="text" name="lname" size="40"></td>
            </tr>
            <tr>
                <td>Password <br/>Question</td>
                <td>
                    <select name="password_que"style="width:100%" >
                    <option> Select question</option>
                    <option value="Who was your childhood hero?"  >Who was your childhood hero?</option>
                    <option value="What is your favourite pastime?"  >What is your favourite pastime?</option>
                    <option value="What is your favourite sports?"  >What is your favourite sports?</option>
                    <option value="What is your pet name?"  >What is your pet name?</option>
                    <option value="Which  is your favourite color?"  >Which  is your favourite color?</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>Password<br/>Answer</td>
                <td><input type="text" name="password_ans" size="40"></td>
            </tr>
            <tr>
                <td>Sex</td>
                <td><input type="radio" name="sex"  value="male">M<input type="radio" name="sex" value="female">F </td>
            </tr>
            <tr>
                <td>City</td>
                <td><select name="city" style="width:100%">
                    <option >Select city</option>
                    <option value="Ahmedabad"  >Ahmedabad</option>
                    <option value="Allahabad"  >Allahabad</option>
                    <option value="Aurangabad"  >Aurangabad</option>
                    <option value="Bengalooru"  >Bengalooru</option>
                    <option value="Chandigarh"  >Chandigarh</option>
                    <option value="Chennai"  >Chennai</option>
                    <option value="Delhi"  >Delhi</option>
                    <option value="Faridabad"  >Faridabad</option>
                    <option value="Ghaziabad"  >Ghaziabad</option>
                    <option value="Gurgaon"  >Gurgaon</option>
                    <option value="Hyderabad"  >Hyderabad</option>
                    <option value="Indore"  >Indore</option>
                    <option value="Kanpur"  >Kanpur</option>
                    <option value="Kolkatta"  >Kolkatta</option>
                    <option value="Latur"  >Latur</option>
                    <option value="Lucknow"  >Lucknow</option>
                    <option value="Ludhiana"  >Ludhiana</option>
                    <option value="Mangalore"  >Mangalore</option>
                    <option value="Mumbai"  >Mumbai</option>
                    <option value="Nasik"  >Nasik</option>
                    <option value="Noida"  >Noida</option>
                    <option value="Pune"  >Pune</option>
                    <option value="Raipur"  >Raipur</option>
                    <option value="Vadodara"  >Vadodara</option>
                    </select></td>
            </tr>
            <tr>
                <td>Mobile No.</td>
                <td><input type="text" name="mobile" size="40" ></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="checkbox" name="accept" value="accept"><br/>  I accept the Terms and Conditions</td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" value="Submit"style="width:75pt; height:20pt; background:green;color:white; font-size:13pt;">    
                <input type="reset" value="Reset"style="width:75pt; height:20pt; background:green;color:white; font-size:13pt; "></td>
            </tr>

        </tbody>
    </table>
    </form>
    <c:if test="${pageContext.request.method=='POST'}">
    <c:catch var="exception">
    <sql:update dataSource="${dataSource}" var="updatedTable">
      insert into ARK.dbo.register values (?,?,?,?,?,?,?,?,?,?,?)
     <sql:param value="${param.email}"/>
     <sql:param value="${param.password}"/>
     <sql:param value="${param.con_password}"/>
     <sql:param value="${param.fname}"/>
     <sql:param value="${param.lname}"/>
     <sql:param value="${param.password_que}"/>
     <sql:param value="${param.password_ans}"/>
     <sql:param value="${param.sex}"/>
     <sql:param value="${param.city}"/>
     <sql:param value="${param.mobile}"/>
     <sql:param value="${param.accept}"/>
    </sql:update>
    <c:if test="${updatedTable>=1}">
        **<c:redirect url="/WEB-INF/File/login.jsp"/>**
    </c:if>
</c:catch>
<c:if test="${exception!=null}">
    <c:out value="Unable to insert data in database." />
</c:if>

View Answers









Related Tutorials/Questions & Answers:
Redirect page
Redirect page  In this code redirect tag is not work, so please help me ,how to redirect page in Tiles With JSTL . <%@ taglib prefix="tiles"uri.../jsp/jstl/sql" prefix="sql" %> <%@page contentType="text/html" pageEncoding
how to redirect jsp page to extjs
how to redirect jsp page to extjs   my requirement is redirect jsp page to extjs form. Am using spring mvc...my welcome page is index.jsp from that index.jsp i need to redirect to extjs. can any one help me in this thanks
Advertisements
How to redirect from a HTML page?
How to redirect from a HTML page?  Hi, Is it possible to redirect from HTML page to another page on the net? I have one page and I want to redirect... to redirect to another page using HTML code. You can use the following code: <meta
ZF Page Redirect
Redirect to another page using submit button, in ZF: It is one of the most common activity in a web application to redirect one web page to another web page. We will learn how to redirect page in Zend Framework form. As we have
Redirect to same jsp page on successful login
Redirect to same jsp page on successful login  Hi, I have an application where on successful login, the redirect should happen to same page... from the database. I am unable to create the session for the same login page
How many ways I can redirect a PHP page?
How many ways I can redirect a PHP page?   How many ways I can redirect a PHP page
How to use filter to redirect to login page after session timeout.
How to use filter to redirect to login page after session timeout.  hello Sir, I have to make a web application in which i have to give... then automatically it should redirect to login page from where user has
How to use filter to redirect to login page after session timeout.
How to use filter to redirect to login page after session timeout.  hello Sir, I have to make a web application in which i have to give... then automatically it should redirect to login page from where user has
validating username and password in servlet and redirect to login page with error message if not valid
validating username and password in servlet and redirect to login page with error message if not valid  hi i want to validate my login page username... error message saying "Invalid username and password" in my login page. please help
How to use filter to redirect to login page after session timeout
How to use filter to redirect to login page after session timeout  hello Sir, I have to make a web application in which i have to give session... then automatically it should redirect to login page from where user has to login again
Jsp redirect
can also redirect the jsp page in a jsp. Here is the code of redirect.jspADS... Jsp redirect          In this section, you will learn how to redirect
C:Redirect Tag - Struts
to the true start page of the web application. In performing the redirect, I want... approach other than c:redirect (maybe java code embedded into page I dunno...C:Redirect Tag  I am trying to use the jstl c:redirect tag
Redirect Entire Frame
, it will redirect in the trailer part. Before redirecting the page i had redirected to some...Redirect Entire Frame  Hello All:) I ve 2 frames in a html file. Say.... Any one have idea how i can redirect the entire header and trailer? What i can do
redirect to multiple links from servlet
redirect to multiple links from servlet  hello , In my servlet page... the output in browser,i need to redirect to another link like the above line. i want redirect to multiple links simultaneously. anyone help me out
send redirect in JSP - JSP-Servlet
send redirect in JSP   How can I include a message i.e "redirected to this page because blah blah" in the send redirect page?  Hi friend, Please specify your problem the message print on the redirect to the next
redirect with tiles - Struts
redirect with tiles  I have definition with three pages. I have link in page left when i click it is page Body change. Help me! Thanks very much... in struts 2. And i want redirect to other definition tag by url tag. Please help me
Using tag <c:redirect> of Core JSTL tags
tag <c:redirect> that is used to redirect the page to given url, here... and unzip this file, you will get a folder named  'redirect_page_jstlCoreTag... and type url 'http://localhost:8080/redirect_page_jstlCoreTag/redirect
ModuleNotFoundError: No module named 'cmsmenu-redirect'
ModuleNotFoundError: No module named 'cmsmenu-redirect'  Hi, My... named 'cmsmenu-redirect' How to remove the ModuleNotFoundError: No module named 'cmsmenu-redirect' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'cmsplugin-redirect'
ModuleNotFoundError: No module named 'cmsplugin-redirect'  Hi, My... named 'cmsplugin-redirect' How to remove the ModuleNotFoundError: No module named 'cmsplugin-redirect' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'cmsplugin-redirect'
ModuleNotFoundError: No module named 'cmsplugin-redirect'  Hi, My... named 'cmsplugin-redirect' How to remove the ModuleNotFoundError: No module named 'cmsplugin-redirect' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'create-redirect'
ModuleNotFoundError: No module named 'create-redirect'  Hi, My... named 'create-redirect' How to remove the ModuleNotFoundError: No module named 'create-redirect' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'django-redirect'
ModuleNotFoundError: No module named 'django-redirect'  Hi, My... named 'django-redirect' How to remove the ModuleNotFoundError: No module named 'django-redirect' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'lowhaio-redirect'
ModuleNotFoundError: No module named 'lowhaio-redirect'  Hi, My... named 'lowhaio-redirect' How to remove the ModuleNotFoundError: No module named 'lowhaio-redirect' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'named_redirect'
ModuleNotFoundError: No module named 'named_redirect'  Hi, My... named 'named_redirect' How to remove the ModuleNotFoundError: No module named 'named_redirect' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'oauth_redirect'
ModuleNotFoundError: No module named 'oauth_redirect'  Hi, My... named 'oauth_redirect' How to remove the ModuleNotFoundError: No module named 'oauth_redirect' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pypi_redirect'
ModuleNotFoundError: No module named 'pypi_redirect'  Hi, My... 'pypi_redirect' How to remove the ModuleNotFoundError: No module named 'pypi_redirect' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'pyramid_redirect'
ModuleNotFoundError: No module named 'pyramid_redirect'  Hi, My... named 'pyramid_redirect' How to remove the ModuleNotFoundError: No module named 'pyramid_redirect' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'redirect-streams'
ModuleNotFoundError: No module named 'redirect-streams'  Hi, My... named 'redirect-streams' How to remove the ModuleNotFoundError: No module named 'redirect-streams' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'redirect-chain'
ModuleNotFoundError: No module named 'redirect-chain'  Hi, My... named 'redirect-chain' How to remove the ModuleNotFoundError: No module named 'redirect-chain' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'redirect-check'
ModuleNotFoundError: No module named 'redirect-check'  Hi, My... named 'redirect-check' How to remove the ModuleNotFoundError: No module named 'redirect-check' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'redirect-io'
ModuleNotFoundError: No module named 'redirect-io'  Hi, My Python... 'redirect-io' How to remove the ModuleNotFoundError: No module named 'redirect-io' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'redirect-streams'
ModuleNotFoundError: No module named 'redirect-streams'  Hi, My... named 'redirect-streams' How to remove the ModuleNotFoundError: No module named 'redirect-streams' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'scrapy-redirect'
ModuleNotFoundError: No module named 'scrapy-redirect'  Hi, My... named 'scrapy-redirect' How to remove the ModuleNotFoundError: No module named 'scrapy-redirect' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'stream-redirect'
ModuleNotFoundError: No module named 'stream-redirect'  Hi, My... named 'stream-redirect' How to remove the ModuleNotFoundError: No module named 'stream-redirect' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'cmsmenu-redirect'
ModuleNotFoundError: No module named 'cmsmenu-redirect'  Hi, My... named 'cmsmenu-redirect' How to remove the ModuleNotFoundError: No module named 'cmsmenu-redirect' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'cmsplugin-redirect'
ModuleNotFoundError: No module named 'cmsplugin-redirect'  Hi, My... named 'cmsplugin-redirect' How to remove the ModuleNotFoundError: No module named 'cmsplugin-redirect' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'create-redirect'
ModuleNotFoundError: No module named 'create-redirect'  Hi, My... named 'create-redirect' How to remove the ModuleNotFoundError: No module named 'create-redirect' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'djangocms-redirect'
ModuleNotFoundError: No module named 'djangocms-redirect'  Hi, My... named 'djangocms-redirect' How to remove the ModuleNotFoundError: No module named 'djangocms-redirect' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'django-redirect'
ModuleNotFoundError: No module named 'django-redirect'  Hi, My... named 'django-redirect' How to remove the ModuleNotFoundError: No module named 'django-redirect' error? Thanks   Hi, In your python
Redirect from servlet to servlet
Redirect from servlet to servlet  I want to insert data from Text box to oracle database ,so in my HTML where there are text box (and 3 Buttons-New... to redirectServlet , and from this servlet I want to again forward my page to insertServlet(i.e
Using redirect element & wild card
directory. redirect element is used to show the new page url to the address...Using redirect element & wild card          <redirect/>
Making 301 redirection by using <c:redirect>
Making 301 redirection by using   How can i set the status as 301 when using tag? When i use , I am able to redirect to the desired URL (here, Google page) but I get 302 as the status of redirect. I need this status as 301. Any
Java Redirect output to file
Java Redirect output to file This section illustrates you how to redirect... to redirect the run-time exceptions and SOPs (System.out.println) to a file... as argument. This will redirect any console output using System.out.println
Redirect the log used by DriverManager and JDBC driver
Redirect the log used by DriverManager and JDBC driver  How can I get or redirect the log used by DriverManager and JDBC drivers
ModuleNotFoundError: No module named 'django-redirect-plus'
ModuleNotFoundError: No module named 'django-redirect-plus'  Hi...: No module named 'django-redirect-plus' How to remove the ModuleNotFoundError: No module named 'django-redirect-plus' error? Thanks   Hi
ModuleNotFoundError: No module named 'django-saml2-auth-idperror-redirect'
ModuleNotFoundError: No module named 'django-saml2-auth-idperror-redirect' ...: ModuleNotFoundError: No module named 'django-saml2-auth-idperror-redirect' How to remove...-redirect' error? Thanks   Hi, In your python environment you have
ModuleNotFoundError: No module named 'django-url-fullpath-redirect'
ModuleNotFoundError: No module named 'django-url-fullpath-redirect'  ...: No module named 'django-url-fullpath-redirect' How to remove the ModuleNotFoundError: No module named 'django-url-fullpath-redirect' error
ModuleNotFoundError: No module named 'django-url-fullpath-redirect'
ModuleNotFoundError: No module named 'django-url-fullpath-redirect'  ...: No module named 'django-url-fullpath-redirect' How to remove the ModuleNotFoundError: No module named 'django-url-fullpath-redirect' error
ModuleNotFoundError: No module named 'django-url-redirect'
ModuleNotFoundError: No module named 'django-url-redirect'  Hi, My... named 'django-url-redirect' How to remove the ModuleNotFoundError: No module named 'django-url-redirect' error? Thanks   Hi
ModuleNotFoundError: No module named 'django-url-redirect'
ModuleNotFoundError: No module named 'django-url-redirect'  Hi, My... named 'django-url-redirect' How to remove the ModuleNotFoundError: No module named 'django-url-redirect' error? Thanks   Hi

Ads