Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
master stewards:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
garden masters:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
gardeners:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

I have this strange display problem

 
pioneer
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
 
pioneer
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
pioneer
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was the problem , i figured it little late.Thanks anyway.
 
permaculture is giving a gift to your future self. After reading this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!