Java DC to WebDynPro dc

Hi
I am using DC first time .
I created Java DC and class Class1 which has method which returns string "Hello".
I created public part.
Now I created WD dc and Use dc of Java DC.
I want to get "Hello" string in textView.
I created context of view and assign it to textView.
I used .jar file of java project in webdyn project.
i write code..
public void wdDoInit()
    //@@begin wdDoInit()
   Class1 c=new Class1();
     wdContext.currentContextElement().setStringvalue(c.getStr());
    //@@end
It shows error....
java.lang.NoClassDefFoundError: com/dhan/java/Class1
    at com.dhan.wdp.FirstView.wdDoInit(FirstView.java:99)
    at com.dhan.wdp.wdp.InternalFirstView.wdDoInit(InternalFirstView.java:112)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
    at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
    at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
Thanks for helping me..

Hi ,
You can try the following locally:
1. Create  an Enterprise Application DC.
2. Make Two public parts in your java DC which refer your java classes
1.Assembly PP(2nd option can be packaged in .sda etc)
2.Compilation pp(1st option)
3 Use Assembly PP in your EA DC as Build and runtime Dependencies
4.Use Compilation PP in WD DC with Build time Qualifier.
5. Build and Deploy the EA DC Ear.
6. Reload and rebuild then Deploy your WD Dc and run.
Also give the shared referance of your EA Dc in WD Dc by right clicking on WD go to Project properties--Shared references and give the value like this.
<Domain name eg;sap.com >/<EA name excluding Track name and Domain Name>
Hope this will Help
Regards,
Siddharth
Edited by: Siddharth Jain on Aug 25, 2008 8:33 AM

