Retriving Portlet preference information using a custom tag

Hi ,
I am trying to create a custom tag which will be used to retrieve portlet prefrence information (administrative pref, community pref, user pref etc.).
In the displayTag method i am not able to create the Portlet request object.
I am getting the IEnvironment reference by calling the method GetEnvironment().
IEnvironment has methods called currentHTTPRequest() and currentHTTPResponse() which returns IXPRequest and IXPResponse object,
But to create a portlet context I need HTTPRequest and HTTPresponse.
If some one is aware of any other method for creating the portlet context from IXPRequest and IXPResponse object. please share as it will be of great help.
Thanks in advance!!

Thanks for reply!
Actualy I am trying to retrieve the Prefernces ( Community Preference, User Preference, Administrative Preference ) values in a custom Tag.
But I did not find any way in native APIs to retrieve the preferences.
So I was wondering if somehow I can established a remote session using IDK to retrieve the same.

Similar Messages

  • Retriving the employee information using LDAP

    How could I get all the entries in LDAP that matches entries with first name or second name or the employee number(if user the number for sure).
    Any sample program would help more.
    thanks

    Thanks for reply!
    Actualy I am trying to retrieve the Prefernces ( Community Preference, User Preference, Administrative Preference ) values in a custom Tag.
    But I did not find any way in native APIs to retrieve the preferences.
    So I was wondering if somehow I can established a remote session using IDK to retrieve the same.

  • How to use JSP custom tag lib in PAR file?

    Hi All,
    I am trying to customize mastheaderpar file. For that I have downloaded relevant par file and making the changes accordingly.
    As part of the changes I would require to use JSP custom tag library in my par file.
    I have the TLD file and relevant classes in the jar file. I would like to know where and what kind of modifications have to be done to use the jsp custom tag library.
    I tried modifying some things in portalapp.xml but was not successful.
    Please help me on how to proceed with this? It would be great if you can provide the xml entry to use this tag library
    Thanks
    Santhosh

    Hi Johny,
    Thanks for the reply. Actually I am able to change colors etc. with out any problem.
    My requirement is to use XMLTaglib in mastheader par file. This tag lib is from apache tomcat. I have the relevant TLD and class files. I copied TLD file into taglib dir of portal-inf and class file in src api.
    And I have added the following line in portalapp.xml under component-profile section of default
    <property name="tlxtag" value="/SERVICE/Newmastheader/taglib/taglibs-xtags.tld">
    Is this the right way to use tag lib? Actually before adding this line I used to get the error saying "Error parsing taglib", but now the error does not occur and I am getting new error. This is an exception in one of the taglib classes.
    Could any one provide me some inputs on how to check this error?
    Thanks
    Santhosh

  • Using a custom tag with a 2.3 servlet descriptor BUG?

    Hi,
    I just developed a Custom Tag and I'd like to use in my jsps.
    If I add the jsp in my JDev project with the custom tag when I try to build the project I got this error:
    Error(11): oracle.xml.parser.v2.XMLParseException: Invalid element 'listener' in content of 'web-app', expected elements '[context-param, servlet, servlet-mapping, session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'.
    It seems like when the jsp parser encounters the line with taglib it tries to parse the web.xml against a 2.2 version of the dtd. My web.xml begins with the correct dtd version (2.3). Can anyone tell me if this is a bug and eventually tell me how to solve it?
    thanks,
    Giovanni

    I repost this issue again, now with a simple test case.
    If I wrote a simple custom tag:
    import java.io.IOException;
    import javax.servlet.jsp.tagext.TagSupport;
    public class MyCustomTag extends TagSupport {
    public int doStartTag() {
    try {
    pageContext.getOut().print("FOO");
    } catch (IOException ioe) {
    pageContext.getServletContext().log(ioe.getMessage(),ioe);
    return(SKIP_BODY);
    with the associated tld:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.2</jspversion>
    <shortname>try</shortname>
    <uri>try</uri>
    <info>A short description...</info>
    <tag>
    <name>mytag</name>
    <tagclass>MyCustomTag</tagclass>
    <bodycontent>EMPTY</bodycontent>
    </tag>
    </taglib>
    and a jsp using the custom tag:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    Hello World
    </TITLE>
    </HEAD>
    <BODY>
    <H2>
    The current time is:
    </H2>
    <P>
    <% out.println((new java.util.Date()).toString()); %>
    <%@ taglib uri="try.tld" prefix="try" %>
    <try:mytag />
    </P>
    </BODY>
    </HTML>
    all runs fine if I have a web.xml with the dtd version 2.2
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    but if I use the version 2.3 because I want filters,context listeners and so on:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <filter>
    <filter-name>FilterRedirector</filter-name>
    <filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>
    </filter>
    <!-- Filter Redirector URL mapping -->
    <filter-mapping>
    <filter-name>FilterRedirector</filter-name>
    <url-pattern>/FilterRedirector/</url-pattern>
    </filter-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    I get the error I report in my last post. (the jsp doesn't compile) If I remove the custom tag from my jsp all works fine (filters, listeners,etc). In my project settings I use the 2.3 version of servlet.jar instead of the ServletRuntime that comes with JDeveloper.
    Can anyone tell me how to resolve this issue (Using simple custom tag with a web application using the 2.3 servlet specs)?
    Thanks in advance,
    Giovanni
    If I remove the filter secion all

  • Re: Using ScopeCache custom tag

    Hi, I am quite new to ColdFusion and I have a calendar that
    is quite slow due to the cfloops it uses to build the calendar. As
    the page does not change very often I wanted to use Raymond
    Camden's ScopeCache custom tag. However, for some reason the custom
    tag was not getting picked up from the custom tag folder on the
    server. I have successfully used components so have tried to
    convert the custom tag to a component but get the following error
    message:
    Routines cannot be declared more than once.
    The routine scope_Cache has been declared twice in the same
    file.
    This is the component:
    <!---
    Name : scopeCache
    Author : Raymond Camden ([email protected])
    Created : December 12, 2002
    Last Updated : November 6, 2003
    History : Allow for clearAll (rkc 11/6/03)
    : Added dependancies, timeout, other misc changes (rkc
    1/8/04)
    Purpose : Allows you to cache content in various scopes.
    Documentation:
    This tag allows you to cache content and data in various RAM
    based scopes.
    The tag takes the following attributes:
    name/cachename: The name of the data. (required)
    scope: The scope where cached data will reside. Must be
    either session,
    application, or server. (required)
    timeout: When the cache will timeout. By default, the year
    3999 (i.e., never).
    Value must be either a date/time stamp or a number
    representing the
    number of seconds until the timeout is reached. (optional)
    dependancies: This allows you to mark other cache items as
    dependant on this item.
    When this item is cleared or timesout, any child will also
    be cleared.
    Also, any children of those children will also be cleared.
    (optional)
    clear: If passed and if true, will clear out the cached
    item. Note that
    this option will NOT recreate the cache. In other words, the
    rest of
    the tag isn't run (well, mostly, but don't worry).
    clearAll: Removes all data from this scope. Exits the tag
    immidiately.
    disabled: Allows for a quick exit out of the tag. How would
    this be used? You can
    imagine using disabled="#request.disabled#" to allow for a
    quick way to
    turn on/off caching for the entire site. Of course, all
    calls to the tag
    would have to use the same value.
    License : Use this as you will. If you enjoy it and it helps
    your application,
    consider sending me something from my Amazon wish list:
    http://www.amazon.com/o/registry/2TCL1D08EZEYE
    --->
    <cfcomponent>
    <cffunction name="scope_Cache" access="public"
    returntype="string">
    <cfargument name="cachename" type="string"
    required="yes">
    <cfargument name="scope" type="string" required="yes">
    <cfargument name="timeout" type="string"
    required="yes">
    <cfprocessingdirective pageencoding="utf-8">
    <!--- allow for quick exit
    <cfif isDefined("arguments.disabled") and
    arguments.disabled>
    <cfexit method="exitTemplate">
    </cfif>
    <!--- Allow for cachename in case we use cfmodule --->
    <cfif isDefined("arguments.cachename")>
    <cfset arguments.name = arguments.cachename>
    </cfif>--->
    <!--- Attribute validation --->
    <cfif (not isDefined("arguments.name") or not
    isSimpleValue(arguments.name)) and not
    isDefined("arguments.clearall")>
    <cfthrow message="scopeCache: The name attribute must be
    passed as a string.">
    </cfif>
    <cfif not isDefined("arguments.scope") or not
    isSimpleValue(arguments.scope) or not
    listFindNoCase("application,session,server",arguments.scope)>
    <cfthrow message="scopeCache: The scope attribute must be
    passed as one of: application, session, or server.">
    </cfif>
    <!--- The default timeout is no timeout, so we use the
    year 3999. --->
    <cfparam name="arguments.timeout"
    default="#createDate(3999,1,1)#">
    <!--- Default dependancy list --->
    <cfparam name="arguments.dependancies" default=""
    type="string">
    <cfif not isDate(arguments.timeout) and (not
    isNumeric(arguments.timeout) or arguments.timeout lte 0)>
    <cfthrow message="scopeCache: The timeout attribute must
    be either a date/time or a number greather zero.">
    <cfelseif isNumeric(arguments.timeout)>
    <!--- convert seconds to a time --->
    <cfset arguments.timeout =
    dateAdd("s",arguments.timeout,now())>
    </cfif>
    <!--- create pointer to scope --->
    <cfset ptr = structGet(arguments.scope)>
    <!--- init cache root --->
    <cfif not structKeyExists(ptr,"scopeCache")>
    <cfset ptr["scopeCache"] = structNew()>
    </cfif>
    <cfif isDefined("arguments.clearAll")>
    <cfset structClear(ptr["scopeCache"])>
    <cfexit method="exitTag">
    </cfif>
    <!--- This variable will store all the guys we need to
    update --->
    <cfset cleanup = "">
    <!--- This variable determines if we run the caching.
    This is used when we clear a cache --->
    <cfset dontRun = false>
    <cfif isDefined("arguments.clear") and arguments.clear
    and structKeyExists(ptr.scopeCache,arguments.name) and
    thisTag.executionMode is "start">
    <cfif
    structKeyExists(ptr.scopeCache[arguments.name],"dependancies")>
    <cfset cleanup =
    ptr.scopeCache[arguments.name].dependancies>
    </cfif>
    <cfset structDelete(ptr.scopeCache,arguments.name)>
    <cfset dontRun = true>
    </cfif>
    <cfif not dontRun>
    <cfif thisTag.executionMode is "start">
    <!--- determine if we have the info in cache already
    --->
    <cfif structKeyExists(ptr.scopeCache,arguments.name)>
    <cfif
    dateCompare(now(),ptr.scopeCache[arguments.name].timeout) is -1>
    <cfif not isDefined("arguments.r_Data")>
    <cfoutput>#ptr.scopeCache[arguments.name].value#</cfoutput>
    <cfelse>
    <cfset caller[arguments.r_Data] =
    ptr.scopeCache[arguments.name].value>
    </cfif>
    <cfexit>
    </cfif>
    </cfif>
    <cfelse>
    <!--- It is possible I'm here because I'm refreshing. If
    so, check my dependancies --->
    <cfif structKeyExists(ptr.scopeCache,arguments.name) and
    structKeyExists(ptr.scopeCache[arguments.name],"dependancies")>
    <cfif
    structKeyExists(ptr.scopeCache[arguments.name],"dependancies")>
    <cfset cleanup = listAppend(cleanup,
    ptr.scopeCache[arguments.name].dependancies)>
    </cfif>
    </cfif>
    <cfset ptr.scopeCache[arguments.name] = structNew()>
    <cfif not isDefined("arguments.data")>
    <cfset ptr.scopeCache[arguments.name].value =
    thistag.generatedcontent>
    <cfelse>
    <cfset ptr.scopeCache[arguments.name].value =
    arguments.data>
    </cfif>
    <cfset ptr.scopeCache[arguments.name].timeout =
    arguments.timeout>
    <cfset ptr.scopeCache[arguments.name].dependancies =
    arguments.dependancies>
    <cfif isDefined("arguments.r_Data")>
    <cfset caller[arguments.r_Data] =
    ptr.scopeCache[arguments.name].value>
    </cfif>
    </cfif>
    </cfif>
    <!--- Do I need to clean up? --->
    <cfset z = 1>
    <cfloop condition="listLen(cleanup)">
    <cfset z = z+1><cfif z gt 100><cfthrow
    message="ack"></cfif>
    <cfset toKill = listFirst(cleanup)>
    <cfset cleanUp = listRest(cleanup)>
    <cfif structKeyExists(ptr.scopeCache, toKill)>
    <cfloop index="item"
    list="#ptr.scopeCache[toKill].dependancies#">
    <cfif not listFindNoCase(cleanup, item)>
    <cfset cleanup = listAppend(cleanup, item)>
    </cfif>
    </cfloop>
    <cfset structDelete(ptr.scopeCache,toKill)>
    </cfif>
    </cfloop>
    <cfreturn scope_Cache>
    </cffunction>
    </cfcomponent>

    Hi, thanks to both of you for your help. I reverted back the
    custom tag and it was picked up this time - I don't know what
    happened before. The functionality works as expected but I have hit
    another problem and I am hoping I can tap your combined ColdFusion
    wisdom to solve!!
    The calendar returns leave records for staff and filters the
    records using a querystring variable appended when the user clicks
    on a particular month. However, what members of staff the user sees
    depends on the data held in the users' session variables based on
    their authority. The reason I wanted to use caching is because the
    page takes a good ten seconds to run because of the use of cfloops
    for the members of staff and the days of the week to dynamically
    build the page. Using the custom tag would have worked if all
    members of staff saw the same calendar data and could only see one
    month. Can you see anyway I can speed up the page and do you think
    caching is the way forward here?

  • Urgent: Unable to run JSP pages(using JRun Custom Tags) in Weblogic 5.1

    Hi,
    I am using JRun Custom tags to bulid JSP pages.
    Could not run the jsp page on Weblogic 5.1.
    I could run the same on JRun Server but not on Weblogic?.
    Had placed JRuntags.jar in the web_inf directory.
    What/where i need to update in properties file?.
    Please reply..
    Best Wishes.
    Satish k.Yalamaddi.

    javax.servlet.ServletException: com/sun/tools/javac/Main (Unsupported major.minor version 49.0)
    This is your problem either your tomcat or eclipse is pointing to a wrong jre
    here the problem is you are trying to run a code that was compiled using j2sdk1.5 in j2sdk1.4

  • Using a custom tag inside another tag's attribute value?

    Hi all,
    I have a custom tag, mytag:link, whose use currently looks like this:<mytag:link path="/images/logo.gif"/>Nevermind what the tag does. Here's its TLD:<?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
        <tlib-version>1.1.1</tlib-version>
        <jsp-version>1.2</jsp-version>
        <short-name>My custom tags TLD</short-name>
        <tag>
            <name>link</name>
            <tag-class>test.MyLinkTag</tag-class>
            <body-content>empty</body-content>
            <description>...</description>
            <attribute>
                <name>path</name>
                <required>true</required>
                <rtexprvalue>true</rtexprvalue>
            </attribute>
        </tag>
    </taglib>I want to replace the path argument of the mytag:link tag to the result of the evaluation of another tag (a SiteMesh decorator tag) like this:<mytag:link path="<decorator:getProperty property="meta.logo"/>"/>This, of course, doesn't work, as I get the following error:org.apache.jasper.JasperException: /decorator.jsp(34,92) equal symbol expected
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:86)
         org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:193)
         org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:143)
         org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1328)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         org.apache.jasper.compiler.Parser.parse(Parser.java:126)
         org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.opensymphony.module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:156)
         com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:59) If I replace the call to the other tag with
    <mytag:link path="<%=someVariable%>"/>then it all works fine. This behavior seems correct, as the SiteMesh getProperty tag is writing its output to the Writer returned by pageContext.getOut() as it should. As such, this seems to be a design question, then. How are you supposed to do this?
    Thanks in advance,
    Matthew

    Note that I've also posted a question to the SiteMesh user forums about this. It has more information about the motivation of this question.
    See http://forums.opensymphony.com/thread.jspa?threadID=8561
    I'm still looking for an answer, though.
    --matthew                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Retrive  User & Cookie Information Using Apache Access Log Files

    Hi All
    The following information are not showing under Apache access log files that is used with Oracle Appserver (10g 10.1.2) given below.
    1)User Informations
    2)Cookie Informations
    We are using below Commands in the httpd.conf File that have specified in the documents link given below
    http://download-west.oracle.com/docs/cd/B31017_01/web.1013/q20201/logs.html#accesslog
    LogFormat "%h %l %u %t \"%r\" %>s %b %v \"%{Referer}i\" \"%{User-Agent}i\" \"%{cookie}n\"" combined
    Please anyone can tell what are the necessary informations that we have to specified in the httpd.conf file to retrive Cookie and user Informations.
    Thanks to all
    Sona

    Thanks for your reply
    Can u please check the below link for the cookie flag information
    http://download-west.oracle.com/docs/cd/B31017_01/web.1013/q20201/mod/mod_usertrack.html
    For your information i have logged in already.
    Our Sample O/p is given below
    151.146.191.186 - - [28/Dec/2006:10:13:05 +0530] "GET /Tab_files/lowerbox.gif HT
    TP/1.1" 200 150 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows)"
    We are using the below command format
    LogFormat "%h %l %u %t \"%r\" %>s %b %{cookie}n \"%{Referer}i\" \"%{User-Agent}i\"" combined
    But User and Cookie informations is not displaying.
    what steps should i follow.
    Looking for the favourable reply
    Thanks

  • Error using Datalist Custom tag HELP!

    Where can I obtain information for the following error: (IDE is JDeveloper): I have been researching this for 3 weeks without success.
    ERROR: Attribute "source" of tag "DataList" cannot be set with a constant, an expression must be specified.
    CODE WITH PROBLEM
    <!--- *** BEGIN DB CONNECTION --->
    <sql:openConnection driver="com.microsoft.jdbc.sqlserver.SQLServerDriver" url="jdbc:microsoft:sqlserver://SPLSERVER:1433" user="MY_WEB_USERS" password="PASSWORD" id="conn"/>
    <sql:setQuery id="conn" query="select * from schemes order by name" res="colorSchemes"/>
    </sql:setQuery>
    <sql:ifError id="conn">
    <table align="center" width="60%" border="0">
    <tr> <td>
    <br><br> A Connection to the DataBase could not be made!
    </td>
    </tr>
    <tr> <td>
    <br><br> Error Generated: <sql:getError id="conn" />
    </td>
    </tr>
    </table>
    </sql:ifError>
    <sql:ifFound res="colorSchemes">
    <% String Found="OK"; %>
    </sql:ifFound res="colorSchemes">
    <!--- *** END DB CONNECTION --->
    <!--- *** BEGIN TABLE LISTING --->
    <list:DataList source="<%=\"colorSchemes\"%>" type="com.cj.datalist.dbtag">
    <!--- *** DATALIST HEADER SECTION --->
    <list:headerTemplate>
    <TABLE CLASS="TableDouble" border="0" align="center"width="50%">
         <TR>
              <TD BACKGROUND="STYLES/<%= session.getAttribute("MyBkg") %>" ALIGN="center" colspan="5">
         <FONT ALIGN="center" CLASS="<%= session.getAttribute("MyFon") %>16">
    <sql:getCount res="colorSchemes"/>  Available Color Schemes!</FONT>
    </TD>
    </TR>
    <TR>
                   <TD ALIGN="center" WIDTH="25%"     STYLE="border-bottom:solid;border-bottom-width : thin;"
    BACKGROUND="STYLES/<%= session.getAttribute("MyBkg") %>">
         <FONT CLASS="<%= session.getAttribute("MyFon") %>12">Scheme Name</FONT>
                   </TD>
                   <TD ALIGN="center" WIDTH="8%" STYLE="border-bottom:solid;border-bottom-width : thin;"
    BACKGROUND="STYLES/<%= session.getAttribute("MyBkg") %>">
         <FONT CLASS="<%= session.getAttribute("MyFon") %>12">Dark</FONT>
                   </TD>
                   <TD ALIGN="center" WIDTH="8%"     STYLE="border-bottom:solid;border-bottom-width : thin;"
    BACKGROUND="STYLES/<%= session.getAttribute("MyBkg") %>">
         <FONT CLASS="<%= session.getAttribute("MyFon") %>12">Light</FONT>
                   </TD>
                   <TD ALIGN="center" WIDTH="8%" colspan="2"     STYLE="border-bottom:solid;border-bottom-width : thin;"
    BACKGROUND="STYLES/<%= session.getAttribute("MyBkg") %>">
         <FONT CLASS="<%= session.getAttribute("MyFon") %>12">Select </FONT>
                   </TD>
    </TR>
    <FORM ACTION="colors.jsp" METHOD="post" NAME="changecolor">
    </list:headerTemplate>
    <!--- *** DATALIST ITEM SECTION --->
    <list:itemTemplate>
    <TR>
                   <TD CLASS="NoEedge" STYLE="border-bottom:solid;border-bottom-width : thin;">
         <FONT CLASS="F10">
                   <%=CURRENT_OBJECT.getColumn(2)%>
                   </FONT>
         </TD>
                   <TD CLASS="LeftEdge" STYLE="border-bottom:solid;border-bottom-width : thin;"
    bgcolor="<%=CURRENT_OBJECT.getColumn(4)%>">
         <FONT class="F10"> </FONT>
    </TD>
                   <TD CLASS="LeftEdge" STYLE="border-bottom:solid;border-bottom-width : thin;"
    bgcolor="<%=CURRENT_OBJECT.getColumn(5)%>">
         <FONT class="F10"> </FONT>
    </TD>
                   <TD CLASS="LeftEdge" STYLE="border-bottom:solid;border-bottom-width : thin;">
         <input TYPE="Button" NAME="DarkButton" VALUE="Dark" ONCLICK="SetBkg('Dark');">
    </TD>
                   <TD CLASS="LeftEdge" STYLE="border-bottom:solid;border-bottom-width : thin;">
         <input TYPE="Button" NAME="Light" VALUE="Light" ONCLICK="SetBkg('Light');">
    </TD>
    <input TYPE="Hidden" NAME="ccsfile" VALUE="<%=CURRENT_OBJECT.getColumn(3)%>">
    <input TYPE="Hidden" NAME="dark_d" VALUE="<%=CURRENT_OBJECT.getColumn(6)%>">
    <input TYPE="Hidden" NAME="dark_l" VALUE="<%=CURRENT_OBJECT.getColumn(7)%>">
    <input TYPE="Hidden" NAME="DarkValue" VALUE="">
    <input TYPE="Hidden" NAME="LightValue" VALUE="">
    <input TYPE="Hidden" NAME="update" VALUE="1">
    </TR>
    </list:itemTemplate>
    </FORM>
    <!--- *** DATALIST FOOTER SECTION --->
    <list:footerTemplate>
    </TABLE>
    </list:footerTemplate>
    </list:DataList>

    I had the same problem. In your .tld change tagclass to tag-class and bodycontent to body-content and that should do the trick. The names slightly changed for JSP spec 1.2.
              

  • Cannot use cfx_image custom tag

    While trying to use cfx_image tag I am getting the following error and anyone give me an idea what I am missing?
    Thanks

    Yes there was a problem with bits. I was trying to run a 32bit dll in 64bit CF.
    Fix:
    Rather than reinstalling my CF I gave up using cfx_image tag as I found a better option.
    The builtin CF function ImageResize:
    <!--- This resizes an image to attributes.thumbsize of original size and resize it proportionately to the new width. Notice that the height is blank.--->
            <cfset uploadedImage=ImageNew("#attributes.imagepath#\#photo#")>
            <cfset ImageResize(uploadedImage,"#attributes.thumbsize#","","highestQuality",1)>
    more details about this function can be found at:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_h-im_39.html

  • How do I configure portal desktop to use my own custom tag in template?

    I seem to have tried everything. I want to use a custom tag from a jar file on a template JSP. I keep getting error saying tag library not found. I have the tld in the meta-inf of the jar. I tried putting the jar in the desktop classes, the deployed WEB-INF lib directory for portal, in the web-src directory for the portal. I tried configuring the uri in the web.xml for the portal webapp. None of these have worked. Does someone know how to do this? If someone could help out that would be great. I tries the jar from a web application and it worked fine. I just need to get this working with Portal Server.
    Thanks,
    Frank

    Thank you for the reply Alex. We are using the Dynamics AX 2012 R3 ISO for our installation. In the software requirement documentation for Dynamics AX it says that is able to run on Windows Server 2012 R2. I believe the prerequisites for Dynamics AX and
    Dynamics CRM are different. We received a response from another forum that you can change the .NET version that Sharepoint 2010 uses through IIS in the application pool, but even after setting it to .NET v2.0, we still receive the error in the Dynamics log
    that says it is not compatible with .NET v4.0. So I suppose the question is, where does the Dynamics AX 2012 R3 prerequisite checker look to see which version of .NET Sharepoint is using?
    Thanks again for the reply!

  • How can I use evaluate to get the instance variable in customized tag

    1.
    At first , I create a class called bean,and declared several params in it and do not define any getter function for the param.
    class bean{
    String param = "test";
    SomeClass scObj = new SomeClass();
    2.
    The second ,I use
    request.setAttribute("beanObj",new bean());
    3.
    And then I wanna use the customized tag to show a text box , then initialize it's value.
    <salt:text name="param" value="beanObj.param">
    <salt:text name="obj" value="beanObj.scObj.func()">
    4.
    I tried the evaluator provided by JexlContext ,Struts, JSTL and it seems that if I do not define the getter for the variable ,I can not get the bean's instance variable's value.
    Expression e = ExpressionFactory.createExpression( value );
    JexlContext jc = JexlHelper.createContext();
    jc.getVars().put(strInitBeanName, request.getAttribute("beanObj"));
    Object obj = e.evaluate(jc);
    the result of the obj is null....
    Can anybody recommand some other evaluator can get the value of a instance variable from an object?

    do you have any other suggestion ? Nops, somebody else may have though. AFAIK, all lookups of the type
    beanName.propertyNameuse reflection on the getXXX() methods to access the property.
    Having said that, I guess you could write one though in a custom tag, using the same - reflection (you will ahve to rely on the java.lang.reflect.Field class quite heavily) - but that would be reinventing the wheel for most other functionality that you would have to include (like looking up the bean in scope etc)
    cheers,
    ram.

  • How to use Custom Tags for Theme and Base Map Definitions

    In Mapviewer documentation I've found the following new feature:
    The XML definition of a theme or base map now supports application-specific
    attribute tags. You can use the Custom Tags option in the theme definition in Map
    Builder to specify tags and their values, which can be interpreted by your application
    but are ignored by MapViewer itself.
    I'm able to define a custom tag in Mapbuilder, but how can I use it in my Application?
    Thanks.

    As he said, you have to use as Platform service to create adapter in OIM.
    tcUserOperationsIntf service = Platform.getService(Thor.API.Operations.tcUserOperationsIntf.class);
    HashMap<String,String> searchmap=new HashMap<String,String>();
    searchmap.put("Users.User ID", userID);
    tcResultSet searchset=service.findAllUsers(searchmap);

  • Error Using Custom Tag

    I am trying to use a custom tag but receive an error when I use it on a jsp page.
    I have a tag handler class file, tag library descriptor file, specified the path to the .tld in the web.xml file.
    The error implies that it cannot find the SimpleTag.class file, though I put it in the \webapps\examples\WEB-INF\classes\ directory.
    Here is the error. Does anyone know what else it could be?
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    C:\jakarta-tomcat-4.0.1\work\localhost\examples\jsp\jspVisual\ch10\using_0005ftag$jsp.java:63: Class org.apache.SimpleTag not found.
    SimpleTag_jspx_th_myFirstTag_SimpleTag_0 = new SimpleTag();

    I could not see any obvious mistakes. But what you could try, in order to isolate the problem, is to bypass the web.xml. In other words access the TLD directly by doing this in your JSP
    <%@ taglib uri="/WEB-INF/jsp/tag_library_descriptor.tld" prefix="myFirstTag" %>
    if that does work then move the your TLD out of the jsp folder and into WEB-INF , then try
    <%@ taglib uri="/WEB-INF/tag_library_descriptor.tld" prefix="myFirstTag" %>
    Maybe someone else has better idea.

  • IllegalStateException using custom tag

    I'm receiving the following exception when trying to use a custom tag we are developing to allow us to provide localized content based on the users browser language/country settings:
         java.lang.IllegalStateException: WEB3025: Cannot reset after response has been committedThe thing is - the tag works perfectly when the page is using JSP includes:
         <jsp:include page="/components/headers/global.jsp" />but we get the exception when using our tag:
         <core:localizedInclude page="/components/headers/global.jsp" />and we make a call to our servlet:
         <jsp:forward page='/servlet/MyServlet' />Here is the line in the custom tag Java code that pulls in the file:
         pageContext.include(localizedPage);Any ideas what we can do to fix this? What are the differences between the <jsp:include> and our <core:LocalizedInclude> in this case?
    Bob

    The pagecontext 's include method flushes the buffer before a call to this method. This means the call to your tag from the jsp should be the first line in your jsp as headers have to be set first before writing any html response.
    Here's the relevant javadoc.
    blah..blah..
    The current JspWriter "out" for this JSP is flushed as a side-effect of this call, prior to processing the include.
    blah..blah..You could try the overloaded pageContext.include("path", false) which according to javadoc
    blah..blah..
    If flush is true, The current JspWriter "out" for this JSP is flushed as a side-effect of this call, prior to processing the include. Otherwise, the JspWriter "out" is not flushed.
    blah..blah..cheers,
    ram.

Maybe you are looking for

  • Error when interpreting the runtime repository Message no. BSP_WD_TOOLS030

    Hi All, I have created an enhancement for ICWC component ICCMP_BP_DETAIL. While trying to diplay this using trn BSP_WD_CMPWB , I am getting the message Error when interpreting the runtime repository Message no. BSP_WD_TOOLS030. What is the reason beh

  • Flex 3 and ColdFusion

    Not sure if I posted too much the first time, so lets take this one stap. I am so confused on this flex2gateway directory and cannot find a single answer in Google or the groups. Is the flex2gateway directory something that needs to be added to each

  • Specifying PDF type for a PDF portfolio

    Hi, Hope you're well. I am going to be creating a PDF porfolio made-up of Illustrator files. This PDF will ultimately be sent to a printer. However, I am used to using InDesign, where when you export to PDF it asks you what kind ie "High Quality Prin

  • Automatic import statements for jsp's?

    Is there a feature in Workshop 9.x's jsp editor that will automatically resolve (or prompt to resolve) classes in use which have not yet been imported into the page? A blue box appeared in 8.x and you could select the class to import, but I'm not fin

  • I got a software license crtificate ,how to use it??? i   paied    for it.

    I got a software license crtificate ,how to use it??? i   paied    for it.