CmsObject.createResource参数到哪里找?

在WEB-INF/config/opencmsvfs.xml里面有

 

<resourcetypes>
				<type class="org.opencms.file.types.CmsResourceTypeUnknownFolder" name="unknown_folder" id="-2" />
				<type class="org.opencms.file.types.CmsResourceTypeUnknownFile" name="unknown_file" id="-1" />
				<type class="org.opencms.file.types.CmsResourceTypeFolder" name="folder" id="0">
					<param name="restypes.indexpage">none|xmlpage|layoutpage</param>
				</type>
				<type class="org.opencms.file.types.CmsResourceTypePlain" name="plain" id="1">
					<mappings>
						<mapping suffix=".txt" />
						<mapping suffix=".html" />
						<mapping suffix=".htm" />
					</mappings>
				</type>
				<type class="org.opencms.file.types.CmsResourceTypeBinary" name="binary" id="2">
					<mappings>
						<mapping suffix=".pdf" />
						<mapping suffix=".zip" />
						<mapping suffix=".class" />
						<mapping suffix=".ppt" />
						<mapping suffix=".doc" />
						<mapping suffix=".xls" />
						<mapping suffix=".jar" />
					</mappings>
				</type>
				<type class="org.opencms.file.types.CmsResourceTypeImage" name="image" id="3">
					<mappings>
						<mapping suffix=".jpeg" />
						<mapping suffix=".jpg" />
						<mapping suffix=".gif" />
						<mapping suffix=".png" />
						<mapping suffix=".tif" />
						<mapping suffix=".tiff" />
					</mappings>
				</type>
				<type class="org.opencms.file.types.CmsResourceTypeJsp" name="jsp" id="4">
					<mappings>
						<mapping suffix=".jsp" />
					</mappings>
					<properties>
						<property>
							<name>export</name>
							<value type="shared"><![CDATA[false]]></value>
						</property>		
					</properties>
				</type>
				<type class="org.opencms.file.types.CmsResourceTypePointer" name="pointer" id="5"/>
				<type class="org.opencms.file.types.CmsResourceTypeXmlPage" name="xmlpage" id="6"/>
				<type class="org.opencms.file.types.CmsResourceTypeXmlContent" name="xmlcontent" id="7"/>
				<type class="org.opencms.file.types.CmsResourceTypeFolderExtended" name="imagegallery" id="8">
					<param name="folder.class">org.opencms.workplace.galleries.CmsImageGallery</param>
					<param name="folder.class.params">w:120,h:90,c:dddddd,t:1,r:2</param>
				</type>
				<type class="org.opencms.file.types.CmsResourceTypeFolderExtended" name="downloadgallery" id="9">
					<param name="folder.class">org.opencms.workplace.galleries.CmsDownloadGallery</param>
				</type>	
				<type class="org.opencms.file.types.CmsResourceTypeFolderExtended" name="linkgallery" id="10">
					<param name="folder.class">org.opencms.workplace.galleries.CmsLinkGallery</param>
				</type>
				<type class="org.opencms.file.types.CmsResourceTypeFolderExtended" name="htmlgallery" id="11">
					<param name="folder.class">org.opencms.workplace.galleries.CmsHtmlGallery</param>
				</type>
				<type class="org.opencms.file.types.CmsResourceTypeFolderExtended" name="tablegallery" id="12">
					<param name="folder.class">org.opencms.workplace.galleries.CmsTableGallery</param>
				</type>
			</resourcetypes>

 另外,自定义的结构化文件的文件类型就是你在opencms-modules.xml 中定义的id 值:

...
<resourcetypes>
                <type class="org.opencms.file.types.CmsResourceTypeXmlContent" name="info" id="10000"

>
                    <param name="schema">/system/modules/mymodles.package/schemas/info.xsd</param>
                </type>
...
 

 

你可能感兴趣的:(Web,jsp,xml)