Similar Messages

  • Calling Webdynpro Java Application from Webdynpro ABAP Application.

    Hi,
    We have developed one Application using Webdynpro Java and I m in need to call the Webdynpro Java application from Webdynpro ABAP.
    Require Suggestions to acheive this.
    Thanks In advance.
    Reg,
    Ajay.

    Dear Ajay,
    Assuming that both your applications WDA & WDJ are in the portal & you don't have to pass any parameters to the WDJ application.
    Write the following code on the action  where you would call the WDJ application.
      DATA:
            lr_compcontroller TYPE REF TO ig_componentcontroller,
            l_component TYPE REF TO if_wd_component ,
            lr_port_manager TYPE REF TO if_wd_portal_integration ,
            wa_navigation TYPE navigation.
      lr_compcontroller =   wd_this->get_componentcontroller_ctr( ).
      l_component = lr_compcontroller->wd_get_api( ).
      lr_port_manager = l_component->get_portal_manager( ) .
    * The value inserted into the navigation-target field can be found in the Portal
    * content administration tab of your portal. It is the ID or PCD Location field
      wa_navigation-target = pcd. " Please provide the PCD Location of the WDJ Application here.
      wa_navigation-mode   = '0'.  "0 = INTERNAL(same page) and 1 = EXTERNAL(new page).
      CALL METHOD lr_port_manager->navigate_absolute
        EXPORTING
          navigation_target = wa_navigation-target
          navigation_mode   = wa_navigation-mode.
    You can get the PCD from the Page properties of the WDJ application page in the Portal.
    Hope it helps!
    Warm regards,
    Upendra Agrawal

  • How to use Java code inside WebDynpro-ABAP

    Hi,
        How to use Java code inside WebDynpro-ABAP.
    Could any one provide sample code.
    Cheers,
    Sam

    Hi Sam,
    We can't Bring Java Inside the ABAP. Both are running in different Environments.
    and also ABAP Codes are runs on BASIS.
    -Basis is a middleware between ABAP codes and Ur OS.
    -Contains set of programs to load,RUN,intepret the ABAP program..
    So Both are Different.
    Regards,
    Ramganesan K.

  • Triggering Java Script in WebDynPro

    Hi Experts,
    I wanted to know if there is any way to trigger java Scripts in webDynpro application.
    If yes, please provide any document on the same.
    Thanks in advance.
    Regards,
    Rohan

    Hi Rohan,
    Javascript is not part of the Web Dynpro programming model.
    Remember: Web Dynpro is a multi-client programming model that supports not-only Web browsers.
    Meanwhile, have a look at the following thread for more info.
    Re: Java Script in WebDynPro!!!!
    I hope this helps.
    Regards,
    Gopal.

  • To use Java Script in WebDynpro

    Hi,
    i am trying to do a webdynpro application where in, if i click on the button it should trigger the java script.how could i do that

    Kalyan,
    try to follow these tutorials:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial on enabling message and error support - 3.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial on using validating and non-validating actions - 33.htm
    you can achieve validating with Web Dynpro methods but not with JavaScript inside of WD-applications.
    kr, achim

  • Calling Java code from Webdynpro Abap UI

    Hi All,
    Can anybody tell me, How to make calls to java code on a button click from webdynpro ABAP UI ?
    Thanks in Advance.
    Jenish .V. Joy

    Hi Jenish,
    As I am new to WebDynpro for ABAP I could not help you out exactly.But See this link which will help you to create applications in WebDynpro by using ABAP language.
    https://www.sdn.sap.com/irj/sdn/developerareas/abap?
    rid=/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943
    If you get any answer for your question let me know.
    Regards,
    Karthick K Eswaran

  • Using Java Applet in WebDynpro Application

    Hello,
    I have the problem that I must access the client in my WebDynpro Application.
    But I found no way to include a Java Applet in my application, so my question: Is it generally possible to include a Java Applet or not?
    If it is not possible with an Applet, is there any other way to access the client?
    Thanks a lot

    We actually embed Java applets in our application. But only on the portal.
    Wrap the applet around a BSP.
    Call the URL in an iframe.
    To prevent the reloading problems that we see with applets and actions, we put the applet in a modal window, with an OK button at the bottom so that when applet processing is finished, the rest of the web dynpro functionality resumes.
    If you need to have them both in the same page, you can embed the BSP iview in the same portal page.

  • Java Script in WebDynPro

    Hi,
    I just want to know if we can use JavaScript in WebDynPro.
    If its possible I would like to know how we can implement Alert Messages,Warning Messages,Error Messages using JavaScript.
    If a piece of sample code is shown it would be of great help.
    Please let me know in this regard.
    Thanks and regards,
    Chandrashekar.
    Edited by: Armin Reichert on Jan 30, 2008 6:58 AM

    Hi Chandra,
    Custom Javascript is not possible in Web Dynpro.
    You need to handle the validations and can use MessagePool to generate the messages.
    You can also write a custom Java class to handle validations.
    Regards
    Nikhil

  • Problem in editing a java file in Webdynpro

    Hi All,
    I have created a new dc and checked it in the DTR. Now, when I sync it from DTR, and again try to change the implementation of the view, it does not let me do it. I have to go to DTR>inactive dcs-> and explicitly edit the file. I am able to change the layout of the view but not the code.
    Please guide me to resolve this issue.
    Thanks

    Just check that ou haven't checkd-in the content of gen_wdp folder. If you have revert them.
    Second check: Insert values between //@begin and //@end tags in only. If you enter any where else, the code will be lost.
    Select the java implementation and open the navigator view. You see the file selected in the left bowser. Check that the file is writable by clicking on File->Go to Properties-> Info
    If it is writable change it to non-writable.
    Best Regards,
    Ashwani Kr Sharma

  • Java Script in WebDynpro ABAP

    Hi Everybody,
    i´ll hope that someone can help me. It is possible to take Java Script in a WebDynro for ABAP. Can anybody give me some code samples or something to solve the issue?
    Thanks
    Best regards
    Markus

    Web Dynpro ABAP is not intended for adding Java Script, or any script for that matter.

  • Where to place java code in webdynpro for communicating between views

    Hi Friends,
    Where should I put the Java code on click of button for the action.
    I can out in init() method, or in teh onActon methods.
    I think suppose I have two views view1 and view2
    on click of one button on view1, user shoudl see results on another view.
    for that I think best is to put data accesing logic for view2--in onAction of view1 itself.

    I've been looking at my examples,  you can do it either way.  In one example, I have coded the logic in the Inbound Plug method on the Result view.  In another example, I am doing the logic in the onAction method when the user presses the button on the Start view.
    I'm thinking it may be better to do it in the onAction method, but it really depends on the overall functionality of the application.
    Regards,
    Rich Heilman

  • How to convert .ear file of webdynpro for java application to webdynpro pro

    Hi All,
    I have a .ear file which belongs one web dynpro for java application.
    I do have other information about the same.
    I need to convert it into a web dynpro project and use it in NWDS to make changes.
    How can I do it? I could not find any solution on SDN.. I hope I get here...
    Thanks and Regards,
    Aditya Deshapnde
    Edited by: Aditya Deshpande on Nov 23, 2010 1:55 PM

    Hi Friend,
    This is almost not possible even if you have Java Decompiler -- WD has a lot compile(design)-time only artifacts that are not exist in generated EAR.
    Hope this is help full for u.
    Regards
    Vijay Kalluri

  • Java Script with WebDynpro

    hi,
    pls see subject. Is it possible ?
    reagards
    sas

    Hi sas,
                Check this
    <a href="/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro:///people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro
    regards
    Sumit

  • Webdynpro ABAP called from IView JAVA works over http but doesn't over http

    Hello gurus, like I said in the subject, we have integrated inside our JAVA portal a WebDynpro ABAP and it's working good over http protocol (http://<servername>:<http_port>/irj/portal), but when you browse the portal over https protocol (https://<servername>:<https_port>/irj/portal), everything works fine exept the WebDynpro ABAP, is like if the javascript components didn't be loaded completly, because the buttons doesn't make anything, and only half of the table that is supossed to be loaded is showed.
    Do you know what kind of configuration I'm missing?
    Thanks and best regards

    You have to note here that for webdynpro ABAP applications, the http/https request is actually served by the backend server.
    So, while accessing your webdynpro ABAP application, the request will be like:
    https://<mybackendserver>:<backendport>/bc/sap/.....
    While creating a system object in your portal (System landscape), you will need to adjust the protocol to https and also set the appropriate https port of the backend server. Also, HTTPS/SSL communication should be enabled on your backend server.
    Please check the definition of your system object.
    You can find more information by turning on a HTTP trace and checking how the request is routed to the backend server upon accessing the WD4A application.
    Thanks,
    Shanti

  • How to start to work on MDM JAVA API by using webdynpro for java

    Hi all
    I have basic idea on MDM business package thru portal by using standard iViews.
    now i am planning to work on MDM JAVA APIs by using Webdynpro for Java as UI.
    1) can you please share the required documents on the same. how to start working on this by using MDM JAVA APIs in webdynpro for java
    2) what are the JARs files are required and how to integrate those jar files into webdynpro for java application.
    3)  is there any SDN help on MDM JAVA API with webdynpro for java? . can you please send the link on the same.
    4) can you please help by providing sample code on how to use JAVA APIs for retrieving,deleting,inserting and Updating the data in the database.
    if anybody helps on the same then it is the great help to me.
    points are always rewardable...
    Regards
    Suresh babu

    Hi Suresh,
    You can have the MDM JAVA API javadocs from the link
    http://help.sap.com/javadocs/MDM/SP06P2/index.html
    There you can see a package named com.sap.mdm.examples.The classes in it contains some examples using which you can start understanding the code.
    You need to have MDM JAR files for it. And these JAR files to be used at build time can be added to the project thru :-
    Right click on project-> properties->Java Build Path - > Add external JARs
    At run time you can add them the reference in
    Right click on project-> properties->web dynpro references->library reference.
    Thanks
    Namrata

Maybe you are looking for