I am getting the following error
You have attempted to dereference a scalar variable of type class java.lang.String as a structure with members. Â And it points me to the following line of my code : Â <cfset StructAppend(SESSION, data)>
The below is my script
<cfcomponent displayname="login2" extends="tool">
<cffunction name="init" access="public" returntype="any" output="false">
           <cfargument name="CompanyID" required="true" type="numeric">           Â
           <cfargument name="webid" required="false" default="0">
           <cfargument name="datatype" required="false" default="0">
          Â
           <cfset super.init(CompanyID, arguments.webID, arguments.datatype)>
            <!--- create objects --->
           <cfset this.navigation = createObject("component", "hb50.navigation").init(CompanyID)>
           <cfset this.workflow = createObject("component", "hb50.workflow").init(CompanyID)>
           <cfset this.display = createObject("component", "hb50.display").init(CompanyID)>
           <cfset this.media = createObject("component", "hb50.media").init(this.CompanyID)>
           <cfset this.blnContent = true>
          Â
           <cfscript>
                 this.homeData = newFormData();
                 this.homeData.tablename = "tblExtranetOptions";
                 this.homeData.title = "Extranet Login Options";
                 columns = ArrayNew(1);
                Â
                 xmlNav = this.navigation.getPublicNavXML();
                 x = StructNew();
                 x.varname = "optDefaultPage";
                 x.title = "Extranet Logged In Default Page";
                 x.type = TYPES.SELECT;
                 x.xml = xmlNav;
                 x.required = true;
                 x.multiple = FALSE;
                 ArrayAppend(columns, x);
                Â
                 x = StructNew();
                 x.varname = "optLoggedOutDefaultPage";
                 x.title = "Extranet Logged Out Default Page";
                 x.type = TYPES.SELECT;
                 x.xml = xmlNav;
                 x.required = false;
                 x.multiple = FALSE;
                 ArrayAppend(columns, x);
                Â
                 x = StructNew();
                 x.varname = "blnLDAP";
                 x.title = "Use LDAP for Authentication";
                 x.type = TYPES.BOOLEAN;
                 x.required = false;
                 ArrayAppend(columns, x);
                Â
                 x = StructNew();
                 x.varname = "txtForgotPass";
                 x.title = "Forgot Password";
                 x.type = TYPES.HTML;
                 x.required = true;
                 ArrayAppend(columns, x);
                Â
                 x = StructNew();
                 x.varname = "txtSuccessEmail";
                 x.title = "Password Emailed";
                 x.type = TYPES.HTML;
                 x.required = true;
                 ArrayAppend(columns, x);
                Â
                 x = StructNew();
                 x.varname = "txtUnSuccessEmail";
                 x.title = "Password Not Emailed";
                 x.type = TYPES.HTML;
                 x.required = true;
                 ArrayAppend(columns, x);
                 x = StructNew();
                 x.varname = "txtLoginMessage";
                 x.title = "Login";
                 x.type = TYPES.HTML;
                 x.required = true;
                 ArrayAppend(columns, x);
                Â
                 x = StructNew();
                 x.varname = "intRoleID";
                 x.title = "RoleId";
                 x.type = TYPES.NUMBER;
                 x.required = false;
                 ArrayAppend(columns, x);
                Â
                Â
                 this.homeData.columns = columns;
                 this.homeData.webid = this.webid;
                 this.homeData.blnWorkflow = false;
                 this.homeData.blnApproval = false;
                 this.homeData.blnLock = false;
                 this.homeData.blnVersion = false;
                 this.homeData.blnDelete = false;
                 this.homeData.blnPreview = false;
                 this.homeData.blnCategory = false;                Â
                 this.homeData.blnScheduling = false;                Â
                 this.homeData.blnMeta = true;                Â
                 this.homeData.blnResources = false;
                 this.homeData.link = this.link;
                 this.homeData.varID = "intID";
                 return this;
           </cfscript>
      </cffunction>
     Â
      <cffunction name="getTabs" access="public" returntype="any">
           <cfxml variable="xmlNav">
                 <cfoutput>
                      <item>
                            <item caption="Login Options" id="1"/>
                      </item>
                 </cfoutput>
           </cfxml>
           <cfreturn xmlNav />
      </cffunction>
     Â
      <cffunction name="getBackEnd" access="public" returntype="string">
           <cfset this.workflow.verifyColumns(this.homeData)>
           <!--- process the form in the back end and inserted --->
           <cfset this.display.setActionMsg(this.workflow.processForm(this.homeData))>
           <!--- this actually get the record (only 1) and you continually edit the record after the first time --->
           <cfquery name="qryExtranetOptions" datasource="#this.datasource#">
                 SELECT *
                 FROM tblExtranetOptions
                 WHERE intCompanyID = #this.companyID#
           </cfquery>
           <cfif qryExtranetOptions.recordcount>
                 <cfset url.id = qryExtranetOptions.intID>
           </cfif>
           <cfset this.homeData.tabs[1] = StructNew()>
           <cfset this.homeData.tabs[1].caption = 'Default Pages'>
           <cfset this.homeData.tabs[1].columnlist = 'optDefaultPage,optLoggedOutDefaultPage,blnLDAP'>
           <cfset this.homeData.tabs[2] = StructNew()>
           <cfset this.homeData.tabs[2].caption = 'Login'>
           <cfset this.homeData.tabs[2].columnlist = 'txtLoginMessage'>
           <cfset this.homeData.tabs[3] = StructNew()>
           <cfset this.homeData.tabs[3].caption = 'Emailed'>
           <cfset this.homeData.tabs[3].columnlist = 'txtSuccessEmail'>
           <cfset this.homeData.tabs[4] = StructNew()>      `
           <cfset this.homeData.tabs[4].caption = 'Not Emailed'>
           <cfset this.homeData.tabs[4].columnlist = 'txtUnSuccessEmail'>
           <cfset this.homeData.tabs[5] = StructNew()>
           <cfset this.homeData.tabs[5].caption = 'Forgot'>
           <cfset this.homeData.tabs[5].columnlist = 'txtForgotPass'>
          Â
           <!--- when user clicks save, update all the blnldap settings for this company --->
           <cfif isDefined("form.button") AND FORM.button eq #translate('Save')#>
                 <cfset ldap = 0>
                 <cfif isDefined("form.BLNLDAP") AND FORM.BLNLDAP eq 'on'>
                      <cfset ldap = 1>
                 </cfif>
                 <cfquery name="qryUpdateLdap" datasource="#this.datasource#">
                      UPDATE tblExtranetOptions
                      SET blnLDAP = #ldap#                Â
                      WHERE intCompanyID = #this.companyID#
                 </cfquery>
           </cfif>
           <cfreturn this.display.getAddEdit(this.homeData)>
      </cffunction>
      <cffunction name="DisplayLoginForm" access="public" returntype="string" output="false">
     Â
           <cfsavecontent variable="txtOutput">
                 <cfoutput>
                 <div id="test">
                      <form  method="post"  name="form">
                            <b><i>User Name: </i></b><input type="text" name="txtUserName" size="20"><br />
                            <b><i>Password: </i></b><input type="password" name="txtPassword" size="20"><br />
                            <input type="submit" value="Login >>>" name="Login" >
                      </form>
                      </div>
                 </cfoutput>
           </cfsavecontent>
          Â
           <cfreturn txtOutput />     Â
      </cffunction>
     Â
     Â
      <cffunction name="getFrontEnd" access="public" returntype="struct" hint="Returns front end display.">
           <cfset var strFrontEnd = StructNew()>
           <cfset strFrontEnd.title = "">
           <cfset strFrontEnd.body = "">
          Â
           <cfquery name="qryOptions" datasource="#this.datasource#">
                 SELECT       optDefaultPage, txtLoginMessage, txtForgotPass, txtSuccessEmail, txtUnSuccessEmail,      optLoggedOutDefaultPage
                 FROM       tblExtranetOptions
                 WHERE       intCompanyID = #this.companyId#
           </cfquery>
          Â
          Â
           <cfset strFrontEnd.body = DisplayLoginForm()>
          Â
          Â
           <!---check if the user is authenticated--->
           <cfif isDefined ("form.txtUserName") and isDefined ("form.txtPassword")>
                 <cfset admin = createObject('component', 'hb50.ldap').init(this.companyId)>
           <cftry>
                 <cfset data = admin.login(#FORM.txtUsername#, #FORM.txtPassword#)>
                 <cfset StructAppend(SESSION, data)>
                 <cfcatch type="user">
                Â
                      <cfset loginError = true>
                      <cfset loginErrorText = CFCATCH.message>
                     Â
                 </cfcatch>
           </cftry>
                 </cfif>
                 <cfoutput> <cfdump var="SESSION"></cfoutput>
                 <cfif isDefined("URL.navid")>
                Â
           <cfset URL.navid = Val(URL.navid)>
      </cfif>
                Â
                 <!---<cfif not (isDefined("SESSION.loggedIn") and SESSION.loggedIn)>
           <!---<cfinclude template="test.cfm">--->
           <cfabort />
      </cfif>
      <cfif isDefined("URL.navid")>
           <cfset URL.navid = Val(URL.navid)>
      </cfif>
           <cfif not (isDefined("SESSION.loggedIn") and SESSION.loggedIn)>
                 <cfparam name="defPage" default="#qryOptions.optDefaultPage#">
                 <cfparam name="loginMsg" default="#qryOptions.txtLoginMessage#">
                 <cfif isDefined("qryOptions") AND qryOptions.recordCount>
                      <cfset defPage = qryOptions.optDefaultPage>
                      <cfset loginMsg = qryOptions.txtLoginMessage>
                 </cfif>
          Â
                 <cfset xmlNav = this.navigation.getPublicNavXML()>
                 <cfset xmlResult = searchXMLByID(xmlNav, defPage)>
                      <cfset xmlResult = searchXMLByID(xmlNav, qryOptions.optLoggedOutDefaultPage)>
                      <cfif not isSimpleValue(xmlResult)>
                            <cfset xmlParent = xmlResult[1]>
                            <cfset txtRedirectLink = qryOptions.optDefaultPage>
                            <cfif xmlParent.xmlattributes.id NEQ this.webid>                      Â
                                      Â
                                 <cflocation url="#txtRedirectLink#" addtoken="no">                           Â
                            </cfif>
           </cfif>
           </cfif>--->
          Â
           <cfreturn strFrontEnd />
      </cffunction>
     Â
</cfcomponent>
>>Â <cfset StructAppend(SESSION, data)>
StructureAppend "Appends one structure to another". Â From the error message, it sounds like "data" is not a structure. Â What type of value does the admin.login(...) function return?
If what you want is to create a new session variable named "data" you could do this
<cfset SESSION["data"] = data /> .... or
<cfset SESSION.data = data />