How to test J2EE apps?

deploying is ok but don't know how to test my servlet?
what is URL?
and how J2EE application server manage servlet in "action" attribute of
HTML form?

Wow man!!
The url of your app is set by the context root tag, if you are using S1AS, on the sun-web.xml deployment descriptor. You can see what it is throught deploytool also.
The servlets URL is given by the servlet-mapping tag in the web deployment descriptor (web), for example:
<servlet>
<servlet-name>Foo</servlet-name>
<servlet-class>org.demo.Foobar</servlet-class>
<servlet>
<servlet-mapping>
<servlet-name>Foo</servlet-name>
<url-pattern>/Foobar</url-pattern>
</servlet-mapping>
Will map the URL for the Foobar servlet at:
http://yourhost/[context-root]/Foobar
Hope it helps,
May the code be with you.

Similar Messages

  • How to test the app on my Ipad device?

    I'd like to know how to test the app and if it's strictly necessary to have a developer liscense to test it or if it's only necessary to make the app available in the Appstore.
    Thanks!

    You need a paid dev account to test on a device.

  • How To Install J2EE app to ColdFusion's Tomcat Server

    Our client has purchased IBM Analytics, that they want to run with the ColdFusion servers. IBM has given over the EAR files to deploy on Tomcat. But, ColdFusion uses a highly modified Tomcat. How would someone deploy another J2EE app in this scenario, without installing another server?

    Hi,
    Thank you for your post. Please refer to http://help.adobe.com/en_US/ColdFusion/10.0/Installing/WSc3ff6d0ea77859461172e0811cdec18c2 8-7fda.html for J2EE deployment.
    Regards,
    Anit Kumar

  • How to test the app in iphone from xcode

    Hi ,
    I want to test my developed application in iphone 4s, could you guide me what is the procedure to do it.
    Regards
    Nitin Shete

    See TN 2250 ~ iOS Code Signing Setup, Process & Troubleshooting / Perform Common Tasks

  • How to run a background process in a J2EE App ?

    Hi guys,
    Here is the requirement which totally stumped me.
    " The web app should have a feature like a background process or something like cron jobs.. which keeps on running in the background and at a particular time each day calls a method". User intervention is not an option.
    Now had this been a stand alone app .. I could have done this using Threads.. but i cant possibly use threads in a J2EE app. Any pointers.. how I can go about realizing this
    Thanks for your replies.
    Cheers!

    You could take the approach that SoulTech mentioned and spawn a new thread from the Servlet's init method. To have the servlet invoke this method with no intervention, you would need to set the following parameter in your servlet definition in your web.xml:
    <servlet>
      <servlet-name>MyStartupServlet</servlet-name>
      <servlet-class>com.my.company.MyStartupServlet</servlet-class>
      *<load-on-startup>1</load-on-startup>*
    </servlet>When you deploy your application, the servlet will be loaded, and its init method will be called.
    If your application is running in a servlet container, I believe you are allowed (by the specification) to spawn your own threads, but you should do so carefully. Since you're writing a scheduler and not some kind of worker threads that are messing with your database, I think you should be okay. Still, just to keep it clean you should add any clean-up logic you may need to your servlet's destroy method. I know that in an EJB container, spawning your own threads can definitely be a problem and the container makes no guarantees that they will function correctly. The J2SE Timer class could be used if you're not using EJB, but the Timer class doesn't have support for J2EE - that's at least part of what led to the introduction of the timer beans in J2EE 1.4. If you're already using EJB, especially EJB 3.0, then the timer service provides a convenient built-in mechanism to do exactly what you want.
    There are always multiple ways to solve any problem...
    Edited by: proflux on May 15, 2008 1:04 PM

  • How to read weblogic user/password within a J2EE app ?

    All,
         There is an J2EE that exposes a webservice and the service can not be secured with ws-security since the service is an exact implementation of an standard that does not mandate  ws-secutiry and only insists on SSL/TLS. The application however needs a legitimate authenticated weblogic user for the rest of its work and hence the app has to read a known user created in the weblogic and then read its password as well and authenticate  within the app and use that authenticated subject. User can create this predefined user in weblogic and we may ask user to store the same weblogic password also in a CSF like OPSS and then have the app read the CSF, but since the password is available in the weblogic internal ldap, we want to leverage that and read the user's password using any of the weblogic mbean's APIs. Can anyone provide a pointer on how to read a user's password within the Weblogic's embedded ldap ?
         We referred to this Developing with the User and Role API - 11g Release 1 (11.1.1) & 6 Managing Security Realms with JMX but could not successfully get it working with J2EE app (Servlet/Filter).

    You can use JMX
    Please find a sample here
    List Users and Groups in Weblogic using JMX | Middleware wonders!!

  • MMS J2ee app made with JBOSS want to use it with JRUN

    Hello fellow developers,
    I am very interested in creating a small website for uploading photos from my cell phone to a j2ee app running on a JRUN 4 server.
    I've downloaded the J2, JSR-212 SAMS Messaging API EJB Reference Implementation, from the nokia site. II also down load an MMSC and SMSC simulator from NOkia, which I believe developers can use in conjunction with testing the above ejb web application.
    Briefly this is what I think is happening so far from reading tid bits here and there like the aritcle in Java Boutique.
    It seems todescribe the SAMS api as being generic enough to accept all clients that supply SPI, which I believe is the interface that verizon, cingular, or that some other cell phone service might provide. This interface allows the forwarding of a text message or media message to another operation ( like yahoo mobile). Thus, when I send my photo to a [email protected], it goes to the MMSC that communicates through SPI say a SAMS J2EE applicaiton running on yahoo, which presents my recently snapped cell phone photo in my yahoo phone album.
    I would like to test this J2ee app I download from nokia. However, in part of the instructions it claims that a person must down load JBOSS 4.0.
    Does any one know if this Nokia J2ee app for JBoss can be used on a JRUN 4?
    Can the NOKIA SMSC/MMSC simulator I downloaded work as well with JRUN4, as I notice the word JBOSS when I was installing this Simulator?
    Does anyone know where, I can get anymore information on SAMS and how to implement it in a simple J2ee app?
    When we can upload a cell phone photofrom the web browser of our phone than we will have arrived!.

    Hello fellow developers,
    I am very interested in creating a small website for uploading photos from my cell phone to a j2ee app running on a JRUN 4 server.
    I've downloaded the J2, JSR-212 SAMS Messaging API EJB Reference Implementation, from the nokia site. II also down load an MMSC and SMSC simulator from NOkia, which I believe developers can use in conjunction with testing the above ejb web application.
    Briefly this is what I think is happening so far from reading tid bits here and there like the aritcle in Java Boutique.
    It seems todescribe the SAMS api as being generic enough to accept all clients that supply SPI, which I believe is the interface that verizon, cingular, or that some other cell phone service might provide. This interface allows the forwarding of a text message or media message to another operation ( like yahoo mobile). Thus, when I send my photo to a myphone#@photo.yahoo.com, it goes to the MMSC that communicates through SPI say a SAMS J2EE applicaiton running on yahoo, which presents my recently snapped cell phone photo in my yahoo phone album.
    I would like to test this J2ee app I download from nokia. However, in part of the instructions it claims that a person must down load JBOSS 4.0.
    Does any one know if this Nokia J2ee app for JBoss can be used on a JRUN 4?
    Can the NOKIA SMSC/MMSC simulator I downloaded work as well with JRUN4, as I notice the word JBOSS when I was installing this Simulator?
    Does anyone know where, I can get anymore information on SAMS and how to implement it in a simple J2ee app?
    When we can upload a cell phone photofrom the web browser of our phone than we will have arrived!.

  • How to test the user is an EP User

    Hi Experts,
             I am developing a WebDynpro application which is to be run in a browser and also in EP.  If this application runs in a browser it has to ask the user id and password and navigate to the home page of my application. For this I have set  Authentication as "true" in Application Propertis and is prompting for user id and password and is navigating to the home page. If this application has to run in EP It should not prompt for user id and password,  It should fetch the user info from EP user list and validate the user and send the control to predefined page based on user role.
              I have also uploaded this to EP and is not prompting for user id and password as it meets my requirement ,  but the is navigating to the Home page which not required for me.
          For this requirement to meet I have to test the user whether he/she is from portal or Webdynpro.
          can any body suggest me how to meet this requirement...
    Thanks in Advance,
    Murthy.

    You have said you have an application which runs both in a J2EE App Server and also may run in a portal.
    Your problem is that if running in the Portal the application sends/redirects/navigates the user to the homepage which is not required.
    Why dont you try testing which environment your WebDynpro Application is running in by using:
    if (WDPortalUtils.isRunningInPortal()) {
      // Do not naviate to homepage but send user the control to perdefined page on user role
    }  else {
      // Perform Authentication.
      // After prompt send to home page as user is running in app. from Standalone J2EE Server}
    To get user information you can use methods as the others have described above or if you need to you can  also get at the HttpRequest object as follows:
       HttpServletRequest request =     ((IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter())
                        .getHttpServletRequest();
    To get user information  also check out what each of these User objects offers as they may offer a method to get user information which may help you get what you want.
    IWDClientUser wdUser = WDClientUser.getLoggedInClientUser();
    IUser user = wdUser.getSAPUser();

  • Using JNDI to access config file located outsite j2ee app

    Hi I'm wanting to store a config file for my J2ee app, somewhere on a tomcat server possibly inside the
    conf/ directory so that I can update this config file without having to redeploy the j2ee app every time a change is made.
    I've been told I can use JNDI to access this file, but I can't seem to find any examples or documentation on how I can do this.
    I'm new to JNDI and would appreciate any help, or suggestions.
    Thanks,
    Tim
    EDIT:
    So far I can access the file with this code:
    Hashtable env = new Hashtable();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
              try {
                   Context ctx = new InitialContext(prop);
                   // look up context for name
                   //env.put(Context.PROVIDER_URL, "file:C:\\confluence\\confluence-2.5.1-std\\conf");
                   File f = (File)ctx.lookup("/confluence/confluence-2.5.1-std/conf/test.txt");My new problems are:
    1. The commented line env.put(Context.PROVIDER_URL, "file:C:\\confluence\\confluence-2.5.1-std\\conf"); it says in examples that this should set the dir to look in to the conf dir but if i change the lookup value to just test.txt it cannot find it.
    2. Can I somehow set the context to look into the conf directory of Tomcat without hard coding the path, as the path could change or be different on different machines??
    Edited by: Timothyja on Jan 15, 2008 7:00 PM

    Hi Kiran,
    Looking at the code you sent and the error, it looks like you should be casting the ds object to a javax.sql.DataSource object not a weblogic.jdbc.common.internal.RmiDataSource object.
    You may find some useful info at the following URL:
    http://edocs.bea.com/wls/docs81/jdbc/rmidriver.html#1026007

  • How to test SCA file?

    Hi
    I have an SCA file named aneAZANW_AZLB_C~20060529092256.sca containing webdynpro development components.
    help.sap.com says:
    <i>"You have imported the SCA successfully into the test system. It has been deployed in the test J2EE Engine.
    Now test the application by running the servlet in the browser under the URL http://<host>:<port>/contextRoot/tax.jsp."</i>
    But this is for the specific java tutorial.
    My SCA file has been deployed onto the test j2ee engine.
    How do I test the application?
    Thanks
    Manoj

    Hi Manoj,
    Since your application is Webdynpro you will need the URL for your webdynpro app. Or you can login to Wendynpro Content Administrator of your test system and run the application from there.
    Regards
    Sidharth

  • J2ee app Migrating to windows XP

    Hi,
    We have a web application developed on J2EE currently deployed on Unix Box.End users are accessing the app from their local machine which is WIndows 98 or WIndows NT.
    We are upgrading their local machines to Windows XP SP2,which ultimately leads to IE6 SP1 from IE 5.5 .
    Please let me know how does this impact the J2EE app and what are the areas we need to test.

    Hi Venkat,
    I dont think there are any changes that are required from the J2EE application. If the user community is upgrading to Windows XP, ensure that they are educated about the Popup blockers installed in their browsers by default. This might prevent acccess to ur web application in case if there are popup windows in ur app.
    One thing which you can also look at is that many people have started using Mozilla Firefox Browsers. Ensure u are testing the app in that version of browser too.
    Thanks and regards,
    Pazhanikanthan. P

  • How to put web app to Oracle 8i Jserver ?

    I've developed a web app with JDev3.1 , Oracle8i 8.1.6 on NTServer4.0.
    and want to put it on Oracle Jserver 8.1.6:
    The app works well within JDev3.1.
    I depolyed my Business Components project and test well.
    I would like to know how to put web app to Jserver. Is it possible?

    when you say "web app" i am assuming you mean an applet, servlet or java server page(jsp) ??
    if you mean this, then you need to move to the rdbms 8.1.7 environment for this support.
    rdbms 8.1.7 supports servlets and jsp's in two different ways :
    externally -- on the rdbms 8.1.7 platform
    they can be run in an external apache front end included with the 8.1.7 rdbms.
    internally -- inside the rdbms 8.1.7
    they can be deployed internally to 8.1.7 in the "oracle servlet engine" (ose)
    applets and html static pages still need to be deployed to a web server on the mid-tier OR the external apache front end included with the 8.1.7 rdbms to optimize performance.
    i hope this helps ...
    p.s. if i've misunderstood your question , please restate it.
    null

  • How to test a simple PL SQL function from another PL SQL script

    Hi,
    I have created a function. Now i need to test that whether it is returning the correct values or not.
    For that, i have written anothe pl sql script and trying to call this function. Im passing all the IN parameters in that function. I assume here that OUT parameters will provide me the result. Im trying to display the OUT parameter one by one to see my result.
    I'm using toad as sql client here connected with oracle.
    pl sql script:-
    DECLARE
    BEGIN
         DBMS_OUTPUT.PUT_LINE('$$$$$$$ VINOD KUMAR NAIR $$$$$$$');
         FETCH_ORDER_PRODUCT_DATA(320171302, 1006, 6999,
    ODNumber OUT VARCHAR2, Line_Number OUT VARCHAR2,
    ServiceID OUT VARCHAR2, BilltoNumber OUT VARCHAR2,
    AnnualPrice OUT NUMBER, CoverageCode OUT VARCHAR2)
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | ODNumber );
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | Line_Number );
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | ServiceID );
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | BilltoNumber );
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | AnnualPrice );
    DBMS_OUTPUT.PUT_LINE('HERE IS THE RESULT ' | CoverageCode );
    END;
    Function:-
    Program Name : SPOT_Order_Product_Data_For_CFS.sql
    Description : Function to Validate parameters from CFS
    By : Vinod Kumar
    Date : 08/19/2011
    Modification History
    By When TAR Description
    CREATE OR REPLACE FUNCTION FETCH_ORDER_PRODUCT_DATA(orderNumber IN VARCHAR2, customerNumber IN VARCHAR2,
    productLine IN VARCHAR2, ODNumber OUT VARCHAR2,
    Line_Number OUT VARCHAR2, ServiceID OUT VARCHAR2,
    BilltoNumber OUT VARCHAR2, AnnualPrice OUT NUMBER,
    CoverageCode OUT VARCHAR2)
    RETURN VARCHAR2 IS
    lv_err_msg VARCHAR2(100) := '';
    lv_bucket_id VARCHAR2(14);
    lv_bill_number VARCHAR2(30);
    lv_anual_price NUMBER;
    lv_coverage_code VARCHAR2(8);
    lv_quote_num NUMBER(10) := NULL;
    lv_line_num NUMBER(5) := 0;
    lv_customer_number VARCHAR2(30) := customerNumber;
    lv_product_id VARCHAR2(14) := productLine;
    lv_count_quote NUMBER := 0;
    lv_quote_status VARCHAR2(5);
    lv_quote_version NUMBER(2):=0;
    BEGIN
    IF INSTR(orderNumber, '-') = 0 THEN
    lv_quote_num := orderNumber;
    ELSE
    lv_quote_num := SPT_Delimiter(orderNumber, 1, '-');
    lv_line_num := SPT_Delimiter(orderNumber, 2, '-');
    END IF;
    --Check status of the quote COM, APP
    SELECT COUNT(*) INTO lv_count_quote FROM sot_order_header WHERE ORDER_NUMBER=lv_quote_num
    AND ORDER_STATUS IN ('APP', 'COM') AND CUSTOMER_NUMBER = lv_customer_number;
    IF lv_count_quote = 0 THEN
    lv_err_msg := 'Invalid Order number';
    RETURN lv_err_msg;
    END IF;
    -- Fetch the latest version on SPOT quote
    SELECT MAX(VERSION_NUMBER) INTO lv_quote_version FROM SPT_QUOTE_HEADER WHERE QUOTE_NUMBER = lv_quote_num
    AND CUSTOMER_NUMBER = lv_customer_number;
    -- If quote is valid fetch the data in OUT parameters
    IF lv_line_num = 0 THEN
    BEGIN
    SELECT a.CUSTOMER_BILLTO_NUMBER,
    b.LINE_NUMBER, b.BUCKET_ID,
    b.ANNUAL_REF_RATE_USD, b.COVERAGE_CODE
    INTO lv_bill_number,lv_line_num,lv_bucket_id,lv_anual_price,lv_coverage_code
    FROM SPT_QUOTE_HEADER a, SPT_QUOTE_LINE b
    WHERE a.QUOTE_NUMBER = lv_quote_num
    AND a.CUSTOMER_NUMBER = lv_customer_number
    AND a.VERSION_NUMBER = lv_quote_version
    AND a.QUOTE_NUMBER = b.QUOTE_NUMBER
    AND a.VERSION_NUMBER = b.VERSION_NUMBER
    AND b.PRODUCT_ID = lv_product_id;
    ODNumber := lv_quote_num;
    BilltoNumber := lv_bill_number;
    Line_Number := lv_line_num;
    ServiceID := lv_bucket_id;
    AnnualPrice := lv_anual_price;
    CoverageCode := lv_coverage_code;
    RETURN '';
    EXCEPTION WHEN OTHERS THEN
    lv_err_msg := 'Multiple PIDs existing in the SPOT order, please provide the SPOT order + line number as input data';
    RETURN lv_err_msg;
    END;
    ELSE
    BEGIN
    SELECT a.CUSTOMER_BILLTO_NUMBER,
    b.BUCKET_ID, b.ANNUAL_REF_RATE_USD,
    b.COVERAGE_CODE
    INTO lv_bill_number,lv_bucket_id,lv_anual_price,lv_coverage_code
    FROM SPT_QUOTE_HEADER a, SPT_QUOTE_LINE b
    WHERE a.QUOTE_NUMBER = lv_quote_num
    AND a.CUSTOMER_NUMBER = lv_customer_number
    AND a.VERSION_NUMBER = lv_quote_version
    AND a.QUOTE_NUMBER = b.QUOTE_NUMBER
    AND a.VERSION_NUMBER = b.VERSION_NUMBER
    AND b.PRODUCT_ID = lv_product_id
    AND b.LINE_NUMBER = lv_line_num;
    ODNumber := lv_quote_num;
    BilltoNumber := lv_bill_number;
    Line_Number := lv_line_num;
    ServiceID := lv_bucket_id;
    AnnualPrice := lv_anual_price;
    CoverageCode := lv_coverage_code;
    RETURN '';
    EXCEPTION WHEN OTHERS THEN
              lv_err_msg := 'Multiple SPOT lines exist with same parameter';
              RETURN lv_err_msg;
    END;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    lv_err_msg := '@@@ EXCEPTION THROWN @@@ '|| SUBSTR(SQLERRM,1,120);
    RETURN lv_err_msg ;
    END;
    Don't look at the function, it might have errors but my primary concern is how to test this function. Once I start doing its testing then only i can understand any bugs(if any).
    My pl sql is not so good. Im still learning. I don't understand IN and OUT parameters are.
    I just know that IN parameters r those whick we pass in to the function wen we call it and OUT parameters are those through which we get the result.
    Thanks in advance
    Vinod Kumar Nair

    20100511 wrote:
    I wondered how I could test the output of the function from within TOAD?I usually create the following function in my developer schema:
    create or replace function BoolToChar( b boolean ) return varchar2 is
    begin
      if b then
        return( 'TRUE' );
      else
        return( 'FALSE' );
      end if;
    end;To test a function like yours, the following will do in SQL*Plus/TOAD/etc:
    begin
      DBMS_OUTPUT.put_line(
        BoolToChar( XCCC_PO_APPROVALLIST_S1.does_cpa_exist(1017934)  )
    end;
    I'm probably doing 101 things wrong here, but thought I'd ask anyway and risk being shouted at.Shout at? You reckon? I thought people risked being beaten with a lead pipe, or pelted with beer cans and stale pretzels - which makes being shouted at a really safe and viable alternative. {noformat};-){noformat}

  • How can I downloads apps by without using credit crd.... Plz help mee soon

    How can I download app in iPhone 4 by without using credit card... Plzz hlp

    Hi Mahendra,
          If you have the was installed on your local machine or if you have remote access to the machine where the was is installed you could also deploy your application using the J2EE Visual Administrator tool .
    After you connect through Visual Admin expand the node Server->Services-Deploy->Runtime . Choose Deploy and Start .In the File field, specify the application EAR file . You can also browse to it in the file system.
    If some additional class files are necessary for loading and deploying or updating the application, modify the list of Additional Class Path . Choose OK .
    The Deploy Dialog Box appears . If you have to make any last minute changes do it here . Else directly select Ok . The successful deployment is marked with green on the status bar .
    Hope this helps you in your endeavour .
    Regards,
        Tahzeeb

  • How can I store apps on my phone, so I don't have to use 3G or internet???

    I am in Europe for 4 months, and at $50/month for 50MB, I am not able to use the majority of my apps, some of which SHOULD work on my iPhone without internet access. On my palm pilot, which had a fraction of the data capacity, I had a spanish/english dictionary, maps of various cities, etc.
    I understand, Apple has a deep relationship with AT&T, but I am sick and tired of them. Some apps should be able to be stored on the device, it's 8 GIGABYTES!!! There is enough space!
    Please, please tell me how I can find apps that work without going online, or some sort of hack or something. This is ridiculous, that my ancient Palm Pilot had more capacity than this 8G toy.
    Thanks!
    Susanna
    <Edited by Moderator>

    I have tested my apps, but what I want to do is buy apps that clearly state, in the store, that they do not require internet access to work. Sure, the app is partially stored on my phone, but the database of information (like a spanish/english dictionary, a city map, a list of local restaurants, etc.) are not stored on my phone. Most apps that offer these services store the majority of the data online. After searching and searching I finally found a spanish/english dictionary that clearly states it is available offline.
    What I'm ranting about is paying $50 for 50GB which has evaporate in less than 2 weeks of enabling data roaming only when I needed to look for something on my map. It's a complete waste of money, when I should be able to buy a map of the city, download it, and search it. I understand it might be hard to fit the entire world onto an 8G iphone, but at least we should be able to get local maps.

