Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I have this strange display problem

 
Archana Annamaneni
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this problem .

In one of my JSP i am poping up a window like this.
<table>
<tr>
<td align="right">
<form action="uploademoticons.jsp" target="popup" onSubmit="window.open('','popup','width=300,height=300');">
<input type="submit" name="submit" value="Upload Emoticons">
</form>
</td>
</tr>
</table>

In the uploademoticons.jsp i am calling the emoupload.jsp

<html>
<title>Upload</title>
<body>
<br>
<br>
<% out.println("You can upload upto one MB");%>
<br>
<br>
<form action="emoupload.jsp" METHOD=POST ENCTYPE="multipart/form-data">
Upload file? <INPUT TYPE=FILE NAME=file1> <BR><br>
<INPUT TYPE=SUBMIT>
</FORM>
</body>
</html>
In the emoupload.jsp i am calling the bean which uploads icons, after that on the same popup window i want a close button and a upload another button , but those not coming up , it printing the whole html code in the window.Somehow it is not recognizing the html . is it beacuse i am doing it in reverse way , menas printing back.
Here is my emoupload.jsp
<%@ page import="java.util.*" %>
<%@ page import="com.UserBean" %>
<jsp:useBean id="upemo" scope="session" class="com.UploadEmoticons"/>
<html>
<body>
<%
upemo.uploadEmoticons(request, response);
out.println("Uploaded successfully");
%>
<table>
<tr>
<td>
<form>
<input type="submit" value="close">
</form>
</td>
</tr>
<tr>
</td>
</td>
</tr>
<tr>
<td>
<form>
<input type="submit" value="Upload Another">
</form>
</td>
</tr>
</table>
</body>
</html>
someone advice
 
Faisal Khan
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Archana,
Have you tried setting the contentType explicitly using the page atribute in the JSP page?
<%@ page setContentType="text/html" %>
HTH
 
Archana Annamaneni
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was the problem , i figured it little late.Thanks anyway.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic