OpenPortal Portlet Container and log4j

Hi,
I'm trying to get my first portlet to work in OpenPortal Portlet Container 2.0 (on Glassfish) and Eclipse. it works fine, but a couple of things are bugging me. Number one annoyance is that I don't understantd why my log4j logging doesn't work. I found a couple of posts related to this issue, and I configured the log level in the admin page, adding my package with a DEBUG value in the additional properties of the "Module Log Levels" page. Unfortunately, I can't see any log from my portlet in the log file (neither DEBUG nor INFO statements). I only get the container logs.
I have the log4j.properties file in webContent/config and src/main/resources directories. My web.xml file contains references the properties file
<context-param>
       <param-name>log4jConfigLocation</param-name>
       <param-value>config/log4j.properties</param-value>
</context-param>As indicated here on http://www.unicon.net/node/767 , I've checked that commons-logging-1.0.4.jar and log4j-1.2.14.jar are in WEB-INF/lib, as well as log4j.properties is in WEB-INF/classes.
Any idea ?
Thanks
Vincent
Edited by: VinzFr on Mar 3, 2009 11:45 AM

Deepak,
Yes my portlet app is using log4j. I'd like the logs to appear in server.log, or anywhere else. In the log4j.properties file, it is configured to log to c:/portlet.log , but the file isn't even created.
For the moment, the only solution I have is to use System.out.println :-(
Regards,
Vincent

Similar Messages

  • Sun Application Server 8 and Log4j

    In ...\sun\ApplicationServer\domains\domain1\lib\ext, you will find log4j.jar . This, being the extension directory will place log4j.jar high up in the classloader hierarchy.
    Suppose I have a 2 EARs to be deployed, each containing a WAR and a EJB JAR. All use log4j and naturally, each will have either log4j.properties or log4j.xml . Say only file logging is configured and all log to different file each.
    Now the problem: since lib/ext/log4j.jar is always the one to be used, the first log4j.properties or log4j.xml to be used will rule over the rest and all logging across WARs and EJBJARs will be to the SAME file!
    In sun-web.xml, can configure <class-loader> element to not to delegate to parent classloaders (havent tried it). But this does not solve the problem because there seems to be no way to configure likewise for EJBJAR! So even if can place log4j.jar in WEB-INF/lib for WAR and able to log to WAR-specified destinaton file, all the EJBJARs across all EARs will still be using lib/ext/log4j.jar and log to SAME file!
    So I have removed lib/ext/log4j.jar . Am I missing out something here? Any insights?
    Thanks.

    I'm having the same problem....
    But I do not have a log4j.jar file under lib/ext. In fact, that path is empty.
    I posted my issue under a different forum (Java Enterprise System - General Discussion)
    http://forum.java.sun.com/thread.jspa?threadID=5171613
    thread is titled: JES5 and log4j inconsistencies from 2005Q4 with multiple web application
    Any ideas? I'm offering 10 duke dollars for an answer on my original post.

  • Character conversion error when installing Java Portlet Container Preview

    I'm trying to tets out JSR 168 portlets on our Oracle 10g server. I'm following the instructions at http://portalstandards.oracle.com/
    I download and try to install the "Java Portlet Container Preview Release 2", and I get the following error:
    [oracle@jupiter home]$ java -jar ~/wsrp-install.jar ~/jwsdp-1.3
    File "/home/oracle/jupiter_mid/j2ee/home/config/global-web-application.xml" modified successfully
    oracle.webdb.utils.PortalExceptionImpl: Error transforming file "config/server.xml"
    at oracle.portal.PortalException.<init>(PortalException.java:66)
    at oracle.webdb.wsrp.server.install.InstallException.<init>(InstallException.java:31)
    at oracle.webdb.wsrp.server.install.Main.applyTransformation(Main.java:387)
    at oracle.webdb.wsrp.server.install.Main.install(Main.java:122)
    at oracle.webdb.wsrp.server.install.Main.main(Main.java:98)
    Caused by: javax.xml.transform.TransformerException: Character conversion error: "Unconvertible UTF-8 character beginning with 0x92" (line number may be too low).
    at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:739)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:715)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
    at oracle.webdb.wsrp.server.install.Main.applyTransformation(Main.java:371)
    ... 2 more
    caused by: ; SystemID: http://xmlns.oracle.com/ias/dtds/application-server-9_04.dtd; Line#: 1; Column#: -1
    javax.xml.transform.TransformerException: Character conversion error: "Unconvertible UTF-8 character beginning with 0x92" (line number may be too low).
    at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:739)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:715)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
    at oracle.webdb.wsrp.server.install.Main.applyTransformation(Main.java:371)
    at oracle.webdb.wsrp.server.install.Main.install(Main.java:122)
    at oracle.webdb.wsrp.server.install.Main.main(Main.java:98)
    [oracle@jupiter home]$
    This is what the server.xml looks like:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!DOCTYPE application-server PUBLIC "-//Oracle//DTD OC4J Application-server 9.04//EN" "http://xmlns.oracle.com/ias/dtds/application-server-9_04.dtd">
    <application-server localhostIsAdmin="true"
    application-directory="../applications"
    deployment-directory="../application-deployments"
    connector-directory="../connectors">
    <rmi-config path="./rmi.xml" />
    <sep-config path="./internal-settings.xml" />
    <jms-config path="./jms.xml" />
    <javacache-config path="../../../javacache/admin/javacache.xml" />
    <log>
    <file path="../log/server.log" />
    </log>
    <transaction-config timeout="30000" />
    <java-compiler name="javac" in-process="false" extdirs="/home/oracle/jupiter_mid/jdk/jre/lib/ext" />
    <global-application name="default" path="application.xml" />
    <application name="BC4J" path="../applications/BC4J.ear" auto-start="true" />
    <application name="BC4JManager" path="../applications/BC4JManager.ear" auto-start="true" />
    <application name="IsWebCacheWorking" path="../applications/IsWebCacheWorking.ear" auto-start="true" />
    <application name="jdev_test2" path="../applications/jdev_test2.ear" auto-start="true" />
    <global-web-app-config path="global-web-application.xml" />
    <web-site default="true" path="./default-web-site.xml" />
    <cluster id="1214162165" />
    </application-server>
    server.xml looks ok, and I've tried tweaking it to no avail. Anyone know what could cause this?

    Could you make sure you don't have any extra Apache libraries hanging around in your global classpath, i.e. ensure there is nothing extra in <J2SE Home>/jre/lib/extThere's a xercesImp.jar under mid/j2ee/OC4J_Portal/applications/jpdk/jpdk/WEB-INF/lib/xercesImpl.jar, but there's also one under jwsdp-1.2/jaxp/lib/endorsed/xercesImpl.jar. Is that supposed to be in there?
    Neither of these are getting loaded, though; running java -verbose shows that all of org.apache.xalan.* is being loaded from mid/jdk/jre/lib/rt.jar
    FWIW, ../../lib/xmlparserv2.jar does exist, but doesn't look like it's being loaded. :-\

  • How can configure .properties file and  log4j on weblogic 8.1 SP5

    Hi,
    I know this is not right forum for post this question.But I hope I'll get my perfect answer here.
    I have 2 questions.
    1. Where I'll keep my .properties file in weblogic 8.1 SP 5. means I have one own .properties file which is contains some proxy settings and this .properties resides on .war file(now), But I want move this propeties file outside .war file. So Where I'll keep in weblogic 8.1 SP 5.
    2. How can we configure log4j in weblogic?
    Please reply me.
    Regards,
    Pattanaik

    You can add your.properties and log4j.properties to the classpath cant you?
    You just need to edit setEnv.cmd (if i remember correctly) in your weblogic server folder to add the folder containing the properties files to the classpath variable.

  • (Why) do I need a JSR-168 Portlet container?

    Probably I'm missing something essential here, but whey do I need a JSR-168 portlet container? Suppose I'm using Tapestry 4 to write my JSR-168 compliant portlets, can they be consumed "directly" by a WSRP Portal server?

    Because:
    "A portlet container runs portlets and provides them with the required runtime"
    "environment. A portlet container contains portlets and manages their lifecycle. "
    "It also provides persistent storage for portlet preferences. A portlet container"
    "receives requests from the portal to execute requests on the portlets hosted by it."
    "A portlet container is not responsible for aggregating the content produced by the"
    "portlets. It is the responsibility of the portal to handle the aggregation."

  • Portlet Container

    Hello together,
    I want to develop Portlets after JSR168. I am quite experienced with Tomcat (4-5), Servlets (2.3, 2.4), JSP (1.2, 2.0) and that. Okay, what Tomcat is to the Servlet, is a Portlet Container to a Portlet. I want to develop the Portal engine by myself, but really cannot find out, how to use Portlet containers like those of Jakarta Pluto.
    I downloaded Pluto and can only minimally run the sample app. Understanding the Pluto Portal Implementation is quite hard due to deep factory nestings.
    Does anyone has a link to a minimalistic approach on how to use a Portlet Container from a custom initial Servlet that is capable of running Portlets. Espcecially unclear for me is also, who is responsible for parsing the portlet.xml files etc.
    In the www I can hardly find useful information except links for other portal engines or on how to develop portlets for existing environments like SAP EP, Sun ONE, WebSphere, BEA etc.
    If you have sample code and / or other information, please let me know. Any help is greatly appreciated!
    Thank you, Timo

    Pluto 1.0.x is rather complex to integrate into a portal. There are two documents which attempt to explain how to embed pluto into your portal:
    http://portals.apache.org/pluto/developer/integrate.html
    and
    http://portals.apache.org/pluto/developer/arch.html
    I would also recomend that you take a looks at the Pluto1.1 branch that is currently being developed. One of it's main goals is to simplify this integration that you are attempting to do. While it has not yet been released, it is becoming quite stable. You can check it out of subversion at:
    http://svn.apache.org/repos/asf/portals/pluto/branches/pluto-1.1/
    Also, if you stick with 1.0.x you may want to take a look at jetspeed for example code.
    Hope that helps and wasn't too late!
    David
    Hello together,
    I want to develop Portlets after JSR168. I am quite
    experienced with Tomcat (4-5), Servlets (2.3, 2.4),
    JSP (1.2, 2.0) and that. Okay, what Tomcat is to the
    Servlet, is a Portlet Container to a Portlet. I want
    to develop the Portal engine by myself, but really
    cannot find out, how to use Portlet containers like
    those of Jakarta Pluto.
    I downloaded Pluto and can only minimally run the
    sample app. Understanding the Pluto Portal
    Implementation is quite hard due to deep factory
    nestings.
    Does anyone has a link to a minimalistic approach on
    how to use a Portlet Container from a custom initial
    Servlet that is capable of running Portlets.
    Espcecially unclear for me is also, who is responsible
    for parsing the portlet.xml files etc.
    In the www I can hardly find useful information except
    links for other portal engines or on how to develop
    portlets for existing environments like SAP EP, Sun
    ONE, WebSphere, BEA etc.
    If you have sample code and / or other information,
    please let me know. Any help is greatly appreciated!
    Thank you, Timo

  • How to refresh the data in a container and to update the new data

    Hi,
    I have created a Module Pool Program in which i have two containers to display the long text.
    Initially this container is filled and based on some condition i want to update the text in the same conatiner.
    I am using the below two classes to do all this.
    cl_gui_textedit,
    cl_gui_custom_container,
    Could someone help me how to remove the long text in the container and update the new long text.
    I am getting the new long text but not able display it in the same container. Please someone help me how to refresh and update the container.
    Thanks in advance.

    Hi
    Try this.
      IF cl_gui_textedit  IS INITIAL.
      create control container
        CREATE OBJECT cl_gui_custom_container
           EXPORTING
                container_name = 'Container Name''
           EXCEPTIONS
                cntl_error                  = 1
                cntl_system_error           = 2
                create_error                = 3
                lifetime_error              = 4
                lifetime_dynpro_dynpro_link = 5.
    create text_edit control
        CREATE OBJECT cl_gui_textedit
           EXPORTING
                parent = cl_gui_custom_container
                wordwrap_mode = cl_gui_textedit=>wordwrap_at_windowborder
                wordwrap_to_linebreak_mode = cl_gui_textedit=>false
           EXCEPTIONS
                error_cntl_create      = 1
                error_cntl_init        = 2
                error_cntl_link        = 3
                error_dp_create        = 4
                gui_type_not_supported = 5.
      ENDIF.
    *--use method to set the text
      CALL METHOD cl_text_edit->set_text_as_stream
        EXPORTING
          text            =  t_lines ( Internal table with long text).
        EXCEPTIONS
          error_dp        = 1
          error_dp_create = 2
          OTHERS          = 3.
    regards,
    Raghu.

  • Why am I getting the error message "Can't open the illustration. The illustration contains and incomplete or garbled object description."

    I work in a graphic design firm and 4 separate people have received these messages on separate days using separate files on separate MAC computers. We are all using CS6.
    "Can't open the illustration. Could not complete the requested operation."
    "Can't open the illustration. The illustration contains an illegal operand. 1206.3.6006 % 1205.9736 1178.52 m % 1206.2236 1178.8374 I % 1206.3232 1178.% 1206.3.6006"
    "Can't open the illustration. The illustration contains an illegal or misplaced operator. ∘ê 3 0 R 508054 0 R 508055 0 R]/Order 508056 0 R/RBGroups[]>>/OCGs[5 0 R 6 0 R 7 0 R 8 0 R 9 0 R 46702 0 R 46703 0 R 46704 0 R 467"
    "Can't open the illustration. The illustration contains and incomplete or garbled object description."
    After clicking ok the file will open; however, most of the illustration is missing. We are interested in repairing our files, but we are more interesting in figuring out why this is happening and fixing it. We are nervous to even open anything for fear this will happen again.
    Please help!

    brittanyesparks,
    One thing often tried first is to create a new document and File>Place the corrupted one to see how much may be rescued that way (remember to tick Paste remembers Layers in the Layer palette flyout/dropdown first, and to untick it afterwards).
    Here is a website where you can see whether it can rescue the file, and if it can, you may pay for a subscription to have it done,
    http://www.recoverytoolbox.com/buy_illustrator.html
    and another similar website,
    http://markzware.com/adobe-software/fix-illustrator-file-unknown-error-occurred-pdf2dtp-fi le-recovery/
    As far as I remember, the former is for Win and the latter for Mac.
    Here are a few pages about struggling with it yourself:
    http://daxxter.wordpress.com/2009/04/16/how-to-recover-a-corrupted-illustrator-ai-file/
    http://helpx.adobe.com/illustrator/kb/troubleshoot-damaged-illustrator-files.html
    http://kb2.adobe.com/cps/500/cpsid_50032.html
    http://kb2.adobe.com/cps/500/cpsid_50031.html
    http://helpx.adobe.com/illustrator/kb/enable-content-recovery-mode-illustrator.html

  • Main Wrapper, Container and background-image repeat problem-and Footer :-)

    Hi everyone,
    First off, i tried almost every idea i could get to solve this on my own but now im...aaa...
    Well, the problem is i have a main wrapper with a background image repeat. A header,menu, body container - which has a left column and right column. I want that main wrapper,body container and both of the columns to grow auto according to content. I tried the height:100%. When i float the columns the text from left column spills over on to the footer. The left column also does not autogrow towards the footer?! I was able to set the footer at the bottom which i want it to remain at the bottom of the main wrapper, but the main wrapper and the columns do not grow automatically...I guess it has something to do with float and the clear properties but what???
    body{
    margin: 0;
    padding: 0;
    font-weight: normal;
    font-style: normal;
    font-size: 11px;
    font-family: verdana;
    text-align: center;
    background:url(back_index3.png) repeat-x scroll 0 0 #E4E4E4;
    #main_wrapper {
    width: 959px;
    margin:0 auto;
    margin-top:80px;
    background:url(backslice.png) repeat-y;
    height:auto;
    min-height:800px;
    #header {
    width: 959px;
    margin-left: auto;
    margin-right: auto;
    height:119px;
    background:red;
    padding-top: 0px;
    padding-bottom: 0px;
    #topmenu {
    background-color:#blue;
    height:30px;
    margin:0px;
    width: 959px;
    margin-left: auto;
    margin-right: auto;
    #body_container {
    height:100%;
    width: 949px;
    margin: 0 auto;
    #content {
    float:left;
    width: 645px;
    background:yellow;
    border-right:1px solid #ffffff;
    padding:10px;
    height:100%;
    text-align:left;
    #sidebar {
    float:left;
    width: 283px;
    background:#234234;
    height:100%;
    #footer {
    clear:both;
    height:200px;
    background-color: #686768;
    margin:0 auto;
    border-top: 1px solid #F6F6F6;
    text-align:center;
    width: 100%;
    <html xmlns="">
    <head>
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="3css.css" />
    <meta http-equiv="content-type" content="text/html" />
    </head>
    <body>
    <div id="main_wrapper">
         <div id="header">
          <span id="header_logo">title</span>
         </div>
         <div id="topmenu">
         menu
         </div>
         <div id="body_container">
          <div id="content">
    content to be added
          </div>
          <div id="sidebar">
          hallow2
          </div>
         </div>
    </div>
    <div id="footer">
    asd
    </div>
    </body>
    </html>
    Thanks in advance if somebody can help me out here.
    you can see an image of the problem in the attachement down thr... thnx

    <html xmlns="">
    <head>
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="3css.css" />
    <meta http-equiv="content-type" content="text/html" />
    </head>
    <body>
    <div id="main_wrapper">
         <div id="header">
          <span id="header_logo">title</span>
         </div>
         <div id="topmenu">
         menu
         </div>
         <div id="body_container">
          <div id="content">
    content to be added
          </div>
          <div id="sidebar">
          hallow2
          </div>
         </div>
    </div>
    <br clear="all" />
    <div id="footer">
    asd
    </div>
    </body>
    </html>
    Hope this will work well

  • Urgent----In which table are portlet id and name stored?

    In which table are portlet-id and name stored?

    portal30.WWPRO_PORTLET_METADATA_NLS$
    portal30.WWPRO_PORTLET_METADATA$
    portal30.WWPOB_PORTLET_INSTANCE$

  • Docking container and SAP standard transaction

    Hello,
    in one screen I have a tree control container and a docking container. With the tree control container everything is perfect. If the user does a click on a node on the tree in the docking container there should be shown a SAP standard transaction (QA03) with the corresponding data.
    I have not found a possibility to show QA03 or QM03 in a docking container. I also tried it in a splitter container, but I do not know how.
    Can anybody help me?
    Greetings
    Corinna

    Hello Corinna
    There is a simple answer to your question: it is not possible.
    Container can only hold other containers or controls.
    Do not be fooled by the ABAP workbench where we apparently can switch between different transactions (e.g. display a class [SE24], show method coding [SE80], double-click on a DDIC structure [SE11]). The ABAP workbench simply changes the control to be displayed but NOT the transaction (remains always the same).
    Regards
      Uwe

  • Portlet drag and drop

    Hi, Is there a way to enable JSR 168 portlet drag and drop(drag from one place to another place) feature. I know we can use oracle composer(page customizable, layout and panal customizable) for that. My requirement is
    1. Create a page template(myTemplate.jspx) that has 2 column layout - to restrict 'page developer' (who uses the page template) to use only two columns all the time. Add facet ref to the columns.
    2. Cretae a page that uses myTemplate.
    3. I want to consume portlets at design time. End user will not be able to add portlets.
    4. End user will only be able to drag one portlet from one place to another.
    In this case where i need to user oracle composer components(page template or the page that uses it)? If I use composer in page then I cannot restrict to 2 column layout.
    Thanks,
    $N

    What version of webcenter are you using? PS2 or PS3?
    Because you are a talking about JSR168 i expect this to be PS2?
    "Consume portlets at design time"
    This means that your developers will drop portlets from JDeveloper on the page; They will NOT use the resource catalog for this, is this correct?
    " End user will only be able to drag one portlet from one place to another"
    This is OOTB functionality when you use layoutCustomizable. Placing portlets in another region is called personalization. Adding portlets to pages is called customization.
    When you want your users to be able to drag and drop portlets from one place to another, they should only be authenticated. Authenticated users can do this by default. You don't need to do anything special for this.
    It looks like your requirements is a description of the default behavior or am i missing something?

  • Is there a way to combine "contains" and "Startswith"? Or a better way???

    I have a script that looks for reserved words in a list of words.  It works but it's slow and I think there has got to be a better and faster way.  I was thinking of how to combine the use of the -contains and $string.StartsWith but haven't had
    any luck.
    Here's what I have.  Any help would be appreciated.
    function ProcessStartsWith ($word)
        $flag = $false
        if ($word.StartsWith("con.")) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("con,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("prn."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("prn,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("nul."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("nul,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("aux."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("aux,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com0."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com0,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com1."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com1,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com2."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com2,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com3."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com3,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com4."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com4,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com5."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com5,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com6."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com6,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com7."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com7,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com8."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com8,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com9."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("com9,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt0."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt0,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt1."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt1,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt2."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt2,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt3."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt3,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt4."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt4,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt5."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt5,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt6."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt6,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt7."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt7,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt8."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt8,"))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt9."))) { $flag = $true }
        if ((!$flag) -and ($word.StartsWith("lpt9,"))) { $flag = $true }
        return $flag
    function ProcessWords($words)
        $errorcount = 0
        foreach ($word in $words)
            if (($ReservedWords -contains $word) -or (ProcessStartsWith($word)))
                "ReservedWord--- = " + $word
                $errorcount = $errorcount + 1
        return $errorcount
    $ReservedWords = "prn","nul","con","aux"
    $ReservedWords = $Reservedwords + "com0","com1","com2","com3","com4","com5","com6","com7","com8","com9"
    $ReservedWords = $Reservedwords + "lpt0","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7","lpt8","lpt9"
    $wordlist = "prn", "prnOK", "con", "control", "com0", "com0.", "com0otion"
    ProcessWords($wordlist)
    Running this results with this output
    ReservedWord--- = prn
    ReservedWord--- = con
    ReservedWord--- = com0
    ReservedWord--- = com0.
    4

    I don't know what the fastest way of accomplishing this would be, but you can certainly make it a lot shorter with a regular expression. For example, this code produces the same output:
    $reservedPattern = '^(?:prn|nul|con|aux|com\d|lpt\d)(?:[\.,]|$)'
    $wordlist = "prn", "prnOK", "con", "control", "com0", "com0.", "com0otion"
    $matchesReserved = $wordlist -match $reservedPattern
    foreach ($word in $matchesReserved)
    "ReservedWord--- = $word"
    $matchesReserved.Count

  • The question about portlet customization and synchronization

    I have a question about portlet customization and synchronization.
    When I call
    NameValuePersonalizationObject data = (NameValuePersonalizationObject) PortletRendererUtil.getEditData(portletRenderRequest);
    portletRenderRequest.setPortletTitle(str);
    portletRenderRequest.putString(aKey, aValue);
    PortletRendererUtil.submitEditData(portletRenderRequest, data);
    Should I make any synchronization myself (use "synchronized" blocks or something else) or this procedure is made thread-safe on the level of the Portal API?

    HI Dimitry,
    I dont think you have to synchronize the block. i guess the code is synchronized internally.
    regards,
    Harsha

  • Portlet title and name do not change

    Hi
    We changed the portlet title and portlet name in provider.xml file. After the portlet repository has been refreshed we could see the changes in the repository. But on the pages where the portlets already exists it does not show the change. If we reate a new instance of the portlet to a page, the new name is reflected.Restarting the apache( and jserv) did not make any difference. Any more changes or refresh we need to carry out?.
    In case it helps
    There are 2 tables called WWPOB_PORTLET_INSTANCE$, WWPOB_PORTLET_INSTANCE_FLAT$. Each of these tables has a name column that does not appear to reflect the new name of the portlet for the records that existed before the provider.xml changed.
    Thanks
    Raja

    Raja,
    Please post this question to the PDK Forum.
    Thanks,
    Jerry

Maybe you are looking for

  • Data retrieval buffers - buffer size and sort buffer size

    Any difference to tune BSO and ASO on data retrieval buffers? From Oracle documentation, the buffer size setting is per database per Essbase user i.e. more physical memory will be used if there are lots of concurrent data access from users. However e

  • Flow of SD, MM, FI

    Hi Friends, Where can i get the very simple document.. which i give Flow of SD, MM, FI modules with diagrams.. Thanks Seshu

  • Acrobat "forgets" about duplex mode

    I am using Acrobat X Pro on an Intel MacBookPro with OS 10.6.8. I have a networked HP ColorLaserJet 5550dn printer with duplex unit which works just fine in any other application. If I have a multi-page .pdf document I want to print from Acrobat (or,

  • How do I eliminate uneven edges in fill color?

    Hello Adobe Community! I have created a color gradient and the color fill has an uneven edge, which creates a small white space between the edges of the fill and the bounding box.  I have tried using shift+click to try and even the edges, but I guess

  • Http service vs data services

    is there any difference between Http service and data services?