<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content=text/html;charset=ISO-8859-1>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Verdana size=2>try this :  </FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV><FONT face=Verdana size=2>CmsJspActionElement cms = new 
CmsJspActionElement(pageContext, 
request,response);<BR>      CmsObject cmso = 
cms.getCmsObject(); <BR></DIV></FONT>
<DIV><FONT face=Verdana size=2> HashMap properties = new 
HasMap();<BR>    <BR>      
properties.put("Description","page");<BR>      
properties.put("Keywords","page");<BR>      
properties.put("NavPos","4.0");<BR>      
properties.put("NavText","page");<BR>      
properties.put("title","page");<BR>      
properties.put("content-encoding","ISO-8859-1");</FONT></DIV>
<DIV><FONT face=Verdana size=2> </DIV></FONT>
<DIV><FONT face=Verdana size=2>com.opencms.file.CmsResource resource = 
cmso.createResource("your path where put the file 
","prova.html",I_CmsConstants.C_TYPE_PAGE_NAME,properties);<BR></FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT> </DIV>
<DIV style="FONT: 10pt arial">----- Original Message ----- 
<DIV style="BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A 
title=giuseppe.troianiello@agora.it 
href="mailto:giuseppe.troianiello@agora.it">Giuseppe Troianiello</A> </DIV>
<DIV><B>To:</B> <A title=opencms-dev@opencms.org 
href="mailto:opencms-dev@opencms.org">opencms-dev@opencms.org</A> </DIV>
<DIV><B>Sent:</B> Thursday, October 30, 2003 6:23 PM</DIV>
<DIV><B>Subject:</B> [opencms-dev] New pages creation from jsp code</DIV></DIV>
<DIV><FONT face=Verdana size=2></FONT><BR></DIV><FONT 
face="Helvetica, Arial, sans-serif"><SMALL>Dear all,<BR><BR>I am trying to 
create a new file from a jsp fragment code, using openCMS APIs.<BR>In 
particular, I used method createResource(cmsObject cms, string name, Map 
properties, byte[] content, HashMap parameter) from class 
com.opencms.file.CmsResourceTypePage.<BR><BR>But it doesn't seem to work 
properly. If I give a name like /opencms/opencms/something/file.html I obtain 
this exception </SMALL></FONT><BR><FONT 
face="Courier New, Courier, monospace"><SMALL>com.opencms.core.CmsException: 2 
Not found. Detailed error: [com.opencms.file.mySql.CmsDbAccess] 
/default/vfs/opencms/opencms/something/<BR>        
at 
com.opencms.file.genericSql.CmsDbAccess.readFolder(CmsDbAccess.java:8259)<BR>        
at 
com.opencms.file.genericSql.CmsResourceBroker.readFolder(CmsResourceBroker.java:5608)<BR>        
at 
com.opencms.file.genericSql.CmsResourceBroker.readFolder(CmsResourceBroker.java:5575)<BR>        
at 
com.opencms.file.genericSql.CmsResourceBroker.createFile(CmsResourceBroker.java:1786)</SMALL></FONT><BR>...<BR><FONT 
face="Helvetica, Arial, sans-serif"><SMALL><BR>and if I give only a name like 
file.html I obtain this</SMALL></FONT><BR><SMALL><FONT 
face="Courier New, Courier, monospace">com.opencms.core.CmsException: 2 Not 
found. Detailed error: [com.opencms.file.mySql.CmsResourceBroker] 
null.<BR>        at 
com.opencms.file.genericSql.CmsResourceBroker.getResourceType(CmsResourceBroker.java:3769)<BR>        
at 
com.opencms.file.genericSql.CmsResourceBroker.createFile(CmsResourceBroker.java:1789)<BR>        
at 
com.opencms.file.CmsObject.doCreateFile(CmsObject.java:978)<BR>        
at 
com.opencms.file.CmsResourceTypePage.createResource(CmsResourceTypePage.java:461)<BR></FONT></SMALL>...<BR><SMALL><FONT 
face="Helvetica, Arial, sans-serif"><BR>I suppose (afer looking class sources) 
there is a wrong separator ("/") management.<BR><BR>Is there anyone who can give 
me a hint on how to proceed, like use another class / method?<BR><BR>Thanks a 
lot<BR>    
Giuseppe</FONT></SMALL><BR>_______________________________________________ This 
mail is send to you from the opencms-dev mailing list To change your list 
options, or to unsubscribe from the list, please visit 
http://mail.opencms.org/mailman/listinfo/opencms-dev </BODY></HTML>