cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieve values from Java class to JSP

Former Member
0 Kudos

Hello all,

I want to call the java class in JSP page and retrieve some values from java class and display in JSP page.I need to display the single field value and Internal table values. Can any one give me some sample code for this?.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member192434
Active Contributor
0 Kudos

1. first you need to import the java class into your jsp page by using this sample code

<%@ page import = "java.util.ResourceBundle" %>

2. then instanciate the java class, suppose ResourceBundle is your java cal

<% ResourceBundle  a = new ResourceBundle ();

%>

3. Now you can call any method from your java class using this

<% String temp=   a.method(); %>

4. To store it in table, create a table

<

TABLE width="100%" height= "100%" border="0" >
     <TR>
        <TD> <%=temp%></TD>
    </TR>
    </TABLE>

Hope it will help u

Former Member
0 Kudos

Hi Anup,

Thanks for your reply. I am working on B2C application. I need to import the value from Jsp page to Java class. How to import parameter from JSP page to java class in B2c? and need to export value from java class to JSP page. How to export paramert from java class to JSP page in B2C?

I am very new to this. please give your suggestion...

Thanks

Answers (0)