HttpServlet as PortalComponent - How to access iView Configuration

Hi There,
we did a HTTP Servlet class as a PortalComponent and deployed it as a par-File.
Now we would like to define configuration parameters in an iView based on this component and get access to these parameters in the Servlet Class. Unfortunately there seems to be no way to reach the iView ConfigurationProfile from the  Servlet.
Greetings
Walter

Hi,
Ok. Let me tell you my scenario:
I have a java web application in which I need to read a configuration file(WebAgent.conf) that has the reference of another configuration file(SmHost.conf). I am placing both these configuration files in the <root-dir> of the application along with other jsp and html files.
I am specifying the path for WebAgent.conf as &ldquo;/WebAgent.conf&rdquo; in my AuthenticateUser java class and in WebAgent.conf, the reference to SmHost.conf is given as &ldquo;/SmHost.conf&rdquo;.
I am copying the content of the all the files for your reference below:
AuthenticateUser.java
String webagentConfigFile = "/WebAgent.conf";
InitDef initdef = new InitDef();
int retcode = agentapi.getConfig(initdef, agentName, webagentConfigFile); // retcode=-1 which implies that code is unable to read the configuration file.
AuthBean authbean = new AuthBean();
WebAgent.conf:
agentconfigobject="1365-pmtrade-trd-dvl4-443-aco"
hostconfigfile="/SmHost.conf"
But with this approach, I am unable to read this configuration files. Kindly let me know where I am going wrong.

