Interaction between 2 classes (servlet and someother)

Hi all,
I have 2 java files one is a servlet and the other is an ordinary java file which checks to see whether a username and password exists in the database(UserPresent.java).This file has got the presentation layer which has to be put into the servlet.
The servlet file must call the UserPresent.java file.I am going to make an interface to the UserPresent.java file ,I will call it User.java.This User.java file will have a method by name
public boolean validateUser(String username,String pasword) .
The UserPresent.java file will implement this interface.
My question now is,where will these java files be put ?,hope that my point is conveyed.How do I test UserPresent.java file.Kindly excuse me if there is a much more sophisticated way of expressing this.
Hoping to hear from you all
Thanks
AS

If put means where does that files goes into directories.
then u can put that files in same package as servlet resides or put in anther package and import
thats all my understanding
regards
hithesh

Similar Messages

  • [svn:osmf:] 10248: Fix a few bugs related to the interaction between IPlayable, IPausable, and ITemporal within a SerialElement, specifically around ensuring that the transition from child to child happens in the various permutations of these traits .

    Revision: 10248
    Author:   [email protected]
    Date:     2009-09-14 16:45:00 -0700 (Mon, 14 Sep 2009)
    Log Message:
    Fix a few bugs related to the interaction between IPlayable, IPausable, and ITemporal within a SerialElement, specifically around ensuring that the transition from child to child happens in the various permutations of these traits.  Introduce a helper class for managing this logic, as it can happen in both CompositePlayableTrait and CompositeTemporalTrait.  This lays the groundwork for a MediaElement which only implements IPlayable (e.g. to ping a tracking server) working within a serial composition.  Beef up unit tests so that these cases don't get broken in the future.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/.flexLibProperties
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/composition/CompositePlayableTrai t.as
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/composition/CompositeTemporalTrai t.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/composition/TestSerialEle ment.as
    Added Paths:
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/composition/SerialElementTransiti onManager.as

    Hi,
    Found a note explaining the significance of these errors.
    It says:
    "NZE-28862: SSL connection failed
    Cause: This error occurred because the peer closed the connection.
    Action: Enable Oracle Net tracing on both sides and examine the trace output. Contact Oracle Customer support with the trace output."
    For further details you may refer the Note: 244527.1 - Explanation of "SSL call to NZ function nzos_Handshake failed" error codes
    Thanks & Regards,
    Sindhiya V.

  • Problem exchanging values between a Servlet and Thread???

    Hi Everybody,
    I have got a problem exchanging values between a Servlet and a Thread...
    The actual thing will go like this
    I take a request from JSP which is served by a servlet..
    A thread is invoked in the servlets into which the parameter values taken from JSP page is sent...
    In between the thread needs to be suspended for a moment, relieve the control back to the servlet and then come back with the new values modified in the servlet...
    How is this achieved?
    Please give ur suggestions regarding this...
    Thanks in advance

    I really have no clue how you can use URLConnection to do that!
    Could you please explain in the following scenario how it can help me as an alternative solution to the following:
    Non-Servlet A continously running & saving to some prop regularly
    --> servlet B reads prop file regularly --> display continously on a jsp file
    I wish I could do a servlet A --> servlet B-- > display jsp scenario but I do not know how to have servlet A continously running while keep the servlet B interacting with the jsp.

  • Is there any Similar between Class.forName() and new operator ???

    Plz tel me is there any Similar between Class.forName() and new operator ??? i have been asked this ques in interview

    You probably should have used the other thread:
    http://forum.java.sun.com/thread.jspa?threadID=792678
    To add a little confusion to the matter...Class objects are in fact objects. They're objects representing classes. So, in a sense, I guess, you could say they're similar -- in each you get an object. But in practice Class objects and all other objects should be considered semantically different unless you're doing some pretty unusual stuff. Also Class.forName is more of a factory method than a constructor.

  • Diffrence between Class.forName() and new Operator

    What is diffrence between class.forName() and new operator.Please tell in much detail.
    Also about classloader.loadclass.
    Suppose the class that we are tring to load with the help of class.forname is not compiled. Again if I make changes at runtime to that class will that get reflected.

    What is diffrence between class.forName() and new
    operator.Please tell in much detail.Class.forName loads a class. The new operator creates a new instance. Apple trees and apples.
    Also about classloader.loadclass.Read the API.
    Suppose the class that we are tring to load with the
    help of class.forname is not compiled.Then you can't load it and get an exception. Read the API.
    Again if I
    make changes at runtime to that class will that get
    reflected.Depends on the changes and when exactly you do them.

  • What is the interaction between calling VIs and subVIs using VI Server?

    I'm studying for the CLAD and one of the lines in NI's preparation document here is this:
    What is the interaction between calling VIs and subVIs using VI Server?
    I know how to use the "Call By Reference" function to call a VI, but not necessarily a subVI. I thought a subVI is always loaded with the calling VI and has nothing to do with VI Server. What am I missing?
    Solved!
    Go to Solution.

    Hi Bmihura,
    I think this article will clear up how the VI Server works with subVIs called dynamically or statically.
    Calling a VI by Reference
    Best Regards,

  • Difference between class 200 and 300

    Experts,
    Can i use class 200 for varient configuration?
    I want to know difference between class 200 and 300 , are this same?
    Appriciate help.
    Tom

    Thanks for marking thread useful.
    Class 300 and 200 are both defined for the materials.class 300 is mainly used for a variant material used for variant configurartion.We can also classify materials under class 200 which do not have to be configurable materials.But allows to use the defined characteristics and restrict the usage for a specific purpose..
    Please check below threads
    http://scn.sap.com/thread/631073
    https://scn.sap.com/thread/576848
    Yes you can copy class and create your new class .
    can you please share your business requirement, what kind of solution your are budiling with this?
    Thanks
    Ritesh

  • What is the differene between class diagram and er diagram .....pls ex

    what is the differene between class diagram and er diagram .....pls explain with examples

    <b>Diff btw Class Diagrams and ERD's:</b>
    Class diagrams and ERDs both model the structure of a system. Class diagrams
    represent the dynamic aspects of a system: both the structural and behavioural features.
    ERDs, depicting only structural features provide a static view of the system.
    Elements of a class diagram:
    >class
    >association
    >binary
    >n-ary
    >Aggregation
    >Composition
    >Generalization
    >Dependency
    >Realization
    >Association Classes
    Elements of Entity Relationship Diagrams:
    >Entity - A data attribute is a property common to an entity.
    Check this link
    www.cdf.toronto.edu/~csc340h/summer/tutorials/TutorialClassERD.pdf
    Regards,
    Pavan.

  • Difference between class report and interactive report

    please give me the differences between  classical report and interactive report

    Hi,read the following :
    In ABAP, there are a total of 7 types of reports. They are:
    Classical Reports
    Interactive Reports
    Logical Database Reports
    ABAP query
    ALV Reports (ALV stands for ABAP List Viewer)
    Report Writer/Report Painter
    Views (There are different types of views also)
    Classical Reports
    These are the most simple reports. It is just an output of data using the Write statement inside a loop.
    Classical reports are normal reports. These reports are not having any sub reports. IT IS HAVING ONLY ONE SCREEN/LIST FOR OUTPUT
    Interactive Reports
    As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers.
    And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.
    We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).
    Logical Database Reports
    Logical database is another tool for ABAP reports. Using LDB we can provide extra features for ABAP reports.
    While using LDB there is no need for us to declare Parameters.
    Selection-screen as they will be generated automatically.
    We have to use the statement NODES in ABAP report.
    ABAP Query Reports
    ABAP query is another tool for ABAP. It provides efficency for ABAP reports. These reports are very accurate.
    Transaction Code : SQ01
    Report Writer / Report painter
    Super users and end users can use Report Painter/Report Writer tools to write their own reports.
    Giving them the ability to report on additional fields at their discretion shifts the report maintenance burden to them, saving SAP support groups time and effort normally spent creating and maintaining the reports.
    ALV reports
    Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length.
    In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output.
    The report output can contain up to 90 columns in the display with the wide array of display options.
    There is no difference between drill down and interactive report, they are the same.
    With drilldown reporting, SAP provides you with an interactive information system to let you evaluate the data collected in your application. This information system is capable of analyzing all the data according to any of the characteristics that describe the data. You can also use any key figures you wish to categorize your data. You can display a number of objects for a given key figure, or a number of key figures for a given object. In addition, the system lets you carry out any number of variance analyses (such as plan/actual comparisons, fiscal year comparisons, comparisons of different objects, and so on).
    *More on Classical Vs Interactive*
    Classical Reports
    These are the most simple reports. Programmers learn this one first. It is just an output of data using the Write statement inside a loop.
    Classical reports are normal reports. These reports are not having any sub reports. IT IS HAVING ONLY ONE SCREEN/LIST FOR OUTPUT.
    Events In Classical Reports.
    INTIALIZATION: This event triggers before selection screen display.
    AT-SELECTION-SCREEN: This event triggers after proccesing user input still selection screen is in active mode.
    START OF SELECTION: Start of selection screen triggers after proceesing selection screen.
    END-OF-SELECTION : It is for Logical Database Reporting.
    Interactive Reports
    As the name suggests, the user can Interact with the report. We can have a drill down into the report data. For example, Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers.
    And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details will be displayed.
    We can have a basic list (number starts from 0) and 20 secondary lists (1 to 21).
    Events associated with Interactive Reports are:
    1. AT LINE-SELECTION
    2. AT USER-COMMAND
    3. AT PF<key>
    4. TOP-OF-PAGE DURING LINE-SELECTION.
    HIDE statement holds the data to be displayed in the secondary list.
    sy-lisel : contains data of the selected line.
    sy-lsind : contains the level of report (from 0 to 21)
    Interactive Report Events:
    AT LINE-SELECTION : This Event triggers when we double click a line on the list, when the event is triggered a new sublist is going to be generated. Under this event what ever the statements that are been return will be displayed on newly generated sublist.
    AT PFn: For predefined function keys...
    AT USER-COMMAND : It provides user functions keys.
    TOP-OF-PAGE DURING LINE-SELECTION :top of page event for secondary list.
    Reward if found helpful

  • Differences between Java Servlet and Portlets

    Hello,
    May anyone let me know the differences between Java Servlet, JavaBeans and Portlets? It seems quite similar to each other... By the way, what are differences between a servlet container and portlet container? Thank you.
    Charoite

    JavaBeans are totally different from servlets or portlets. JavaBeans can be used in just about any environment. A JavaBean is basically a java class with a no-arg constructor which follows certain naming conventions for its get and set methods.
    Servlets can only function in an "web containers" which are provided by application servers which support servlets. The main function of servlets is to process requests (usually http requests) and generate output (usually web pages). They usually perform validation and other processing and then delegate the web page generation to a jsp.
    Portlets are similar to servlets but rather than generating an entire web page, their output is relegated to a portion of a page. A single web page may contain the output of several portlets. These portlets can communicate with each other. The portlet container provides the functionality to merge the output of the various portlets and the infastructure required to support the portlets.

  • Interaction between Edge Animate and RaphaelJS (or any svg library)

    Hello.
    Edge Animate's possibilities are really nice as long as i'm working with anything rectangular. The overall UI is very practical and so, but when you want to work with more complex shapes overlapping it gets very limitated.
    I've looked around with no success, so may be someone here as a clue for me.
    How would you integrate something from this kind of page (interactive map of australia) and make the map and an Edge environment work together.
    Here i'm thinking :
    - Edge buttons that would highlight some parts of the map (or reveal some divs from the original html)
    - RaphaelJS code at building of the map that would interact with edge symbols.
    So far, my knowledge of code/js/css seems too limited to get things done as i wish, any ideas/insight welcome.

    Hi Franck!
    You are right. The default implementation uses the SVG as a background image applied to a div container. That's the reason why you loose all the interactivity within the SVG itself. I love Raphael, but I think it would be an overhead for your map example.
    Here is a light weight solution with (jQuery SVG) that works like a charme with non-rectangle click areas.
    Assuming you have a rectangle placed on the stage (named "playground") you can load the SVG into that container within the "compositionReady" handler of your composition like this:
    yepnope({
         load: "libs/jquery.svg.package-1.4.5/jquery.svg.min.js",
         complete: function() {
              // Load Handler for SVG Graphics
              function onSvgLoad(svg, error) {
                $('path#Cyan').click( function(){
                     alert('hello Cyan');
                     // Your code here
              // Select Edge Animate Element for SVG display
              var playground = sym.$("playground");
              // Load SVG Graphics
              playground.svg({});
              var svg = playground.svg('get');
              svg.load('images/pie.svg', {
                   addTo: false,
                   changeSize: false,
                   onLoad: onSvgLoad
    I put together a small demo project with an example svg and all dependencies:
    http://public.simonwidjaja.com/temp/AnSVG.zip
    Hope that helps!
    Cheers,
    Simon

  • The difference between class, instances and object?

    I've been reading a JAVA book and i've come accross terms such as class, instances and object. What I don't understand is why after creating a class, we have to create an object and then create instances? What's an object and instance anyway? I don't really understand the term. Can anyone pls help and explain it to me in an easier way to understand?
    Thanks a lot.

    A Class defines what attributes (properties) and methods a particular item will have.
    Ex. You have a class person
    public class Person
    public void walk()
    String name;
    int age;
    }An instance and Object are the same. When you create an instance of a class, you get an object of that class.
    Person kevonline = new Person();You can then set kev's name, age, make him walk, etc... since these are defined in the class Person.
    HTH,
    Dewang

  • Issues with interactivity between component states and page states

    Hi there, I recently downloaded the trial of Catalyst 5.5 and am encountering the following problem:-
    I have many screens in my application and am attempting to get around the 20 state limit by creating custom components that contain multiple states that can be used as screens. So, I have created button links between the component states which work fine but have also created button links to and from the standard states of the application, which dont work upon running/publishing. I'm not quite sure whats wrong here as the button commands are pointing to the right place, i.e. they are pointing firstly to the specific custom component and then the state within the component, but its just not working.
    Is this a trial issue or something deeper?
    I really hope someone can help as apart from this issue I have been very happy with the application but if I can not find a solution theres no point in purchasing it.
    Cheers.

    Ive had the same problem. Im trying to create an interactive e-book but im having problmes with the limit of states. I have now worked out that i have to create custom components to create a sub-state but im finding it difficult to go between sub states. Help anyone?

  • Difference Between Class & Characterstics and the Tcodes to create them ?

    Hi All,
    I want to know the difference between the Class & Characterstics ? And the transaction codes to create them ?
    Can any one provide me clear information ?
    Answers will be rewarded,
    Thanks in advance.

    Hello The Rock,
    Class is a group of similar objects described by means of characterstics
    that they have in common
    Tcode - CL02
    This class is used to hold the characterstics that describe a configurable
    material . The characterstics are attached to the class.
    Characterstics are used to define the features of a configurable material
    The Tcode to create charcterstics is CT04
    Reward if this information is useful.
    Regards,
    Suresh Babu.S

  • Problem with Interaction between SAP GUI and BSP Applications

    Hi Folks,
    I am new to BSP and am trying to create a program to created a BSP within the SAP GUI. This is my program, I have tried to find as to what error have I made but I am not able to find out.
    I can only find a button post document in the output, but I am not able to trigger any event. Please let me know as to what is the error.

    REPORT  zbsp_iact_gui.
    SET SCREEN 100.
    *       CLASS cl_my_html_yiewer  DEFINITION
    CLASS cl_my_html_viewer DEFINITION INHERITING FROM cl_gui_html_viewer.
      PUBLIC SECTION.
        METHODS: constructor IMPORTING parent TYPE REF TO cl_gui_container.
        METHODS: on_sapevent FOR EVENT sapevent OF cl_gui_html_viewer IMPORTING action postdata.
    ENDCLASS.                    "cl_my_html_viewer  DEFINITION
    *       CLASS cl_my_html_viewer IMPLEMENTATION
    CLASS cl_my_html_viewer IMPLEMENTATION.
      METHOD constructor.
        super->constructor( parent = parent ).
        DATA: event_tab TYPE cntl_simple_events,
              event TYPE cntl_simple_event.
        event-eventid = me->m_id_sapevent.
        event-appl_event = 'X'.
        APPEND event TO event_tab.
        call method html_control->set_registered_events
            exporting
               events = event_tab.
        SET HANDLER me->on_sapevent FOR me.
      ENDMETHOD.                    "constructor
      METHOD on_sapevent.
        BREAK-POINT.
        IF action CS 'COUNTER'.
          DATA: counter TYPE string.
          READ TABLE postdata INDEX 1 INTO counter.
          SPLIT counter AT '=' INTO counter counter.
          MESSAGE counter TYPE 'I'.
        ENDIF .
      ENDMETHOD.                    "on_sapevent
    ENDCLASS.                    "cl_my_html_viewer IMPLEMENTATION
    DATA: html_viewer TYPE REF TO cl_my_html_viewer,
          html_container TYPE REF TO cl_gui_custom_container,
          fcode LIKE sy-ucomm.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'TESTHTM1'.
      IF html_viewer IS INITIAL.
        CREATE OBJECT html_container
          EXPORTING
            container_name = 'HTML'.
        CREATE OBJECT html_viewer
          EXPORTING
            parent = html_container.
        DATA: url TYPE string, urlc(2048) TYPE c.
        cl_bsp_runtime=>construct_bsp_url(
        EXPORTING in_application = 'ZBSP_IACT_GUI'
        in_page = 'Start.htm'
        IMPORTING out_abs_url = url ).
        urlc = url. " type conversion STRING to C
        CONCATENATE urlc '?SAP-CLIENT=650' INTO urlc.
        html_viewer->show_url( url = urlc ).
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
    *       text
    MODULE user_command_0100 INPUT.
      CASE fcode.
        WHEN OTHERS.
          CALL METHOD cl_gui_cfw=>dispatch.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    Edited by: Nonconformist Pagal on May 12, 2009 1:42 PM
    Edited for formatting by: Durairaj Athavan Raja on May 14, 2009 9:50 AM

Maybe you are looking for

  • Issue when suming the field in Select query using inner join

    Hi All, SELECT A~OI_SHNUM        A~FORWAGENT                A~ROUTE        A~SHTYP        A~DTSHP_EACT        A~/BIC/GTCLICENS        A~/BIC/GTCADD04        A~COMP_CODE        SUM( C~GRS_WGT_DL )        C~UNIT_OF_WT   INTO TABLE I_LAYONE   FROM ( ( /

  • Why does ad blocker not work?

    this will be complicated.... my anti virus software, avast also notifies users that software is not up to date. when i updated that software i also got unwanted sh*t without my knowledge. those items include my PC back up and arcadeplayer. arcade pla

  • Sales Handling unit enhancement

    Dear friends, This is regarding packing handling units in delivery. I have a customized table which is having ready handling units with reference to sales order. I have a requirement to pick these handling units from Ztable and attach to delivery whe

  • Picture thumb nails not showing up?

    i have i photo version 4 a nd i was running out of space on the harddrive, so i purchased an external hard drive to store photos on and free up space on my main drive. i copied some photos from my root photo directory and now when i go to my iphoto l

  • MacBook and MacBook Pro power adapters cross compatible?

    Greetings~! I have a MBP, and I just bought my girlfriend a MacBook for her B-Day. I realize there is a wattage difference between the two power adapters. The MBP is 85watts and the MB is 60watts. So... to me, I could use the 85watt power adapter to