Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

redirect page with POST method in JSTL

843840Jun 1 2008 — edited Jun 6 2008
how to redirect page with POST method in JSTL.

below is the code that i make, but the page redirected with GET method,
so, the URL shown as http://localhost:8080/tes2/coba2.jsp?nama=saya

how to hide the parameter, so it didn't show at the URL..??

anybody help me..??

server1 -> coba1.jsp
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

<html>
<head>
<title>coba1</title>
</head>

<body>
<c:url value="http://localhost:8080/tes2/coba2.jsp" var="displayURL">
  <c:param name="nama" value="saya"/>
</c:url>

<c:redirect url="${displayURL}"/>
</body>
</html>
server2->coba2.jsp
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

<html>
<head>
<title>coba2</title>
</head>

<body>
<c:forEach items="${param}" var="currentParam">
        <li><c:out value="${currentParam.key}" />
            = <c:out value="${currentParam.value}" /></li>
      </c:forEach>
</body>
</html>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 4 2008
Added on Jun 1 2008
7 comments
1,586 views