Maybe you are looking for

  • Can't send text to some people

    I have a problem with texting that is driving me buggy.  I can't send a text message to my wife or my son.  They are both part of my friends and family plan.  There may be others, but I don't send a lot of text messages (there are at least six or sev

  • What can I use in the place of the AIM toolbar? I used it for older versions of firefox, but it is no longer compatible.

    I am just having problems finding a toolbar with the same features of the AIM toolbar. I simply want a toolbar with button links. Not one with the content feeds from social sites.

  • Touch-up brush help?

    Help! I just opened my Adobe PhotoShop Elements 8 package for the first time, and the touch-up healing brush tools do not seem to work on my photos. I've read the tutorials, and have followed the directions.  The tools appear on the photo, and I can

  • OS X 10.8 Mountain Lion Photoshop CS5 Windows file server save issue

    After Lion to Mountain Lion upgrade. Cannot save or save as to Windows server. Due to "program error." Adobe Photoshop CS5. Can save as fine to local drive. Can also drag and drop in the Finder to this server. This is Photoshop CS5 12.0.4 (current).

  • Selecting What Child Of A SerialElement To Play Next

    Is there a smart way to pick which child to play next in a serial element without modifying the internal SerialElementTransitionManager class? I understand the SerialElement by definition just plays elements in sequence, but it would be handy to be a