Results 1 to 5 of 5
- 12-30-2009, 09:01 PM #1
Senior Member
- Join Date
- Oct 2008
- Posts
- 116
- Rep Power
- 0
how from an Access Currency field I populate a hidden field
The above found to give errors... how from Access Currency field like price=Java Code://out.println("<input type=\"hidden\" name=\"price" + plantNo + "\" value=\"" + rs.getString(5) + "\">");
rs.getString(5)
I populate a hidden field ? How do it in MySQL ?
Servlets upon compilation(or update) needed server restart to rerun (updated) ?
- 12-31-2009, 12:17 PM #2
Senior Member
- Join Date
- Oct 2008
- Posts
- 116
- Rep Power
- 0
make it more clear rs.getString(5)-nowork/"8.9"-work
if I insert
rs.getString(5) // field5 = currency field MS-Access DB
it doesn't work, but if insert
"8.9"
work in value of hidden field , where error ?
out.println("<input type=\"hidden\" name=\"price" + plantNo + "\" value=\"" + rs.getString(5) + "\">"); // "8.9"
- 12-31-2009, 12:27 PM #3
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Don't try to output HMTL from servlets like that.
Use a JSP for the presentation. After collecting the results from a helper class whose methods are called from the servlet, set the results as request attributes in the servlets and let the servlet route to a JSP. You would then retrieve these attributes in the JSP and present the values.
- 12-31-2009, 04:59 PM #4
Senior Member
- Join Date
- Oct 2008
- Posts
- 116
- Rep Power
- 0
may problem above be in the DATA, I have:
total+=Double.parseDouble(request.getParameter("pr ice"+i))*Integer.parseInt(request.getParameter("pl antQuantity"+i));
somewhere in the doPost executed after submit form with hidden:
out.println("<input type=\"hidden\" name=\"price" + plantNo + "\" value=\"" + rs.getString(5) + "\">"); // "8.9"
As you say SOLUTION: how transfer from servlet to JSP request attributes/data ? Also how in servlet forward or transfer control to JSP...?
- 01-17-2010, 11:13 PM #5
Senior Member
- Join Date
- Oct 2008
- Posts
- 116
- Rep Power
- 0
I include servlet, get data from:this is textbook problem (self solve not instructed)
Please answer asap.... this is textbook problem (self solve not instructed)...
I include[attach] whole servlet, get data from:
<body>
<form action="/Webdbt/flowerpower" method="get">
<p>
<h3>Choose your favorite color and click Submit Answer!!</h3>
<select name="choiceColor">
<option value="Peach">Peach</option>
<option value="Pink">Pink</option>
...............................................
MS-ACCESS DATABASE and field:5, is of currency type. UNDER TOMCAT.
Similar Threads
-
Entity - Field-Based Access Vs Property Based Access
By CatchSandeepVaid in forum Enterprise JavaBeans (EJB)Replies: 3Last Post: 11-02-2009, 07:18 PM -
Field type
By code_worm in forum New To JavaReplies: 15Last Post: 10-21-2009, 03:03 PM -
Method access or field access
By carderne in forum New To JavaReplies: 2Last Post: 12-06-2008, 06:20 PM -
Search field in the browser
By sandeeprao.techno in forum Advanced JavaReplies: 4Last Post: 06-07-2008, 07:37 AM -
Regarding Text Field
By adeeb in forum AWT / SwingReplies: 1Last Post: 06-05-2008, 11:01 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks