Jsp page - java class binding

Is there any configuration file that binds the jsp page and the java class? I need to replace some jsp pages and their classes in different packages, but the pages cannot find their classes. Does anybody know where/how I can set the appropriate binding?
Thanks,
Kelly.

It's not configurable (yet). The page name, and the "backing bean", must have the same name (including case), and the java class needs to be in the package folder with the rest of the backing beans.
-- Tor
http://blogs.sun.com/tor

Similar Messages

  • Managing JSP files (.java, .class) size in working directory

              Our new web application automatically generates JSP pages which
              causes the working directory holding the JSP files to grow
              too large to manage,does Weblogic have a alternate way to
              compile JSP without permanently storing the .java, .class files
              on disk.
              Maybe in cache were they can be managed, cleaned up similar
              to how a database cache works.
              Any ideas or advice would be appreciated.
              THANKS IN ADVANCE.
              

              Just don't look in the classfiles directory and everything will
              be fine.
              WLS will only leave the .java files if you ask it to keep them (keepgenerated).
              If you don't keep the .class files on disk then WLS will have to
              recompile them every time it is restarted. If you have so many
              JSPs you are having trouble managing them, you definitely don't
              want to recompile everytime you restart WLS.
              Last time I looked in our public_html there were 67000 JSP files.
              We don't have any problems managing them.
              Mike
              "denis mercier" <[email protected]> wrote:
              >
              >Our new web application automatically generates JSP pages which
              >causes the working directory holding the JSP files to grow
              >too large to manage,does Weblogic have a alternate way to
              >compile JSP without permanently storing the .java, .class files
              >on disk.
              >Maybe in cache were they can be managed, cleaned up similar
              >to how a database cache works.
              >Any ideas or advice would be appreciated.
              >THANKS IN ADVANCE.
              

  • JSP with Java Class

    How to run *.class in JSP. For example, the demo class, Clock.class is run in html format, Can I run the Clock.class in JSP format?

    Please notice,
    The applet has a graphical context which can draw lines, circules and painting all the object including the background. Now the applet can be load from a jsp page also as if it resides on a html page. Now when you want to use the class Clock.class as a bean inside the jsp page, it has to keep the following definition ( you can't get the graphical context from the applet as a class method in a bean.
    The JavaBeans is realy nothing more than a class that maintains some data ( called properties) and follows certain coding convention ( getXX() setXX()) and it has to implements the Serilizable interface and provide no argument for the constructor.
    As a result when you want to use the jsp tag for Bean like <jsp:useBean id="MyClock" class="Clock.class" /> keep in mind that the Clock.class is directly located in /WEB-INFO/classes/ in your web application directory.
    Now your purpose will be directly oriented to get or set some value for the clock like to get the current time or to set different time zone or to calculate the time in Kurdistan if you are in US etc..
    So the Clock class has become a source of hidden business logic operation exposed by methods only.
    The graphical animation etc.. is not related to Bean at all event though the applet implements the Seriazable interface

  • JSP + internal java class

    Hi,
    I have a small problem with my JSP, which is using an static internal class as a bean. The oc4j cannot find it. The code is working superb in the Tomcat, but not in the oc4j. The package can be found because the mother class of the internal class is used by other part of the application, but not this one.
    My environment:
    Windows XP prof (eng)
    oversion.cmd delivers following info:
    Oracle BPEL Server Version 10.1.2.0.0
    Build: 1442
    Build-Dauer: Fri Apr 29 16:59:32 PDT 2005
    Build-Typ: release
    Quell-Tag: BPELPM_10_1_2_release_branch
    and this is the interesting part of the JSP
    <?xml version="1.0" encoding="UTF-8"?>
    <%@ page contentType="application/x-java-jnlp-file" info="My Test GUI" language="java"%>
    <%@ page import="lucom.util.HTMLUtil"%>
    <%@ page import="oscisigner.OSCISignerImpl.OSCIContainer"%>
    <%@ page import="oscisigner.OSCISignerImpl"%>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <jsp:useBean id="container" scope="request" type="oscisigner.OSCISignerImpl.OSCIContainer" class="oscisigner.OSCISignerImpl.OSCIContainer"/>
    The class OSCISignerImpl contains the class OSCIContainer and both classes are contained by the WEB-INF/classes folder (with package of course).
    Has anybody a clue why oc4j cannot find it ?
    Best Regards
    Tomasz

    Tomasz:
    I have reproduced the problem: <jsp:useBean id="container" class="test.Outer.Inner"/> does not work in oc4j, where Inner is a public static inner class of class test.Outer. This problem will be fixed.
    In the mean time, it is a good idea to make your inner class a 'standalone' class since you planned at least to use it independently of the outer class.
    Oracle JSP team member

  • Standard B2C application Order page Java class called on Update?

    Hi All,
    On the Standard B2C application, on adding CampaignKey to the order or Changing the Quantity of the Items. We click UPDATE to update the sales order.
    Please can anyone help to find out which JAVA action Class is linked with the Update button.
    I need to create one Z java action class to update the order.
    Thanks a lot!
    Ekta

    Hi
    I used session logging to trace the class called. I am not able to use HTTP Watch. It is on the Client's network using Citrix. Hence cannot install it. but no doubt that is a better way.
    Classes and the action path is
    main java action class 
    MaintainBasketB2CDispatcherAction"
    linked action path for Update is
    Action path="/b2c/maintainBasket"
    Forward path name   
    <forward name="update" path="/b2c/basketupdate.do"/>
    and for action path
    action path="/b2c/basketupdate"
    java action class :
    MaintainBasketB2CUpdateAction"
    I am making Z action claa for MaintainBasketB2CUpdateAction" and i am updating the condig.xml file.
    I am making this thread open. To trace the flow if in case i get some problem
    Thanks to all of you for your support!
    Thanks
    Ekta

  • How can i call java class file in jsp page

    Hai,
    i wants to call .class file in jsp page.
    my class file is in C:\jsdk\bin.
    Thanks

    I'm not entirely sure what you mean by "calling a class file", but I'm going to assume that you want to do something like the following in your page:
    <%
    MyClass myClass = new MyClass();
    myClass.someMethod();
    %>etc
    If that's the case, then all you have to do is make sure that the class is in the servlet engine's classpath. You'll probably also need to include an appropriate import statement at the top of the page.
    Hope that helps.

  • Custom Java class called from RTF template generates error

    We are running a report in BI Publisher and the report calls a custom developed Java class that is used to bind PDFs together and sent the result to another application.
    On the RTF template we have some XSLT that reads the input XML and sets a variable which is then passed to the Java class. We are however getting the following error when the report is called simultaneously 2 or more times:
    XML-22044: (Error) Extension function error: Error invoking 'JavaClassName': 'java.lang.Error: Cannot interweave overlay template with pdf input, combined number of pages is odd!
    I read this as the real cause of the error is the Java code but I'm not 100% sure. Also I don't understand what the error message means.
    Could someone help out please?
    Many thanks

    Since our this requirement is in Quotes module, its not using OAF. It is using plain JSPs and java classes.
    What i was thinking is, create the Option values as flex fields, and write a custom java class to fetch these data from the flex tables and use it in the JSP.
    The main problem we are facing now is,
    "...we wrote a simple java class, which establishes database connection, executes a simple insert & select query to our custom table. compiled & placed the class file under our new pkg structure under $JAVA_TOP eg. oracle.apps.xxx.quot.tmpl , bounced the apache."
    But when we tried to import this class in the jsp (which is being customized), the app just throwed Internal Server Error and we couldnt find any info in the Log file.
    Couldnt guess, why is this simple thing failing. Any idea ?

  • WebService DataControls programmatically construct java class en jdeveloper 11g

    1. I have a data control what is a web service client to URL https:
    2. JDev 11g build a model
    3. I need to call this data control from java class
    4. My java class simply must call a method of the web service, this method I see in the DAta Control, with the parameter and just return the String,
    5. this is not a Web Application, is swing, I not have a Context
    method in WS
    public String ConsultaPlaca(String arg1);
    How I can implement this?
    Just in Java Class, not in page JSP. the java class is a library of other Java class, I need to build a file .jar

    Hi Vishal,
    I created the class as mentioned in the link. But when I try to test the web service, I get the following error :
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "oracle.apps.ddr.testFileDownload" failed to preload on startup in Web application: "Application7-Project1-context-root".
    javax.xml.ws.WebServiceException: Annotation @com.sun.xml.internal.ws.developer.StreamingAttachment(parseEagerly=true, dir=, memoryThreshold=40000) is not recognizable, atleast one constructor of class com.sun.xml.internal.ws.developer.StreamingAttachmentFeature should be marked with @FeatureConstructor
         at com.sun.xml.ws.binding.WebServiceFeatureList.getWebServiceFeatureBean(WebServiceFeatureList.java:176)
         at com.sun.xml.ws.binding.WebServiceFeatureList.parseAnnotations(WebServiceFeatureList.java:148)
         at com.sun.xml.ws.binding.WebServiceFeatureList.<init>(WebServiceFeatureList.java:113)
    Any ideas on how I can make it work ?
    Thanks and Regards,
    Pritom

  • PAR files and jsp pages into NWDS

    Hi,
    I need to modify transactions from the MSS 50.x package, i.e. HR transactions. I need to delete some fields on the screens.
    The sysadmin was giving me a par file
    com.sap.pct.hcm.attendanceoverviewperiod.par.bak
    But when I import the par file into NWDS, the only thing I see is the portalapp.xml and a bunch of attribute files.
    No jsp page, no class files..
    When I browse into the directoria via sysadmin/support/portal runtime via WEB-INF, I do see all the necessary files. But how do I get the whole bunch of classes, jsp etc into NWDS? Download all single elements and put them manually into a NWDS project? There must be a better way
    Any help will be gracefully awarded

    I tried it, but when I follow your instruction, NWDS gives me an error in the import wizard "<dir> does not have a .project file".
    If I look in the .par file, there is no .project file at all.
    I looked in the download of the PCD, there is no .project file either, but at least the java classes and the jsp. 
    Is it removed intentionally? Probably because it is an SAP business package?

  • Adding a JSP page to an application

    Hi,
    I want to add a JSP page called image.jsp to an oc4j service called analytics. I probably have to change something in the web.xml, but keep running into: 500 Internal Server Error
    Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response.
    my web.xml now looks like this:
    <?xml version="1.0"; encoding="UTF-8"?>
    <!DOCTYPE web-app
         PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN";
         "http://java.sun.com/dtd/web-app_2_3.dtd";>
    <web-app>
         <servlet>
              <servlet-name>SAWBridge</servlet-name>
              <servlet-class>com.siebel.analytics.web.SAWBridge<;/servlet-class>
              <init-param>
                   <param-name>oracle.bi.presentation.sawserver.Host<;/param-name>
                   <param-value>localhost</param-value>
              </init-param>
              <init-param>
                   <param-name>oracle.bi.presentation.sawserver.Port<;/param-name>
                   <param-value>9710</param-value>
              </init-param>
         </servlet>
         <servlet-mapping>
              <servlet-name>SAWBridge</servlet-name>
              <url-pattern>/saw.dll<;/url-pattern>
         </servlet-mapping>
         <servlet>
              <servlet-name>image</servlet-name>
              <servlet-class>/image</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>image</servlet-name>
              <url-pattern>/image</url-pattern>
         </servlet-mapping>
         <mime-mapping>
              <extension>xsd</extension>
              <mime-type>text/xml</mime-type>
         </mime-mapping>
         <welcome-file-list>
              <welcome-file>default.jsp<;/welcome-file>
              <welcome-file>image.jsp<;/welcome-file>
         </welcome-file-list>
    </web-app>
    any pointers are much appreciated.
    I'm a total newbie with configuring OC4J...
    Regards
    John
    EDIT: error log:
    java.lang.NullPointerException
         at image.jspService(_image.java:90)
         [SRC:/image.jsp:44]
         at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:619)
    maybe something else?
    Edited by: John Minkjan on Sep 18, 2009 1:34 AM

    hi John
    There does seem to be a problem on line 44 of your image.jsp page:
    java.lang.NullPointerException
    at _image._jspService(_image.java:90)
    SRC:/image.jsp:44
    ...Would you mind posting a part of your image.jsp page that includes line 44 (or the complete page if it is not too big)?
    You wrote "... I probably have to change something in the web.xml, ...", why do you think that is the case?
    regards
    Jan Vervecken

  • Custom java class in Quoting screen Customization

    Hi,
    We are working with Customization of couple of screens in Quote module. Esp. the Create Template screen. We decide to add new property to the Template and user needs to choose among a set of values to this new property through a radio button.
    Instead of hardcoding these property values and radiobuttons, we thought we would define these data in some lookup table and fetch them and display.
    Now, since we are defining these lookup data, should we write our custom java class to interact with database and fetch them from any lookup table (should we use flex fields ?) ?
    If we are going to write custom java object, any guidance on how to compile/deploy/standards for them ?
    Message was edited by:
    tcesenthil

    Since our this requirement is in Quotes module, its not using OAF. It is using plain JSPs and java classes.
    What i was thinking is, create the Option values as flex fields, and write a custom java class to fetch these data from the flex tables and use it in the JSP.
    The main problem we are facing now is,
    "...we wrote a simple java class, which establishes database connection, executes a simple insert & select query to our custom table. compiled & placed the class file under our new pkg structure under $JAVA_TOP eg. oracle.apps.xxx.quot.tmpl , bounced the apache."
    But when we tried to import this class in the jsp (which is being customized), the app just throwed Internal Server Error and we couldnt find any info in the Log file.
    Couldnt guess, why is this simple thing failing. Any idea ?

  • Access Java class in my JSP/JSF page and conditionally open a new browser

    When the user clicks on a button in my JSP page, I'd like to launch a new browser and display certain things in that browser window while leaving the original browser window open.
    My thought was to invoke a javascript method in 'onLoad' which would determine if the new window needs to be launched.
    This is kinda what my page looks like:
    <jsp:root version="1.2" ................>
        <jsp:directive.page import="java.util.*, com.test.Configuration" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
        <f:view>
         <ui:body binding="#{Page1.body1}" id="body1" onLoad="launchWindow();">     
         </ui:body>
       </f:view>
       <script type="text/javascript">
            function launchWindow(){
             if (Configuration.openWindow()) {
              window.open("hello.jsp", "newWindow", 'toolbar,width=400,height=400');            
        </script>     
    </jsp:root>My problem is that the call to "Configuration.openWindow()" does not resolve correctly. If I remove that call and simply make a call to "window.open()" all works. But once I put the condition in, nothing happens. I do not see an exception in my browser window but a new browser window does not open.
    Is my syntax correct. Can I make a call to the static method 'openWindow()' in my class 'Configuration.java'.
    thanks,
    tsc

    I have made some changes so that I do not directly access the 'Configuration' class in my javascript.
    I have a hidden field on my form and when the user clicks the button, in my back bean, I set a value for the hidden field. In the javascript function 'launchWindow()' I check if a value has been set for the hidden field and if yes, I open a new window.
    <ui:body binding="#{Page1.body1}" id="body1" onLoad="launchWindow(document.forms[0]);">
    <h:inputText id="hiddenField" value="#{formBean.hiddenValue}" />
    <script type="text/javascript">
            function launchWindow(form){
                alert("in lw");
                var test = form["form1:hiddenField"].value;
                alert("got test");
                if (test !=  "")
                    window.open("hello.jsp", "newWindow", 'toolbar,width=400,height=400');            
                alert ("done test");
    </script>When my page is first loaded, the launchWindow() is called and all the alerts popup as expected.
    When I click on the button (the back bean sets the value on the hidden field), my page is reloaded but this time its blank.
    Any ideas as to why this maybe the case?
    thanks,
    tsc

  • Problem during call java class (model layer) from jsp page (view layer)

    I created new Fusion web application so I have now to parts in the application navigator (model, viewcontroller)
    I want to write java class in the Model part as following:
    package persistence;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class DBManager {
    Connection connection = null;
    public DBManager() {
    super();
    public void init() {
    try {
    // Load the JDBC driver
    String driverName = "oracle.jdbc.driver.OracleDriver";
    Class.forName(driverName);
    // Create a connection to the database
    String serverName = Constant.DB_SERVER_NAME;
    String portNumber = Constant.DB_PORT_NUMBER;
    String sid = Constant.DB_SID;
    String url =
    "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" +
    sid;
    String username = Constant.DB_USER_NAME;
    String password = Constant.DB_PASSWORD;
    connection = DriverManager.getConnection(url, username, password);
    System.out.println("*");
    System.out.println(connection.getCatalog());
    } catch (ClassNotFoundException e) {
    System.out.println("Could not find the database driver");
    } catch (SQLException e) {
    System.out.println("Could not connect to the database");
    e.printStackTrace();
    and wrote JSP page in the view controller part as following :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@page import="persistance.*"%>
    <% persistance.DBManager manager = new DBManager(); %>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>Browse</title>
    </head>
    <body>
    <table>
    </table>
    </body>
    </html>
    but this I have the following error in the jsp page :type persistance.DBManager not found
    my job is to build simple ADF application using JSF and java without any ADF faces or JPA or any another technology
    thanks

    Duplicate message.
    type persistance.DBManager not found
    Add a Dependency on the Model project in the View project. In Project Properties select the Dependencies node to add dependencies.
    Edited by: dvohra16 on Jun 19, 2011 8:37 AM

  • Passing parameters from a Java class to Jsp page

    Hi everybody. I'm newbie in using Java class in conjunction with JSP pages. Infact I have a problem. How can I pass the parameters used in a Java class (as UserName, Password, and so on..) to a JSP page? What methods (and classes) I have to use?
    Thank you in advance
    Have a nice day

    It still doesn't work. I write the code
    //my java class
    package channel_service;
    import java.util.Vector;
    * <p>Title: </p>
    * <p>Description: </p>
    * <p>Copyright: Copyright (c) 2002</p>
    * <p>Company: </p>
    * @author unascribed
    * @version 1.0
    public class CallMenu {
    private Vector parameters = new Vector();
    public void setParameters( String UserId ) {
    parameters.add(0, UserId);
    //parameters.add(2, Pin);
    //parameters.add(3, UserName);
    //parameters.add(4, Greeting);
    public Vector getParameters() {
    return parameters;
    //my jsp page
    <%@ page import="Channel_Service.src.channel_service.CallMenu" %>
    <%@ page import="java.util.Vector" %>
    <html>
    <head><title>User Menu Page</title></head>
    <body>
    <center><h1><i><b>This is your personal User Menu page</b></i></h1></center>
    <br>
    <br>
    <center><h2><i>In the list below you'll find all your personal information (as UserID, Password and so on...)
    and all the function you have the rights to use</i></h2></center>
    <br>
    <br>
    <table align=center>
    <tr>
    <%
    CallMenu cl = new CallMenu();
    cl.setParameters();
    Vector params = cl.getParameters();
    String UserId = (String)params.elementAt(0);
    String Pin = (String)params.elementAt(1);
    String UserName = (String)params.elementAt(2);
    String Greeting = (String)params.elementAt(3);
    %>
    <td><h2><b><i>User ID = <%= UserId %></td></tr>
    <tr><td><h2><b><i>PIN = <%= Pin %></td></tr>
    <tr><td><h2><b><i>User Name = <%= UserName %></td></tr>
    <tr><td><h2><b><i>The system says <%= Greeting %></td></tr>
    </table>
    </body>

  • Import java-classes in JSP-page

    Hi,
    I'm starting with JSP and with trying one of the first examples in the book "beginning J2EE 1.4" from wrox, i got following problem.
    i'm trying to import a java-class in the package CH03 with
    <%@ page import="Ch03.FaqCategories" %>but he didn't find the package Ch03.
    I try already many things and i have no idea of the cause of the problem. So it's difficult to give information that leads to the solution.
    Maybe helpfull is the direcory-structure:
    jsp-page: /Ch03/welcome.jsp
    java-classe: /Ch03/WEB-INF/classes/Ch03/FaqCategories.class
    If you need source-codes or other information, just ask.
    Thanks,
    Dennis

    Thank you,
    Your help was one step into the good direction and that problem is solved.
    The application work now with studio one, but if i try it to work it with a stand-alone tomcat server it doesn't work anymore. I go first try to solve this problem by my self or at least try to describe the problem more exactly, before i ask for new help.
    but if you have any idea, that's always welcome...
    with regards,
    Dennis

Maybe you are looking for

  • Wifi for 2 houses separated by 270 meters

    Hello all, [sorry for my englsih] We need to have a Wifi access between 2 houses separated by 270 meters. We think to buy an Aironet 1240AG (AIR-LAP1242AG-E-K9) access point but we don't know which antenna to choose. I can install the antenna on the

  • Core dump with deque program

    Hey all, here is the small deque program... When this program was run for upto 529 entires it works fine. When tried for 530 entries it dumps core. By the way instead of push_front if we use push_back, it works fine. However, we are facing this probl

  • Calculate gross profit, yearly sales,monthly sales,weekly sales?

    hi all i try to create procedures according to these conditions  What are my yearly sales? What are my monthly sales? What are my weekly sales? What are my daily sales? What is my Gross Profit? What is my Gross Sales? this is star schema now how i ca

  • Have to "clear arp" table to get traffic to pass

    I have a very unusual problem that I can't figure out. We have a 2800 series router we are using as our voice gateway. It has been running fine for about 6 months but then a few days ago, it started dropping off the network every 10 minutes or so. We

  • Camera no longer mounts

    I've been using a Fuji FinePix 4800 for a number of year, and through a number of OS updates... without a hitch. Suddenly, the camera will no longer mount, and I can no longer download photos. I had thought that this was an issue related to my HD, wh