Help reading data passed as a parameter
I have a servlet which connects to a database and brings back data picked from a form. I now wish to chnage this servlet into a bean so i can call the bean and pass in parameters from another servlet something like this:
finderBean bean = new finderBean(category, price);
request.setAttribute("valid", bean); // i understand this as meaning on the jsp page i set id as valid is that correct??????????My question is in the bean i use to just use:
Category = request.getParameter("category");
price = request.getParameter("price");to get the paremeters from a form, what will i use to read the parmeters that are passed in when the bean is created now?
ok so:
finderBean bean = new finderBean(category, price);
request.setAttribute("valid", bean); // i understand this as meaning on the jsp page i set id as valid is that correct??????????
is what i use to pass the user request to the bean, its just in the bean i am having trouble can you give an example of how to pick up the category and price in the bean?
Similar Messages
-
Need Help:Reading Data from RU payroll cluster for table GRREC
Hi...
I need help on how to read data from RU cluster table for table GRREC for the employee & run date and get the value from structure PC292 .
Please let me know about the includes and the import and export statements to be used.
Thanks in advance,
RAVI.Hi,
Here goes pseudocode
Includes:
include: rpppxd00 ,
rpppxd10 ,
rpc2cd09 ,
rpc2rx02_ce , "if ldb pnp_ce is used else use the same include with out _ce
rpc2rx29 ,
rpc2rx39 ,
rpppxm00 ,
rpc2ruu0_ce ,
Declare:
DATA : i_rgdir LIKE pc261 OCCURS 0 WITH HEADER LINE ,
i_result TYPE pay99_result OCCURS 0 WITH HEADER LINE ,
i_grrec LIKE pc292 OCCURS 0 WITH HEADER LINE .
start-of-selection:
GET pernr.
Get the RGDIR VALUE for the current PERNR & selected Molga
get rgdir data TABLES i_rgdir
USING pernr-pernr
p_molga " parameter
CD-KEY-PERNR = PERNR-PERNR.
RP-IMP-C2-CU.
i_rgdir [] = rgdir[].
LOOP AT i_rgdir WHERE fpbeg LE pn-endda
AND fpend GE pn-begda
AND srtza EQ 'A'
AND void NE 'V'.
get_result_tabs TABLES i_result
USING 'RU' " US cluster
pernr-pernr
i_rgdir-seqnr
RX-KEY-PERNR = PERNR-PERNR.
UNPACK i_RGDIR-SEQNR TO RX-KEY-SEQNO.
RP-IMP-C2-RU.
i_grrec[] = i_result-inter-grrec[].
LOOP AT i_grrec.
case i_grrec.
use wage types required here and pass the data to output table.
endcase.
endloop.
endloop
end-of-selction. -
HELP! date pass to script not display in date format
hi all,
i want to include final approver date into Puchase Order, and i call up a form, getting the date from CDHDR. however, when i return the date back to the script, the date display in PO are out of date format.
original : 16.07.2007
but it shows as : 20070716
how am i going to change it to the actual proper format in script?
very thanks for the help first.hi,
but i have other date ( such as create date) which are showing correctly. the create date gets directly from table.
i tried to use the SET DATE, but there is no charge on it. my actual code is as below:
/: PERFORM GET_TEST IN PROGRAM Z_TESTING6
/: USING &EKKO-EBELN&
/: CHANGING &UDATE&
/: ENDPERFORM
PO Release Date,,&UDATE&
can only one help me. thanks -
I'm streaming data to disk in one loop, however once this finishes I'd like to read the data into power spectrum vi/Octave analysis vi in another loop. The data from the read vi is a string and power spectrum vi needs 1d waveform. Does anyone have experience with this process?
From your general description, I gather you are streaming to a text based file (comma or tab separated spreadsheet format) and would like to analyse this data with a power spectrum or octave analysis when you finish. Since you are streaming, I assume you have a lot of data. Do you have more than one channel?
In any case, you have two simple options (and lots of complex ones). You can either read the data back from disk and convert it to a 1D array (try the Read From Spreadsheet File.vi - will get a 2D array, take the first column or the column of your choice if you have more than one channel) or you can use the Spreadsheet String to Array primitive to create an array from your text data before you save it to disk.
If your data rate is slow enough, you can analyze as you acquire and store.
Taking your data as text is very inefficient. What you really want to do is read the data as binary, use that for your analysis, and use something like the Write to Spreadsheet File.vi to save text data to disk.
This account is no longer active. Contact ShadesOfGray for current posts and information. -
Help Reading parameter in VWP backing/managed bean
Hi everyone. I am working on adding a jMaki widget into my Visual Web Pack Application and need some help sending data from my jMaki widget and receiving it in my VWP backing bean.
I have been able to get the jMaki widget added by manipulating the example found on the divas blog: http://blogs.sun.com/divas/. My next step would be to be able to get the data being sent.
<a href="faces/Home.jsp?name=banana">Banana</a>Mainly how do i access the parameter "name" from my backing or managed bean in my VWP application. Any help is appreciated. Thanks.
Message was edited by:
b12si was able to resolve this. thanks anyway.
-
Failed to read data from report file, failed to read parameter object
Error message when doing a u201CSchedule List of Valuesu201D
failed to read data from report file,
c:\docume~1\user........
failed to read parameter object
Earlier in the day it worked just fine nothing had been changed.
I have admin right on the windows server and in central management console
Can someone please help with this issue.Hi Glenn
Please let us know the following:
1.What is the exact version of Crystal Reports Designer?
2.What is the version of Business objects Enterprise installed on the machine?
3.Are reports based on Business views,Deski,Webi?
4.Are the reports migrated from older version of Crystal Reports to new Version?
Thanks
Shraddha -
Is data passed back to responder a read-only copy?
I have a service that I call, adding a responder:
var modelingDataResponder:IResponder = new
ModelingDataResponder();
var modelingDataService:DataService =
EnterpriseServiceLocator.getInstance().getDataService("ModelingDataService");
var token:AsyncToken = modelingDataService.fill(myModel,
clientName);
token.addResponder(modelingDataResponder);
This causes the variable myModel to be filled. It adds a
responder called modelingDataResponder which implements IResponder.
modelingDataResponder is called when the fill completes.
My question is this. modelingDataResponder is called with
data that's a copy of the myModel object that was filled. But it
seems to be only a copy. It seems like executing code inside
modelingDataResponder that changes data fields inside the parameter
that is passed in just changes the data in a local copy, not in the
myModel object that was filled. The two objects have separate
addresses when looked at in the debugger, and changing a value in
one has no effect on the other.
So it's like the data that is passed back is a copy. The copy
can be read. Writing in the copy is OK, but it is just writing on a
copy, on on the object that was filled. Right?- Since what version of LCDS is this issue resolved?
LCDS 3.0 and above.
- Is their a Jira issue for this?
No, as we use an private bug tracking system for LCDS.
- Is a patch available?
No, sorry. You would have to work through Adobe Technical support to get a hotfix for this, and I do not believe that one exists. I would recommend upgrading to 3.1 if you can.
Tom -
Help Needed in passing parameter to cryst report
Hello everyone, I am trying to create a report for a single record and as such am trying to pass parameters to a crystal report but I am not sure exactly how to do this. This is my own method that I am employeeing. I do not want to create a data table and put all the info I need in there and then base a report off of it. I do not want to deal with loops and arrays right now. I just want to pass for example parameter JuvenileID = 1 to my crystal report, then create a command under the database expert and set the parameter for my command to the parameter I passed my crystal report. How would I go about in doing this? I am using VS 2010 C#. This is a windows application. I have a dataentry form that is already populated with the info needed for the report. I just need to pass all the controls.text values to the report and populate it that way.
I'm not sure if I fully understand the issue, but since you have all the data you need in a data entry form that is already populated, why don't you simple create an ADO .NET Dataset and pass that to the report? Much easier to implement, faster execution with the small amount of data you have and less code.
Dataset sample app is here:
https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
More info on datasets is here:
[1511438 - How to use datasets to pass data to crystal reports|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533313331333433333338%7D.do].
- Ludek -
Help Required -- Can we use SQL Query to READ data from SAP MDM Tables
Hi All,
Please help.........
Can we use SQL Query to READ(No Creation/Updation/Deletion just Read) Data from SAP MDM tables directly, without using MDM Syndicator.
Or direct SQL access to SAP MDM tables is not possible. Only through MDM Syndicator can we export data.
Thanks in Advance
RegardsAll the tables you create in Repository comes under A2i_CM_Tables in Database named as your repository name. So the tables names are fields of table A2i_CM_Tables. Now i tried it but cant make it.
Now, I dont think its possible to extract all fields in tables and there values using select query. May be pure sql guy can do that or not.
But there is no relation of data extraction and syndicator. Data is viewed in Data Manager. and you can also store data in a file from DM also.
BR,
Alok -
Help needed in reading data from a Crystal Report
I am trying to read data values from a saved crystal report. (groovy code snippet below)
I open a new ReportClientDocument and set the RAS using the inprocConnectionString property.
Then I get the rowsetController and set defaultNumOfBrowsingRecords, rowsetBatchSize and maxNumOfRecords all to 1000000
Using the browseFieldValues method after that returns only 100 records. I want to get all.
ReportClientDocument clientDocSaved;
def pathout=rc.pathToSavedReports+rr.path;
//****** BEGIN OPEN SAVED SNAPSHOT ************
clientDocSaved = new ReportClientDocument();
clientDocSaved.setReportAppServer(ReportClientDocument.inprocConnectionString);
// Open report
println("Reading file in.")
clientDocSaved.open(pathout, OpenReportOptions._openAsReadOnly);
def rowsetController = clientDocSaved.getRowsetController()
rowsetController.setDefaultNumOfBrowsingRecords(1000000)
rowsetController.setRowsetBatchSize(1000000)
rowsetController.setMaxNumOfRecords(1000000)
//setup metadata
IRowsetMetaData rowsetMetaData = new RowsetMetaData()
Fields fields = clientDocSaved.getDataDefController().getDataDefinition().getResultFields()
rowsetMetaData.setDataFields(fields)
def values = rowsetController.browseFieldValues(fields.get(0), 1000000)
values.each{value->
println(value.displayText(new Locale("ENGLISH")))
Before using the browseFieldValues method I was trying to use a rowsetCursor
//get the rowset cursor to navigate through the results
RowsetCursor rowsetCursor = clientDoc.getRowsetController().createCursor(null, rowsetMetaData)
//navigate through the rowset and log the name and value
rowsetCursor.moveTo(0)
while(!rowsetCursor.isEOF()){
Record currentRecord = rowsetCursor.getCurrentRecord()
//println("current record number: " + rowsetCursor.getCurrentRecordNumber())
for(int i=0;i<fields.size();i++){
//println("Column - "+fields.get(i).getName())
if (currentRecord.size()>0){
println(currentRecord.getValue(i))
rowsetCursor.moveNext()
the currentRecord was always an empty list and I did not get any data values at all.
Am I missing something in using these approaches?
I'm fairly new to using the Java SDK for CR. Any help will be greatly appreciated.
Thankshi, I am trying this second method to read the values from report. but all the records comming as null. Kindly help me to resolve this issue.
-
Urgent help with simple BPEL process for reading data from database
Hello there,
I need help with BPEL project.
i have created a table Employee in Database.
I did create application, BPEL project and connection to the database properly using Database Adapter.
I need to read the records from the database and convert into xml fomat and it should to go approval for BPM worklist.
Can someone please describe me step by step what i need to do.
Thx,
DpsI have created a table in Database with data like Empno,name,salary,comments.
I created Database Connection in jsp page and connecting to BPEL process.
It initiates the process and it goes automatically for approval.
Please refer the code once which i created.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.Map" %>
<%@page import="com.oracle.bpel.client.Locator" %>
<%@page import="com.oracle.bpel.client.NormalizedMessage" %>
<%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
<%@page import="javax.naming.Context" %>
<%@page import="java.util.Hashtable" %>
<%@page import="java.util.HashMap" %>
<%@ page import="java.sql.*"%>
<%@ page import= "jspprj.DBCon"%>
<html>
<head>
<title>Invoke CreditRatingService</title>
</head>
<body>
<%
DBCon dbcon=new DBCon();
Connection conn=dbcon.createConnection();
Statement st=null;
PreparedStatement pstmt=null;
Hashtable env= new Hashtable();
ResultSet rs = null;
Map payload =null;
try
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.PROVIDER_URL, "opmn:ormi://localhost:port:home/orabpel");//bpel server
env.put("java.naming.security.principal", "username");
env.put("java.naming.security.credentials", "password");//bpel console
Locator locator = new Locator("default","password",env);
IDeliveryService deliveryService =
(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
// construct the normalized message and send to Oracle BPEL Process Manager
NormalizedMessage nm = new NormalizedMessage();
java.util.HashMap map = new HashMap();
st=conn.createStatement();
out.println("connected");
String query1="Select * from EMPLOYEE";
rs=st.executeQuery(query1);
/*reading Data From Database and converting into XML format
so that no need of going to BPEL console and entering the details.
while (rs.next()){
String xml1 = "<AsynchBPELProcess1ProcessRequest xmlns='http://xmlns.oracle.com/AsynchBPELProcess1'>"+
"<Empno>"+rs.getString(1)+"</Empno>"+
"<EmpName>"+rs.getString(2)+"</EmpName>"+
"<Salary>"+rs.getString(3)+"</Salary>"+
"<Comments>"+rs.getString(4)+"</Comments>"+
"</AsynchBPELProcess1ProcessRequest>";
out.println(xml1);
nm.addPart("payload", xml1 );
// EmployeeApprovalProcess is the BPEL process in which human task is implemented
deliveryService.post("EmployeeApprovalProcess", "initiate", nm);
// payload = res.getPayload();
out.println( "BPELProcess CreditRatingService executed!<br>" );
// out.println( "Credit Rating is " + payload.get("payload") );
//Incase there is an exception while invoking the first server invoke the second server i.e lsgpas13.
catch(Exception ee) {
//("BPEL Server lsgpas14 invoking error.\n"+ee.toString());
%>
</body>
</html>
Its working fine.And i want it for Bulk approvals.please help me step by step procedure if any other way to implement this. -
Help me, How to read data from USB ???
Help me, How to read data from USB ???
If its a disk on key or some portable hard drive than once its connected to the usb and recognized by the system you can access it through java like you would access your hard drive.
-
Gurus..need help in reading data from virtual infocube
Gurus,
I have to read data from an virtual infocube...I am trying to use FM RSDRI_INFOPROV_READ to read data but it doesn't work..
I am doing exactly what has been done in the demo program RSDRi_INFOPROV_READ_DEMO...
Please help me...its really URGENT...
Thanks
samCheck out this thread....
must be helpful
Re: Read data from 0BWTC_C02 via ABAP -
Urgent help on reading data into ByteBuffer
Hi,
I am trying to read data into ByteBuffer using SocketChannel.
The following code working fine but the problem is with ByteBuffer size.
The data varies from request to request .
How do I read data into ByteBuffer with out specifing size .
The problem with size is some records has more than 500 bytes and some are less than 500 bytes.
I want to read all the data .. ( even if it has more than 500 bytes ..)
How do i solve this problem ..
Is there any way to read data dynamically from socket channel ...
Any help on this please ...
The data I have to read is in the following format ..
XXX ... yyyyy
AAA
BBBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCC
DDDDDDDDDDDDDDDDDDDDDDd
etc ...
Here is my Code:
public ByteBuffer getResponse(byte[] request) throws Exception {
int lenth = 500;
InetSocketAddress isa = new InetSocketAddress("ip", port);
SocketChannel channel = SocketChannel.open(isa);
ByteBuffer requestBuffer = ByteBuffer.wrap(request);
channel.write(requestBuffer);
ByteBuffer responseByteBuffer = ByteBuffer.allocate(length);
int num = 0;
while (num == 0 ) {
responseByteBuffer.rewind();
num = channel.read(responseByteBuffer);
channel.close();
return responseByteBuffer;
Thanks.Two possible solutions
1. Read in as many bytes as you can until you hit the EOS OR you fill the byte buffer. If you fill the buffer (try checking for BufferUnderFlowException), you could move the read bytes into a dynamically allocated memory Collection such as an ArrayList. When you hit the EOF, you could then do whatever else you need to do from then on.
2. I use this option: Implement a site local protocol for transmitting data. Provide a header first containing 2 ints (compressed size, uncompressed size - so you can also use compression when sending), and send the remainder as a payload.
Therefore
Read in the header first (always 8 bytes)
Then extract those integer values. They will tell you how much is being sent. Set you byte buffer for the payload to be the correct size for this transmission.
Reset and wait for next connection -
Missing Data in Table passed as Function Parameter
I am running a JCO server & in my handleRequest(), I am trying to get the data from the tables paased as function parameters from the SAP system.
Somehow I am not able to see any data in the tables, though the SAP system has put some data in the tables before sending.
The no. of rows in the table is 0 always on the JCO side. I tried to dunp the content of the Function & Table with writeHTML() & it shows no data too.
I am able to pass simple strings & integers, but the tables doesn't work. Can anyone tell me where might be the problem.Hi,
I am bit confused, You are not getting the data in the Function module when you make a call from Java or the data returned by the function module is not reaching the Java side. If you are not getting the data which you pass from java in the function module then I have faced this problem before.
In that case the problem was when you pass data as table parameters to the function module you have to check the size of table parameter I was using INITIAL to check if there is any data in the table parameter. If this is the same problem may be by checking the size of the table will solve your problem.
Regards,
Sesh
Maybe you are looking for
-
Multiple Archive directories in Sender file channel
Hi Experts, My requirment is to have multipple archive direcotories in Sender file channel. We have multiple source dirs e.g. c:/abc/ c:/bcd/ c:/cde/ and we want to archive the files from these source dirs to corresponding archive directories e.g. c
-
Drop down box in selection screen
Hi all, I have a requirement in which i need to display a drop down list box for some of the fields in the input selection screen like 1) status to be A) Yes b) No and the 2) Order field to be A) Not started B) In Progress C) Complete....
-
Zen Touch says its connected to PC, PC says it is
I just bought a Zen Touch 40GB player today and am pulling my hair out with it. Basically at the minute when I open up the mediasource software the Zen player will light up and claim that its docking with PC, but mediasource will show the window that
-
Hiding Topics From Search Results
I have about 7 different types of users that require different and private set of documentation. My plan is to use conditional build tags to deliver a help set for each user. I'm delivering noncontext-sensitive help and via batch processing. Later I'
-
PROBLEM connect oracle 9i with JBOSS 3.2.3 application server
i want to connect my web app to oracle9i by jboss3.2.3 . The database is on server machine in my domain and the application is on my local machine. Please help me is urgent Thanks