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

Similar Messages

  • How to create a file and store its contents into another file?

    Hi,
    I'm having some trouble trying to create a code where I have to to create a file and store its contents into another file?
    I read the API, but I'm not certain how this file thing works.
    Here's my code so far:
    public static void main(String[] args) throws Exception
              File file = new File("tasks.txt");
              if (file.exists())
                   System.out.println("File already exists");
                   System.exit(0);
              Scanner scan = new Scanner(System.in);
              Scanner scan2 = new Scanner(System.in);
              //Scans the input line by line
              scan.useDelimiter("\\n");
              //Scans the input by tabs
              scan2.useDelimiter("\\t");
              PrintWriter outputs = new PrintWriter("newtasks.txt");
              outputs.print("ok");
              outputs.println(3);
              outputs.close();
         }

    I managed to change my text into uppercase, but how do I store the uppercase content into another file.
    -So this is what I did so far, I took a text file and modified its strings to uppercase.
    -Now I need to put those modified strings into another text file, is there a way where I can do that with my current code?
    -I already tried printwriter, but it doesn't seem to work
    public static void main(String[] args)throws IOException
              //Task[] oneHundredTasks = new Task[100];
              String uppercase;
              String combine;
              Scanner scan = null;
              FileInputStream in = null;
            FileOutputStream out = null;
            PrintWriter output = null;
            try
                 scan = new Scanner(new BufferedReader(new FileReader("tasks.txt")));
                 scan.useDelimiter("\\n");
                 scan.useDelimiter("\\t");
                while (scan.hasNext())
                     if(!scan.hasNext())
                          scan.next();
                     combine = scan.next();
                     uppercase = combine.toUpperCase();
                     System.out.println(uppercase);
            finally
                if (scan != null)
                    scan.close();
            //The program will try the input and output files
            try
                 in = new FileInputStream("tasks.txt");
                out = new FileOutputStream("newtasks.txt");
                int c;
                //The number "-1" is used to indicate that it has reached the end of the stream.
                while ((c = in.read()) != -1)
                    out.write(c);
            finally
                if (in != null)
                    in.close();
                if (out != null)
                    out.close();
         }

  • 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 we create custom infotype and how to configure with its subtypes.

    hai abap-hr gurus,
    how to create custom infotype and how to configure with its subtypes. when i am creating infotypes i am not getting how to configure subtypes.
    plz help me for this with an example code.
    thanks..
    kiran kumar

    Hi Kiran,
        Please fallow the below steps to create the custom infotype. If you have any quires let me know.
    For Creation of Infotype first Go to Transaction PM01, Enter the custom Infotype number which you want to create, it should be a 4 digit number and have to start with 9xxx.
    then select the `Employee Infotype' radio button
    after that select the `PS Structure Infotype'
    then click on Create… A separate table maintenance window appears
    then Create a PS structure with all the fields you want on the infotype
    Save and Activate the PS structure
    now Go back to the initial screen of PM01
    Click on `All' push button. It takes a few moments
    Click on `Technical Characteristics’. Infotype list screen appears
    Click on `Change'(pencil) button
    Now select your Infotype and click on `Detail' (magnifying glass) button
    Give `T591A' as subtype table & also Give `T591S' as subtype txt tab
    Give your subtype field as subtype field & Save and come back to PM01 initial screen
    Click on `Infotype Characteristics' … Infotype list screen appears
    Click on `Change' (pencil) button & on New Entries
    and then Enter your Infotype number and short text Here we have to set different Infotype Characteristics as per the requirement. (Better open another session with some standard Infotype's infotype characteristics screen and use as the reference
    to fill yours). Now save ur entries
    Now the Infotype is created and ready to use.
    If you want to change the layout of the Infotype as per your
    requirement…
    In the PM01 initial screen…Select `Screen' radio button and give
    2000 as the screen name, then click on edit.
    In the next screen.. Select `Layout Editor' and click `Change'.
    Screen default layout appears…here you can design/modify the
    screen..change the attributes of the fields..etc.
    Save and activate. (Don't forget to `Activate at every level)
    Regards,
    Ramakrishna kotha.

  • Reading a properties file in a servlet and passing its contents to a JSP pa

    Hi all,
    I'm totally new to Servlet pgmg n JSP. Please can ne1 tell how to read a simple properties file (in a servlet) and pass its contents to a JSP page.Actually the reason is to fill a combo box in a JSP page with the contents of a properties file.If calling a servlet for the same is d best way to do that, plz can ne1 tell me :
    1> whether to override the doPost method in the servlet in which to read d file using FileInputStream
    2> Putting the contents in an array and then how to pass this array to the JSP page.
    Thanks,
    deepthy.

    I'm using a properties file to let my web application know what the name of the database is. I'm using an abstract class GeneralDao which will be extended by all the DAO's (Data Access Objects or java classes containing SQL statements).
    Here's the code :
    protected Connection getDatabaseConnection()
              throws Melding
         Connection dbconn = null;     
         ResourceBundle resBundle;
         try
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         resBundle = ResourceBundle.getBundle("gcoConfig");
         String dbConnectie = resBundle.getString("databaseconnection");
         gcoLogger.debug("lezen databaseconnection in resourceBundle " );
         dbconn = DriverManager.getConnection(dbConnectie);
         } catch (InstantiationException exc)The ResourceBundle is used to read the properties file, named gcoConfig.properties.
    With the getString() command I read the content of the string named databaseconnection.
    The gcoConfig.properties file is placed inside the folder C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\gco\WEB-INF\classes
    The GeneralDao is placed in the folder C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\gco\WEB-INF\classes\org\gertcuppens\cluifDao.
    So this class is placed some folder below the WEB-INF\classes folder of gcoConfig.properties.
    And the content of the properties file is just one line :
    databaseconnection=jdbc:mysql://localhost/cluif
    If you want to let the JSP know what's inside the properties file, wrap the content in a Javabean, put it in the request or even the session and pass the control to the JSP.

  • How to create the ICONS and SYMBOLS

    how to create the ICONS and SYMBOLS
    Title was edited by:
            Alvaro Tejada Galindo

    HI,
    Check this sample code....Not mine...
    REPORT SHOW_ICONS.
    TABLES: ICON.
    INCLUDE <ICON>.
    FIELD-SYMBOLS: <F>.
    SELECT * FROM ICON.
       ASSIGN (ICON-NAME) TO <F>.
       WRITE:   /(5) <F>, 20 '@',21 ICON-ID+1(2),23 '@',ICON-OLENG,
                ICON-BUTTON,ICON-STATUS,ICON-MESSAGE,ICON-FUNCTION,
                ICON-NAME.
    ENDSELECT.
    Also Try this,
    INCLUDE <symbol>.
    INCLUDE <icon>.
    Write:/ 'Phone Symbol:', SYM_PHONE AS SYMBOL.
    SKIP.
    WRITE: / 'Alarm Icon: ', icon_alarm AS ICON.
    For more information check out the following link it will help you.
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e4a35c111d1829f0000e829fbfe/content.htm
    Regards,
    Padmam.

  • How to create a package and add a file?

    Hi all,
    I am new to Java and very much much confussed with how to create a package and then include some files any help will be very thankfull.
    Thanks for your help
    kka.

    Steps for creating a package in java are as follows:
    Choose a base directory for your classes. For example, you might choose c:\java\packages. Type the following command:
    set CLASSPATH=%CLASSPATH%;c:\java\packages
    Create subdirectories for each chapter or section, if you don't already have them.
    For each of the classes in the subdirectories, add the following line to the very top of each file:
    package directory-name;
    where directory-name is the name of the subdirectory the class file is located in.
    In other directories you may have class files that need to access one of the classes in another directory (package). To do this, write one of the following at the top of the class that needs the other class:
    import subdir.*;
    or
    import subdir.classname;
    Use the class by name in the new class file.
    Note that you can create sub-packages by creating subdirectories of the original subdirectories, and inserting package statements at the top of the java files in those directories.
    Hope this helps!

  • How to create RFQ s and use them to complete the program

    hi,
    how to create RFQ s and use them to complete the program
    thanks in advance

    Hi Santosh,
    RFQ is created through transaction ME41.
    You need to write down BDC for mass update of RFQ, because BAPI is not available.
    Regards,
    Tutun

  • How could i parse string and link its model with my files in eclipse project?

    How could i parse string and link its model with my files in eclipse project?, as i read that we dont have to use standalone mode while working with eclipse projects.
    Example of what i want to do:
    I have file1.dsl in my project which contains some statements but the declaration of these statements are not in another file, i need to put them only in my code

    Hi Stefan,
    I have eclipse project contains 2 files, file1.dsl and file2.dsl, you can see the contents of the files below.
    file1.dsl contains some statements as shown below and file2.dsl contains the declarations of the variables. (like in C++ or Java we have declarations and usage)
    At this step file1.dsl and file2.dsl will be parsed successfully without any errors.
    Lets imagine that we will delete this project and will create another one and the new project will contain only file1.dsl (which contains the usage)
    At this step this file (file1.dsl) will contains some errors after parsing it, because we are using variables without declarations.
    So what i need is to parse the content of file2.dsl directly without adding this file to the project.
    I need to add the content of file2.dsl directly as a string in the code and parse it. just like that ( "int a;int b;" )
    And link file1.dsl with the model generated after parsing my string
    file1.dsl
    a++;
    b++;
    file2.dsl
    int a;
    int b;
    Thanks

  • How to create a partner and header record using CRM_ORDER_MAINTAIN?

    Hi any one knows how to create a partner and header record using the function module CRM_ORDER_MAINTAIN??
    I tried to  create a record, but i only managed to create a header record and the partner record is not reflected in the transaction.  Why is that so? is there any indicator that i need to include?
    Thanks..
    Jen

    Hi Jen!
    I use this FM and it works perfectly.
    Use this to create a partner:
      gs_partner-ref_handle    = '0000000001'.
      gs_partner-ref_kind      = 'A'.
      gs_partner-ref_partner_handle = '0001'.
      gs_partner-partner_fct   = '00000001'.
      gs_partner-partner_no    = NO_PARTNER. "number of the partner, bu_partner
      gs_partner-display_type  = 'BP'.
      gs_partner-no_type       = 'BP'.
      gs_partner-kind_of_entry = 'C'.
    *  ls_partner_l-ref_handle    = '1'.
      gs_partner-ref_guid      = '00000000000000000000000000000000'.
      APPEND gs_partner  TO gT_partner .
      ls_input_field-ref_kind  = 'A'.
      ls_input_field-logical_key   = '0001'.
      ls_input_field-objectname  = 'PARTNER'.
      ls_input_field-ref_handle  = '0000000001'.
      ls_input_field_names-fieldname = 'DISPLAY_TYPE'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'KIND_OF_ENTRY'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'NO_TYPE'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'PARTNER_FCT'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      ls_input_field_names-fieldname = 'PARTNER_NO'.
      INSERT ls_input_field_names INTO TABLE ls_input_field-field_names.
      INSERT ls_input_field  INTO TABLE  gt_input_fields.
      clear ls_input_field-field_names[].
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
      EXPORTING
    *    it_schedlin_i   = gt_schedlin_i_com
        it_partner      = gt_partner
    *    it_sales        = gt_sales
    *      it_orgman       = gt_orgman
    *      it_appointment  = gt_appointment
    *      it_ordprp_i     = gt_ordprp_i
    *   it_product_i    = gt_product_i
    *      it_activity_i   = gt_activity_i
    *      it_pridoc       = gt_pridoc_com
      CHANGING
        ct_orderadm_h   = gt_orderadm_h
    *   ct_orderadm_i   = gt_orderadm_i
        ct_input_fields = gt_input_fields.
    *      ct_doc_flow     = gt_doc_flow
    *      cv_log_handle   = gv_log_handle.
    Hope it helps u,
    Regards,
    Mon.

  • How To Create A Technical And Business Systems For Web AS ABAP ???

    Hi Experts,
    How To Create A Technical And Business Systems For Web AS ABAP ???
    Please Let me Know All the Step-By-Step Process to Create ????
    Points Will be Given
    Regards
    Khanna

    Hi Sumit,
    When U Told the thing that first time to execute the RZ70 and All i Did this in XI System
    So I got An Entry for the Technical System for XI System.
    Now i Deleted that and Executed RZ70 in R/3.
    When I Executed RZ70, I got this Error.
    <b> "RFC Call failed: Error Opening an RFC Connection "</b>.
    Now I am Unable to see Any Technical System  Under Web As ABAP. It's Showing Empty Now.
    Please Let me know
    Regards
    Khanna

  • How to create new user and How can i assign end user roles

    Hi,
    I am new to SAP, please explain how to create end users and their roles
    Thanks
    ravi

    Hi,
    Roles are decided by IT managers. Suppose if Persons who are working in shopfloor or production side
    give authorization to Production order create , change and Confirm like that etc
    1. In role maintenance (transaction PFCG), choose the Authorizations tab page.
    2. To change the authorization data for the transactions assigned to the role, choose Change Authorization Data or Expert Mode for Profile Generation. Otherwise, a dialog box appears in expert mode (see Regenerating an Authorization Profile After Changes).
    Please take telp from Basis person also refer this link,
    http://help.sap.com/saphelp_46c/helpdata/EN/52/6714a9439b11d1896f0000e8322d00/frameset.htm
    Thanks

  • How to create portal user and integrate with external appl login

    How to create portal user and integrate the user with external application for single sign-on ?
    I want to access my external application thru portal user ..?
    Shyam

    Hi Jithin,
    The link that you've shared talks about a different scenario.
    In my case, I want to pass the portal user id when the user clicks on the Help Link present in the header area.
    I am trying to pass it along with the Help Link Url property of a masthead iview but it is not getting passed to the target Url.
    I would like to know if it is possible to pass the Portal User Id in this way or not.
    Though if we create a appintegrator iview and pass the user id <User.UserID> along with the target Url, it reaches there.
    Thanks & Regards,
    Anurag

  • Can any 1 tell me how to create budget journal and how to enter journal ?

    hi all+
    Can any one tell me how to create budget journal and how to enter journal against that budget ?+
    Regards+
    Yasir+

    http://download.oracle.com/docs/cd/A60725_05/html/comnls/us/gl/budjrnl.htm#index-Budget-journals-Entering--0
    Enter budget journals to maintain an audit trail for your budget balances. You can use budget rules to calculate budget journal amounts automatically.
    When you post budget journals, the journal amounts update existing budget balances. You can review and change your budget journals before posting them.
    Attention: When you use budget rules in Journal Mode, General Ledger calculates the appropriate debit or credit needed to achieve the balance you enter for the account type.
    Prerequisites
    1. Define a budget
    2.Open one or more years for your budget
    3.Define a budget organization
    4. Assign the "Entered" budget entry type to the accounts for which you want to enter budget journals
    To enter budget journals for a single account:
    1. Navigate to the Enter Budget Journals window.
    2. Specify the Budget Organization for the account to which you want to budget. If the budget organization is password-protected, you must enter the password before you can enter budget journals.
    3. Enter the Budget you want to update. You cannot use a budget that is frozen.
    4. Enter the range of Accounting Periods to which you want to budget.
    5. Enter the Currency of the budget amounts you are entering. The accounts must be assigned to the budget organization for this currency.
    6. Choose Journal Mode from the region poplist to enter budget amounts in a journal format.
    You can also use Single Row Mode or Worksheet Mode to enter budget journal amounts. However, you can only generate budget journals from these entry modes when you use the Enter Budget Journals window.
    Additional Information: When you use Journal Mode, Balance Type is a display-only field. It displays Budget when you are entering budget journals. In the Enter Journals window, this field displays Actual when you are entering actual journals.
    7. Enter or query the Account to which you want to budget. You can also switch to Worksheet Mode to easily query accounts, then return to Journal Mode to enter budget journals.
    8. Enter a Debit or Credit amount for each period. Do not enter journal amounts if you want to use budget rules to calculate and distribute budget amounts.
    9. Choose Create Journals to create a budget journal batch. If you are using budgetary control, you specify a funds action when you create the batch.

  • How to create process chains,and how to use process like and or xor

    Hi,
    How to create process chains,and how to use process like and or xor.
    can any one please give me a example in each.
    Thanks,
    cheta.

    Hi Cheta,
    Here is step by step procedure to create process chains
    Process chain is nothing but executing a process ..(or) loading the data any process we can do in background.. that means.. automatically we can execute our process based on Time or any event..
    Creating Process Chains
    Prerequisites
    If you want to include a load process in the process chain, you need to have already created an InfoPackage.
    You cannot load flat file data from a client workstation in the background. For this reason, you have stored your data on an application server.
    Creating Process Chains
    You have the option of creating a process chain in the process chain maintenance screen directly or by using a maintenance dialog for a process:
    Creating a Process Chain Directly in the Process Chain Maintenance Screen
    You are in the BW Administrator Workbench.
    1. Click on the Process Chain Maintenance icon in the AWB toolbar.
    The Process Chain Selection dialog window appears.
    2. Choose Create.
    3. Enter the technical name and a description of the chain, and confirm your entry.
    The Add Start Process dialog window appears.
    4. Create a variant for a start process.
    1. a. On the Maintain Start Process screen, choose whether you want to schedule the chain directly or whether you want to start it using a metachain.
    2. b. If you choose to schedule the chain directly, enter the start date value for the chain under Change Selections and save your entries.
    The Maintain Start Process screen appears again.
    3. c. Save your entries, return to the previous screen and confirm your entries in the Add Start Process dialog window.
    You are taken to the Plan View of the process chain maintenance screen.
    In the left-hand area of the screen, a navigation area is displayed. In the right-hand area of the screen, the process chain is displayed.
    5. Use the drag-and-drop function to add the relevant processes into your process chain.
    You use the Process Types function to select the processes. This sorts the process types according to different categories. You can also call up InfoPackages and processes for the data target from the separate InfoSources and Data Targets navigation trees.
    Hope this helps
    Regards
    Karthik

