cancel
Showing results for 
Search instead for 
Did you mean: 

Error.. while calling from jsp

priyankasoni
Champ in-the-making
Champ in-the-making
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?
3 REPLIES 3

mitpatoliya
Star Collaborator
Star Collaborator
unless you give from where you get this reference how is your environment nobody will be able to help.So, please give some more detail what you are trying to achieve and how?

hi i am try to call alfresco from my jsp application , fromwhere i want to create folder in alfreso

kaynezhang
World-Class Innovator
World-Class Innovator
You can test your source code in java file and paste error message here
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.