AnsweredAssumed Answered

Error.. while calling from jsp

Question asked by priyankasoni on Jul 23, 2013
Latest reply on Jul 24, 2013 by priyankasoni
Hi
i have write following code
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <%@page import="org.apache.chemistry.opencmis.client.api.SessionFactory" %>
    <%@page import="org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl" %>
    <%@page import="java.util.HashMap" %>
    <%@page import=" java.util.Map" %>
    <%@page import="org.apache.chemistry.opencmis.client.api.CmisObject"%>
    <%@page import= "org.apache.chemistry.opencmis.client.api.Document" %>
    <%@page import="org.apache.chemistry.opencmis.client.api.Folder" %>
     <%@page import="org.apache.chemistry.opencmis.client.api.ItemIterable" %>
      <%@page import="org.apache.chemistry.opencmis.client.api.Session" %>
       <%@page import= "org.apache.chemistry.opencmis.commons.SessionParameter"%>
       <%@ page import="org.apache.chemistry.opencmis.commons.enums.BindingType" %>
        <%@ page import="org.apache.chemistry.opencmis.commons.PropertyIds"%>
           
"<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
String name = request.getParameter("Namefolder");
String title = request.getParameter("titlefolder");
String description = request.getParameter("Desfolder");
Map<String, String> parameter = new HashMap<String, String>();

      // user credentials
      parameter.put(SessionParameter.USER, "admin");
      parameter.put(SessionParameter.PASSWORD, "admin");

      // connection settings
      parameter.put(SessionParameter.ATOMPUB_URL, "http://localhost:8080/alfresco/cmisatom");
      parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());

      // set the alfresco object factory
      parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");

      // create session
      SessionFactory factory = SessionFactoryImpl.newInstance();
      Session session1 = factory.getRepositories(parameter).get(0).createSession();
      Map<String, Object> properties = new HashMap<String, Object>();
      properties.put(PropertyIds.NAME, "incometax");
      properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:folder,P:cm:titled");
      properties.put("cm:description", "tax folder");
      Folder folder=session1.getRootFolder().createFolder(properties,null,null, null, null);
      %>
"
      


</body>
</html>
but it giving me error.. Plz tell me why?

Outcomes