Maybe you are looking for

  • New iTunes 10 for the iOS 6 keeps freezing

    I recently updated my iOS for my iPhone 4s to the 6. When I plugged it into my computer, iTunes tells me I have to update it as well. Now, iTunes keeps freezing on me or saying that it can't connect to my phone for some reason. I'm kind of annoyed wi

  • Transferring a DVD to the Desk top and then downloading to Kindle Fire

    I want to transfer some of my DVD films to my Kindle Fire; can I do this by using the DeskTop DVD Drive first to copy to a store on the computer and then downlaodng to a Kindle, I am not technically dexterous so would like a detailed guide p[lease if

  • I want to buy high resolution mu

    I made a search on this before posting but didn't find what I was looking for. I bought the Audigy 4 a while back and really enjoy the performance and quality. When I bought this sound card it came with a DVD 24 bit music sampler. I've been shopping

  • Scrollbar questions

    I've searched the forums, and haven't found anything that describes building a scrolling text area the way I'm trying to do - maybe I'm looking for something too simple... Here's a picture of the page I'm doing: Asian Menu - I'm using Flash 8, but I

  • Migration from Business Area to Profit centre

    Hi All, My client currently uses the business area functionality for management reporting (to capture brand specific financial data). Due to the inherent challenges encountered using business area the strategy now is to migrate to profit center accou