How to use "scope " attrubute in useBean tag
Can anyone please tell me if I can use the same JavaBean Class to hold information form different pages? well, let me explain exactely what I want to do:
I have a Java bean Class that holds a property 'Name':
package ContactManager;
public class Person {
private String name="%";
public String getName () {
return this.name;
public void setName (String my_name) {
name = my_name + "%" ;
I'm using this class to store temporarly the Criteria of search from a JSP/HTML page to send to a database for search and for UPDATE -> this of course is done in different HTML/JSP pages. The problem I have is that the first time I set the properties (when the user make a search) this value remains unchanged [-> the second time when the user asks for update, I try to use the same bean to keep the value => unfortuntly it returns me the old value]
My question is: is the use of 'scope' attribute of the "jsp:useBean" tag can solve this problem? if yes how to use it? I've tryed to set the scope of the bean to page but that does not help :-(
Pleaze help, I'm stuck.... Bellow is the 4 JSP pages for:
- person_search.jsp / person_result.jsp
- request_modify.jsp/ DoModify.jsp
1 -person_search.jsp
<%@ page import="java.sql.*" %>
<HTML>
<HEAD><TITLE>Person Search</TITLE></HEAD>
<BODY><CENTER>
<form method="POST" action="person_result.jsp">
Name <input type="text" name="name" size="47"></p>
<input type="submit" value="Submit" name="B1">
<input type="reset" value="Reset" name="B2"></p>
</form></body>
</html>
2- person_result.jsp
<%@ page import="java.sql.*" %>
<HTML><BODY>
<jsp:useBean id="theBean" class="ContactManager.Person"/>
<jsp:setProperty name="theBean" property="*" />
Name<BR>
<%
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("JDBC driver loaded");
catch (ClassNotFoundException e) {
System.out.println(e.toString());
%>
<%
try {
Connection con = DriverManager.getConnection("jdbc:odbc:ContactManager");
Statement s = con.createStatement();
String sql = "SELECT Client.ClientID, Client.Name FROM Client where Client.Name like " + "'" + theBean.getName() + "'";
ResultSet rs = s.executeQuery(sql);
while (rs.next()) {
String myId = rs.getString(1);
%>
<TR>
<TD><%= myId %></TD>
<TD><a href="person_detail.jsp?id=<%= myId %>"><%=rs.getString(2)%></a></TD>
<TD><a href="delete_person.jsp?id=<%= myId %>">Delete</a></TD><BR>
</TR>
<%
rs.close();
s.close();
con.close();
catch (SQLException e) {
System.out.println(e.toString());
catch (Exception e) {
System.out.println(e.toString());
%>
</BODY>
</HTML>
3- request_modify.jsp
<%@ page import="java.sql.*" %>
<html>
<head><title>AddressBook: Modifying Person <%= request.getParameter ("id") %></title> </head>
<body bgcolor="#ffffee">
<%
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("JDBC driver loaded");
catch (ClassNotFoundException e) {
System.out.println(e.toString());
%>
<%
int rowsAffected = 0;
try {
Connection con = DriverManager.getConnection("jdbc:odbc:ContactManager");
Statement s = con.createStatement();
String sql = "SELECT Client.ClientID, Client.Name FROM Client where ClientID ="+ request.getParameter("id");
ResultSet rs = s.executeQuery(sql);
if (rs.next()) {
%>
Client Name is <input type=text name=name value=<%= rs.getString(2) %>> <br>
<TD><a href="person_do_modify.jsp?id=<%= rs.getString(1)%>">Confirm Modify</a></TD>
<%
rs.close();
s.close();
con.close();
catch (SQLException e) {
System.out.println(e.toString());
catch (Exception e) {
System.out.println(e.toString());
%>
</BODY> </HTML>
4- do_modify.jsp
<%@ page import="java.sql.*" %>
<html>
<head><title>AddressBook: Modifying Address <%= request.getParameter ("id") %></title></head>
<body bgcolor="#ffffee">
<jsp:useBean id="theBean" class="ContactManager.Person" scope="page"/>
<jsp:setProperty name="theBean" property="name"/>
<%
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("JDBC driver loaded");
catch (ClassNotFoundException e) {
System.out.println(e.toString());
%>
<%
int rowsAffected = 0;
try {
Connection con = DriverManager.getConnection("jdbc:odbc:ContactManager");
PreparedStatement preparedStatement = con.prepareStatement ("UPDATE Client SET Name=? WHERE ClientID =?");
preparedStatement.setString (1, theBean.getName());
preparedStatement.setString (2, request.getParameter("id"));
rowsAffected = preparedStatement.executeUpdate ();
preparedStatement.close ();
if (rowsAffected == 1) {
%>
done
<%
else{
%>
Not Modified
<%
con.close();
catch (SQLException e) {
System.out.println(e.toString());
catch (Exception e) {
%>
</BODY></HTML>
Thank you for the help.
Sammy
While a quick search on the <jsp:useBean> tag and the scope attribute will probably yield more information than I can summarize in a few sentences, I'm pretty sure that using the scope="page" attribute on a bean will cause that bean to be instantiated every time the page is loaded. In order for a bean to persist longer than the existance of that page (whether you're loading a new page, or reloading the same one), you'd need to set the scope to session or application (you'd probably want session).
Similar Messages
-
How to use Euro symbol in xml tags?
How to use Euro symbol in xml tags?
What do you mean by "in xml tags"? Can you post a three-line XML snippet showing what you hope to achieve?
-
How to use loop inside mx:webservice tag
Hi to all,
I'm using some webservices. i just want to pass XMLChildren
to the request element of webservice tag.
for that,
<mx:WebService id="WES3" destination="applicantws"
useProxy="true" fault="Alert.show(event.fault.faultString) ,
'Error'" >
<mx:operation name="ZhrFunApplicantCreate"
result="onResult2(event)" resultFormat="e4x" >
<mx:request>
<education>
{ samplexml.children() }
</education>
</mx:request>
</mx:operation>
</mx:WebService>
but the problem is samplexml contains many children when i
embed that samplexml inside websrvice it is taking only the
firstchild of that samplexml.so i need to loop through the
samplexml inorder to fetch & bind all the childs of that
samplexml.
How do i do that??
can anyone please please please bring me the solution...
Thanks in advance..
regards,
Thenmalar. vHi,
You can achieve this by UDF,
inputs are E1IDB02 BA-FIIKWAER,E1EDKA1 BE-NAME1
yes then suggest MIDE(E1EDKA1 BE - STRAS,1,35)
IF E1IDB02 BA-FIIKWAER = CNY
then MID(E1EDKA1 BE-NAME1,12,11)
IF E1IDB02 BA-FIIKWAER <> CNY and LEN(E1EDKA1 BE-NAME1)<=35
then MID(E1EDKA1 BE-STRAS,1,35)
IF E1IDB02 BA-FIIKWAER <> CNY and LEN(E1EDKA1 BE-NAME1)>35
then MID(E1EDKA1 BE-NAME1,36,35)
Regards
Chilla -
How to use add image in HTML tag
Hello frndz
i m working on text chat application in adobe air.using <mx:html/> tag for dispalying text and images(smiley).but the font size fo flex is diffrent and html diffrent.i mean i m using 10 font size but it looks too large on <mx:html/> component.is there any way to cast them in same size.
The second and major problem is that it can not add images to html tag.when i m giving images like:-private var txt:String="<img src='src\smily\tongue.gif'/>" .
it shows nothing but when i give images through http path it shows images on html componenet.
can any body explain me the problem.
Thanks And regards
Vineet Oshothanks Alot René Bühling for your quick reply.but the link u mentioned ith reply is not working for me.
ok can u tell me how can i manage my flex font size 10 to <mx:html tag 's font size 10.
i think there is large difference between flex font and html font.so please guide me for that.
Thanks Alot
Vineet osho -
How to use the Image in document Tag (title).
hi,
I using Jdeveloper 11.1.1.3.0.
I want to show the one image in title itself. which tag use to do this one.
Regards,
RaguHi Abhijit,
when I click the new tab in firebox or IE and you enter the oracle website in the address bar. Now the new Tab place shows the title of oracle and Oracle Image. Like that i want.
How to code in jspx file.
I used the this tag <af:document id="d1" title="Oracle">. before oracle title i need one small image in jspx file.
Regards,
ragu -
How to use Photoshop Elements 11 Image Tags in Lightroom 4.4
Hello,
I would like to filter my Lightroom catalog by people in the photo. This could be done manually in Lightroom using metadata, however, Photoshop Elements 11 Organiser has an auto-analyse feature that does this automatically and creates Image Tags for all identified people. How do I use the Photoshop Elements 11 Organiser Image Tags in Lightroom 4.4?
I have tried:
Created image tags for identified people. These are listed in the Image Tags section of the main workspace and can be used within Photoshop Elements 11 Organiser to filter on people using Search and People features.
Updated metadata within Lightroom
Searched for tags in all metadata fields using Library Filters
I have been unable to find any mention of these Image Tags in the file metadata - perhaps they only exist in the Photoshop Elements 11 Catalog? If so, does anybody have a best practice for transferring this information between Photoshop Elements 11 and Lightroom 4.4?
Thanks in advance,
DavidYes you can open multiple images into PSE from LR. But actually there is no great advantage in using Lightroom for Photomerge as the export copies are already created in the Library but the saved copy will be the merged version which LR will know nothing about, and which would need to be imported to the library separately.
I would personally start from Expert Mode in PSE11 and then use:
File >> Open
Navigate directly to the folder and select the images you want and click open.
If they are raw files they will open up in camera raw and will already have the light room adjustments included, if the metadata has been saved to file in Lightroom.
Click select all (top left) and then ensure the image depth is set to 8 bits using the drop down menu at the bottom of the dialog. Then click the open images button (bottom right) to send them all into PSE. -
How to use rowspan with display:column tag
Folks,
For displaying table in my project I am using display:table tag. Now in one of the column i need to use row span attribute. How can i use that.
Waiting for the reply.i dont think u can set a rowspan in display:table !!!!
-
How to use value from Custom Select tag
Hi,
I have made a custom tag for html element select. It is a very basic tag with the selection of one vaule. I am able to populate the list using custom tag in JSP but i am not able to optain the value from that. Kindly see my jsp code.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Expenses Report</title>
</head>
<body>
<center>
<table summary="layout">
<tr>
<td>Month:</td>
<td>
<tt:Select name="month" from="${ExpensesDBO}"/>
</td>
</tr>
</table>
<c:if test="${fn:length(param.month) > 0}">
<table summary="layout" border="1">
<tr>
<td align="center">Year</td>
<td align="center">Month</td>
<td align="center">Shopping</td>
<td align="center">Groceries</td>
<td align="center">Fixed Expenses</td>
<td align="center">Transportation</td>
</tr>
<tt:Expenses var="exp" username="${sessionScope.user}" from="${ExpensesDBO}">
<tr>
<td>${exp.year}</td>
<td>${exp.month}</td>
<td>${exp.shopping}</td>
<td>${exp.groceries}</td>
<td>${exp.fixedExpenses}</td>
<td>${exp.transportation}</td>
</tr>
</tt:Expenses>
</table>
</c:if>
</center>
</body>
</html>
Basically based on the selected value I want to show the same page with the details including page with the default value in select list.
I have made a generic select custom tag to be used within the application.
Regards,
Rahul.If both tables come from the same data source, join the two tables in one data set rather than two as shown. If they are from different data sources, use a 'join data set'
-
How to use cm_nodeName attribute of search tag in content queries ?
hello,
i want to know about cm_nodeName,cm_path attributes of search tag.Actually i want to directly reterieve concerned node,so that content should be directly reterieved from that node and it should not search into all the present nodes in repository,to improve performence.
Problem is that above mentioned tags are not working.
Peply as soon as possibleYou could always write your own authenticator (i do not know if you can configure BEA directly)
-
How to use navigationmethod byEPCM with navigation tag libraries?
Hi,
we have created our own Top Level Navigation component which implements a hover meny for level 3-5. The menu works great when navigationmethod in the anchor is set to "byURL":
<nav:navNodeAnchor navigationMethod="byURL" anchorAttributes="class='LinkLevel1u'"/>
but we need to use "byEPCM" since we want to utilize history, forward and backwards functions of the Page Toolbar.
When we set
navigationMethod="byEPCM"
our menu is not updated when the users clicks on a menu item. But in the content area the correct page/iview is shown.
Use of byEPCM is very poorly documented, does anyone have any experience with it?Vegard,
I am facing the exact same issue you had with the menu navigation not refreshing, but the content area displays the correct pages. Did you find a fix to this problem? Could you please post a reply if you did or didn't. Thanks. -
How to use bean as attribute?
I create a bean(sql result) from a servlet and put it in the request using setAttribute(bean) and then use dispacher to send the request to the display.jsp. In display.jsp i have a <jsp:usebean id="bean" class="beanClass"> but when i use <jsp:getProperty name="bean" property="colum1"/> it doesnt give anything. Did i miss anything? How does the usebean tag know which bean i wanna use? The usebean tag i used creates a new bean, right?
Hope to get some helpMay be you need to define the scope for <jsp:useBean> tag. For class, try to add package.class.
-
How to use JSTL varriable in to XML
1. how to use JSTL varriable into Xml Tag.
for example :
java value I am passing to XML.
<eztag:companytag pgm_sname="<%= strpgm_name%>" dbase="<%= strd%>"
dbpass="<%= strp%>" dburl="<%= stru%>" session="<%= session%>" />
After modified in JSTL
<eztag:companytag pgm_sname="${pgm_name}" dbase="${strd}"
dbpass="${strp}" dburl="${stru}" session="${session}" />
but its Not working. How to use this
2.How to use ArrayLIst in JSTL
For example
IN Java scriplet code in JSP
<%for(int i=0;i<alist.size();i++) {
String str = String.valueOf(alist.get(i));
String str1 = String.valueOf(alist.get(i+1));
%>
<TD>STR - <%=str%> </TD>
<TD>STR1 - <%=str1%> </TD>
<% } %>
This code How to Use in JSTL.
thanks in advancethanks for reply
But in this article it describes how to passing the value of function.
I need how to assign the JSTL varriable to xml tag attribute.
for example
In my TLD File
<tag>
<name>companytag</name>
<tag-class>bas.CompanyTag</tag-class>
<attribute>
<name>dbase</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>dbpass</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>dburl</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>pgm_sname</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
<attribute>
<name>session</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
<type>java.lang.String</type>
</attribute>
</tag>
Html code
old code :
<%@ taglib uri="/ezerptags.tld" prefix="eztag" %>
<eztag:companytag pgm_sname="<%= strpgm_name%>" dbase="<%= strd%>"
dbpass="<%= strp%>" dburl="<%= stru%>" session="<%= session%>" />
After modified in JSTL
<%@ taglib uri="/ezerptags.tld" prefix="eztag" %>
<eztag:companytag pgm_sname="${pgm_name}" dbase="${strd}"
dbpass="${strp}" dburl="${stru}" session="${session}" />
but its Not working. How to use this
the "eztag" and "companytag" are the customtag. these tages available in eztaglib.tld file. I am passing the value through XML Tag.
Please suggest me . how to use.
is there any article describes how to pass jstl varriable to XML Tag attribute.
thanks in advance -
Make sure that your bean is implementing the serializable interface and that
you are accessing the bean from the session with the same name.
Bryan
"Sandeep Suri" <[email protected]> wrote in message
news:[email protected]..
Hi, I have quick question about use of USEBEAN tag in SP2. When I
specify a scope of SESSION for the java bean, it does not keep the
values that I set for variable in the bean persistent.Thanks,Sonny
Try our New Web Based Forum at http://softwareforum.sun.com
Includes Access to our Product Knowledge Base! -
Unable to use jsp:useBean tag
when I use
<jsp:useBean id="addressBean" class="AddressBean" scope="session"/>
I get the following error
Exception Details: org.apache.jasper.JasperException
Unable to compile class for JSP No Java compiler was found to compile the generated source for the JSP. This can usually be solved by copying manually $JAVA_HOME/lib/tools.jar from the JDK to the common/lib directory of the Tomcat server, followed by a Tomcat restart. If using an alternate Java compiler, please check its installation and access path.
So my question is how to use the <jsp:useBean> tag in JSCPlease see my message How to set developer's mode for oracle jsp engine.
As a very early warning of the future, this way of setting configuration paramemter in web.xml for oracle jsp engine will be deprecated in the next major version of oc4j and desupported probably later on. Yes, it is still supported in 10.1.3 and the next major version, though. -
How to use logic:present tag in struts el tag
Hi
I am trying to use struts el tags in the jsp page.I am struggling with the following exception: Cannot find bean: "result" in any scope.I couldn't understand why this error is coming even i had the property "result" in my ActionForm.
ActionForm:
package com.finocus.cam.struts.bean;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import com.finocus.cam.common.ValidateFormat;
public class DetailsForm extends org.apache.struts.action.ActionForm {
private final static String LOG_TAG = DetailsForm.class.getName() + ".";
private static final long serialVersionUID = 1L;
// VARIABLES DECLARATION
private String name = null;
private String searchField = null;
private String searchCriteria = null;
private String phonenumber = "";
private String email = "";
private List results = null;
private String adminUserName = "";
private String adminUserEmail = "";
public DetailsForm() {
// GETTER AND SETTER METHODS
public String getName() {
return name;
public void setName(String name) {
this.name = name;
public String getSearchCriteria() {
return searchCriteria;
public void setSearchCriteria(String searchCriteria) {
this.searchCriteria = searchCriteria;
public String getSearchField() {
return searchField;
public void setSearchField(String searchField) {
this.searchField = searchField;
public String getEmail() {
return email;
public void setEmail(String email) {
this.email = email;
public List getResults() {
return results;
public void setResults(List results) {
this.results = results;
public String getPhonenumber() {
return phonenumber;
public void setPhonenumber(String phonenumber) {
this.phonenumber = phonenumber;
public String getAdminUserEmail() {
return adminUserEmail;
public void setAdminUserEmail(String adminUserEmail) {
this.adminUserEmail = adminUserEmail;
public String getAdminUserName() {
return adminUserName;
public void setAdminUserName(String adminUserName) {
this.adminUserName = adminUserName;
// DUMPING THE VALUES IN THE CONSOLE
public void dumpValues() {
StringBuffer sb = new StringBuffer();
sb.append("Name'");
sb.append(name);
sb.append("SearchField");
sb.append(searchField);
sb.append("searchCriteria");
sb.append(searchCriteria);
sb.append("'");
sb.append(" ");
System.out.println(sb.toString());
// RESET() METHOD IS USED FOR STORE FORM'S CURRENT VARIABLES DECLARATION
public void reset(ActionMapping actionMapping, HttpServletRequest request) {
System.out.println("reset() method is called");
this.email = null;
this.searchCriteria = null;
this.searchField = null;
this.results = null;
// VALIDATE() METHOD IS USED TO VALIDATE THE FORM DATA
public ActionErrors validate(ActionMapping actionMapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
System.out.println("Validate()is called");
// Determine if name has been entered.
if (getName() == null || getName().length() == 0
|| getName().equals(" ")) {
errors.add("accountText", new ActionError("searchText.error"));
} else if ((getSearchField().equals("name") == true)
&& (ValidateFormat.isValidText(getName()) == false)) {
errors.add("validAccountName", new ActionError("validName.error"));
if (getSearchField() == null || getSearchField().length() == 0) {
errors.add("accountSearchField", new ActionError(
"searchField.error"));
} else if ((getSearchField().equals("email") == true)
&& (ValidateFormat.isValidEmail(getName()) == false)) {
errors
.add("validAccountEmail", new ActionError(
"validEmail.error"));
} else if ((getSearchField().equals("phonenumber") == true)
&& (ValidateFormat.isValidPhoneNoFormat(getName()) == false)) {
errors.add("validPhoneFormat", new ActionError(
"validPhoneFormat.error"));
if ((getSearchField().equals("searchallfields"))
&& ((ValidateFormat.isValidText(getName()) == false)
&& (ValidateFormat.isValidEmail(getName()) == false) && (ValidateFormat
.isValidPhoneNoFormat(getName()) == false))) {
errors.add("validNameEmail",
new ActionError("validNameEmail.error"));
return errors;
Action class:
package com.finocus.cam.struts.action;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.finocus.cam.db.CAMDbAccess;
import com.finocus.cam.struts.bean.DetailsForm;
public class DetailsAction extends org.apache.struts.action.Action implements
com.finocus.cam.common.CAMConstants {
private final static String LOG_TAG = DetailsAction.class.getName() + ".";
// Global Forwards
public static final String GLOBAL_FORWARD_search = "login";
// Local Forwards
public static final String SUCCESS_search = "success";
private boolean dumpRequestParams = true;
public DetailsAction() {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
System.out.println("SearchAccount execute() is called");
HttpSession session = request.getSession(true);
ArrayList results = null;
DetailsForm search = (DetailsForm) form;
String name = search.getName();
String searchField = search.getSearchField();
String searchCriteria = search.getSearchCriteria();
// Dumping the values of input patameters
if (dumpRequestParams == true) {
request.setAttribute("SearchCriteria", searchCriteria);
request.setAttribute("SearchField", searchField);
request.setAttribute("Text", name);
search.dumpValues();
// Perform search based on what criteria and search Field was entered.
CAMDbAccess dbAccess = CAMDbAccess.getInstance();
if (null != searchCriteria && searchField != null) {
System.out.println("Search Criteria =" + searchCriteria
+ "Selected Option =" + searchField);
if (searchCriteria.equals(Search_Account) && searchField != null) {
results = dbAccess.searchByAccountInfo(name, searchCriteria,
searchField);
System.out.println(" Search criteria :Exact Match was selected.<BR>");
// Place search results in SearchForm for access by JSP.
search.setResults(results);
// Forward control to this Action's input page.
return mapping.findForward(SUCCESS_search);
My jsp page:
<%@ taglib uri="/WEB-INF/tld/struts-bean" prefix="bean" %>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic-el" %>
<%@ taglib uri="/WEB-INF/tld/struts-html" prefix="html" %>
<html:html>
<head>
<title>Search Page</title>
</head>
<body colorants="LightGreen">
<table width="100%" bgcolor="LightGreen">
<tr>
<td align="left"><font color="brown"><h3><b>Search Info</b></h3></font><hr></td>
</tr>
<tr>
<td align="left"><h4><font color="brown"><b>Search Text:</b></font><%=request.getAttribute("Text")%></h4></td>
</tr><tr>
<td align="left"><h4><font color="brown"><b>Search Field:</b></font><%=request.getAttribute("SearchField")%></h4></td>
</tr><tr>
<td align="left"><h4><font color="brown"><b>Search Criteria:</b></font><%=request.getAttribute("SearchCriteria")%></h4></td>
</tr><tr>
<html:form action="/results.do">
<td><center><html:submit value="AllSearchOptions " /></center></td>
</html:form>
</tr>
<tr>
<td align="left"><font color="brown"><hr><h2><b>Search Results</b></h2></font></td>
</tr>
<tr>
<td>
<table border="1" cellspacing="1" cellpadding="3" width="70%"
bgcolor="white">
<logic:present name="searchbyaccount" property="results">
Results exists
<c:if test="${size==0 }">
<center><font color="red"><b>No Results Found</b></font></center>
</c:if>
<br>
<c:if test="${size>0}">
Size is greater than ZERO
<table border="1" cellspacing="1" cellpadding="3" width="70%"
bgcolor="white">
<tr>
<th>Customerid</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>phone Number</th>
<th>Details</th>
</tr>
<c:forEach var="result" items="${results}">
<c:out value="${result}"/>
<tr>
<td><bean:write name="result" property="customerid"></bean:write></td>
<td><bean:write name="result"
property="accountAdminFirstName"></bean:write></td>
<td><bean:write name="result"
property="accountAdminLastName" /></td>
<td><bean:write name="result" property="accountability" /></td>
<td><bean:write name="result" property="accountAdminPhone" /></td>
<td><html:form action="/accountDetails.do">
<html:submit value="Details" />
</html:form></td>
</tr>
</c:forEach>
</table>
</c:if>
</logic:present>
</table>
</td>
</tr>
</table>
</body>
</html:html> Please refer me where i done a mistake.Thanks in Advancehi all,
I am doing programs in sturts. My program
My program purpose is to retrieve data from the
database.My database is MySql. I know that we can
write connection code in Action Class, it is ok for
some less prog's if i want to use the sane connection
code in more Action Classes it is vasting time and
so.I don't think it's a good idea to put database code in Action classes. (That's one of the biggest drawbacks of Struts - it's completely tied to Actions, HTTP, and the Web.) Better to move that code into plain old Java objects and let the Actions call them.
You'll be able to test them without the container or Struts, and you'll be able to reuse those objects in other, non-Web contexts.
So i want to use <data-sources> tag that is available
in struts-config.xml. I know that thre is tag withThis is the wrong place to configure a connection pool, too. Struts should have nothing to do with it. What if you change Web frameworks to WebWork or Spring? The connection pool should be configured in the container that hosts your app, not Struts.
this name, but the problem is i don't know how to use
this tag. If any budy know how to use this please
tell me the syntax or any example.
plese... reply soon..Don't do it. Think about doing it in your container, not Struts.
%
Maybe you are looking for
-
HT204053 How do I stop the pop up for sign into iCloud?
I Get a pop up every 10 seconds. how can I cancel it?
-
Access data from a third party warehousing tools in BEx WAD
Hi, I would like to know whether it's possible to access data from a third party warehousing tools ( For eg: Cognos) in BEx Web Application designer. Any help would be appreciated. Thanks
-
I have Thunderbird AB Sync Free app and can't seem to get it to work.
I need to sync mail from a tablet where Thunderbird is set up and working to another device. Preferably my android phone or another tablet. So I found the Thunderbird AB Sync app and entered in the connection data. When I begin searching on the devis
-
Hola Simplemente pasaba para desearles un feliz año a todos. Que sea con salud y dinero. Más dinero que salud, porque como dicen por acá, la salud va y viene, pero el dinero escasea.
-
Hi All, Environment - Production and Disaster Recovery Centre have a active passive cluster on solaris 10. Oracle version - Oracle 11gR2. Want to Set up Physical Standby and configure a DG Broker to manually manage the DG. I have gone through the ste