How to create a servlet to be called by a portlet in weblogic workshop

Hey,
In weblogic workshop 8.1.4, I created a portal application. In the portlet(Java portlet- JSR 168), I would like to call a Java Servlet. In the workshop, it seems there is no way to create a Java Servlet.
Does anybody know how to create a Java Servlet in the Weblogic workshop?
Thanks!
Jeff

How about creating a java class and adding the proper imports, extends, methods etc. to make it a servlet.
Do the the necessary changes to web.xml
Then try to invoke it from the portlet's jsp of java code
HTH,
Raj

Similar Messages

  • How to create the servlet as acontroller  and how to use it

    how to create the servlet as acontroller and how to use it

    >
    John
    Please update your forum profile with a real handle instead of "914824".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    I am going to have over 50 buttons in a page, Why? This would be a most unusual UI paradigm. I've never seen such a page, which suggests that whatever you want to do is normally done another way. Please explain the requirement in more detail.
    just wanted to know if its possible to do something like this in java.
    Java is not used in programming APEX UI behaviour. Java and JavaScript may share initial syllables, but they are not closely related.
    It's possible to achieve a great deal in JavaScript, but a clear definition of the requirements is necessary. Do you mean the buttons should be dynamically generated? If so, yes, this is possible in JavaScript. What would drive the process?
    Also, i would like to have dynamic action on it, for example, when the button is pressed, fill a string of text into other items(text field) within the page. Without more detail its not possible to make any specific suggestions. For example, I certainly would not want to create 50+ individual dynamic actions relating to different buttons.

  • How to create a background job for call transaction

    hi gurus
    can any one suggest me
    how to create the background job for call transaction.
    thank you
    regards
    kals.

    Hi,
       Refer
    https://forums.sdn.sap.com/click.jspa?searchID=10926107&messageID=889652
    Regards
    Kiran Sure

  • How to create a servlet  in PAR Application

    Hi Experts,
    I want to create a servlet in PAR application. This servlet should be capable of accessing the functions of other java files included in PAR Application. Servlet should be capable of accessing the functions say doContent(req, resp) of any class of PAR application.
    Is it possible to create Servlet in PAR application?
    I created one servlet but unable to declare its information in Deployment Descriptor.
    Because the deployment which is provide ie portalapp.xml doesnt allow us to write tags like <servlet-name>, <servlet-mapping>, <url-pattern> etc. These are necessary for declaration of servlet.
    So how can i write a complete working Servlet under PAR application?
    Please help and replies will be appreciated.

    Hi,
    Depending upon your usecase there are different ways to implement this logic.
    Check this for example (Read my answer in this post):
    https://forums.sdn.sap.com/thread.jspa?threadID=349151
    Also check these senarios:
    http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm
    Also the delegation may be interesting for you:
    http://help.sap.com/saphelp_nw70/helpdata/en/a0/44b742cafec96ae10000000a155106/frameset.htm
    Greetings,
    Praveen Gudapati

  • How to create a servlet and write its details in DD in PAR Application

    Hi Experts,
    I want to create a servlet in PAR application. This servlet should be capable of accessing the functions of other java files included in PAR Application. Servlet should be capable of accessing the functions say doContent(req, resp) of any class of PAR application.
    Is it possible to create Servlet in PAR application?
    I created one servlet but unable to declare its information in Deployment Descriptor.
    Because the deployment which is provide ie portalapp.xml doesnt allow us to write tags like <servlet-name>, <servlet-mapping>, <url-pattern> etc. These are necessary for declaration of servlet.
    So how can i write a complete working Servlet under PAR application?
    Please help and replies will be appreciated.

    Hi Pankaj,
    I don't think it is possible to write Servlet in portal applications.
    I guess in Portal Application Projects we can develop portal components and portal services only.
    Thanks and regards,
    -Madhu

  • How to create an Accounting Document by calling BAPI

    Hai friends ,
    please tell me how to call this BAPI and fulfill all the parameters .. Please help me , I dont know the head and tail of it ...
    create an Accounting Document by calling BAPI  BAPI_ACC_DOCUMENT_POST
    Below is the step to fill the parameters for BAPI:
    Enter company code, invoice no, invoice date, document type, header text into DOCUMENTHEADER
    Enter customer, item text, company code, payment term into ACCOUNTRECEIVABLE
    Enter offset account, company code, document type, item text into ACCOUNTGL
    Enter currency type u201800u2019, currency, exchange rate, amount into CURRENCYAMOUNT. Please note there will be two rows in this table, one positive amount and one negative amount
    Call the BAPI to create the AR document. If p_check is checked, call the BAPI only without COMMIT and then do the message processing
    If p_check is initial, COMMIT the data to the database tables.
    Check the RETURN table after each BAPI, if no u2018Eu2019 message type found, output the document no. Otherwise, output the error messge to the screen with the message type u2018Eu2019.
    thanks in advance ...

    Hi,
    Check the link
    http://www.sapbrainsonline.com/sapinfo/tutorial.php?artid=617
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi_acc_document_post-error-1973720
    http://delaynomore.spaces.live.com/blog/cns!D2BFFB84EDFE4189!528.entry
    http://sap4.com/wiki/index.php?title=BAPI_ACC_DOCUMENT_POST
    http://www.sapfans.com
    Anurodh

  • How to create a Servlet

    Hello All,
    I am trying to learn creating a servlet in oaf. Although I kind of understand the concept of a servlet....have doubts about where the servlet class file lives/resides? Does it matter where it resides....at least for now in the Jdeveloper environment?
    The way I understand it is:
    1) In the oaf page need to place the item in which the servlet result is displayed
    2) In the PR of the CO of the above page, need to find the above item
    2.1) set the source of the above item to be the servlet class while passing in the params into the set source call.
    2.2) Does it matter where the servlet class file resides? ie., can it live anywhere in the project??
    Pls. help me understand this concept.
    Practially in steps2,3 of the servlet wizard of the Jdeveloper what do these do?
    Step#2: URL Pattern
    Step#3: Parameters. Do I have to necessarily set up the params here in this step or can they be dynamically set when the serveletis invoked in the PR of the CO? If yes, could you pls. provide a sample code. If params can be done either way...which way is effective. Reason for asking is....in my other post, I mentioned that while trying to create a dynamic VO, it seemed to force me to explicitly set the sql statement instead of simply running the sql statement associate with the VO of the page (I am not sure why it is like that...but that worked)
    Thanks,
    Edited by: OAF_Monkey on Nov 16, 2012 4:11 PM

    The way I understand (after following several older posts) is
    1) When my destination page (say page2 renders), in the CO need to find the image item/bean (I am assuming bean and an item mean the same)
    2) After finding the item item/bean, need to set its source as "ReadImage" telling it to go get it from the web.xml while passing in the id
    for which it needs to find an image/blob in the db.
    At this point, if it finds the class "ReadImage" then it should get the
    2.1)db connection
    2.2)get the parameter passed in using
          String image_id = request.getParameter("s1");
         2.3)get the sql statement provided
    2.4)get the image/blob as an input stream and write to the output stream using the below
            InputStream in = null;
            in = rs.getBinaryStream("IMAGE");
         Below is my code in the PR of CO
          System.out.println("I am back in the IMG CO : primaykey val is "+ s1 );
    BP1-->  OAImageBean imageItem = (OAImageBean)webBean.findIndexedChildRecursive("SJImage");
          System.out.println("I am back in the IMG CO1 : after finding the image item" );
    BP2-->     if (imageItem !=null ){
          System.out.println("I am back in the IMG CO2 : before setting the source of the image item" );    
    BP3-->     imageItem.setSource("/OA_HTML/WEB-INF/ReadImage?id=" + s1);
          System.out.println("I am back in the IMG CO3 : after setting the source of the image item" + imageItem.getSource());
          }When I ran it in the debug mode (break points shown above BP1,2,3), I can see that the value is getting passed in ok with the 's1' at BP1 and BP2.
    However when it reaches BP3, if I expand all the nodes of the debug window, I can see that in the 'Statisfields of the CO', it shows
    "Failed to establish the database connection." for the "DBCONNECT_ERROR_MSG" node.
    In the "ReadImage" class file the code to get connection is shown below:
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
            try
            Class.forName("oracle.jdbc.driver.OracleDriver");
            catch (Exception exception )
            exception.printStackTrace();
            throw new UnavailableException(exception.getMessage());
        }In the doPost method:
            if (conn == null)
            try
            WebAppsContext ctx = null;
            ctx = WebRequestUtil.validateContext(request, response);
            ctx = WebRequestUtil.createWebAppsContext(request, response);
            conn = ctx.getJDBCConnection();
            stmt = conn.createStatement();
            }Is this code correct to get a db connection? Pls. share thoughts/ideas/suggestions...
    Thanks,

  • How to create a Servlet Exception in jsp

    Greetings,
    I would like to know if someone knows how create a servlet exception in a JSP.
    Thx

    What for? new ServletException() - IIRC it's not abstract.

  • [Deploy Tool] How to create a  Servlet?

    Hello,
    i try to assemble and deploy a java servlet with the deploy tool in NW4, but to no avail. I managed to use jsps succesfully, but up to now i failed with servlets.
    When i try to access the WAS after deploying my exercise, i get:
    <b>404 Requested resource ( Ue160/servlet/Login.class ) not found.</b>
    The file Login.class, the directory /servlet and the URL mapping are defined in the file tab of 'J2EE Components'. As far as i can see the servlet container is unable to load the class file.
    The servlet name is in red, so something is wrong. But i can build the war-file without any error messages.
    Any hints?
    I can't use the developer studio, because it does not work with NW4.
    Message was edited by: Nico Manicone

    hi jeff
    1. I am not aware of any portal specific screen which can create this screen for you. However to create a servlet you will need to extend from the HttpServlet interface
    2. To direct the request to your servlet from your jsr 168 portlet you could use the PortletRequestDispatcher getNamedDispatcher(String s) declared on PortletContext
    Hope this helps
    anand

  • How to Create one more SOA-INFRA under the same domain in weblogic server

    Hi All,
    Can anybody can guide how to create one more soa-infra under the same domain. In order to maintain my composites to be deployed into
    different domains, I need to create one more soa-infra and deployed all the composites under that one.
    Please let me know if any demo is available for this activity to be gets completed.
    Regards,
    CH

    Hi Vijay,
    There are several composites which needs to be deployed and maintained in the server. So, we I'm trying to maintian
    by deploying composites into 3 different SOA-INFRA's so if one is not accessible, we can look into it and others can access the
    composites from another SOA-INFRA instead of creating domains.
    Let me know what will be feasible way to perform this activity.
    Regards,
    CH

  • Creating a portlet without WebLogic Workshop

    Hi;
    Are there instructions anywhere on how to create a portlet and run it under WebLogic - without using WebLogic Workshop? I am guessing that that might be a simpler approach.
    thanks - dave

    There really aren't - BEA wants you to use their Workshop tools because they hide all the supposed 'complexities' of their Portal framework nonsense from you.
    That being said, I've managed to find a way to work without Workshop and to use Eclipse as our development environment. Granted, we're focussed on JSR-168 portlets with JSF, but we still have to play within their proprietary framework for the Portal itself. So far, we've been very successful, just a few minor issues regarding the admin tool, but it works. The trick is to create a project in Workshop once, then dissect it so you can import it into Eclipse and work with it the way you want. Its not impossible, but its not trivial either - it has taken me about 4 weeks to sort our how the Portal works.
    We're using Portal 8.1sp5, with JSR-168/Apache JSF-Portlet Bridge, Spring, Hibernate with Eclipse 3.1/Maven 1.x.

  • How to create a user using spml call

    Hello,
    I am trying to create an user in idm using spml call. I have also imported spml.xml into idm. I m using LighthouseClient class to set the user attributes. After authenticating to idm i m sending the request to rpcrouter2 on localhost via client.request(req); But i m getting error
    com.waveset.util.InternalError: Unable to locate view handler for 'user'. Why cant i create a user in IDM from a command line program. Do i need to call this program from a workflow only ? Is it necessary?
    thanks in advance
    ravi

    hi All,
    I am working with Idm7.1 and using SPML to write command-line programe to work with Idm7.1
    getting a guideline from all your post I started with few sample code and got stucked ... Can any of you answer me ....
    Why Can't i do the following in IDM from a command line program using SPML.
    Add a User
    Delete a User
    Modify a User
    Search for a User
    I am using following code to create user:-
    ------ CODE--------
    LighthouseClient client = new LighthouseClient();
    client.setUrl("http://localhost:8080//idm/servlet/rpcrouter2");
    client.setUser("configurator");
    client.setPassword("configurator");
    AddRequest req = new AddRequest();
    req.setOperationalAttribute("trace", "true");
    req.setObjectClass("person");
    req.setIdentifier("user1");
    req.setAttribute("password", "abcd");
    req.setAttribute("gn", "showmen");
    req.setAttribute("sn", "majumdar");
    req.setAttribute("email", "[email protected]");
    SpmlResponse res = client.request(req);
    System.out.println("Response from Server->"+res.getResult());
    System.out.println("Error from server->"+res.getError());
    The output Reflect's as:-
    ------------OUT-PUT--------
    init:
    deps-jar:
    compile-single:
    run-single:
    Response from Server->urn:oasis:names:tc:SPML:1:0#failure
    Error from server->null
    BUILD SUCCESSFUL (total time: 5 seconds)
    ---------------------XXXXX------------------------
    I am currently using Idm7.1 and when i try to Import spml.xml file it throws some Weird Exception
    where as spml2.xml can import without any Exception.
    After all these when i loging to Idm7.1 using login.jsp as -u "configurator" -p "configurator"
    there is no new user created .....
    likewise all the sample code provided is throwing exception's ....
    Can any of you please send me some guideline to figureout these
    Thank's
    Showmen Majumdar
    e-mail: [email protected]
    Wipro Technology
    Bangalore.

  • How to create context sensitive help and call the role based help from my Java Project?

    Hello All,
    I am new to Robo Help. I have created a Robo help for my Java Web Applicaion. My application is role base i.e some user's will not see some of the pages of the application. So I want to hide those pages in Robo help as well. I tried creating multiple TOC for different Roles.
    My Question is
    How to call robo Help from my application?(I will be calling using java script. If it is with RoboHelp_CSH.js where can I get that and How to implement it in my project)
    How to implement role based help?
    Thanks,
    Siva.

    I answered that. My point in asking whether it matters was that if it does, then you cannot use content categories and point different users to different categories and not allow them to see the others.
    The alternative, as I said, would be to produce different outputs for each role.
    As it does matter, then using webhelp you will have to use your RoboHelp project to produce a number of outputs, one for each category. Your app would install each webhelp into different folders and when your app determines the user role, you will link to the appropriate help.
    There is another thread running where it has been explained by Willam van Weelden that you can achieve what you want using browser based AIR help. If that form of help can be considered, then the thread is at http://forums.adobe.com/message/4914753?tstart=0#4914753
    Browser based AIR help must be run from a web server. It cannot be installed locally.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • How to create Activity to a Service Call

    Hi,
    how can i create an activity to a service call?
    i have to create an activity first and then add a line in the activities collection of the service call, right?
    but i always get an error message, when i want to create the contact.
    Error-Message: "Invalid Code  [OCLG.CntctSbjct]"
    What is that? The contact has got a subject!

    ServiceCalls oSC = (ServiceCalls)oCompany.GetBusinessObject(BoObjectTypes.oServiceCalls);
            Contacts oContact = (Contacts)oCompany.GetBusinessObject(BoObjectTypes.oContacts);
            oContact.Activity = BoActivities.cn_Other;       
            oContact.Subject = sFreitext;
            oContact.StartTime = Convert.ToDateTime(dtDatum.ToString("yyyy-MM-dd") + " " + sVon);
            oContact.EndTime = Convert.ToDateTime(dtDatum.ToString("yyyy-MM-dd") + " " + sBis);
            oContact.CardCode = sKundennummer;
            int iRet=oContact.Add();
    what is wrong?

  • How to create new TC which will call report group "MGRO"?

    Hi Abap-Experts,
                                    I want to create new transaction code which should call report Group MGRO. After executing the new transaction, the first screen of the user should be the selection screen of report group "MGRO" to run the report group.
                                   Can anyone please guide me by giving some example for this?

    The query was resolved

Maybe you are looking for

  • How can I see my own phone number on the new iphone 3G

    I recently purchased an iphone 3G and cannot seem to get my own phone number to appear at the top of the contacts page (above the "A" contacts. The apple store people tell me that it should have shown up there but it hasn't. Can anyone help me? thank

  • Printing duplex postcards - URGENT!! pls Help.

    I want to print duplex to a 4x6 inch postcard. The printer is set with a duplex queue. No postscript printing only PCL printing. We are on Reports 6i running against the 9i db. The data will come from one record. Fields 1,2,3 go to front side for the

  • UIX-BC4J Form Example

    Could anybody post an example of a simple UIX-BC4J Form with Insert, Update and Delete event handlers but NOT in automatic mode? TIA. Francisco

  • New Keynote won't open.

    I updated Keynote and now it is done, but i can not open the application "because it is still updating, and programs that are updating can not e opened", i don't understand, it is done updating and I have used it a couple of times after updating it a

  • Could not start JSPM

    Hi Windows 2003/EP7/10G I could not start JSPM error message: jspm cannot connect to localhost and port Would you be able to help where do I get my port as my localhost will be my server name. Thanks.