Similar Messages

  • How to access CQ configuration settings using CQ HTTP client?

    Hi,
    I am trying to access CQ configuration in my application using CQ HTTP client. I am able to access through ConfigAdmin, but not directly.
    Please suggest a way to access the configuration directly by CQ HTTP client.
    Is CQ proxy settings directly available to CQ HTTP client? if so, how do we access it?
    Thanks

    Yes it is directly available. The proxy does not need to be explicitly configured for each HttpClient since it is done automatically when the com.day.commons.osgi.wrapper.commons-httpclient gets activated.  Make sure your bundle imports [1] and call as HttpClient client = new HttpClient();
    [1]
    org.apache.commons.httpclient,version=3.1.0 from com.day.commons.osgi.wrapper.commons-httpclient (xx)
    org.apache.commons.httpclient.methods,version=3.1.0 from com.day.commons.osgi.wrapper.commons-httpclient (xx)

  • How to access to configuration page of the router through the windows phone 7 ?

    Hi all
    I'd like to know if there's a way to access to configuration page of the router through my windows phone 7.
    I usually access the router by laptop as following: "192.168.1.1". but sometimes when I'm on my phone  I need to reboot the router through my phone other then the laptop which is not near me...
    I looked up for applications that should do the work, but unfortunately I got no positive result, so I'm reaching out to this very forum in order to find help and tricks so that I can figure it out
    thank you in advance

    Hi Happydz,
    For help using Windows Phone please post in the Windows Phone forums on
    http://answers.microsoft.com .
    The MSDN Windows Phone Development forums are for developers to discuss writing their own Windows Phone apps.
    That said, I'd expect you could connect to 192.168.1.1 from the phone's browser the same way you would from the laptop's browser.

  • How to access (or configure) the web based Oracle Beehive workspaces client

    Hello,
    In the one of the Oracle Beehive online trial, there is a demo about working with workspaces using a web interface:
    https://beehive-ondemand.oracle.com/Documents.html
    I've been searching the documentation how can I access this web client on my installation, but I hadn't find the URL.
    I'm wondering if this web client is included in the 1.4 version, if so, how can I access it? Do I have to configure it or install it? How?
    Thanks for your help.
    Edited by: user3585264 on Oct 18, 2008 9:33 PM

    Hello
    this client is not provided with the 1.4.1., but it is expected with the next release (in a couple of month normally, that's what great weith beehive releases, every 2-3 month you get a lot of news !! )
    Stay tuned on MGMT - Kids, that's Oracle new anthem (or it should be :D, that song was everywhere during OOW, along with Time to Pretend)

  • How to access PCI configuration info from CVI

    I am using CVI. I need to read the resources allotted to my PCI interface card, Access the memory, IO and use the interrupt.

    Hello
    you best bet would be to use the low level functions like inp and outp. Or better yet, use VISA, check out this link
    But CVI is general is targeted more towards application development, and not really for driver development. VISA is a pretty powerful tool for this, so you might want to explore that some more.
    I hope this helps
    Bilal Durrani
    NI
    Bilal Durrani
    NI

  • How to access the content in the configuration files

    Hi, Folks,
    To make it easy, the questions can be like this:
    how to access the content in web.xml in a web application?
    Through ServletConfig and context?
    how to access the content in ejb-jar.xml in an ejb?
    initial context?
    Thanks

    There is no documented way to delete data stored in archived log files: you can only remove the archived log files if needed.

  • How to access the images stored in folder which is kept inside theapplicati

    Iam new to java..
    I want to display the images (.jpeg,,.gif, flash) which are kept in one folder
    Using Jsp...
    Its Executing fine in local system..
    Its not working 1)when i execute that jsp from other system
    2)if i give the full url then only its executing in local system
    Please help me...
    thanks in advance...
    by Priya
    <%@ page import="java.io.*"%>
    <html>
    <head>
    <title>Movie Details</title>
    </head>
    <body text="#000000" bgcolor="#FFFFFF">
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" id="AutoNumber1">
    <%
    File f=new File("..E:\application\Images");
    File []f2=f.listFiles();
    for(int ii=0;ii<f2.length;ii++)
    if(f2[ii].isFile())
    String fname=f2[ii].getPath();
    %>
    <tr>
    <td width="87%"><%=fname%> </td>
    <td width="14%"><img border="0" src="<%=fname%>" width="150" height="100" ></td>
    </tr>
    <%
    System.out.println(f2[ii].getPath());
    %>
    </table>
    </body>
    </html>

    Hi,
    Well i guess a Simple concept of a image servlet can cater your requirement here.
    checkout the below example of how to do it
    Configurations needed in /WEB-INF/web.xml:
    <servlet>
        <servlet-name>ImageServlet</servlet-name>
        <servlet-class>com.ImageServlet</servlet-class>
        <init-param>
           <param-name>backupFolderPath</param-name>
           <param-value>E:/application/Images</param-name>
           <!--Could use any backup folder Available on your Server and make sure we place a image file named noImage.gif which indicates that there is no file as such-->
        </init-param>
         <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>DownloadServlet</servlet-name>
        <url-pattern>/Image</url-pattern>
    </servlet-mapping>
    ImageServlet.java:
    package com;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    *@Author RaHuL
    /**Image Servlet
    *  which could be accessed Image?fid=fileName
    *  or
    *  http://HOST_NAME:APPLN_PORT/ApplnContext/Image?fid=fileName
    public class DownloadServlet extends HttpServlet{
      private static String filePath = new String();
      private static boolean dirExists = false;
      public void init(ServletConfig config){
          // Acquiring Backup Folder Part
          filePath = config.getInitParameter("backupFolderPath");
          dirExists = new File(filePath).exists();      
      private void processAction(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{
           // getting fileName which user is requesting for
           String fileName = request.getParameter("fid");
           //Building the filePath
           StringBuffer  tFile = new StringBuffer();
           tFile.append(filePath);    
           tFile.append(fileName); 
           boolean exists = new File(tFile.toString()).exists();
           FileInputStream input = null;
           BufferedOutputStream output = null; 
           int contentLength = 0;
           // Checking whether the file Exists or not      
           if(exists){                  
            try{
                // Getting the Mime-Type
                String contentType = this.getContentType(tFile.toString());          
                input = new FileInputStream(tFile.toString());
                contentLength = input.available();
                response.setContentType(contentType);
                response.setContentLength(contentLength);
                 String contentDispo = "";
                  try{
                     contentDispo = request.getParameter("coid");
                  }catch(Exception exp){
                 if(contentDispo != null && contentDispo.equals("69125"))
                   response.setHeader("Content-Disposition","attachment;filename=\""+fileName+"\"");       
                this.exportFile(input,response.getOutputStream());
             }catch(Exception exp){
                 exp.printStackTrace();
                 this.getServletContext().log("Exception Occured:"+exp.getMessage());
                 throw new ServletException(exp.getMessage());
           }else{
              try{
                 // Getting the Mime-Type
                String contentType = this.getContentType(filePath+"noImage.gif");          
                input = new FileInputStream(filePath+"noImage.gif");
                contentLength = input.available();
                response.setContentType(contentType);
                response.setContentLength(contentLength);
                this.exportFile(input,response.getOutputStream());
              }catch(Exception exp){
                 exp.printStackTrace();
                 this.getServletContext().log("Exception Occured:"+exp.getMessage());
                 throw new ServletException(exp.getMessage());
      /** Gets the appropriate ContentType of the File*/
      private String getContentType(String fileName){
            String url = java.net.URLConnection.guessContentTypeFromName(fileName);
               if(url == null)
                 return "application/octet-stream";
               else
                 return url;
           or one may use
           return new  javax.activation.MimetypesFileTypeMap().getContentType(fileName);
           NOTE: Do not forget to add activation.jar file in the classpath
      /** Prints the Image Response on the Output Stream*/
      private void exportFile(InputStream input,OutputStream out) throws ServletException,IOException{
             try{
                    output = new BufferedOutputStream(out);
                    while ( contentLength-- > 0 ) {
                       output.write(input.read());
                    output.flush();
              }catch(IOException e) {
                    e.printStackTrace();
                     this.getServletContext().log("Exception Occured:"+e.getMessage());
                     throw new IOException(e.getMessage());
              } finally {
                   if (output != null) {
                       try {
                          output.close();
                      } catch (IOException ie) {                     
                            ie.printStackTrace();
                         this.getServletContext().log("Exception Occured:"+e.getMessage());
                         throw new IOException(ie.getMessage());
      /** HttpServlet.doGet(request,response) Method*/
      public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException{       
            // Calling  respective Action Method to Provide File Service
            this.processAction(request,response); 
      /** HttpServlet.doPost(request,response) Method*/
      public void doGet(HttpServletRequest request,HttpServletResponse response) throws         ServletException,IOException{
            // Calling  respective Action Method to Provide File Service
            this.processAction(request,response); 
    NOTE: The following code could be used to provide service to stream any sort of files with any sort of content
    with some minor modications.
    Inorder to access all the images you can restructure your jsp like the one below
    JSP:
    <!--
         And say we have are storing Image name & Movie details in the database and we are created a collection
         of all the database results like bean here is how we would display all the details with images
         Say you wrote a query to findout Moviename,timings,Hall Number & pictureFileName
         example:
            Movie: DIE HARD 4.0
            Timings: 10:00AM,2:00PM,9:15PM
            Hall NUmbers: 1,1,2,4 
            pictureFileName: die_hard_4.jpg
             or
            Movie: Transformers
            Timings: 11:20AM,2:20PM,10:15PM
            Hall NUmbers: 2,3,1,5 
            pictureFileName: transformers.jpg
         say you are saving the information in a dtoBean with properties like
          public class MovieBean{
             private String movieName;
             private String timings;
             private String pictureFileName;
             /* and followed by getters & setter of all those*/
          and say we have queried the database and finally collected an ArrayList<MovieBean> from the query results and
          saving it within the scope of session with the attribute name "MovieList"
    -->
    <%@ page language="java"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>
    <html>
    <head>
    <title>Movie Details</title>
    </head>
    <body text="#000000" bgcolor="#FFFFFF">
    <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#FFFFFF" width="100%" id="AutoNumber1">
    <thead>
    <tr>
        <td>Movie Name</td>
        <td>Timings</td>
        <td>Hall Numbers</td>
        <td>Poster</td>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="movieBean" items="${sessionScope.MovieList}">
        <tr>
             <td><c:out value="${movieBean.movieName}"/></td>
             <td><c:out value="${movieBean.timings}"/></td>
             <td><c:out value="${movieBean.hallNo}"/></td>
             <!-- Here is where we are making use of image servlet and trying to retrive images -->
             <td><img src="Image?fid=<c:out value="${movieBean.pictureFileName}"/>" align="center" width="30" height="30"/></td>
        </tr> 
    </c:forEach>
    </tbody>
    </table>
    </body>
    </html>Hope this might help,If that does do not forget to assign the duke stars which you promised :)
    REGARDS,
    RaHuL

  • How to access Portal URL outside of the LAN

    Hi Experts,
    Our J2EE engine is hosted on one machine and R/3 is installed on other machine (IP address is different). We have configured Web Dynpro ABAP iVIEW's and Transaction iViews in my portal. To be able to access these two iViews I have to maintain the IP addresses of both EP server and R/3 server IP's in every client host file.
    Hence my client system is in LAN it is working with no issues, but we want to access the URL form out of LAN which is not possible at the moment.
    Could anyone please advise me how to access the URL without maintaining the IP address in host file
    and
    able to access the URL out side of the LAN.
    Thanks
    Murthy

    Hi Murthy,
    Directly its not possible at all, For this you need to publish the Portal Server on Internet.
    Once its published on internet  then you can access the URL without maintaining the
    IP address in host file.
    In this your Basis Team and Network team will help you.
    Regards,
    Piyush

  • How to access a value from "List of Values" by giving a name?

    I have a "List Of Values" defined in my BI Report. It comprises list of label-value pairs.
    I have defined a parameter :p_Value for the above "List Of Values" defnition. this parameter is used in datasource sql defnition to filter the query results. I configured a template which has a table that shows all the parameters used for filtering query results. If I give <?$p_Value?> in the template then the parameter value is rendered on it. But I want the "name" of the parameter and not the value. Can anybody tell me how to access name of the parameter which refers to one of value in "List of Value" defnition?

    option 1:
    Can you get the value from the DB in the report sql ?
    You have the code, inside the report query, if you can get the decoded value form that
    option2:
    create another paramater, LOV and query, and make it as hidden, and use the first :param_1_value in the lov query in the second param and decode the value.
    Now , you can refer the :PARAM_2_value in template which will have decoded value.

  • How to access tables/views of an external database provider..

    After much trouble I finally managed to setup a second Database Provider that doesn't display the "0 out of 0 connections are good" error by filling in the "Configuration Class" field with "intradoc.server.DbProviderConfig".
    But now the problem is actually accessing the tables/views in my newly configured external database provider...
    In the Configuration Manager applet when I try to add a new Table or View it only lists the tables contained in the schema of the SystemDatabase database provider (the original one), I've tried running Queries via components trying stuff like SELECT * FROM provider_name.table_name and other similar but obviously it doesn't work...
    So... with that said, I just want to know how I access tables or views in my "supposedly" well conected (15 out of 15 connections are good, no errors on the Test Query) Oracle external Database Provider - After searching I was unable to find any information regading any post-provider-setup actions in the Content Server documentation - Does anyone know how to do this?
    On a side note, if the database is SQLServer instead of Oracle, with the same configuration and apparently no errors on the database side (other clients access it well) the Query Test of the new database provider returns the following error:
    "The provider 'TestSqlSrv' is in error. Unable to create database connection for JDBC:ODBC:SqlSrv. Unable to create result set for query 'select * from dummy'. Invalid Fetch Size Unable to create result set for query 'select * from dummy'. Invalid Fetch Size java.sql.SQLException: Invalid Fetch Size".But I won't even go there yet.... for now I would settle with just knowing how to reference information in the Oracle external database provider...
    Message was edited by:
    user602700

    if you are able to, pick up Bex Huff's book the Definitive Guite to Stellent Content Server Development (amazon link: http://www.amazon.com/Definitive-Stellent-Content-Server-Development/dp/1590596846/ref=sr_1_1?ie=UTF8&s=books&qid=1196365101&sr=8-1)
    chapter 11 is all about this.

  • How to access the gui through a NAT device

    Hi
    I have to access the management GUI over a NAT IP. So the browser is not accessing the configured managment IP. How can this be realized?
    Unfortunately the programmers wrote the HTML code with absolute addressed links instead of using relative links.
    Example HTML code excerpt from the web gui:
    <script src="
    https://wsa.test.local:8443/scfw/1y-7.1.2-020/yui/animation/animation-min.js"></script>
    Good code shoul read like:
    <script src="/scfw/1y-7.1.2-020/yui/animation/animation-min.js"></script>
    The second code doesn't take care on which hostname/IP nor port the web gui is seen from the client. The browser just adds hostname to the beginning of the URL as it was used to access the starting page. So a NAT or even PAT on the way to access the box has no influence on the usability.
    Any ideas how to circumvent that problem?

    We found out that this seems to be a limitation of the browser. It doesn't work with iE 8/9 but it works with Firefox 6.0.1.
    Strange...

  • How to access/open rpd files in offline mode from client desktop

    Hi All,
    Please tell me what configuration settings I need to have on my desktop to access RPD files stored on BI server?
    In our OBIEE environment, we have BI server installed on linux server, and I have installed BI admin tool on my desktop (Windows OS).
    I need to know what settings I should configure in my NQSConfig.ini file on my desktop so that I can access rpd files stored on BI server...
    I can access online RPD using BI server ODBC connectibity, but want to access other offline RPD files stored in repository directory on linux server where OBIEE 11g server installation is done.
    Thanks and Regards
    Santosh
    Edited by: 910192 on 22-Feb-2012 08:09

    Saichand,
    Highly appreciate your response.
    But wht I am looking for is how to access other RPD files stored in repository folder on server machine where BI server is running, from BI administration tool which is installed on my desktop
    I am able to access default online repository on BI server using ODBC configuration from BI admin tool on my desktop, but want to access other rpd files (lets say sample rpd files which are installed on BI server machine) using (file->open-offline) option.
    As per Jay, it seems it is not possible to access repositories other than online repository on BI server, and I will have to copy those rpd files on my desktop and then access using file->open->offline option in BI admin tool.
    If you have any other way of doing this or have done this somehow , please let me know.
    Thanks and Regards
    Santosh

  • How to access MS SQL in Oracle BI Administration?

    Hi All,
    I'm a new in Oracle BI, I've just created an business application using Oracle BI Administration Tool of Oracle BI Server version 10.1.3.4.1:
    Steps:
    1. building repository (through Physical, Business model and Mapping, Presentation),
    2. making Answers from Presentation Services.
    => It ran well and beautiful reports, charts. But now, my DB is stored in Microsoft SQL Server, help me how to access MS SQL in Oracle BI, more details steps, are there any useful links?
    Appreciate All.

    Hi
    Do the following
    Control panel> Administration tool> ODBC>SystemDSN > ADD > select the driver>Your SQL SERVER credentials
    Then test the connection
    Go to the BI tool
    IMPORT from Database>Select the SQL server connection you have just created>Locate your desired schema> configure the connection pool> import
    regards
    Roy

  • How to access Pointbase?

    I create a domin,then I start the pointbase cmd,
    I fill username and password both same weblogic(url:jdbc:pointbase:server://localhost:9093/weblogic_eval and driver:com.pointbase.jdbc.jdbcUniversalDriver,but I can't login it.
    the error prompt is not port 9093 on listen,I don' know how to access!?

    Hi Fish,
    It looks like you are using the correct connection URL and driver so it is likely that Pointbase did not start when you started your server. You should check your command window for error messages regarding Pointbase. Also, make sure that your start script was invoked with POINTBASE_FLAG=true in your environment.
    If you don't know if POINTBASE_FLAG=true or how that would have gotten set then trace your start script and you will see that the setDomainEnv script is configured, by default, to use Pointbase.
    I can never remember the connection URL for the Pointbase console so whenever I use it I look at the value in one of the XML files in the config/jdbc dir in my domain: C:\bea_wlp102\user_projects\domains\my_domain\config\jdbc
    The URL is:
    jdbc:pointbase:server://localhost:9093/WEBLOGIC_EVAL
    The driver is:
    com.pointbase.jdbc.jdbcUniversalDriver
    I don't think the URL is case-sensitive, but just in case it is you might want to try consistent capitalization. For the user/password, the same thing. The XML file specifies WEBLOGIC, not weblogic.

  • How to access Hyper-V Client from Hyper-V Server to the new machines?

    Hi
    We have a small company in that we have 50 machines, i am having windows 2012 r2 server, i installed Hyper-V with that i have created virtual OS(winxp and win7) in the Hyper-V server. My question is how to access them in client Machines, Can Anybody help
    me in this regards?
    Regards
    Meer Akbar Ali

    Hi Meer,
    In addition ,  you need to use external virtual switch for these VMs that are used for RDP connection from clients .
    Please refer to the article below for virtual network configuration :
    http://technet.microsoft.com/en-us/library/cc732470(v=WS.10).aspx#BKMK_ConfigVN
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

Maybe you are looking for

  • I cant open Camera Raw in Bridge cs6 - MAC

    Hello - I'm using a Mac and use photoshop/bridge CS6. Today as i opened bridge to batch edit photos in camera raw, the "open in camera raw" option was not available to click on. It worked perfectly yesterday and now today it's not. Is there a way to

  • Mac Pro using Mac Mini as Print Server

    Hi all, Mac Pro is wired to my network, Mac Mini is Airport connected. I'd like to use Mac Mini as a Print Server without keyboard and mouse. I've installed OSXvnc-server on Mac Mini and Chicken of the VNC (CVNC) Client on Mac Pro. Mac Pro's keyboard

  • PL/SQL XML Parser (problem getting text of a node)

    I am trying to get the contents of an ELEMENT (node with a CDATA section) using xmldom.getNodeValue(). However, it seems that there is a MAXIMUM number of characters that I can get back. I think I've found a work-around using xmldom.writeToBuffer() w

  • Error message 1015 and 2003

    Hi guys and girls, I have recently stated to use an I-Phone and have encountered a problem when trying to restore the handset after it has placed itself into recovery mode. The handset currently displays the charger pointing toward the cd/music symbo

  • Too late to re-activate adobe ...so it closed

    Hello Have I done a catastrophic mistake by being too late to re-activate my Adobe creative suite? I have had computer problems. When I in the end bought a new computer and tried to install Adobe, the re-activation time had run out. I did have a poss