Problem accessing variables from java file to JSP page

Hello Everyone,
I have small problem accessing my method variables from my java bean file to a JSP page. can some please take a look and tell me why I can't populate my JSP page, I've been trying all day to get this done!!!
This is my Java file
package dev;
import java.io.*;
import java.util.*;
public class RoundDetail2
public String string_gameID;
public int string_card1;
public String readDetail_topLayer;
public static final String SUITS[] = {" ", "Clubs", "Hearts", "Spades", "Diamonds", "Joker", "FaceDown"};
public static final String VALUES[] = {"Joker ","Ace", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King"};
public static final String SuitVALUES[] = {" ","1","2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14"};
public RoundDetail2() throws FileNotFoundException
DataInputStream inFile=
             new DataInputStream(
                new BufferedInputStream(
               new FileInputStream("C:/apps/jakarta-tomcat-4.0.6/webapps/ROOT/WEB-INF/classes/dev/Data_452SY2.txt")));
try { 
             while((readDetail_topLayer = inFile.readLine()) != null)
          StringTokenizer tokenizer_topLayer = new StringTokenizer(readDetail_topLayer,"\t", true);
               while  (tokenizer_topLayer.hasMoreTokens())
                    string_gameID = tokenizer_topLayer.nextToken();
     catch(IOException e)
                System.out.println(e.getMessage());
     Thanks KT

......How are you declaring the class in your JSP? ... are you instantiating it as a bean using the useBean tag, or just instantiating it in your code like normal.
Maybe you could post the relevant JSP code too?
Hello again,
Only the last string is populating after the file has be tokenized. What I'll like to accomplish is passing the very first string in the file. I did not get too far in the JSP file setup because the code is still in it's testing stage, but any help will be highly appreciated.
Here is the JSP code
<%@page import="dev.*" %>
<%@page session="true" language="java" import="java.io.*" %>
<jsp:useBean id="wagerhist" scope="request" class="dev.RoundDetail2" />
<html>
<head>
<title>Round Detail</title>
<body>
  <table width="530" bordercolor="#000000" valign="top">
    <tr>
          <td align="left"  width="19%">Game ID<%=wagerhist.string_gameID%></td>
          <td align="left"  width="30%">  </td>
          <td align="left"  width="20%">card1</td>
          <td align="left"  width="31%">  </td>
        </tr>
  </table>
</body>
</html>

Similar Messages

  • Jintegra problem - accessing Matlab from Java??

    Hi:
    Sorry if this post doesn't belong here!!
    I am accessing Matlab from JAVA using JIntegra for COM. I tried running the example in their website.
    (http://j-integra.intrinsyc.com/support/com/doc/other_examples/Matlab.htm)
    I have also posted the example below. I am using their trial version and have included all the jars as said. I get the an unexpected output (all zero's) for reading a variable in the matlab workspace. I don't understand why I get this. Can anyone let me know if this runs for you??
    Thanks
    Pavan
    Example code from Jintegra website:
    public class MatlabExample {
    public static void main(java.lang.String[] args) throws Exception {
    try {
    // DCOM authentication: Make sure NT Domain, NT User, NT Password are valid credentials.
    // Uncomment this line if MatlabExample.java remotely accesses MATLAB :
    // com.linar.jintegra.AuthInfo.setDefault("NT DOMAIN", "NT USER", "NT PASSWORD");
    // Create the MATLAB object
    // Specify host name or IP address of MATLAB machine as parameter if
    // MatlabExample.java remotely accesses MATLAB.
    // mlapp.MLApp mlApp = new mlapp.MLApp("123.456.789.0");
    mlapp.MLApp mlApp = new mlapp.MLApp();
    String result = mlApp.execute("a = [1 2 3 4; 5 6 7 8;]");
    System.out.println("Execute result is " + result);
    double mreal[][] = new double[2][4];
    double mimage[] = new double[0];
    mlApp.getFullMatrix("a", "base", new Object[]{mreal}, new Object[]{mimage});
    for (int i = 0; i < 2; i++) {
    for (int j = 0; j < 4; j++) {
    System.out.println(mreal[i][j]);
    } finally {
    com.linar.jintegra.Cleaner.releaseAll();
    }

    ......How are you declaring the class in your JSP? ... are you instantiating it as a bean using the useBean tag, or just instantiating it in your code like normal.
    Maybe you could post the relevant JSP code too?
    Hello again,
    Only the last string is populating after the file has be tokenized. What I'll like to accomplish is passing the very first string in the file. I did not get too far in the JSP file setup because the code is still in it's testing stage, but any help will be highly appreciated.
    Here is the JSP code
    <%@page import="dev.*" %>
    <%@page session="true" language="java" import="java.io.*" %>
    <jsp:useBean id="wagerhist" scope="request" class="dev.RoundDetail2" />
    <html>
    <head>
    <title>Round Detail</title>
    <body>
      <table width="530" bordercolor="#000000" valign="top">
        <tr>
              <td align="left"  width="19%">Game ID<%=wagerhist.string_gameID%></td>
              <td align="left"  width="30%">  </td>
              <td align="left"  width="20%">card1</td>
              <td align="left"  width="31%">  </td>
            </tr>
      </table>
    </body>
    </html>

  • How to access a variable from a dynamically included JSP page

    I have a jsp (say main.jsp) using the following in its code :
    <jsp:include page="menu.jsp" flush="true" />
    I have a variable in menu.jsp which I would like to use in my main.jsp.
    How do I get the value of the variable defined in menu.jsp ?
    I called this variable in menu.jsp, Public, but this didnot help me use the value of that variable in main.jsp
    Any help is highly appreciated.. thnks a lot

    I do notice the variable var1 has the value populated - in menu.jsp - (from View -->
    Source in the browser) but for some reason not able to use it in main.jspI'm not quite sure of the way your jsps are structured from your code snippet but I think there is something to be aware of here that may be part of your problem, namely the difference between the include directive and the include action.
    You are currently using the include action, this treats the included resource as a dynamic object - i.e. a request is sent to that resource and the resulting response is included in your page. So when you think of what there is no java variable actually included - you'll just get the resulting HTML that is generated by menu.jsp
    The include directive, as in <%@include file=�menu.jsp � %>, on the other hand treats the resource as a static object. This means the actual bytes in the included resource are inserted into the including jsp and then the result of that is compiled and processed, effectively you are cutting and pasting the menu.jsp into your calling jsp. In this case the variable would be available to the calling jsp.
    However this approach does bring other difficulties that may break your current code, you'll just have to try it and see what happens.
    Hope that's relevant to your problem,
    Matt

  • Simple Question Calling methods from Java files through JSP without JVM

    Hi.
    I've got a simple question (forigve my newbieness)...
    If I'm running Tomcat can I exectue a method in a compiled Java file from a JSP page without having the JVM installed on the server?
    Any thoughts or additional comments would be appreciated.
    Many thanks.

    No... but that's because you can't run Tomcat without
    a JVM installed on the server.
    If you are running Tomcat, you are running a JVM for
    the JSP pages to run in, in which case, yes, the JSP
    pages can call the other Java code... as long as it's
    in the classpath.Thanks a lot for the replies.
    So just to check, if I sign up with a hosting company that offers Tomcat then the JVM will be installed on the server and I can call other Java code as long as it's in the classpath?
    I just want to make sure before I sign up with a hosting company =D
    Thanks again!

  • Problems Accessing VARRAY from Java

    Hi,
    I am calling a stored procedure with IN parameters as VARRAYS from Java application.
    There are two schemas in the database. One main schema, say 'MAIN_SCHEMA' which contains all the table,VARRAYS,packages etc. There are public synonyms for all the database object including VARRAYS in this schema. The java application uses a connection pool created using another user say 'ADMIN'. This user has been granted priviliges for acccessing all the objects in the 'MAIN_SCHEMA'. For the VARRAYS we have created public synonyms and granted EXECUTE for ADMIN.
    However when I try to execute the stored procedure from java , I get an SQLException("invalid name pattern: ADMIN.UIDARRAY")
    I solved the problem temporarily by prefixing the main schema name to the name of the VARRAY. The sample code I have used is as below. but I am not sure if this is the correct way of doing it. I do not understand why we have to prefix the schema name if we have priviliges and public synonyms on the object.
    public void setPendingForfeituresUids(java.util.List pendingForfeituresUids) throws DAOException{
    try{
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor(
    "MAIN_SCHEMA.UIDARRAY", con);
    array = new ARRAY(descriptor, con, pendingForfeituresUids.toArray());
    if(array == null){
    stmt.setNull(3,java.sql.Types.ARRAY);
    }else{
    stmt.setArray(3, array);
    }catch(SQLException e){
    closeStatement();
    releaseLobWrappers();
    throw new DAOException(e);
    Database and Drivers used
    I am using Oracle 9.2.0.1.0, Weblogic 8.1, Oracle Jdbc thin driver for 9.2 that comes bundled with weblogic (ojdbc14.jar)
    Any help on this is welcome.
    Thanks,
    Sunil

    Hi Sunil,
    I was wondering if you had any solution to the problem you listed.
    We are also facing a similar problem and is reported to oracle. Its a Bug as per oracle.
    Any help in getting this resolved is appreciated.
    Thanks,
    Sandip
    [email protected]

  • Java File and JSP Page

    I am to create a link verification program -- a simple java file with the database connection & some business logic and a JSP page that instantiates the my java file. It won't work. Everytime I run the jsp page, it gives me java.lang.NullPointerException. Can anyone give me some directions? The web server I am using is JRun.
    Thank you
    Below are my code:
    JSP Page:
    <%--      Verify Links
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@ page import="java.sql.*" %>
    <%@ page import="java.net.*" %>
    <%@ page import="pro.*" %>
    <html>
    <head>
    <title>Results</title>
    </head>
    <body>
    <%
    try{
    LinkConnection newconn = new LinkConnection();
    newconn.initialize();
    newconn.query();
    newconn.close();
    }catch (ClassNotFoundException cnfe)
    out.println(cnfe);
    catch (SQLException sqle)
    out.println(sqle);
    catch (NullPointerException npe)
    out.println(npe);
    %>
    </body>
    </html>
    Java Code:
    package pro;
    import java.io.*;
    import java.sql.*;
    import java.net.*;
    public class LinkConnection {
    Connection con;
    ResultSet RS;
    Statement Stmt;
    public void initialize() throws SQLException, ClassNotFoundException
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection("XXXX", "XXXX", "XXXX");
    public void query() throws SQLException
    Statement Stmt=con.createStatement();
    String strSQL="Select guideline_name, guideline_url from pgt_guidelines";
    ResultSet RS=Stmt.executeQuery(strSQL);
    while (RS.next())
    String guidelinename = RS.getString("guideline_name");
    String guidelineurl = ("http://" + RS.getString("guideline_url"));
    try {
    URL url = new URL(guidelineurl);
    HttpURLConnection link=(HttpURLConnection)url.openConnection();
    System.out.println("<font color='blue'>");
    System.out.println(guidelinename);
    System.out.println("<br>");
    System.out.println(guidelineurl);
    System.out.println("</font>");
    System.out.println("<font color='red'>");
    System.out.println(link.getResponseCode());
    System.out.println("</font>");
    System.out.println("<br />");
              }catch (Exception e)
              {System.out.println("<font color='yellow'>Error Link </font>")
    public void close() throws SQLException {     
    RS.close();
    Stmt.close();
    con.close();

    i'm having the same problem, what is the solution to this
    A Servlet Exception Has Occurred
    java.lang.NullPointerException
         at test.Lesson.runSql(Lesson.java:80)
    ===== Lesson.java file =====
    package test;
    import java.sql.* ;
    import java.io.Serializable;
    public class Lesson {
         public Lesson( ) { }
    //Line 9
         public String runSql ( ) {
              String browserOutput = "";
              Connection sqlca = null;
              Statement sqlStatement = null;
              ResultSet myResultSet = null;
    //Line 16
              /* Connect to database, run SQL and produce output */
              try { 
                   /* Connection to the database */
                   Class.forName("org.gjt.mm.mysql.Driver").newInstance();
                   String theDatabase ="jdbc:mysql://localhost/employee";
                   sqlca = DriverManager.getConnection(theDatabase,"usr","pwd");
    //Line 24
                   /* Construct and execute the sql, positioning before the
                   first row in the result set */
                   sqlStatement = sqlca.createStatement();
                   myResultSet = sqlStatement.executeQuery
    //Line 29
                   ("select emp_id, " +
                        "emp_lname, " +
                        "city, " +
                        "state," +
                        "zip_code, " +
                        "emp_fname " +
                        "from employee " +
                        "where emp_id < 250 " +
                        "order by emp_lname, emp_fname");
    //Line 39
                   /* Construct the heading for the table */
                   browserOutput =
                        "<div align=left>"+
                        "<table border=0 align=left width=520>" +
                        "<caption><i><b>" +
                        "Employee Listing</b></i></caption>" ;
    //Line 46
                   /* Construct the column headings for the table */
                   browserOutput +=
                        "<th align=left>Emp_id</th>" +
                        "<th>First Name</th>" +
                        "<th>Last Name</th>" +
                        "<th>City</th>" +
                        "<th>State</th>" +
                        "<th>Zip</th>" ;
    //Line 55
                   /* Move to next row and & its contents to the html output */
                   while(myResultSet.next()) {
                        browserOutput += "<TR><TD>" +
                   myResultSet.getObject("emp_id").toString() + "</TD><TD>" +
                   myResultSet.getObject("emp_fname").toString()+"</TD><TD>" +
                   myResultSet.getObject("emp_lname").toString() + "</TD><TD>" +
                   myResultSet.getObject("city").toString() + "</TD><TD>" +
                   myResultSet.getObject("state").toString() + "</TD><TD>" +
                   myResultSet.getObject("zip_code").toString() + "</TD></TR>" ;
    //Line 66
                   }//end of while
                   sqlStatement.close();
                   sqlca.close();
              }//end of try
              catch (SQLException e) {
    //Line 72
                   browserOutput = " Error: SQLException: " + e.getMessage();
                   browserOutput= " Error: SQLState: " + e.getSQLState();
                   browserOutput= " VendorError: " + e.getErrorCode();
              }//end of SQLException
              catch (Exception e) {
                   browserOutput = " Error: JDBC Class creation: " + e.getMessage();
              }//end of Exception
    /**Line 80**/     finally {
                   try { sqlca.close(); }
                   catch(SQLException e) {
                   browserOutput = " Error: Closing connection: " + e.getMessage();
              }//end of finally
         /* Complete the html and return it to the Java Server Page */
         browserOutput += "</table>" + "</div>" ;
         return browserOutput;
         } //end of runSql
    }//end of Lesson

  • Problem accessing servlet from java class which uses Basic Authentication

    "Hi,
    I am using weblogic 6.1 server. I am calling a servlet file from a class file using HttpURLConnection. This is the code below.
              String theUsername="B1A1Z1T2";
              String thePassword="hlladmin";
              String urlString="http://rsnetserver:113/hll/servlet/CallSSRUpload";
              String userPassword = theUsername ":" thePassword;
              String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
              try
                   URL url = new URL (urlString);
                   HttpURLConnection uc=(HttpURLConnection)url.openConnection();
                   int it = 0;
                   while ((it = encoding.indexOf('\n')) != -1
                        || (it = encoding.indexOf('\r')) != -1) {
                             encoding = encoding.substring(0, it)
                             encoding.substring(it 1);
                   uc.setRequestProperty("Authorization","BASIC " encoding);
                   uc.setRequestProperty("SOAPAction", url.toString());
                   System.out.println(uc.getResponseCode());
                   System.out.println(uc.getResponseMessage());
              catch(Exception io)
                   io.printStackTrace();
                   System.out.println("error message........" io.getMessage());     
    In web.xml I have d

    Hello,
    Could you post the stack trace?
    Thanks,
    Bruce
    Vijay Babu wrote:
    >
    "Hi,
    I am using weblogic 6.1 server. I am calling a servlet file from a class file using HttpURLConnection. This is the code below.
    String theUsername="B1A1Z1T2";
    String thePassword="hlladmin";
    String urlString="http://rsnetserver:113/hll/servlet/CallSSRUpload";
    String userPassword = theUsername ":" thePassword;
    String encoding = new sun.misc.BASE64Encoder().encode (userPassword.getBytes());
    try
    URL url = new URL (urlString);
    HttpURLConnection uc=(HttpURLConnection)url.openConnection();
    int it = 0;
    while ((it = encoding.indexOf('\n')) != -1
    || (it = encoding.indexOf('\r')) != -1) {
    encoding = encoding.substring(0, it)
    encoding.substring(it 1);
    uc.setRequestProperty("Authorization","BASIC " encoding);
    uc.setRequestProperty("SOAPAction", url.toString());
    System.out.println(uc.getResponseCode());
    System.out.println(uc.getResponseMessage());
    catch(Exception io)
    io.printStackTrace();
    System.out.println("error message........" io.getMessage());
    In web.xml I have d

  • How to run and displaying output of java file in jsp page ???

    Hai,
    I am going to develop a website which would have everything about java.
    Example code displayed for all methods.Next to every Example i shoud have *"Run"* button.
    Click at Run button should compile the example and show the output or even error.
    Ex:If the user clicks the vector link then all the examples will be shown..
    import java.util.*;
    etc...
    Run button-onclick it shoud compile the code above and shoud show the output....
    I don't know how to get the console error and output..
    kindly help me out....Thanks.

    Check java.lang.Runtime API.

  • 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,

  • How can we  use java variable in javascript code on JSP page?

    How can we use java variable in javascript code on JSP page?
    Pls help

    Think about it:
    JSP/Java is executed on the Server and produces HTML+JavaScript.
    Then that HTML+JavaScript is transfered to the client. The client now interpretes the HTML+JavaScript.
    Obviously there's no way to access a Java variable directly from JavaScript.
    What you can do, however, is write out some JavaScript that creates a JavaScript variable containing the value of your Java variable.

  • Problem in saving modified rtf file in jsp

    hi,
    I have [b]problem in saving modified rtf file in jsp. My scenario is like this:
    I need to open rtf file in jsp and allow user to modify it, after user modifies rtf file in browser, user will press send button. After user pressing send button rtf has to be saved into destination directory(the directory from which its been fetched. I appreciate if any one could send me relevant code for the same.
    thanks
    ram

    1) RTF is not opened in your browser, but in an application that is set to handle the file type (like Word or Wordpad)
    2) from the web you have no control over what that application does
    3) conclusion: what you want is not possible using the web
    Other than that, asking for code without showing that you put some effort into the problem yourself is a sure way of getting flamed. You should know that by now, since you registered more than 2 years ago...

  • Convert from java file to cap file

    Dear Pro,
    Please help me this problem,
    I'm building a applet in eclipse. Now, I want to convert from java file to cap file to load it into javacard.
    I need repair what tools and do what, please help me!
    Thanks & Best Regards,
    KeillyNguyen

    Run -> Run Configuration -> Double click Java Card Application -> Click Run
    After that, the CAP file will be generated in the bin directory.
    Are you come from VN? Im Vietnamese :) Nice to meet you

  • [JDBC][ODBC] How to compact access database from Java ?

    Hello,
    I'm developping a java applcation wich is connected to an MS Access file database.
    For now, I don'y compact it but it would be better.
    So How can I compact an access database from Java ?
    thanks :)

    Hi ypiel,
    Try this:
    1) Download JETCOMP.exe (freeware from Microsoft);
    2) Put the following code in your app (assuming your database file name is: "DB.mdb"):
    try {
    File current = new File("DB.mdb");
    File backup = new File("BACKUP.mdb");
    if (current.renameTo(backup)) {
    Runtime.getRuntime().exec("jetcomp -src:BACKUP.mdb -dest:DB.mdb");
    } catch (Exception e) {
    System.out.println(e.getMessage());
    Best regards,
    YT.

  • SYSTEM ERROR : com/adobe.processingexception:Problem accessing data from De

    Hi SAP Guru,
    We have configured ADOBE for separate ABAP server and Java Server.
    But when I am execution report FP_TEST_00 getting below error
    ADS: com.adobe.ProcessingException: Problem accessing d(200101) Message no. FPRUNX001
    FP_CHECK_DESTINATION_SERVICE
    FP_CHECK_HTTP_DATA_TRANSFER giving error
    SYSTEM ERROR : com/adobe.processingexception:Problem accessing data from Destination dest :FP_ICF_DATA_IP1//sap/bc/fp/form/layout/FP_FORM_SECURITY_TEST.XDP?fp-language=DE
    But report fp_pdf_test_00 is giving postive response.
    I have troubles hooted according to note 944221 , my configuration is ok but no success.
    Please help to resolve this issue.

    Hi,
    Check your ADS Connection .
    Do one thing
    Go to T-code "SM59"  -  "RFC Destinations (Display/Maintain)"
    select "HTTP Connections to External Server" - > ADS
    Double click there and check the all the settings " Administrations "  ,  Technical setting , Logon and security , Special option .
    Please check the log on and pass word with the help of your SAP BASIS consultant it will work fine .

  • Problem accessing data from Destination: dest:FP_ICF_DATA_ SID //sap/bc/fp/

    This error message has many threads.  However, I have not seen any postings for NW CE 7.1.  The configuration for this version of JAVA and ADS is very different from any of the documentation that we have found.  We suspect a config issue but cannot find any pertinent documentation for ADS configuration and NW CE 7.1 (we are SP11). 
    Where can we find ADS configuration documentation for NW CE 7.1?
    Please help.
    So far, we are mainly using test FP_CHECK_DESTINATION_SERVICE which seems to prove that the destination configuration is the problem.  Fortunately, some of the configuration was automated. But not all.

    Thanks for the help, so far.  I have gotten one step closer by manually starting all processes and services related to Adobe Document Services.  CE 7.1 is quite a bit different.
    I can now get a byte count returned with the test FP_CHECK_DESTINATION_SERVICE in SE38 without checking the "with destination service" box.  When I check the box, I still get the "Problem accessing data from Destination: dest:FP_ICF_DATA_<SID>//sap/bc/fp/ message".
    The problem is related to the return of the rendering service from the Java side via the Java destination service.
    Note that the ABAP side with the problem is ECC 6.0 EHP3 SP1.

Maybe you are looking for

  • IPod classic (160gb) not recognized by computer

    I have a 7th gen 160gb iPod classic which isn't recognized by my computer. I recently replaced the hard drive and battery and it seemed to go off without a hitch. After I put the front plate back on the screen lit up and everything was working. I con

  • Bug: Text Search is not working for Excel spreadsheets

    Hi, We have published several Excel, Word and PowerPoint file items to our portal application content area. However, The intermedia text search is not returning the excel files - it is working on other file formats though! I have even tried directly

  • How to handle a (Oracle) database restart

    Hi, For a cold backup we stop and start the database. When using Toplink for database access I've a problem when the database is restarted: "500 Internal Server Error: Exception [TOPLINK-4002] ... oracle.toplink.exceptions.DatabaseException ... Broke

  • Enterprise Services

    Hi Gurus! I think I know the concept of Enterprise Services, but I need to know technical aspects of ES (Integration on systems, ...). Could somebody give me information, links, examples,...? Useful answers will be rewarded. Thanks and regards, Manue

  • Is There a Shortcut Key for Change/Find ?

    Hello and thanks in advance, Using the InDesign CS-5  Find/Change feature, I am always using  the Change/Find button. *** Is there a way to create a shortcut key for this option, Change/Find ? *** Since I use it so often, it would be good if it could