Server context path in the listener class

Hi, I have a listener class which sends a notification mail. The mail should contain a URL to a page on the server where this listener class is invoked. How can I construct the absolute URL in the lsitener class?

Hi Masashi Fujita,
Check this Link for Uploading and Downloading files using Web Dynpro Java.
[Uploading and Downloading Files in Web Dynpro Java|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71]
[Upload Files Using Web Service in Web Dynpro Java Application|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0d9336b-b4cf-2910-bdbf-b00d89bd2929]
[Uploading and Downloading Files in Web Dynpro Tables|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982cb83f]
Thanks & Regards,
Sharma Kvbk.

Similar Messages

  • File does not Upload !   Error in the listener class com.sap.ip.portal...

    Hello.
    Recently, I Add a New Server Node on Java Central Instance.
    And Java Program Upload on Portal, then following error occured.
    Error in the listener class com.sap.ip.portal.admin.portalanywhere.QueryHandler during the process of
    handleTopic
    Original server node can upload successfully.
    But, An error happens in New Additional node.
    Please tell me way to resolve the error.
    Regards.
    Edited by: Masashi Fujita on Dec 24, 2008 5:29 AM
    Edited by: Masashi Fujita on Dec 25, 2008 7:20 AM

    Hi Masashi Fujita,
    Check this Link for Uploading and Downloading files using Web Dynpro Java.
    [Uploading and Downloading Files in Web Dynpro Java|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71]
    [Upload Files Using Web Service in Web Dynpro Java Application|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0d9336b-b4cf-2910-bdbf-b00d89bd2929]
    [Uploading and Downloading Files in Web Dynpro Tables|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e10426-77ca-2910-7eb5-d7d8982cb83f]
    Thanks & Regards,
    Sharma Kvbk.

  • Unable to add the Listener class in project .

    Hi friends ,
    I'm using deploytool of Sun's AppServer 8.2.
    I'm not abel to add the Eventlistener class in the project.
    In the Help Menu the given following discription to Add the Event Listener call
    Web Application WAR File -> Event Listeners tabbed pane
         1. Click Add to add an event listener to the Event Listener Classes list.
         Locate any event listener classes contained in this WAR file in the drop-down list in the Event Listener Classes      pane.
         (note:There is no any drop-down list in in the Event Listener Classes pane.)
    2. If the event listener class is not in the list, in the General tab, click Edit and to go to the Edit Contents      dialog box where the event listener class can be added to the contents of the WAR file. Upon return the event      listener class will be in the pull-down list.
              (note:But the listener class is present in General tab ,WEB-INF->classes->listeners(In the Contents of the           General tab.))
    How could i resolved this , i mean how to add Event Listener Classes in project ?
    (Same problem while adding error page and filter classes which are also present in the General tab)
    Regards,
    Sachin Warang.

    I suggest using NetBeans IDE 5.5, which integrates easily with various appservers, including Sun Java System Application Server.
    -cheng

  • How to give the application server file path in the module pool programming

    Hi,
         Could somebody help me how to provide the application server file path in module pool programming once the logo is uploaded to sap system.
      For eg I have imported a logo name ‘owens’ into sap system by using transaction ‘se78’; now I need to call the path in the below url,
    if container2 is initial.
    CREATE OBJECT CONTAINER2
      EXPORTING
        CONTAINER_NAME              = 'PICTURE_CONTAINER2'.
    CREATE OBJECT PICTURE2
      EXPORTING
        PARENT = CONTAINER2.
    CALL METHOD PICTURE2->SET_DISPLAY_MODE
      EXPORTING
        DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
      EXCEPTIONS
        ERROR        = 1.
    CALL METHOD PICTURE2->LOAD_PICTURE_FROM_URL
      EXPORTING
        URL    = " ? "
      EXCEPTIONS
        ERROR  = 1
        Others = 2.
    endif.
    Thanks in advance
    Deepu

    hi Deepu,
    Use FM '/SAPDMC/LSM_F4_FRONTEND_FILE' for fetching the data from the application server path/presentation server path
    Regards,
    Santosh

  • Listener class not found which is declared in the Connector project.

    Hi friends,
    I have a problem, I have created a new J2ee connector project in eclipse
    and created the classes listener,activatioinspec,resource adapter and worker with the name JCA1. I have created another Message driven bean project with name MDB1.Since iam using EJB2.1, I have not implemented MessageListener instead of that i have implemented the
    listener class which is created in the JCA1 Connector project.In the MDB class i have imported that listener class implemented.
    Iam using application server Jonas, i have declared in ra.xml message listener type, In the MDB1 ejbs ejb-jar also declared messaging type.
    While deploying the MDB1 jonas log says the class listener declared in the JCA1 not found , can any one suggest what is the problem ??, Listerner class is declared in JCA1 Connector.
    Thanks
    Rafel

    Did you read the tutorial from Creator?
    David
    http://www.pricerunner.com/forum/viewtopic.php?t=1659

  • Load Java classes location/path in the datbase

    Hi all,
    I have uploaded Java class file into the database using LOAD JAVA.
    Where i can see my sources or class file in the database home?
    I mean directory path for the java class?
    Thanks

    Kalee wrote:
    Is there a way to see java source(methods,variables etc) from database?If there is no java sources in DB (only class files were loaded), then unload classes and use a decompiler. For example, jad or jd.

  • Mapping of Web App context root and the physical directory of the web app

    I'm running Weblogic 7.0 on Windows2000.The physical directory of my web application
    is D:\WL8\weblogic81\TestDeploy\build\TestWebApp and under these directory I have
    my JSPS, static HTML and WEB-INF. I define the context path of this web app in
    the weblogic.xml ;-
    <weblogic-web-app>
         <context-root>/testapp</context-root>
    </weblogic-web-app>
    As a result of deploying this web app in the server (or it may be created manually
    also), the following entry gets inserted in the server's config.xml ,-
    <Application Deployed="true" Name="TestWebApp"
    Path="D:\WL8\weblogic81\TestDeploy\build" TwoPhase="true">
    <WebAppComponent Name="TestWebApp" Targets="myserver" URI="TestWebApp"/>
    </Application>
    Now, whenever I make a request of the form "http://localhost:7001/testapp/..",
    it's properly executing my web app. My question is, how does the container knows
    that for any request for the web app with context path as 'testapp', it has to
    server files from D:\WL8\weblogic81\TestDeploy\build\TestWebApp. In the above
    process, nowhere such mapping is specified. I expected something like Tomcat's
    server.xml, where in docbase we clearly specify this mapping between the context
    path and the physical directory. Please help.

    Let me give some more details and hopefully this will make things clearer.
    Say you deploy /foo/bar/myweb.war and in myweb.war you configure a
    context-root of /rob
    During deployment, the server creates an ApplicationMBean with a path of
    /foo/bar/. It then creates a WebAppComponent with a uri of myweb.war.
    Next, deployment calls back on the web container and tells it to deploy
    the WebAppComponent. The web container reads the myweb.war, parses
    descriptors etc. The web container then updates its data structures to
    register that myweb.war has a context path of /rob. (It has to figure
    out all the other servlet mappings as well.)
    When a request for /rob/foo comes in, the web container consults its
    data structures to determine which webapp and servlet receives the
    request. This is not a linear search of all webapps and servlets.
    There's much better ways to do pattern matching.
    Hope this clears things up. Let me know if you still have questions.
    -- Rob
    Arindam Chandra wrote:
    Thanks for the answer. Still one thing is not clear. Whatever context path I declare
    for my web app as the value of <context-root> element in the weblogic.xml (in
    my example it's "/testapp"), it is no where mapped with the "URI" attribute (or
    any other attribute, sub-element whatsoever in the <Application> element).
    Application Deployed="true" Name="TestWebApp"
    Path="D:\WL8\weblogic81\TestDeploy\build" TwoPhase="true">
    <WebAppComponent Name="TestWebApp" Targets="myserver" URI="TestWebApp"/>
    </Application>
    So when a request of the form http://myweblogic.com:7001/testapp/... arrives at
    the server, how does the server knows that it has to serve this request with files
    from D:\WL8\weblogic81\TestDeploy\build\TestWebApp ? It should not be like the
    web container iterates thru all the web application entries in config.xml and
    tries to match with one context-root declaration. I repeat, I expected some mapping
    similar to Tomcat's server.xml, where in the <docbase> element u clearly specify
    the mapping between the context path and the physical directory
    Rob Woollen <[email protected]> wrote:
    Arindam Chandra wrote:
    I'm running Weblogic 7.0 on Windows2000.The physical directory of myweb application
    is D:\WL8\weblogic81\TestDeploy\build\TestWebApp and under these directoryI have
    my JSPS, static HTML and WEB-INF. I define the context path of thisweb app in
    the weblogic.xml ;-
    <weblogic-web-app>
         <context-root>/testapp</context-root>
    </weblogic-web-app>
    As a result of deploying this web app in the server (or it may be createdmanually
    also), the following entry gets inserted in the server's config.xml,-
    <>So the server will look for your web application at the Application Path
    (D:\WL8\weblogic81\TestDeploy\build|) + the web uri (TestWebApp). So
    it
    maps the context-root you've specified /testapp to that path.
    It's a little clearer in the case where you had a full-fledged EAR.
    Then you'r application path would map to the "root" of the EAR, and the
    uris would point to the various modules (eg webapps.)
    -- Rob
    Now, whenever I make a request of the form "http://localhost:7001/testapp/..",
    it's properly executing my web app. My question is, how does the containerknows
    that for any request for the web app with context path as 'testapp',it has to
    server files from D:\WL8\weblogic81\TestDeploy\build\TestWebApp. Inthe above
    process, nowhere such mapping is specified. I expected something likeTomcat's
    server.xml, where in docbase we clearly specify this mapping betweenthe context
    path and the physical directory. Please help.

  • Get real path in non servlet class

    Hi,
    I've created a ServletContextListener class that loads a thread at application startup and kills it and application shutdown.
    The thread periodically monitors a specific file. I need to pass a real file path to the thread, but because the thread class is not a servlet, I cannot use the getServletContext().getRealPath("").
    What are my options?

    The ServletContextListener has access to both the ServletContext as well as the Thread.
    So the solution can be to get the path in the listener and pass it as a parameter to the constructor or a setter method of the thread.

  • Error compiling the BPEL classes while configuring custom approval process

    Hi,
    I get the below error, but unable to fix this. Any one who did face this issue please share your thoughts to overcome this.
    Error(45,34): Failed to compile bpel generated classes.
    failure to compile the generated BPEL classes for BPEL process "ApprovalProcess" of composite "default/SelfRegistrationApproval!1.0"
    The class path setting is incorrect.
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
    Thanks,
    Bhaskar

    You need to keep all the custom jars at three places :
    1) Soa ext , and make sao extension jar by running ant
    2) Bpel classpath
    3) in your project as an external referrence

  • Context path of external jsf page

    I have a jsf (.jspx) page which contains a java portlet. The jsf page and portlet are located in different context root of the server.
    In the portlet jsp, how can I get the context path of the jsf page ?

    Hi,
    could you pass this in as a parameter (session or request)?
    Frak

  • Could not find the main class?

    I am getting a
    Could not find the main class. Program will exit!
    Error with 1.3, but its because there is a jar file missing from the class path. The main class is actually there. Took me 1/2 to figure that out. This must be an error in the java command. Anyone else notice this?

    Hi all
    I'm stuck in the same thing as well...not only am I having problem with the JAR file I created, I'm also having problem executing other's JAR files..
    For example, I created this JAR file with 'Main-Class: PrototypeTest' as it's header but when the JAR file is done and I tried to run it, it simply gives me the No Main Class Found error.
    Same thing happens when I downloaded this JAR file game from Virum's website and tries to run it...no can do either...
    So wondering...has anyone found the solution to this yet? I'm still looking but it is sure driving me crazy...

  • How do I get context path in javascript?

    Hi,
    I code the following code but the contextPath will return a string = <%=request.getContextPath()%> instead of returning the context path. The codes works on a normal jsp form. Please help. Thanks.
    <script>
    <contents>
    var contextPath = "<![CDATA[<%=request.getContextPath()%>]]>";
    function doAction( action ){
    if( action == "clear" ){
    document.GnCodeSetupForm.action= "clearGnCodeSetupAction.do";
    document.GnCodeSetupForm.submit();
    </contents>
    </script>

    var contextPath = "<![CDATA["+<%=request.getContextPath()%>+"]]>";
    will return following code
    var contextPath = ""+<%=request.getContextPath()%>+"";
    which is syntax error.

  • Set Context Path

    I wish to separate customer specific jsp codes in different directory. All jsps are stored in a directory "/jsp".
    Within this there is another directory "cust_jsp" , where I moved the customer specific code. This customer code links to other jsps in the parent directory (/jsp).
    When I visit the customer specific code and then try to go to other link, it tries to look for them in the current directory. What I want, is that it should look for any hyperlinks from the web-apps root directory.
    I guess, I can use request.getContextPath() and then append this in front of the hyperlinks. But doing this would require a lot of change in the application.
    Is there any other way, where i can set the context path to the root so it looks for the files from the web-apps root directory.
    Thanks for your help.
    RM

    if you are using eclipse or WSAD you could set the context path in Project>properties>web

  • How to set the servlet context path manually in Tomcat web server.

    I tested some servlets by putting them in the folder , which the tomcats examples application uses (ie Tomcat 4.1\webapps\examples\WEB-INF\classes\) and it appeared to be working fine.
    I was calling the servlet like this : http://localhost:2006/examples/servlet/TestServlet
    But when I installed my own WAR file in the server , the servlet is not working now. now the new location of my servlets is : Tomcat 4.1\webapps\MyApp\WEB-INF\classes\
    and I'm trying to call the servlet like this : http://localhost:2006/MyApp/servlet/TestServlet
    The error , what i'm getting is :
    description :The requested resource (/MyApp/servlet/TestServlet) is not available.
    Some body please tell where I'm making the mistake ? I believe this may have something to do with the servlet context path setting. If anybody has any idea , how to set the path..will be much appreciated.

    Thanx for your reply , at first I was not using any web.xml(since not mandatory) but even after using the web.xml file the error is coming . Please have a look into the contents of the web.xml file and let me know if you find any problem...
    <?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>
    <servlet>
    <servlet-name>TestServlet</servlet-name>
    <servlet-class>TestServlet</servlet-class>
    </servlet>
    </web-app>
    one more thing I would like to tell you here. I was just looking into the configuration of Iplanet web server..I found that , there are options to set the servlet container path (like : - Prefix: /servlet
    Servlet Directory: /ecomm/iplanet/nes60/product/docs/container )
    so from here I came to know that "container " is the folder where we should put our servlets and it has URI as "servlet" but yet I'm not able to find any option in the Tomcat Web server to set the servlet container to any different directory.
    If you have any idea please let me know.

  • Flat file connection: The file name "\server\share\path\file.txt" specified in the connection was not valid

    I'm trying to execute a SSIS package via SQL agent with a flat file source - however it fails with Code: 0xC001401E The file name "\server\share\path\file.txt" specified in the connection was not valid.
    It appears that the problem is with the rights of the user that's running the package (it's a proxy account). If I use a higher-privelege account (domain admin) to run the package it completes successfully. But this is not a long-term solution, and I can't
    see a reason why the user doesn't have rights to the file. The effective permissions of the file and parent folder both give the user full control. The user has full control over the share as well. The user can access the file (copy, etc) outside the SSIS
    package.
    Running the package manually via DTExec gives me the same error - I've tried 32 and 64bit versions with the same result. But running as a domain admin works correctly every time.
    I feel like I've been beating my head against a brick wall on this one... Is there some sort of magic permissions, file or otherwise, that are required to use a flat file target in an SSIS package?

    Hi Rossco150,
    I have tried to reproduce the issue in my test environment (Windows Server 2012 R2 + SQL Server 2008 R2), however, everything goes well with the permission settings as you mentioned. In my test, the permissions of the folders are set as follows:
    \\ServerName\Temp  --- Read
    \\ServerName\Temp\Source  --- No access
    \\ServerName\Temp\Source\Flat Files --- Full control
    I suspect that your permission settings on the folders are not absolutely as you said above. Could you double check the permission settings on each level of the folder hierarchy? In addition, check the “Execute as user” information from job history to make
    sure the job was running in the proxy security context indeed. Which version of SSIS are you using? If possible, I suggest that you install the latest Service Pack for you SQL Server or even install the latest CU patch. 
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

Maybe you are looking for