<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
Ok, thanks a lot!!!<br>
This method works propperly!<br>
<br>
Bye!<br>
    Giuseppe<br>
<br>
<br>
<br>
<br>
Federico Locci wrote:<br>
<blockquote type="cite"
 cite="mid00d501c39f8b$11a396b0$c1a0f150@Federico">
  <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>
  <div><font face="Verdana" size="2">try this :  </font></div>
  <div> </div>
  <div><font face="Verdana" size="2">CmsJspActionElement cms = new
CmsJspActionElement(pageContext, request,response);<br>
      CmsObject cmso = cms.getCmsObject(); <br>
  </font></div>
  <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"> </font></div>
  <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> </div>
  <div
 style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-stretch: normal; font-size-adjust: none;">-----
Original Message -----
  <div
 style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: initial; -moz-background-origin: initial;"><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><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
<a class="moz-txt-link-freetext" href="http://mail.opencms.org/mailman/listinfo/opencms-dev">http://mail.opencms.org/mailman/listinfo/opencms-dev</a> </blockquote>
<br>
</body>
</html>