This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
Date08-Sep-2005 12:54:11 EEST
Bug criticalityBadBug
Browser versionFirefox
Bug statusNewBug
PageProvider usedFileSystemProvider
Servlet ContainerTomcat4
Operating SystemLinux Server/XP client
Java version1.5 (sun)

When using another template then default, in this case using 'redman' the upload functionality seems to stop working. The upload popup shows up empty and no error logging is found in the jspwiki.log

In the tomcat4 log I found:

java.lang.IllegalAccessError: tried to access method
from class org.apache.jsp.Error_jsp

I made the constructor with String public again in WikiContext, cause it is used from the Error.jsp page.

Then I found this in the jspwiki.log:

        at org.apache.jasper.runtime.JspRuntimeLibrary.getContextRelativePath(
        at org.apache.jasper.runtime.JspRuntimeLibrary.include(
        at org.apache.jasper.runtime.PageContextImpl.include(
        at com.ecyrd.jspwiki.tags.IncludeTag.doEndTag(
        at org.apache.jsp.Upload_jsp._jspService(

Then I added some debug logging to the findJSP() method:

    	log.debug("Called findJSP with parameters: " + 
    			"pageContext [" + pageContext + "] " +
    			"template [" + template + "] " +
    			"name [" + name + "] ");

Then it shows in the log:

Called findJSP with parameters: 
pageContext [org.apache.jasper.runtime.PageContextImpl@1c486f2] 
template [default] 
name [templates/redman/UploadTemplate.jsp]

Two strange things here:

  • the template is default instead of redman
  • the location of the jsp is already resolved

To fix this bug I updated the Upload.jsp from:

<wiki:Include page="<%=contentPage%>" />


<wiki:Include page="UploadTemplate.jsp" />

This seems to work, because the include tag does its own findJSP()


Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 08-Sep-2005 12:56 by