This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JSP and the fly likes response.setHeader problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "response.setHeader problem" Watch "response.setHeader problem" New topic
Author

response.setHeader problem

raj guntupalli
Greenhorn

Joined: Dec 16, 2002
Posts: 27
Hi,
I am using the following code in one jsp which calls another but I am getting null.I am using tomcat 4.1.Thanx in advance.
<html>
<%! String name="075000051"; %>
<%! String disply="test11"; %>
<%
response.setHeader("hello","hello1");
%>
<form action="http://localhost:20000/examples/jsp/jsptoserv/jsptoservlet.jsp" method="post">
<input type="hidden" name="institution_name" value="<%=name%>">
<input type="hidden" name="user_display_number" value="<%=disply%>">
<input type="submit" name="submit">
</form>
</html>
jsptoservlet.jsp
<html>
<body bgcolor="white">
<%=request.getHeader("hello")%>
</html>
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Originally posted by raj guntupalli:
Hi,
I am using the following code in one jsp which calls another but I am getting null.I am using tomcat 4.1.Thanx in advance.
<html>
<%! String name="075000051"; %>
<%! String disply="test11"; %>
<%
response.setHeader("hello","hello1");
%>
<form action="http://localhost:20000/examples/jsp/jsptoserv/jsptoservlet.jsp" method="post">
<input type="hidden" name="institution_name" value="<%=name%>">
<input type="hidden" name="user_display_number" value="<%=disply%>">
<input type="submit" name="submit">
</form>
</html>
jsptoservlet.jsp
<html>
<body bgcolor="white">
<%=request.getHeader("hello")%>
</html>


what are you trying to achieve with your response.setHeader() ??
There you only can set HTTP protocol headers, which are describen
on the W3C page. when you want to show
a different page then try a
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: response.setHeader problem