0

Fileupload error in JSP

asked 2011-04-03 01:22:05 +0800

adrianflan gravatar image adrianflan
9

Hello,

I have created a very simple test.zul file with a file upload component as

<?page title="test.zul"?>
<window title="" border="normal" height="300px">

	<fileupload height="40px" width="150px">
		Select File
	</fileupload>
					
 </window>

This works fine and clicking the "select file" button gives the file browser to select a file.

Next I take the same code and put it in a file test.jsp as

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.zkoss.org/jsp/zul" prefix="z" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>A Demo</title>
</head>

<head>
	<title>Home</title>
</head>
<body>

<z:page>
 <z:window title="" border="normal" height="300px">
	<z:fileupload height="40px" width="150px">Select File</z:fileupload>
 </z:window>
</z:page>
 
</body>
</html>

When I try to display this jsp page it throws the following error:

description The server encountered an internal error () that prevented it from fulfilling this request.

exception 
org.apache.jasper.JasperException: org.zkoss.zk.ui.UiException: Child not allowed in org.zkoss.zul.Fileupload

root cause 
org.zkoss.zk.ui.UiException: Child not allowed in org.zkoss.zul.Fileupload

I have tried a few other components in the jsp page such as buttons or tabbed panels and they work fine. Is this s a bug or am I missing something?

Thanks in advance

delete flag offensive retag edit
Be the first one to reply this discussion!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-04-03 01:22:05 +0800

Seen: 244 times

Last updated: Apr 03 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More