Parameters in java files

Parameter in java files
Hello,
I want to know how it becomes in JDeveloper in order to pass over "Frame1.java" toward "Frame2.java" a parameter of type string.
If an example of this exists, I would thank me it they send.
Thank you
Homero Obando
Infochile Ltda.
null

Hi Serge,
   It reported bug with this ODI version. Workaround is to use JDK 1.6
   Check out on Oracle support for more details: Bug 13064870 : ERROR REPORTED WHEN RUNNING ODI 10.1.3.6 DESIGNER WITH JDK 1.7.0
Thanks,
Santy.

Similar Messages

  • How can i execute "*.java " files in Workshop

    Hi,
    Im sunil,new to this weblogic workshop8.1..i dont know how to execute standalone .java files or servlets in workshop.plz help me and tell the way.
    regards
    Budati sunil

    Im not too sure about the Java project. But single normal java files with public static void maain(String [] args) are very simple to execute.
    1. Write the java code somewhere lets call this class A.
    2. Make a dummy page flow.
    3. In the begin action of this pageFlow, call the main method of the A class directly using A.main(null) since main is a static method. your code will work fine.
    4. If you have to pass a String[] as parameters. Before calling main, create this String[] and then pass it.
    In this way you can make a jsp and take the input from the user also.
    Hope it helps
    Cheeers

  • Wsdlc Ant Task - Problem creating java files in the correct package

    In eclipse, for weblogic 9.2
    Using the wsdlc WebLogic Web Services Ant Task, I am trying to auto-generate the java files for the web service based on the WSDL. I have specified the packageName as one of the parameters. However the java files are being created and packaged based on the TargetNameSpace of the WSDL rather then under the package name specified. Following is part of my build.xml
    autogen.src.dir=../code/java/beaAutoGen
    base.dest=../../../var/build/wsmToPlmWS
    bea.build.dir=beaBuild
         <target name="generate-from-wsdl" depends="prepare">
              <delete dir="${src.dir}" includeemptydirs="true" />
              <delete dir="${autogen.src.dir}" includeemptydirs="true" />
              <wsdlc srcWsdl="../config/sourceWSDL/MRPBindingPort.wsdl"
                   destJwsDir="${base.dest}/${bea.build.dir}/compiledWsdl" destImplDir="${base.dest}/${bea.build.dir}/impl"
                   packageName="com.lmco.iplm.webservices.wsmtoplm" debug="on"
                   srcServiceName="WSPlmMto_Service"
                   debugLevel="DEBUG" autoDetectWrapped="true" jaxRPCWrappedArrayStyle="true"
                   verbose="on" classpathref="bea-classpath" />
    <!-- unjar to get the all the details so we can tokenize -->
              <unjar dest="${autogen.src.dir}"
                   src="${base.dest}/${bea.build.dir}/compiledWsdl/MRPBindingPort_wsdl.jar" />
    <!-- copy over the impl file -->
              <copy todir="../code/java/src">
                   <fileset dir="${base.dest}/${bea.build.dir}/impl" />
              </copy>
         </target>

    In eclipse, for weblogic 9.2
    Using the wsdlc WebLogic Web Services Ant Task, I am trying to auto-generate the java files for the web service based on the WSDL. I have specified the packageName as one of the parameters. However the java files are being created and packaged based on the TargetNameSpace of the WSDL rather then under the package name specified. Following is part of my build.xml
    autogen.src.dir=../code/java/beaAutoGen
    base.dest=../../../var/build/wsmToPlmWS
    bea.build.dir=beaBuild
         <target name="generate-from-wsdl" depends="prepare">
              <delete dir="${src.dir}" includeemptydirs="true" />
              <delete dir="${autogen.src.dir}" includeemptydirs="true" />
              <wsdlc srcWsdl="../config/sourceWSDL/MRPBindingPort.wsdl"
                   destJwsDir="${base.dest}/${bea.build.dir}/compiledWsdl" destImplDir="${base.dest}/${bea.build.dir}/impl"
                   packageName="com.lmco.iplm.webservices.wsmtoplm" debug="on"
                   srcServiceName="WSPlmMto_Service"
                   debugLevel="DEBUG" autoDetectWrapped="true" jaxRPCWrappedArrayStyle="true"
                   verbose="on" classpathref="bea-classpath" />
    <!-- unjar to get the all the details so we can tokenize -->
              <unjar dest="${autogen.src.dir}"
                   src="${base.dest}/${bea.build.dir}/compiledWsdl/MRPBindingPort_wsdl.jar" />
    <!-- copy over the impl file -->
              <copy todir="../code/java/src">
                   <fileset dir="${base.dest}/${bea.build.dir}/impl" />
              </copy>
         </target>

  • Need more info on EO,VO and AM *.java files

    HI,
    Friends and experts I need your help in learning OAF.
    I am new to OAF and want to know more info about the following java classes.
    When I created a simple search page with EO, VO and AM, the following java classes are created.
    I want to know
    what is it?
    what we do with that ?
    where we use that?
    Any sample scripts if possible?
    EOImpl.java
    Please correct me if I am wrong,I know that we use this one for manipulating data for a particular row ,operations such as getattribut,setattribute, delete ,update, insert. There are various methods got created when you create the EO if you select options on the " Generate Method " during step 4 on EO wizard.
    EOCollImpl.java
    VOImpl.java
    ViewRowImpl
    AMImpl.java
    Thanks
    Sri.

    Hi Sri ,
    EO :
    Entity Objects are basically based on one table which encapsulate the business rules. These objects are used by OAF page to perform update/insert/delete operations .
    Inside EOImpl.java you will find setter() and getter () methods in java we call it as accessor and mutator , each attribute in EO is mapped to column in the data base table .
    You can also generate a create () method Validate () method .
    Eg : To get the sequence value in OAF you can use Create() method .
    VO :
    VOImpl (VO) : It just consist of an Data base sql query , you might have noticed while executing a query eg : VO.executeQuery() ;
    to perform any validation it provides iteration over and access to the view rows in its result set.
    VoRowImpl : Represents a single row in a view object .
    You will understand better when you writing a code using voimpl /voRowimpl objects
    AmImpl :
    It basically performs the Business logic , we will define all our methods to implement business logic .
    Eg : you can call a method from controller and define the method Amimpl.java , you can use of initializing the query or
    you do DML operation , etc ...
    In summery : The main reason why we have java file distribute across EO , VO , AM is because OAF is designed with MVC design pattern ,
    in other words we have to isolate the responsibility of code in each layer ( Model , View , Controller ) .Its bad practice to write
    the entire code in one single class file .
    Eg : Controller class should accept the parameter from user and pass these parameters BC4J files ( AMImpl.java ) and its Job of the AMImpl.java
    to perform the business logic and return the result back to to controller .
    To enforce the coding standard of MVC design pattern we have these java files EO , VO , AM , CO . with more practice you will understand the various
    methods defined in each of these java files .
    Keerthi

  • Call a Java file from ABAP

    Hi,
    I would like your help in identifying a mechanism in calling a Java Program from an ABAP program. The requirement is that I need to pass enough parameters(possibly in a single object like a <i>table</i>) and fetch that in a Java Program residing in a jar in the J2EE engine. The possibility of this java file interpreting this incoming object and also be able to return something to ABAP which can eventually be printed on the screen needs to be known.
    I also would like to validate an assumption of mine which is that, the jar(the receipient java file) file needs to be put under the directory
    "\usr\sap\<i>SystemID</i>\<i>instancenumber</i>j2ee\deploying\lib"
    Appreciate your time and effort in helping me with this.
    Regards,
    Sam.

    i am not sure about
    I also would like to validate an assumption of mine which is that, the jar(the receipient java file) file needs to be put under the directory
    "\usr\sap\SystemID\instancenumberj2ee\deploying\lib"
    but for your case what you could do is, on the java side get developed a jsp page which will receive data and use the jar to proces and return the results as xml. once thats done.
    from abap you can use cl_http_client class to call this jsp page to pass parameters and get the processed results from jsp page.
    Raja

  • Want to create and exe file for .java files

    Hello all :)
    I am making a multi-threaded console application.
    It also takes command line parameters from user.
    I want to create .exe files out of .java files.
    Note:- One class contains main method (in default package) and all other classes are in some specific package
    I want to create an exe for the whole application.
    The solutions which i get on net is exe4j but i was unable to use it.
    Please suggest me to create an windows executable file out of java files.
    Thanx in advance

    by definition, if you double click on the .exe , you won't pass it parameters
    you have to launch a shell, reach the directory where the .exe (or .jar) is stored, and launch the exe directly with parameters, e.g:
    myApplication.exe -u user -p password
    you can't double click on the exe and say "ok, i give you -u -p!" ; everything has to be done simultaneously if your app is using the "String [] args" arguments of main
    if you want to specify parameters after launching the app, you have to grab user input in your main

  • What is the size limit for a servlet .java file?

    I have been working on a jsp page with over 500 controls so I have getParameter() for those at least in my servlet. It is too big I think because the java file size is 40K but the class file is 25KB. Any sugguestion? Thanks,J

    Yes, there is a maximum length for the URL but if you use POST with a form the parameters do not appear in the URL... They would if you'd use GET however.
    Still, I guess it is just too much. And if that's a form a user would be supposed to fill out (usually they are supposed to do just that) they'd probably get tired and quit after the first 100 fields... 500 fields on one page is definately too much. I'd say try splitting it up to have about 10 fields on a page but then you'de have 50 pages to go through, which is less that good...
    May I ask what the 500 fields are for? What data is the form supposed to process? There might be a more practicable way to solve this.

  • Connecting java file to jsp

    Hi i'm working on a jsp file and i want my jsp file to access the methods in a java file of mine.I have an idea its got something to do with beans. But i have no knowledge about beans. does anyone know how i can acheive it.

    The following ( from the java tutorial with samples is downloadable) gave me the clarity in understanding how .jsp interact with classes (modified beans)
    This tutorial is available at
    http://java.sun.com
    and follow thelinks for the tutorial.
    Here Goes.....
    Home | Download | PDF | API | FAQ | Search | Feedback | History
    JavaBeans Components
    JavaBeans components are Java classes that can be easily reused and composed together into applications. Any Java class that follows certain design conventions is a JavaBeans component.
    JavaServer Pages technology directly supports using JavaBeans components with standard JSP language elements. You can easily create and initialize beans and get and set the values of their properties.
    JavaBeans Component Design Conventions
    JavaBeans component design conventions govern the properties of the class and govern the public methods that give access to the properties.
    A JavaBeans component property can be
    Read/write, read-only, or write-only
    Simple, which means it contains a single value, or indexed, which means it represents an array of values
    A property does not have to be implemented by an instance variable. It must simply be accessible using public methods that conform to the following conventions:
    For each readable property, the bean must have a method of the form
    PropertyClass getProperty() { ... }
    For each writable property, the bean must have a method of the form
    setProperty(PropertyClass pc) { ... }
    In addition to the property methods, a JavaBeans component must define a constructor that takes no parameters.
    The Duke's Bookstore application JSP pages bookstore.jsp, bookdetails.jsp, catalog.jsp, and showcart.jsp use the database.BookDB and database.BookDetails JavaBeans components. BookDB provides a JavaBeans component front end to the access object database.BookDBAO. The JSP pages showcart.jsp and cashier.jsp access the bean cart.ShoppingCart, which represents a user's shopping cart.
    The BookDB bean has two writable properties, bookId and database, and three readable properties: bookDetails, numberOfBooks, and books. These latter properties do not correspond to any instance variables but rather are a function of the bookId and database properties.
    package database;
    public class BookDB {
    private String bookId = "0";
    private BookDBAO database = null;
    public BookDB () {
    public void setBookId(String bookId) {
    this.bookId = bookId;
    public void setDatabase(BookDBAO database) {
    this.database = database;
    public BookDetails getBookDetails() throws
    BookNotFoundException {
    return (BookDetails)database.getBookDetails(bookId);
    public List getBooks() throws BooksNotFoundException {
    return database.getBooks();
    public void buyBooks(ShoppingCart cart)
    throws OrderException {
    database.buyBooks(cart);
    public int getNumberOfBooks() throws BooksNotFoundException {
    return database.getNumberOfBooks();
    Creating and Using a JavaBeans Component
    To declare that your JSP page will use a JavaBeans component, you use a jsp:useBean element. There are two forms:
    <jsp:useBean id="beanName"
    class="fully_qualified_classname" scope="scope"/>
    and
    <jsp:useBean id="beanName"
    class="fully_qualified_classname" scope="scope">
    <jsp:setProperty .../>
    </jsp:useBean>
    The second form is used when you want to include jsp:setProperty statements, described in the next section, for initializing bean properties.
    The jsp:useBean element declares that the page will use a bean that is stored within and is accessible from the specified scope, which can be application, session, request, or page. If no such bean exists, the statement creates the bean and stores it as an attribute of the scope object (see Using Scope Objects). The value of the id attribute determines the name of the bean in the scope and the identifier used to reference the bean in EL expressions, other JSP elements, and scripting expressions (see Chapter 16). The value supplied for the class attribute must be a fully qualified class name. Note that beans cannot be in the unnamed package. Thus the format of the value must be package_name.class_name.
    The following element creates an instance of mypkg.myLocales if none exists, stores it as an attribute of the application scope, and makes the bean available throughout the application by the identifier locales:
    <jsp:useBean id="locales" scope="application"
    class="mypkg.MyLocales"/>
    Setting JavaBeans Component Properties
    The standard way to set JavaBeans component properties in a JSP page is by using the jsp:setProperty element. The syntax of the jsp:setProperty element depends on the source of the property value. Table 12-3 summarizes the various ways to set a property of a JavaBeans component using the jsp:setProperty element.
    Table 12-3 Valid Bean Property Assignments from String Values Value Source Element Syntax
    String constant <jsp:setProperty name="beanName"
    property="propName" value="string constant"/>
    Request parameter <jsp:setProperty name="beanName"
    property="propName" param="paramName"/>
    Request parameter name that matches bean property <jsp:setProperty name="beanName"
    property="propName"/>
    <jsp:setProperty name="beanName"
    property="*"/>
    Expression <jsp:setProperty name="beanName"
    property="propName" value="expression"/>
    <jsp:setProperty name="beanName"
    property="propName" >
    <jsp:attribute name="value">
    expression
    </jsp:attribute>
    </jsp:setProperty>
    1. beanName must be the same as that specified for the id attribute in a useBean element.
    2. There must be a setPropName method in the JavaBeans component.
    3. paramName must be a request parameter name.
    A property set from a constant string or request parameter must have one of the types listed in Table 12-4. Because constants and request parameters are strings, the web container automatically converts the value to the property's type; the conversion applied is shown in the table.
    String values can be used to assign values to a property that has a PropertyEditor class. When that is the case, the setAsText(String) method is used. A conversion failure arises if the method throws an IllegalArgumentException.
    The value assigned to an indexed property must be an array, and the rules just described apply to the elements.
    Table 12-4 Valid Property Value Assignments from String Values Property Type Conversion on String Value
    Bean Property Uses setAsText(string-literal)
    boolean or Boolean As indicated in java.lang.Boolean.valueOf(String)
    byte or Byte As indicated in java.lang.Byte.valueOf(String)
    char or Character As indicated in java.lang.String.charAt(0)
    double or Double As indicated in java.lang.Double.valueOf(String)
    int or Integer As indicated in java.lang.Integer.valueOf(String)
    float or Float As indicated in java.lang.Float.valueOf(String)
    long or Long As indicated in java.lang.Long.valueOf(String)
    short or Short As indicated in java.lang.Short.valueOf(String)
    Object new String(string-literal)
    You use an expression to set the value of a property whose type is a compound Java programming language type. The type returned from an expression must match or be castable to the type of the property.
    The Duke's Bookstore application demonstrates how to use the setProperty element to set the current book from a request parameter in the database bean in bookstore2/web/bookdetails.jsp:
    <c:set var="bid" value="${param.bookId}"/>
    <jsp:setProperty name="bookDB" property="bookId"
    value="${bid}" />
    The following fragment from the page bookstore2/web/bookshowcart.jsp illustrates how to initialize a BookDB bean with a database object. Because the initialization is nested in a useBean element, it is executed only when the bean is created.
    <jsp:useBean id="bookDB" class="database.BookDB" scope="page">
    <jsp:setProperty name="bookDB" property="database"
    value="${bookDBAO}" />
    </jsp:useBean>
    Retrieving JavaBeans Component Properties
    The main way to retrieve JavaBeans component properties is by using the JSP EL expressions. Thus, to retrieve a book title, the Duke's Bookstore application uses the following expression:
    ${bookDB.bookDetails.title}
    Another way to retrieve component properties is to use the jsp:getProperty element. This element converts the value of the property into a String and inserts the value into the response stream:
    <jsp:getProperty name="beanName" property="propName"/>
    Note that beanName must be the same as that specified for the id attribute in a useBean element, and there must be a getPropName method in the JavaBeans component. Although the preferred approach to getting properties is to use an EL expression, the getProperty element is available if you need to disable expression evaluation.
    All of the material in The J2EE(TM) 1.4 Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.
    hope this helps
    regards,

  • Create javadoc for java files under development

    hi
    i would like to know if there is any method by which i can generate javadoc of java files that are in the process of development.
    What i do is first create a skeleton java file with just the methods defined along with their javadoc comments and then start implementing the methods.
    I do a daily build of javadoc and hence its not necessary that a coding of a particular method is completed before javadoc is run.
    sibi

    it dint work for me. i have a sample code
    public class HelloWorld
          * Sample Hello world. Note the 3rd System.out.print is missing a ";" and hence
          * should cause a compile error and  Javadoc must have no problem running.
         public static void main()
              System.out.print("H");
              System.out.print("E");
              System.out.print("L")     //Note ";" is missing
              System.out.print("LO WORLD");
              System.out.println();
    }Note the 3rd System.out.print has a ";"missing and must generate an error when compiling but the javadoc must run properly. Note the method main() is fully defined with parameters and return types.
    Pls correct me if i am wrong.
    sibi

  • I am trying to use java  file as Model layer and jsf as presentation layer

    I am trying to use java file as Model layer and jsf as presentation layer and need some help
    I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
    I create java file
    package oracle.model;
    import java.sql.;*
    import java.util.;*
    *public class TableBean {*
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    *public List getperInfoAll() {*
    perInfoAll.add(0,new perInfo("name","username","blablabla"));
    return perInfoAll;
    *public class perInfo {*
    String uname;
    String firstName;
    String lastName;
    *public perInfo(String firstName,String lastName,String uname) {*
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    *public String getUname() {*
    return uname;
    *public String getFirstName() {*
    return firstName;
    *public String getLastName() {*
    return lastName;
    right click on the file and choose 'create data control'
    then i wrote the jsf file:
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<f:view>*
    *<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
    var="item" bgcolor="#F1F1F1" border="10"
    cellpadding="5" cellspacing="3" rows="4" width="50%"
    dir="LTR" frame="hsides" rules="all"
    *>*
    *<f:facet name="header">*
    *<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
    *</f:facet>*
    *<h:column id="c2">*
    *<f:facet name="header">*
    *<h:outputText value="First Name" id="ot1"/>*
    *</f:facet>*
    *<h:outputText style="" value="#{item.firstName}"*
    id="ot2"/>
    *</h:column>*
    *<h:column id="c4">*
    *<f:facet name="header">*
    *<h:outputText value="Last Name" id="ot9"/>*
    *</f:facet>*
    *<h:outputText value="#{item.lastName}" id="ot8"/>*
    *</h:column>*
    *<h:column id="c3">*
    *<f:facet name="header">*
    *<h:outputText value="Username" id="ot7"/>*
    *</f:facet>*
    *<h:outputText value="#{item.uname}" id="ot4"/>*
    *</h:column>*
    *<f:facet name="footer">*
    *<h:outputText value="The End" id="ot3"/>*
    *</f:facet>*
    *</h:dataTable>*
    *</center>*
    *</af:document>*
    *</f:view>*
    but nothing is appear in my table
    I know that there is something wrong in calling the binding object
    I need help pls and where can i find some help to deal with another tag types
    thanks

    i dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
    and this code is generated
    *<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
    *"http://www.w3.org/TR/html4/loose.dtd">*
    *<%@ page contentType="text/html;charset=UTF-8"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
    *<f:view>*
    *<af:document id="d1">*
    *<af:messages id="m1"/>*
    *<af:form id="f1">*
    *<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
    *rows="#{bindings.perInfoAll1.rangeSize}"*
    *emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
    *fetchSize="#{bindings.perInfoAll1.rangeSize}"*
    *rowBandingInterval="0"*
    *selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
    *rowSelection="multiple" id="t1">*
    *<af:column sortProperty="uname" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.uname.label}"*
    *id="c1">*
    *<af:inputText value="#{row.bindings.uname.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.uname.label}"*
    *required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
    *id="it3">*
    *<f:validator binding="#{row.bindings.uname.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="firstName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
    *id="c2">*
    *<af:inputText value="#{row.bindings.firstName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.firstName.label}"*
    *required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
    *id="it2">*
    *<f:validator binding="#{row.bindings.firstName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="lastName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
    *id="c3">*
    *<af:inputText value="#{row.bindings.lastName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.lastName.label}"*
    *required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{row.bindings.lastName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *</af:table>*
    *</af:form>*
    *</af:document>*
    *</f:view>*
    but when run it i see the following errors
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    :(

  • View Object to read data from a java file

    Hi,
    I am using JDeveloper 11.1.1.4 and ADF-BC in my application.
    For one of my view objects , I want the data to be read from a java file which exposes some method to return a collection.
    I cannot use a static view object in this case.
    Please suggest the best way to implement this requirement.Basically build a view object that should read data from a java file.
    Thanks,
    Praveen

    Depending on your use case you can either use a programmatic VO or directly expose the JV class as a data control.
    http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html

  • Import statement in .java files and .jsp files

    Guys I have few mysteries about this import statement.
    Please correct me if I am wrong.
    1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
    BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import the class I want to use.That is i have to say
    <%@page import="one"%>
    and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder.(Note that My.class is created in a folder different from c:\ClassFolder )
    But I am wondering why was there no need for me to import one.class in two.java.
    (Note I am using JDeveloper and Apache server)
    Please help.
    In this case the pSo I am wondering in JSP why it doesn't take the class I am looking for from the classpath .
    Help.

    You have to understand Java scoping rules. In the 1st scenario with the two Java files I am guessing neither one of them begins with a package statement. This means that they belong to the default package. When you compile the compiler uses the classpath to resolve method calls looking in the default package since there was no import statement specified in two.java. JSP is a little different. Now I just read this here in these forums a couple of days ago. Since the classfiles generated from the JSP files are not in the CLASSPATH they are loaded by a different classloader. This is why you have to import all references to all classes in the default package.

  • Import statement in .java files and .jsp files ..correction

    Guys I have few mysteries about this import statement.
    Please correct me if I am wrong.
    1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement in two.java I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
    BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import one.class in My.jsp .That is i have to say
    <%@page import="one"%>
    in My.jsp.
    and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder and MyJsp is compiled sucessfully.(Note that My.class is created in a folder different from c:\ClassFolder )
    But I am wondering why was there no need for me to import one.class in two.java.
    (Note I am using JDeveloper and Apache server)
    Please help.

    It has to do with packages. Most java classes are in a package, the name of which must conform to its place on the filesystem relative to the classpath. By that I mean that if you have com.mystuff.One.java, it must be in a folder com/mystuff where com is located somewhere in the classpath.
    What you've done is a little different. I'm assuming a couple of things:
    1. you have no package declaration at the top of one.java or two.java
    2. you have the current directory "." in your classpath.
    Java has the concept of the "default package", which covers classes without a declared package, and in your case is the current directory.
    So when you're in c:\sourcefolder and run the compiler, then "."="c:\sourcefolder", and that directory is part of the default package. No import statements are necessary for classes that are in the same package. This is why two.java can call methods in one.java without an import statement.
    When you run your jsp, the "current directory" part of your classpath is not c:\sourcefolder, but some other value (probably the directory you start your jsp engine from) You will have to import all non-java-library classes because the jsp itself becomes a java class, with a package that is determined by the jsp engine.

  • Can not see the design view nor the java file in CentOS

    Hi all. I've recently installed JSC2 in CentOS. I find this tool really useful. But I have a problem with the design view and the java file view. At the beginning, when I first create a Page1.jsp, I can see the design view and the java view with no problem. I run apps correctly. But after a while, I get a "null pointer exception" error and I am able to see only the jsp view, not the others. I don't even have the option to see the Design and Java views. And the page icon in the project window appears to be darker than a well working page. I'm not really sure what sequence of actions I do to get this error, it just suddenly happens. What I've done so far in JSC2 is to link to pages in the Page Navigation view. It works fine for a while, but after a while I get the error I've described.

    Yes, if I do that It happens the same. I've tried everything. Now I'm using Window$ 2000 and it works properly. Thanks anyway.

  • How do I include a JAVA file in my website  using DreamweaverCC ?

    Hi.  I searched the forums and it seems that all questions relating to JAVA and Dreamweaver elicit zero replies.
    I hope that someone has some direction.  Thanks again.
    I have a JAVA file that I want to include or have run within one of my pages in my WebSite.
    file > new > create > and there is not an option for JAVA but there is one for PHP etc. etc.
    How do I incorporate a java script into my Web Site ?
    I thought that I could just copy the code into the file here - at least to begin with  - but JAVA  runs in the background.
    I am lost
    conceptually
    and I do not know how to go about this task
    structurally.
    Thanks again,
    Regina

    JQuery is a core JavaScript library used by millions of web sites.  It's the "do more & write less code framework."  If you're into re-inventing the wheel every time you need an advanced feature (plugin), feel free to manually code it yourself with JavaScript.  However, you'll need to test & debug your scripts in every conceivable browser and OS before you can be sure it's viable for use on a production site.
    On the other hand, you could use a plugin and be up & running in 5 minutes or less. See the code below.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5, with Fancybox2 Viewer</title>
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!--LATEST JQUERY CORE LIBRARY-->
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <!--FANCYBOX plugins-->
    <link href="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.css" rel="stylesheet" media="screen">
    <script src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.pack.js"></script>
    <style>
    body {
        background: silver;
        font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
    #wrapper {
        width: 1000px; margin:0 auto;
        background:#FFF;
    /**this styles image container**/
    #thumbs p {
        float: left;
        width: 180px;
        height: 12.5em;
        margin: 10px 22px 0 22px; /**space between containers**/
        padding: 10px; /**space around containers**/
        border: 1px solid silver;
        /**rounded borders**/
        -moz-border-radius: 20px;
        -webkit-border-radius: 20px;
        border-radius: 20px;
        /**this styles caption text**/
        font: italic 14px/1.5 Geneva, Arial, Helvetica, sans-serif;
        color: #666;
        text-align: center;
    /**recommend using same size images**/
    #thumbs img {
        width: 160px; /**adjust width to thumbnail**/
        height: 120px; /**adjust height to thumbnail**/
        margin-bottom: 1.5em;
        opacity: 0.75;
    #thumbs img:hover { opacity: 1.0 }
    /**float clearing**/
    #thumbs:after {
        content: ".";
        clear: left;
        font-size: 0px;
        line-height: 0;
        display: block;
        visibility: hidden;
    </style>
    </head>
    <body>
    <div id="wrapper">
    <h1><a href="http://fancyapps.com/fancybox/">Fancybox2</a> Viewer with images</h1>
    <!--insert thumbnails with links to full size images below-->
    <div id="thumbs">
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 1" /></a> <br />
    Caption 1 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 2" /></a> <br />
    Caption 2 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 3" /></a> <br />
    Caption 3 </p>
    <p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 4" /></a> <br />
    Caption 4 </p>
    <!--end thumbs--></div>
    <!--end wrapper--></div>
    <!--FancyBox function code-->
    <script>
    $(document).ready(function() {
        $('.fancybox').fancybox();
    </script>
    </body>
    </html>
    Nancy O.

Maybe you are looking for

  • How can i pass a parameter into paintComponent()?

    public void paintComponent(Graphics g) Graphics2D g2 = (Graphics2D) g;           for(int i = 150;i<=250;i+=20)                for(int a = 50;a<=200;a+=50)           Rectangle box = new Rectangle(i, a, 15, 15); g2.draw(box); this is my paintComponent

  • Error in bootstrap within patching of NW PI 7.40 AEX (Java Only)

    Hi all, we are suffering an error witin patching a NW PI 7.40 AEX (Java Only) In SUM we get the following error when SUM wants to stop / start system in execution phase FATAL: Critical shutdown with exit code [2150] was requested due to [AS Java cann

  • My ipod 5 won't connect to my home network

    I have an updated iPod 5th generation and for the last three days I've had limited internet access at my home network. It works everywhere else but not at home. It says it's connected but nothing that requires internet will load. I'm the only in the

  • How to get first 50 records from database using cmp beans 2.0?

    does any body know how i should write ejb-statment to do that? thanks winnicki

  • Abstract Portal Component VS Dynpage

    Can any one explain the differences between Abstract portal component and JSP DYN PAGE? When to use where ? How can we provide communication between iViews with in the same component / different components. Useful answers will be rewarded with points