Portlet border

Can anybody guide me on how to remove the border of a portlet? I do not wnat to show the portlet border in the Guest home page

The portlet border is controlled through the CSS class .platportletBorder
View any of the Cascading StyleSheets in\ptimages\imageserver\plumtree\common\public\cssand you should find in the file the following.platportletBorder {border: solid 1px #<somecolor>;}Change this to solid 0px and the border will go away.
To save you from having to edit all ~180 CSS's.....You will have to investigate how to use CSSMill but it will involve1) A better way to fix this item is to use CSS Mill -- change the portal50.template. -or-2) using the definition of @border.none.thin@ found in the prop-text/<language> files --change the values to border.none.thin=0px3) Regenerate all the stylesheets
Phil Orion | [email protected] | www.orionsmith.com

Similar Messages

  • Can't remove portlet border.

    Hi Gurus,
    i'm facing some unexpected behavior with a portlet:
    The portlet appears in the page with a gray border.
    BUT the "show portlet border" checkbox isn't checked in area edit page.
    So, what is happening?
    And how can i remove the border.
    I've already try some stupid things as:
    1)check "show portlet border"
    2)apply changes
    3)Ok
    4)edit area
    5)uncheck "show portlet border"
    6)apply changes
    7)Ok
    but nothing
    Thanks,
    Felippe.

    The portlet calls a jsp page.
    It has been created like all the other, via XML.
    It displays the jsp content correctly but the border around the portlet.
    When i toggle the checkbox "Show portlet border" it makes no difference at all but the "Show portlet header" does.
    Any ideas??
    I'm trying to seek some erros in jsp code.
    thanks,
    Felippe.

  • Change portlet border with .css

    I want to change color and size of the portlet border with the help of .css.
    I have downloaded and use the dreamweaver Extension. .Css are link to portal site with UI template.
    I wondering which class that change the style for the border. So far have tried to use .PortletBodyColor and .PortletHeaderColor. Are there any one that have managed to change border style with .css?
    Regards,
    Jorunn

    I don't think you can just the outer border. If you look at the source code you see that the <td> tags also have the .portletbodycolor and header color classes, so while you technically can change the border, it will change the borders for all the cells and not just the outside of the table.

  • Portlets Border Color!!!

    Hello
    I have created a content area and a portlet, then I have edited the content area page and add this portlet to the page, I have selected on the region where I add my portlet Show Portlet Borders but I need to change the color of the border. How can I do that??. I have checked the content area style and there is nothing there to change the color of the borders like there is on the pages styles.
    Please help me I have been trying to do that for a long time and I haven't been able
    Ana Lasprilla

    I believe the color for the border/frame around portlets is the same as for its heaeder.
    At least I remember I found it.
    And it was one of the other colors in the style so there is -NO- seperate color for the borders :(

  • CSS Mill for Portlet Border Customizations

    Can someone let me know if this is a bug:
    I created a new template in <PT_HOME>\ptimages\imageserver\plumtree\common\public\css. All I did was copy and rename one that was already there. I tried using platPortletBorder to set the portlet borders = 0. That didn't work. Border wouldn't dissapear.
    Then I set:
    .portletBase
         <b>border:0px</b> solid @color.bg.lighter@;
         margin-bottom: 10px;
         width: 100%;
    That didn't work either. Border wouldn't dissapear. Finally I went directly to the CSS to make sure CSS Mill was writing the proper info to the style sheet. I discovered two instances of .portletBase. The first one on line 608. Then came all the other attempts to set border equal to 0. Finally, in line 741 a second instance of .portletBase setting <b>border = to 1px</b>I
    Does anyone know why there are two instances of .portletBase written to the style sheet and why editing the template only affects one of these instances?

    I have been having problems using make_all under ant 1.6.1. Somehow, community_theme file that is generated is all messed up, meaning carriage returns that existed for each language line - no longer do exist. everything is in on one line.
    2) any comments that I have in my templates example /*this is a comment*/ are automatically removed? when I build under ant 1.5.1 I do not get these issues. Do you see any issues if I build under 1.5? We are runing latest release of the portal. Also, 1.6.1 complained about it needing a file called tools.jar. I copied the file over, but that did not seem to work.
    A side question, if I build my 18 styles once more, will I get all the necessary styles for collaboration server generated as well from build.xml?
    Thanks

  • Customize the look and feel of a portlet

    After I published an application component as a portlet and inserted that portlet into a portal page, there are portlet text header and a thin border around the portlet. How can I get rid of the header and the border, or at least to hide them? Thanks in advance.

    Edit the page region properties to turn the portlet border and heading off.

  • Setting the Border background color

    Post Author: gravy
    CA Forum: .NET
    Hi,
    Using the API I'm trying to set the Border background color to transparent but I can't. I want to set the background color to match what the designer does when you uncheck the Background option on the Border tab of a TextObjects properties.
    Can anyone help?

    What release are your using?
    do you want to set this dynamically, for one portlet or all. you may what to use
    'Themes'
    "Jorgeana" <[email protected]> wrote:
    >
    Does someone have a sample of setting the portlet border and background
    color ?
    I´m having problems using "setPortletBGColor" !! Tks

  • News OmniPortlet Appearance

    Hello,
    I have been trying to change the appearance of a XML-News-OmniPortlet in a JSF page. I have followed the examples outlined in Oracle WebCenter Framework Tutorial using JDeveloper 10.1.3.2. The portlet is rendering a news service for me just fine in a browser, but now I want to control the portlet size, font size, etc. Neither the InlineStyle nor the ContentInlineStyle properties for the adfp:portlet seem to effect the content of the portlet in IE7 or FF2. Also, the height and width properties for the adfp:portlet seem to ineffective as well. When looking in JDeveloper design view, the JSF page looks like I want it to. However, when rendered to the browser the style elements are ignored.
    I have also tried modifying the xsl, provided by Oracle, to include a span tag with the inline CSS I want, but keep getting an error from the portlet saying it can't get the data.
    Should I be using a skin to control the news rendered in the portlet? Is there some trick?
    I have done some additional digging into the generated code for the portlet and found some strange things, but I want to make sure I am doing this right.
    Thanks in advance,
    Steve

    Peter,
    Thanks for the reply.
    Let me describe the portlet. I am taking and defining an OmniPortlet in a JSF page. Run the page, clicked define, select type of data as XML, give the news service URL (RSS 2.0), give the url to the XSL, nothing on filters, enter title, disable header and footer text, select the News "Layout Style", leave Caching alone. On the Layout step, I have tried all three "News Styles" (Plain, Logo, Scrolling) going with Plain. "Column Layout" I have working and linking as it allows and I expect. And no Events.
    I found Scrolling to be a nice space saver, but font size is preventing me from using it. The height/width controls there work, but the portlet border doesn't shrink to fit those sizes. I think that answers your question. Yes?
    Under the hood:
    Ok, as I mentioned before I am trying to use the adfp:portlet's Height, Width, ContentInlineStyle and InlineStyle properties to control things. The OmniPortlet renders the border inside a table and then includes the portlet content within a <td> cell and then within an <iFrame>. The ContentInlineStyle is rendered to the <td> style attribute. The height, width, and InlineStyle are rendered to the <iFrame> style attribute. Seems a bit backward to me, but lets continue.
    When you look at the <iFrame> style attribute, it reads like this:
    style="font-size:6.0pt;;width: 150;;height: 200;;position:relative;" (copied from the rendered source)
    I am not sure what the exact interpretation of the CSS will be based on that, but I do know that if I remove height and width and edit the InlineStyle to remove the ";" then only one ";" is generated. However, the content still doesn't inherit the font-size from the <iFrame>. This is likely because of the class definitions defined in the content, but that is just a guess.
    I am going to look into the HTML Layout instead of News Layout and skins tomorrow.
    Thanks for the help,
    Steve

  • Items style

    How can i do to make a border to an item? Like portlets border!
    Thank you,
    Gabriel

    Yes, but I have already make this pagelinks. And I have about 20 page everyone with about 20 page links. How can I transform a item region with 20 page links into a navigation page?
    Thanks

  • "Page Portlets"; no border or headers displaying

    I'm working with "Page Portlet" (published page as a portlet). The problem I'm faced with is when I go to place that "Page Portlet" on another Page, I am not seeing the Portlet header or border for that portlet even though the region itself is set to do so.
    Is this a limitation of a "portletized Page" or am I missing something?

    I'm having a similar problem. I've created a tab with three portlets displayed in it. One is a report, two are charts. Neither the portlet headers nor thier bodies display until I click on the customize page link and then the close button.

  • Remove border from HTML portlet

    Hii,
    When i am adding HTML portlet then a border is coming automatically. How to remove this border.

    Hi,
    The Rendering of the Portlet depends on the Region too - you can have a look at the "Edit Defaults" ( the Pencil Icon ) link for the Region where the Portlet is located. You can uncheck the " Show Portlet Borders " ( or, even " Show Portlet Headers " ).
    Regards,
    Sandeep

  • Portlets working as Administrator, but not as a Admin Group.

    Hello,
    I am using a 6.1.2 portal. We also have a Portal Custom Database for our custom portlets. When custom portlets are displayed on a page, the only appear when logged in as the administrator.
    If I log in as a domain user who is part of the Administrator Group - I get this error:
    java.rmi.RemoteException: -2147204095 - Error in function PTSession.Reconnect (strToken == '9201|1268945907|YtmwQquYM+hDkbNKEJ40Tvgc9fs='): -2147204095 - InternalSession.Connect(): UserID (9201) not found.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Web.Services.Protocols.SoapException: java.rmi.RemoteException: -2147204095 - Error in function PTSession.Reconnect (strToken == '9201|1268945907|YtmwQquYM+hDkbNKEJ40Tvgc9fs='): -2147204095 - InternalSession.Connect(): UserID (9201) not found.
    Source Error:
    Line 17: <div class="alertText" id=errorMessage runat=server><p ><span class="alertErrorTitle" >
    Line 18: <img src="pt://images/plumtree/portal/public/img/icon_error.gif" alt="Error" border="0" height="20" width="20" ></img> Error</span>
    Line 19: <span class="alertErrorDescription" ><%= Eub.Ptl.EubAnnouncements.Web.WebLib.GetPortletName()%> cannot be displayed due to an unknown error.</span></p>
    Line 20: <p ><span class="alertErrorSubtitle" >We Recommend:</span>
    &bull; Accessing this Portlet at a later time.
    Line 21:
    &bull; Contacting your Portal administrator if problems persist.</p>
    Source File: E:\bea\alui\ptportlets\EubAnnouncements\Error.aspx Line: 19
    Stack Trace:
    [SoapException: java.rmi.RemoteException: -2147204095 - Error in function PTSession.Reconnect (strToken == '9201|1268945907|YtmwQquYM+hDkbNKEJ40Tvgc9fs='): -2147204095 - InternalSession.Connect(): UserID (9201) not found.]
    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +431766
    System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +204
    com.plumtree.remote.prc.soap.QueryAPIService.queryObjectData(String sLoginToken, Int32 nClassID, Int32 nPropIDMask, Int32 nFolderID, Int32 nPropIDOrderBy, Int32 nOrder, Int32 nSkipRows, Int32 nMaxRows, QueryFilter[] ArQueryFilters) +437
    com.plumtree.remote.prc.soap.QueryProcedures.QueryObjectData(String sLoginToken, Int32 objectClass, Int32 nPropIDMask, Int32 nFolderID, Int32 sortProperty, Boolean ascending, Int32 nSkipRows, Int32 nMaxRows, XPQueryFilter[] ArQueryFilters) +218
    [PortalException: Exception of type 'Plumtree.Remote.PRC.PortalException' was thrown.]
    Plumtree.Remote.PRC.PortletManagerWrapper.GetPortletInstance(Int32 portletID) +353
    Eub.Ptl.EubAnnouncements.Web.WebLib.GetPortletName() +348
    ASP.error_aspx.__RendererrorMessage(HtmlTextWriter __w, Control parameterContainer) in E:\bea\alui\ptportlets\EubAnnouncements\Error.aspx:19
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
    System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
    System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +163
    System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
    System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +51
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
    System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
    System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +134
    System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
    System.Web.UI.Page.Render(HtmlTextWriter writer) +29
    System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
    System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266
    PTSPY shows:
    Portlet request failed, the remote server returned HTTP error '500'. Portlet ID=244, User ID=9201, URL='http://PortalServer:8092/Portlets/EubAnnouncements/AnnouncementList.aspx'
    In the PTUSER table, my user id corresponds to 9201 - so that user is in the portal database. The administrator user id is 1 and it works.
    Now the portal db was restored from a production environment. However all domain users were
    I am able to open the custom portlet outside the portal with no error - it works.
    Any ideas where to go from here?
    Help?
    Thanks,
    V

    Thanks for your reply Jason
    Yes, i accept am getting things complicated by running script and writing to text file.
    I have tried using SCCM for pulling FreeDisk Space, i have enabled the Free Space attribute in hardware inventory. But i face the below issue.
    1. I have created a query to find out Free disk Space, BUT only few machines show the Free space on C: drive but
    same query is not discovering for some other machines
    Any specific thing i need to check ?? to fix this issue.
    2. I used the reporting Hardware 01A it is not showing the free disk space (though all hardware inventory are enabled)
    Please assist

  • Display image in JSP Portlet

    I create a JSP portlet. But The portlet can't display image(gif file, jpg file). I have modified the provider.xml and the following line is added:
    <imageURL>URL_Path</imageURL>
    But, the image still cannot be displayed.
    How can I display image in JSP portlet?

    Leo Cheung,
    You could try the following :
    1. Add a virtual directory path Alias 'imgf' in the Apache configuration file httpd.conf to load the image file. Add the following line under the alias section :
    Alias /imgf/ "<your directory>\images/"
    2. Place your gif/jpg files (eg., work.gif) in the images directory.
    3. Use the IMG tag of HTML :
    <IMG src="/imgf/work.gif" border=0 width=80 height=80> in the JSP file at the location where you need to display the image.
    Hope this helps
    Pushkala

  • User Authentication Failed error when trying to display a JSP portlet

    The steps carried out are as follows :
    1. Created a JSP file named "c.jsp" and deployed it under 902_MidTier_Home\j2ee\home\default-web-app\examples\jsp
    2. Created a table named USER_TABLE under Scott schema to store the usernames and passwords to validate this JSP application.
    3. Registered this JSP as an external application with the following values :
    Application Name           : RAGHU
    Login URL          : http://hostname:port/j2ee/examples/jsp/c.jsp
    User Name/ID Field Name     : username
    Password Field Name     : password
    Type of Authentication Used : POST
    3. Clicked on the External Application and entered the username as USER1 and password as USER1 ( These values are available
    under USER_TABLE for comparison ). Then it shows the message "Hi User1 .. Welcome message"
    4. Now created a directory named JSPSAMPLE under "WEB-INF\Providers" and put the provider.xml file under this.
    Created a raghu.properties file and placed it under "WEB-INF\deployment".
    5. Now tested the testpage using the URL " http://hostname:port/jpdk/providers/raghu " and it works fine.
    6. Registered this as a provider in Portal and added this portlet onto a page. Assigned this page to a newly created user.
    It gives the message " Authentication Failed - Update Login Information " which is expected. I click on the link and
    it takes me to the external application username password. I enter the credentials but this time it comes back again
    to the page with the same message " Authentication Failed - Update Login Information ".
    7. Basically the values are not passed to the Username and Password in jsp page which is why the problem occurs.
    The JSP Code used is as follows :
    <%@ page import="java.sql.*" %>
    <HTML>
    <HEAD><TITLE>DB Connectivity test</TITLE></HEAD>
    <BODY BGCOLOR="#FFFFFF">
    <CENTER>
    <B>user_table</B>
    <BR><BR>
    <%
    String username = request.getParameter("username");
    String password = request.getParameter("password");
    Connection conn = null;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    conn = DriverManager.getConnection("jdbc:oracle:thin:@hostname:1521:iasdb","scott","tiger");
    Statement stmt = conn.createStatement();
    String query = "SELECT * FROM user_table where userid= '"+ username +"' and passwd = '" + password + "' " ;
    ResultSet rs = stmt.executeQuery(query);
    while(rs.next())
    out.println("<TR>");
    out.println(" <TD> hi " + rs.getString("userid") + ", welcome</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    catch(SQLException e)
    out.println("SQLException: " + e.getMessage() + "<BR>");
    while((e = e.getNextException()) != null)
    out.println(e.getMessage() + "<BR>");
    out.println("invalid userid,password");
    catch(ClassNotFoundException e)
    out.println("ClassNotFoundException: " + e.getMessage() + "<BR>");
    finally
    //Clean up resources, close the connection.
    if(conn != null)
    try
    conn.close();
    catch (Exception ignored) {}
    %>
    </CENTER>
    </BODY>
    </HTML>
    The Provider.xml file used is as follows :
    <?xml version="1.0" encoding="UTF-8"?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.http.URLProviderDefinition">
         <providerInstanceClass>oracle.portal.provider.v2.http.URLProviderInstance</providerInstanceClass>
         <session>true</session>
         <authentication class="oracle.portal.provider.v2.security.Authentication">
              <authType>ExternalApp</authType>
              <userFieldName>username</userFieldName>
              <userPwdName>password</userPwdName>
              <errorPageMessages>Raghu,Please sign in,Sign me up!</errorPageMessages>
         </authentication>
         <portlet class="oracle.portal.provider.v2.http.URLPortletDefinition">
              <id>1</id>
              <name>RaghuPortlet</name>
              <title>Raghu Mail Portlet</title>
              <description>This portlet is to test Integration services using mail.yahoo.com</description>
              <timeout>100</timeout>
              <timeoutMessage>Raghu timed out</timeoutMessage>
              <showEdit>false</showEdit>
              <showEditDefault>false</showEditDefault>
              <showPreview>false</showPreview>
              <showDetails>false</showDetails>
              <hasHelp>false</hasHelp>
              <hasAbout>false</hasAbout>
              <acceptContentType>text/html</acceptContentType>
              <registrationPortlet>false</registrationPortlet>
              <accessControl>public</accessControl>
              <renderer class="oracle.portal.provider.v2.render.RenderManager">
                   <showPage class="oracle.portal.provider.v2.render.http.URLRenderer">
                        <pageUrl>http://172.17.24.235:8888/c.jsp</pageUrl>
                        <contentType>text/html</contentType>
                        <filter class="oracle.portal.provider.v2.render.HtmlFilter">
                             <useAuthLinks>true</useAuthLinks>
                             <headerTrimTag>&lt;table width="100%" cellpadding=0 cellspacing=0 border=0>&lt;tr>&lt;td bgcolor=#9bbad6></headerTrimTag>
                             <footerTrimTag>&lt;table width="100%" cellpadding=2 cellspacing=1>&lt;tr>&lt;td bgcolor=#9bbad6></footerTrimTag>
                             <convertTarget>true</convertTarget>
                             <redirectUrlFieldName>.done</redirectUrlFieldName>
                        </filter>
                   </showPage>
              </renderer>
              <securityManager class="oracle.portal.provider.v2.security.URLSecurityManager">
                   <authorizType>registered</authorizType>
              </securityManager>
         </portlet>
    </provider>
    The Contents of raghu.properties file
    serviceClass=oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter
    loaderClass=oracle.portal.provider.v2.http.DefaultProviderLoader
    showTestPage=true
    definition=providers/raghu/provider.xml
    autoReload=true
    Any inputs regarding why the values are passed properly in case of External Application but not so when registered as
    a portlet in Portal.
    Regards
    Satish G

    As I can see from the information posted, you are trying to
    use URL-based portlet's SSO feature, though not in a correct
    way.
    The SSO feature of URL-based portlets relie on the usage
    of Cookies as authentication tokens. For example, in the
    present context, http://hostname:port/j2ee/examples/jsp/c.jsp
    will write a cookie to the client upon successfull authentication.
    Subsequent access to the same JSP or some other JSP in the same
    workspace should be checking for the existence of this particular
    cookie at the client side and if found should not prompt for
    user information again.
    If you can fine tune your existing applications as per above
    conditions, then everything should work fine. Else you might
    want to use page parameters to pass user information.
    For more information on page parameters, please visit
    http://portalstudio.oracle.com/servlet/page?_pageid=350&_dad=ops&_schema=OPSTUDIO&12678_PDKHOME902_39847486.p_subid=249821&12678_PDKHOME902_39847486.p_sub_siteid=73&12678_PDKHOME902_39847486.p_edit=0#NEW1

  • We can use JSR-168 JPS portlet upload file,

    We can use JSR-168 JPS portlet upload file,
    here is the source for you referrence:
    upload file can use JSR168 portlet,
    1,CustomizablePortlet.java File
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.ResourceBundle;
    import javax.portlet.*;
    import oracle.webdb.utils.SimpleStringBuffer;
    public class CustomizablePortlet extends GenericPortlet {
    private static final String TITLE_KEY = "title";
    protected static final String OK_ACTION = "ok_action";
    protected static final String APPLY_ACTION = "apply_action";
    protected static final PortletMode PREVIEW_MODE = new PortletMode("preview");
    protected static final PortletMode EDIT_DEFAULTS_MODE = new PortletMode("EDIT_DEFAULTS");
    protected static final PortletMode ABOUT_MODE = new PortletMode("ABOUT");
    public CustomizablePortlet() {
    public String getTitle(RenderRequest request) {
    return request.getPreferences().getValue("title", getPortletConfig().getResourceBundle(request.getLocale()).getString("javax.portlet.title"));
    public void doEdit(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.print("<FORM ACTION=\"");
    out.print(getEditFormSubmitURL(request, response));
    out.println("\" METHOD=\"POST\">");
    out.println("<TABLE BORDER=\"0\">");
    out.println("<TR>");
    out.println("<TD WIDTH=\"20%\">");
    out.println("<P CLASS=\"portlet-form-field\" ALIGN=\"RIGHT\">Title:");
    out.println("</TD>");
    out.println("<TD WIDTH=\"80%\">");
    out.print("<INPUT CLASS=\"portlet-form-input-field\" TYPE=\"TEXT\" NAME=\"");
    out.print("title");
    out.print("\" VALUE=\"");
    out.print(getTitle(request));
    out.println("\" SIZE=\"20\">");
    out.println("</TD>");
    out.println("</TR>");
    out.println("<TR>");
    out.println("<TD COLSPAN=\"2\" ALIGN=\"CENTER\">");
    out.print("<INPUT CLASS=\"portlet-form-button\" TYPE=\"SUBMIT\" NAME=\"");
    out.print("ok_action");
    out.print("\" VALUE=\"OK\">");
    out.print("<INPUT CLASS=\"portlet-form-button\" TYPE=\"SUBMIT\" NAME=\"");
    out.print("apply_action");
    out.print("\" VALUE=\"Apply\">");
    out.println("</TD>");
    out.println("</TR>");
    out.println("</TABLE>");
    out.println("</FORM>");
    protected String getEditFormSubmitURL(RenderRequest request, RenderResponse response) {
    return response.createActionURL().toString();
    public void doHelp(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.print("Help for <i><b>");
    out.print(getTitle(request));
    out.println("</b></i>.");
    public void doAbout(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    String aboutHTML = (new SimpleStringBuffer(30)).append("/about_").append(getPortletName()).append(".html").toString();
    PortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(aboutHTML);
    response.setContentType("text/html");
    if(rd != null) {
    rd.include(request, response);
    } else {
    PrintWriter out = response.getWriter();
    out.print("<p class=\"portlet-font\">This is the about page for ");
    out.print(getTitle(request));
    out.print(".</p><p class=\"portlet-font\">");
    out.print("To customize the contents of this page, create a file named '");
    out.print(aboutHTML.substring(1));
    out.print("' in the Portlet web application's root directory containing HTML ");
    out.print("to appear here. ");
    out.print("Alternatively, override the <code>CustomizablePortlet</code> ");
    out.println("class's <code>doAbout()</code> method.</p>");
    public void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    WindowState state = request.getWindowState();
    if(!state.equals(WindowState.MINIMIZED)) {
    PortletMode mode = request.getPortletMode();
    if(mode.equals(PREVIEW_MODE))
    doView(request, response);
    else
    if(mode.equals(EDIT_DEFAULTS_MODE))
    doEdit(request, response);
    else
    if(mode.equals(ABOUT_MODE))
    doAbout(request, response);
    else
    super.doDispatch(request, response);
    } else {
    super.doDispatch(request, response);
    public void processAction(ActionRequest request, ActionResponse actionResponse) throws PortletException, IOException {
    String newTitle = request.getParameter("title");
    PortletPreferences prefs = request.getPreferences();
    prefs.setValue("title", newTitle);
    prefs.store();
    if(request.getParameter("ok_action") != null) {
    actionResponse.setPortletMode(PortletMode.VIEW);
    actionResponse.setWindowState(WindowState.NORMAL);
    2,FileUploadPortlet.java file
    import java.io.*;
    import javax.activation.DataHandler;
    import javax.mail.MessagingException;
    import javax.mail.internet.MimeBodyPart;
    import javax.portlet.*;
    import oracle.portal.portlet.sample.CustomizablePortlet;
    public class FileUploadPortlet extends CustomizablePortlet
    private static final String FILE_PARAM = "file";
    private static final String SUBMIT_PARAM = "submit";
    private static final String DEFAULT_CHARSET = "ISO-8859-1";
    private static final String uploadRoot = "";
    public FileUploadPortlet()
    public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.print("<form action=\"");
    out.print(response.createActionURL().toString());
    out.println("\" enctype=\"multipart/form-data\" method=\"post\">");
    out.println("<center><table border=\"0\">");
    out.println("<tr>");
    out.print("<td class=\"portlet-form-field\" align=\"right\">");
    out.print("Please browse to an HTML file:");
    out.println("</td>");
    out.print("<td>");
    out.print("<input class=\"portlet-form-input-field\" type=\"file\" name=\"");
    out.print("file");
    out.print("\">");
    out.println("</td>");
    out.println("</tr>");
    out.println("<tr>");
    out.println("<td colspan=\"2\" align=\"center\">");
    out.print("<input type=\"submit\" class=\"portlet-form-button\" name=\"");
    out.print("submit");
    out.print("\" value=\"Display\">");
    out.println("</td>");
    out.println("</tr>");
    out.println("</table>");
    out.println("</form>");
    String lastFile = request.getPreferences().getValue("file", null);
    if(lastFile != null) {
    out.println("<hr width=\"100%\"><br>");
    out.print(lastFile);
    public void processAction(ActionRequest request, ActionResponse actionResponse) throws PortletException, IOException {
    FormDataParser parsedRequest = new FormDataParser(request);
    MimeBodyPart mbp = parsedRequest.getMimeBodyPart("file");
    if(mbp == null)
    super.processAction(request, actionResponse);
    else
    try {
    String fileName= mbp.getFileName();
    int splash = fileName.lastIndexOf("\\");
    if(splash != -1)
    fileName = fileName.substring(splash +1, fileName.length()).trim();
    String contentType = mbp.getContentType();
    String charSet = getCharsetFromContentType(contentType);
    int sepIndex = contentType.indexOf(';');
    if(sepIndex != -1)
    contentType = contentType.substring(0, sepIndex).trim();
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    mbp.getDataHandler().writeTo(bos);
    bos.close();
    String content = new String(bos.toByteArray(), charSet);
    FileOutputStream fos = new FileOutputStream(fileName);
    fos.write(bos.toByteArray());
    fos.close();
    PortletPreferences prefs = request.getPreferences();
    prefs.setValue("file", fileName + "upload ok");
    prefs.store();
    catch(MessagingException me) {
    throw new PortletException(me);
    public static String getCharsetFromContentType(String contentType) {
    int lastPos;
    if((lastPos = contentType.indexOf(';')) == -1)
    return "ISO-8859-1";
    lastPos++;
    String lowerContentType = contentType.toLowerCase();
    int nextPos;
    do {
    nextPos = lowerContentType.indexOf(';', lastPos);
    String param;
    if(nextPos == -1)
    param = lowerContentType.substring(lastPos).trim();
    else
    param = lowerContentType.substring(lastPos, nextPos).trim();
    if(param.startsWith("charset=") && param.length() > 8)
    return param.substring(8);
    lastPos = nextPos + 1;
    } while(nextPos != -1);
    return "ISO-8859-1";
    3,FormDataParser.java file
    import java.io.*;
    import java.util.*;
    import javax.activation.DataSource;
    import javax.mail.MessagingException;
    import javax.mail.internet.MimeBodyPart;
    import javax.mail.internet.MimeMultipart;
    import javax.portlet.ActionRequest;
    import javax.portlet.PortletException;
    public class FormDataParser {
    private static final String MULTIPART_PREFIX = "multipart/";
    private static final String MULTIPART_FORM_DATA = "multipart/form-data";
    private static final String PLAIN_TEXT = "text/plain";
    private ActionRequest mWrappedRequest;
    private Map mParams;
    private Map mBodyParts;
    private boolean mIsInitialized;
    private boolean mHasMultipart;
    public FormDataParser(ActionRequest request) {
    mWrappedRequest = request;
    public String getParameter(String name) throws PortletException {
    String value = mWrappedRequest.getParameter(name);
    if(value != null)
    return value;
    initParameters();
    if(!mHasMultipart)
    return null;
    List paramList = (List)mParams.get(name);
    if(paramList != null)
    return (String)paramList.get(0);
    else
    return null;
    public String[] getParameterValues(String name) throws PortletException {
    String values[] = mWrappedRequest.getParameterValues(name);
    if(!mHasMultipart)
    return values;
    initParameters();
    List valueList = (List)mParams.get(name);
    if(valueList == null)
    return values;
    int size = valueList.size();
    if(values != null) {
    List newValueList = new ArrayList(values.length + size);
    newValueList.addAll(Arrays.asList(values));
    newValueList.addAll(valueList);
    valueList = newValueList;
    values = new String[size];
    valueList.toArray(values);
    return values;
    public MimeBodyPart getMimeBodyPart(String name) throws PortletException {
    initParameters();
    if(!mHasMultipart) {
    return null;
    } else {
    List parts = (List)mBodyParts.get(name);
    return parts != null ? (MimeBodyPart)parts.get(0) : null;
    public MimeBodyPart[] getMimeBodyParts(String name) throws PortletException {
    initParameters();
    if(!mHasMultipart)
    return null;
    List parts = (List)mBodyParts.get(name);
    if(parts == null) {
    return null;
    } else {
    MimeBodyPart mimeBodyParts[] = new MimeBodyPart[parts.size()];
    parts.toArray(mimeBodyParts);
    return mimeBodyParts;
    private void initParameters() throws PortletException {
    if(mIsInitialized)
    return;
    String contentType = mWrappedRequest.getContentType();
    if(contentType == null) {
    mIsInitialized = true;
    return;
    int sepIndex = contentType.indexOf(';');
    if(sepIndex != -1)
    contentType = contentType.substring(0, sepIndex).trim();
    if(contentType.equalsIgnoreCase("multipart/form-data")) {
    mParams = new HashMap(20);
    mBodyParts = new HashMap(20);
    DataSource ds = new DataSource() {
    public InputStream getInputStream() throws IOException {
    return mWrappedRequest.getPortletInputStream();
    public OutputStream getOutputStream() throws IOException {
    throw new IOException("OutputStream not available");
    public String getContentType() {
    return mWrappedRequest.getContentType();
    public String getName() {
    return getClass().getName();
    try {
    MimeMultipart multipartMessage = new MimeMultipart(ds);
    parseMultiPart(multipartMessage, null);
    catch(MessagingException me) {
    throw new PortletException(me);
    catch(IOException ioe) {
    throw new PortletException(ioe);
    mHasMultipart = true;
    mIsInitialized = true;
    private void parseMultiPart(MimeMultipart multipartMessage, String parentFieldName) throws MessagingException, IOException {
    int partCount = multipartMessage.getCount();
    for(int i = 0; i < partCount; i++) {
    javax.mail.BodyPart part = multipartMessage.getBodyPart(i);
    if(part instanceof MimeBodyPart) {
    MimeBodyPart mimePart = (MimeBodyPart)part;
    String disps[] = mimePart.getHeader("Content-Disposition");
    if(disps != null && disps.length != 0) {
    String disp = disps[0];
    String lcDisp = disp.toLowerCase();
    int nameStart;
    int nameEnd;
    if((nameStart = lcDisp.indexOf("name=\"")) != -1 && (nameEnd = lcDisp.indexOf("\"", nameStart + 6)) != -1)
    parentFieldName = disp.substring(nameStart + 6, nameEnd);
    if(parentFieldName != null)
    if(mimePart.getContentType().toLowerCase().startsWith("multipart/")) {
    Object content = mimePart.getContent();
    if(content instanceof MimeMultipart)
    parseMultiPart((MimeMultipart)content, parentFieldName);
    } else
    if((nameStart = lcDisp.indexOf("filename=\"")) != -1 && (nameEnd = lcDisp.indexOf("\"", nameStart + 10)) != -1) {
    List values = (List)mBodyParts.get(parentFieldName);
    if(values == null) {
    values = new ArrayList(1);
    mBodyParts.put(parentFieldName, values);
    values.add(mimePart);
    } else
    if(mimePart.getContentType().toLowerCase().startsWith("text/plain")) {
    Object content = mimePart.getContent();
    if(content instanceof String) {
    List values = (List)mParams.get(parentFieldName);
    if(values == null) {
    values = new ArrayList(1);
    mParams.put(parentFieldName, values);
    values.add((String)content);
    4.web.xml file
    <?xml version = '1.0' encoding = 'ISO-8859-1'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <display-name>hanhuiwen OracleSamplePortlets</display-name>
    <description>hanhuiwen Oracle Sample Portlet Application</description>
    <servlet>
    <servlet-name>portletdeploy</servlet-name>
    <servlet-class>oracle.webdb.wsrp.server.deploy.PortletDeployServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>portletjaxrpc</servlet-name>
    <servlet-class>com.sun.xml.rpc.server.http.JAXRPCServlet</servlet-class>
    <init-param>
    <param-name>configuration.file</param-name>
    <param-value>/WEB-INF/WSRPService_Config.properties</param-value>
    </init-param>
    </servlet>
    <servlet>
    <servlet-name>portletresource</servlet-name>
    <servlet-class>oracle.webdb.wsrp.server.ResourceServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ChartServlet</servlet-name>
    <display-name>Chart Servlet</display-name>
    <description>Demo image-generating servlet</description>
    <servlet-class>oracle.portal.portlet.sample.chart.ChartServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>uix</servlet-name>
    <servlet-class>oracle.cabo.servlet.UIXServlet</servlet-class>
    <init-param>
    <param-name>oracle.cabo.servlet.pageBroker</param-name>
    <param-value>oracle.cabo.servlet.xml.UIXPageBroker</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>ChartServlet</servlet-name>
    <url-pattern>/chart*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>portletjaxrpc</servlet-name>
    <url-pattern>/portlets*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>portletresource</servlet-name>
    <url-pattern>/portletresource*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>uix</servlet-name>
    <url-pattern>*.uix</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>uix</servlet-name>
    <url-pattern>/uix/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>60</session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>index.uix</welcome-file>
    </welcome-file-list>
    <!--
    LogLevel controls the amount of information logged. There are 7 log levels:
    0 - logging disabled
    1 - configuration
    2 - severe error
    3 - warning
    4 - throwing exception
    5 - performance
    6 - information
    7 - debug
    The oracle.portal.log.Logger interface defines methods that map to these 7
    log levels. However, there are also 2 methods that do not map to log
    levels. These methods are included for backwards compatibility and data
    logged using these methods will always be logged regardless of the log level.
    -->
    <env-entry>
    <env-entry-name>oracle/portal/log/logLevel</env-entry-name>
    <env-entry-type>java.lang.Integer</env-entry-type>
    <env-entry-value>7</env-entry-value>
    </env-entry>
    </web-app>
    5.portlet.xml
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
    <portlet>
    <description xml:lang="en">A portlet that demonstrates the file upload features of the Java Portlet Specification.</description>
    <portlet-name>FileUpload</portlet-name>
    <portlet-class>FileUploadPortlet</portlet-class>
    <expiration-cache>0</expiration-cache>
    <supports>
    <mime-type>text/html</mime-type>
    <portlet-mode>help</portlet-mode>
    <portlet-mode>about</portlet-mode>
    <portlet-mode>edit_defaults</portlet-mode>
    </supports>
    <supported-locale>en</supported-locale>
    <portlet-info>
    <title>File Upload Portlet</title>
    <short-title>File Upload</short-title>
    <keywords>File,Upload, Portlet</keywords>
    </portlet-info>
    </portlet>
    <custom-portlet-mode>
    <description xml:lang="en">This mode should be used by the portlet to display information on the portlet's purpose, origin, version, etc.</description>
    <portlet-mode>about</portlet-mode>
    </custom-portlet-mode>
    <custom-portlet-mode>
    <description xml:lang="en">This mode signifies that the portlet should render a screen to set the default values for the modifiable preferences that are typically changed in the EDIT screen. Calling this mode requires that the user must have administrator rights.</description>
    <portlet-mode>edit_defaults</portlet-mode>
    </custom-portlet-mode>
    <custom-portlet-mode>
    <description xml:lang="en">This mode should be used by the portlet to render output without the need of having back-end connections or user specific data available.</description>
    <portlet-mode>preview</portlet-mode>
    </custom-portlet-mode>
    <user-attribute>
    <name>user.name.given</name>
    </user-attribute>
    <user-attribute>
    <name>user.name.family</name>
    </user-attribute>
    <user-attribute>
    <name>user.name.middle</name>
    </user-attribute>
    <user-attribute>
    <name>user.name.nickname</name>
    </user-attribute>
    <user-attribute>
    <name>user.bdate</name>
    </user-attribute>
    <user-attribute>
    <name>user.business-info.online.email</name>
    </user-attribute>
    </portlet-app>

    Hello i had exactly the same error, but not with file upload.
    I'm sure you have in your application lib directory to jars which aren't compatible to each other.
    And the problem occured between my myfaces and tomahawk jars .
    See this page:
    http://wiki.apache.org/myfaces/CompatibilityMatrix
    It tells you which myfaces and tomahawk jars you can use together.
    Hope it can help.
    bye

Maybe you are looking for

  • Conditon record is not picking in CRM

    I have created new condition table with new combination and downloaded to CRM from R/3. After that i have new condition records with that combination and those records also came to CRM from R/3. But when i create service order this condtion record is

  • Best way to Organise - Shared Documents with Others and to iPad2

    I have a large number of iWork documents on my iMac. Some of these documents I wish to share with others and also to my iPad2. Previously I used the iWork.com BETA and this was integrated with Pages, Numbers and Keynote through the 'Share' iCon in ea

  • Runtime Error for Set text container

    Hi I'm receiving a runtime error in IE for a set text for container. Works in Firefox and Safari. IE dubugging says its line 17 (which is the last line of code):

  • REALLY REALLY URGENT!!!!!!! DUE IN THREE HOURS!!!!

    I BET U CANT DO THIS PROBLEM IN 3 HOURS: Objective The objective of this homework is to help you become familiar with the SAX and DOM interfaces for XML parsers. Description The structure of a web site can be saved in a graph structure. The nodes of

  • EEnvelope date stamp

    Hello - In Adobe Acrobat 9 Pro, I'm creating a security envelope using Acrobat's included "eEnvelope with Date Stamp" template (template2.pdf). The resulting date stamp is exactly 8 hours ahead of the actual time on my computer's clock (i.e. I create