How to redirect to Success URL on form submission in ATG

In JSP file


<dsp:getvalueof bean="/its/blog/BlogFormHandler" var="welcome"></dsp:getvalueof>
<dsp:form action="/muthu/muthu1.jsp" method="POST" name="regForm">
<p>User ID: <dsp:input bean="/its/blog/BlogFormHandler.userId" type="text" required="<%=true%>"/>
    <p>Post Title: <dsp:input bean="/its/blog/BlogFormHandler.postTitle" type="text" required="<%=true%>"/>
     <p>Post Content: <dsp:input bean="/its/blog/BlogFormHandler.postContent" type="text" required="<%=true%>"/>
     <dsp:input type="hidden" bean="/its/blog/BlogFormHandler.successURL"
value="/muthu/success.jsp"></dsp:input>
<dsp:input type="hidden" bean="/its/blog/BlogFormHandler.FailureURL"
value="/muthu/fail.jsp"></dsp:input>
     <p><a href="javascript:submit(document.regForm)">Submit</a></p>     
     <p><dsp:input type="submit" bean="/its/blog/BlogFormHandler.createpost"/>
   </dsp:form>
</dsp:page>


In java file
return checkFormRedirect(getSuccessURL(), getFailureURL(), request, response);

Popular posts from this blog

[Solved] Hive installation error: java.net.URISyntaxException: Relative path in absolute URI

Install Android SDK in centOs

Installing arules package (Association Rules) in R