GeeCON Prague 2014*
The moose likes JSP and the fly likes I have this strange display problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSP
Bookmark "I have this strange display problem " Watch "I have this strange display problem " New topic
Author

I have this strange display problem

Archana Annamaneni
Ranch Hand

Joined: Jan 29, 2003
Posts: 147
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

Joined: Jun 29, 2003
Posts: 285
Archana,
Have you tried setting the contentType explicitly using the page atribute in the JSP page?
<%@ page setContentType="text/html" %>
HTH


The secret to creativity is knowing how to hide your sources.
Archana Annamaneni
Ranch Hand

Joined: Jan 29, 2003
Posts: 147
That was the problem , i figured it little late.Thanks anyway.
 
GeeCON Prague 2014
 
subject: I have this strange display problem