How to manipulate data in AS400 using JSP?
hi i am developing a system and i am using JSP with AS400 as its database.
My question in how am i be able to access the data from the database to the pages?
How can i also manipulate the data in the database using JSPs?ex..add,edit,delete
Can anyone help me about it..it would be better if i got to see some sample codes.
Now then first of all lets come back to origination of specification
to me AS 400 is a product technology from IBM.
IBM offers solutions for operating on respective platform using a specific Application Programming Environment and if you are looking for a solution using Java Environments the below PDF / articles might have to serve your need.
http://www.redbooks.ibm.com/pubs/html/as400/v4r5/ic2924/info/java/rzaid/java400.pdf
http://search400.techtarget.com/tip/1,289483,sid3_gci537120,00.html?FromTaxonomy=%2Fpr%2F2fa
http://publib.boulder.ibm.com/iseries/v5r1/ic2924/index.htm?info/rzahh/javadoc/RLReadFileExample.html
http://publib.boulder.ibm.com/infocenter/iadthelp/v6r0/index.jsp?topic=/com.ibm.etools.iseries.javatools.doc/tasks/t4over.htmand if you are looking for a open source solution the below project library might intrest you
http://jt400.sourceforge.net/Hope that might help :)
REGARDS,
RaHuL
Similar Messages
-
How to put data into textbox using JSP
How can I put data into a textbox using JSP?
This code prints to a html page but I want it inside an text area:
// Print out the type and file name of each row.
while(ftplrs.next())
int type = ftplrs.getType();
if(type == FtpListResult.DIRECTORY)
out.print("DIR\t");
else if(type == FtpListResult.FILE)
out.print("FILE\t");
else if(type == FtpListResult.LINK)
out.print("LINK\t");
else if(type == FtpListResult.OTHERS)
out.print("OTHER\t");
out.print(ftplrs.getName() +"<br>");
}I have tried with the code below:
<textarea name="showDirectoryContent" rows="10" cols="70">
<%
// Print out the type and file name of each row.
while(ftplrs.next())
int type = ftplrs.getType();
if(type == FtpListResult.DIRECTORY)
%>
<%= "DIR\t" %>
<% else if(type == FtpListResult.FILE) %>
<%= "FILE\t" %>
<% else if(type == FtpListResult.LINK) %>
<%= "LINK\t" %>
<% else if(type == FtpListResult.OTHERS) %>
<%= "OTHER\t" %>
<% String temp = ftplrs.getName() +"<br>");
<%= temp > <br>
%>
</textarea>I get the following error:
Location: /myJSPs/jsp/grid-portal-project/processviewfiles_dir.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated.
C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\processviewfiles_dir_3.java:151: 'else' without 'if'.
else if(type == FtpListResult.FILE)
^
C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\processviewfiles_dir_3.java:165: 'else' without 'if'.
else if(type == FtpListResult.LINK)
^
C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\processviewfiles_dir_3.java:179: 'else' without 'if'.
else if(type == FtpListResult.OTHERS)
^
C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\processviewfiles_dir_3.java:193: ';' expected.
String temp = ftplrs.getName() +"");
^
4 errors, 1 warning
at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:898)
at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:733)
at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506)
at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:875)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
at java.lang.Thread.run(Thread.java:536)
Please help???Yes indeed this works:
<textarea name="showDirectoryContent" rows="10" cols="70">
<%
// Print out the type and file name of each row.
while(ftplrs.next())
int type = ftplrs.getType();
if(type == FtpListResult.DIRECTORY)
{%>
<%= "DIR\t" %>
<%} else if(type == FtpListResult.FILE) {%>
<%= "FILE\t" %>
<%} else if(type == FtpListResult.LINK) {%>
<%= "LINK\t" %>
<%} else if(type == FtpListResult.OTHERS) %>
<%= "OTHER\t" %>
<%= ftplrs.getName() %>
<%
%> -
How to retrieve data (xml file) using jsp
I am a newbie to xml. I have decided to store my information in the xml file. may I know how can I retrieve my information from the xml file?
Thanx in advance.I am a newbie to xml. I have decided to store my
information in the xml file. may I know how can I
retrieve my information from the xml file?
Thanx in advance.You can get the information from the XML file using one of the parsers available, such as Xerces http://xml.apache.org, and JDOM as an API.
Using this you have the option of having a SAXParser or a DOMParser.
SAX (Simple API for XML) is an event based parser, so if you know the XML structure, and need to find a certain element, you can just look for the element name,and retrieve the value of the element, it's attributes and its children.
DOM(Document Object Model)represents the XML as a tree, but uses more resources as it stores the entire tree in memory. But it is good in that you can traverse the whole tree.
JDOM would be a good idea too. If you download this, you can use it's API, which is very good, that will use the parser on your system (Xerces). I would definately recommend JDOM. -
How to upload data into IT0000 using ABAP-HR program
Hello,
I'm required to upload data into multiple infotypes [IT000, 0001, 0002, etc] using single input text file. Can anyone able to guide me, how to upload data into IT0000 using ABAP program ?
Thanks in advance.
Regards
Prabhakar.
Message was edited by:
Prabhakara MuthyalExample code for HR_MAINTAIN_MASTERDATA to COPY IT0002
DATA: INT_0002_FINAL TYPE STANDARD TABLE OF PA0002 WITH HEADER LINE.
DATA: VALUES LIKE PPROP OCCURS 10 WITH HEADER LINE,
RETURN LIKE BAPIRETURN1,.
LOOP AT INT_0002_FINAL.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-PERNR'.
VALUES-FVAL = INT_0002_FINAL-PERNR.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-BEGDA'.
VALUES-FVAL = INT_0002_FINAL-BEGDA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-ENDDA'.
VALUES-FVAL = INT_0002_FINAL-ENDDA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-nachn'.
VALUES-FVAL = INT_0002_FINAL-NACHN.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-gblnd'.
VALUES-FVAL = INT_0002_FINAL-GBLND.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-vorna'.
VALUES-FVAL = INT_0002_FINAL-VORNA.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-rufnm'.
VALUES-FVAL = INT_0002_FINAL-RUFNM.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-name2'.
VALUES-FVAL = INT_0002_FINAL-NAME2.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-inits'.
VALUES-FVAL = INT_0002_FINAL-INITS.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-famst'.
VALUES-FVAL = INT_0002_FINAL-FAMST.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-gbdat'.
VALUES-FVAL = INT_0002_FINAL-GBDAT.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-sprsl'.
VALUES-FVAL = INT_0002_FINAL-SPRSL.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-anzkd'.
VALUES-FVAL = INT_0002_FINAL-ANZKD.
APPEND VALUES.
VALUES-INFTY = '0002'.
VALUES-FNAME = 'P0002-natio'.
VALUES-FVAL = INT_0002_FINAL-NATIO.
APPEND VALUES.
* maintain master data
CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
EXPORTING
PERNR = INT_0002_FINAL-PERNR
ACTIO = 'COP'
BEGDA = INT_0002_FINAL-BEGDA
* ENDDA = INT_0002_FINAL-ENDDA
SUBTY = SPACE
NO_ENQUEUE = SPACE
DIALOG_MODE = '0'
TCLAS = 'A'
IMPORTING
RETURN1 = RETURN
TABLES
PROPOSED_VALUES = VALUES
* MODIFIED_KEYS =
EXCEPTIONS
OTHERS = 1.
IF RETURN IS INITIAL.
WRITE:/' Done....'.
ELSE.
WRITE:/ RETURN-ID, RETURN-TYPE, RETURN-NUMBER, RETURN-MESSAGE_V1, RETURN-MESSAGE_V2, RETURN-MESSAGE_V3, RETURN-MESSAGE_V4.
ENDIF.
CLEAR VALUES.
REFRESH VALUES.
ENDLOOP. -
How do i display Jasper Report Using Jsp
Hi,
Can anyone give me the code snippet of how to display a jasper report using jsp
Thanx in advance
--HJasperReport jasperReport =
JasperCompileManager.compileReport(file);
JasperPrint jasperPrint = JasperFillManager.fillReport(
jasperReport, null, conn);
JasperExportManager.exportReportToHtmlFile(
jasperPrint, tDest);
JasperViewer.viewReport(jasperPrint);
//replace file -> .jrxml file source path
conn -> database connection name
tDest -> .html file destination -
How to retrieve data from MDM using java API
hi experts
Please explain me the step by step procedure
how to retrieve data from MDM using java API
and please tell me what are the
important classes and packages in MDM Java API
thanks
ramuHi Ramchandra,
You can refer to following links
MDM Java API-pdf
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d18d355-0601-0010-fdbb-d8b143420f49
webinr of java API
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/89243c32-0601-0010-559d-80d5b0884d67
Following Fourm Threads will also help.
Java API
Java API
Re: usage of java API ,
Matching Record
Need Java API for Matching Record
Thanks and Regards,
Shruti.
Edited by: Shruti Shah on Jul 16, 2008 12:35 PM -
How to avoid data repetation when using select statements with innerjoin
how to avoid data repetation when using select statements with innerjoin.
thanks in advance,
satheeshyou can use a query like this...
SELECT DISTINCT
frg~prc_group1 "Product Group 1
frg~prc_group2 "Product Group 2
frg~prc_group3 "Product Group 3
frg~prc_group4 "Product Group 4
frg~prc_group5 "Product Group 5
prc~product_id "Product ID
txt~short_text "Product Description
UP TO 10 ROWS
INTO TABLE l_i_data
FROM
Joining CRMM_PR_SALESG and
COMM_PR_FRG_ROD
crmm_pr_salesg AS frg
INNER JOIN comm_pr_frg_rod AS prd
ON frgfrg_guid = prdfragment_guid
Joining COMM_PRODUCT and
COMM_PR_FRG_ROD
INNER JOIN comm_product AS prc
ON prdproduct_guid = prcproduct_guid
Joining COMM_PRSHTEXT and
COMM_PR_FRG_ROD
INNER JOIN comm_prshtext AS txt
ON prdproduct_guid = txtproduct_guid
WHERE frg~prc_group1 IN r_zprc_group1
AND frg~prc_group2 IN r_zprc_group2
AND frg~prc_group3 IN r_zprc_group3
AND frg~prc_group4 IN r_zprc_group4
AND frg~prc_group5 IN r_zprc_group5.
reward it it helps
Edited by: Apan Kumar Motilal on Jun 24, 2008 1:57 PM -
How to Call Custom BPEL Process using JSP
Hi All,
I m not able to find out the way " How to deploy Custom BPEL process using JSP." Suppose I m Designing my custom BPEL process , and I want to call process through JSP.
In order to call the BPEL process using JSP I may get the Reference from Oracle guide, But it is for Existing Example like Hello world, Order Booking.
But I am facing the problem in order to call the Custom BPEL process.
In case of Oracle Example it looks Simple but How to call Custom BPEL process using JSP.
Please help me.
Thanks&Regards
Devesh Mishrahi
The BPEL Developer guide give the way to Locate the service.can you please specify where you are getting the problem.
Thanks,
Sivakumar -
Displaying data in xml using jsp
how do we display data in database from jsp using xlst format in xml browser view
how do we display data in database from jsp using xlst
format in xml browser viewRefer this Post
http://forum.java.sun.com/thread.jsp?forum=45&thread=482077&tstart=0&trange=15
-Regards
Manikantan -
How to open jxl workbook directly using JSP...??
Dear Friends,
I have created an object for "jxl.write.WritableWorkbook" in my action class, suppose let's say "objWB"
now I can write this object to a file using objWB.write(), If I write to a file I am able to open it using FileInputStream
but I don't have permissions on my client machine
so is there any way, where I can open it directly using JSP.
Thanks in advance..
GP
Don't think be happyDon't think, be happy eh? How can you be happy if you have no capacity to register it?
In any case, to "open" a document in any web environment, you write the binary data to the response with the correct content-type set. If for example you set the content-type to "application/ms-excel" and on the client computer a program is registered to handle that content type, the document might be opened directly in that application. If there is no application registered to handle the content-type, a download of the file is usually offered.
Do a google search for popular content-type values. I'm sure you can also find examples on how to output a binary file to the response. You are already almost there, in stead of writing the data to the fileoutputstream, write it to the outputstream of the response object in stead. -
How to Export data from webdynpro using Jecxcel
Hi ,
Can anyone help me how to export data from web dynpro using Jexcel. kindly send me the related links.
ThanksHi Sandeep,
Have you refered in the blogs?
U can find may more document related to this.the below blog helps u in
Exporting Data from Web Dynpro in Different Formats Using Open Source (POI, JExcel, iText) APIu2019s.
https://www.sdn.sap.com/irj/sdn/index?rid=/library/uuid/b030e7fb-2662-2b10-0dab-c4aa52c3550b
Regards
Supraja -
How to upload data for me01 using lsmw recording method
*dear expert please tell me the complete procedure for how to upload data in me01 transaction using lsmw recording method.
Moderator Message: Duplicate post locked.
Edited by: Vinod Kumar on May 8, 2011 7:56 PMHi,
To be honest I don't understand your question. When You execute LSMW and create project, then all steps are shown in a very clear way with good description. With which one you have problems?
Best regards
Marcin Cholewczuk -
How to upload an html file using jsp and jdbc
Hi,
im trying to upload an html page using JSP and jdbc. but of no success.
my aim is to keep some important html pages in the database.the file size can vary.the file has to be selected from a local machine (through the browser) and uploaded to a remote machine(where the databse resides).
any help/sample code or pointer to any helpful link is appreciated.
thanks in advance
javajar2003When uploading a file, I use a byte array as a temporary buffer..
So, you should then be able to store the byte array in the
database as binary data.
example>
//Temporary Buffer To Store File
byte[] tmpbuffer = new byte[860];
//Some Code To Upload File...
//File Should Now Be In Byte Array
//Get DB Connection and execute Prepared Statement
Connection con=//GET DB CONNECTION;
String sql=insert into TABLE(page) values(?);
PreparedStatement ps=con.prepareStatement(sql);
ps.setBytes(1,tempbuffer);
ps.executeUpdate();
//Close PS and Free DB Connection
..... and this method looks like you dont even have
to store the file in a byte array, you can just give
it the input stream.
ps.setBinaryStream(int, inputStream, int);
You may have to make several attempts at this. I have
uploaded a file and temporarily stored it in a byte array,
but have never from there stored it in the DB as binary
data.. but this looks like it'll work.
Good Luck! -
How to create Reports and Forms using JSP
Hi,
How to create reports using JSP. And how many types of reports can be created using JSP.Can anyone explain with example please.
Thanks,
Vijayalakshmi.MHere is some code that creates xml for any SQL that returns a ResultSet. Note this uses my default out-of-the-box XML template, but you can quickly create and use your own templates to generate xml to look anyway you desire.
FormattedDataSet fds=FormattedDataSet.createInstance();
Map miscData=new HashMap();
map.put("rootElement", "musicgroups");
String xml=fds.getFormattedDataSet("select * from groups", miscData, "xml1");
String xml has the value:
<musicgroups>
<row rowID='1'>
<group_id>1</group_id>
<group_name>Rolling Stones</group_name>
<type>Rock</type>
</row>
<row rowID='2'>
<group_id>2</group_id>
<group_name>Beatles</group_name>
<type>Rock</type>
</row>
<row rowID='3'>
<group_id>3</group_id>
<group_name>Led Zepplin</group_name>
<type>Rock</type>
</row>
</musicgroups>steve -
http://www.fdsapi.com - The easiest way to generate dynamic HTML and XML
http://www.jamonapi.com - A performance tuning and scalability measuring API -
How to get a dynamic pages using jsp?
actually using jsp we create static pages.
My question is whether it is possible to create dynamic pages. ie the page should reflect changes without refreshing or reloading. for example we have date timings frequently updated without refreshingRead Beginning JSP from WROX Press. It is a good book for developing dynamic JSP using all latest technologies.
Maybe you are looking for
-
BPM 11g install and configuration with Webcenter
Hi, I am new to this BPM so need some help in installation. Where can I download the latest version of BPM 11g and for installating it what steps do I need to follow. Also I need to integrate Webcenter also so for webcenter integration what do I need
-
Problems working with different types of aggregation in two facts table
Hello every Body!! Greetings from Brazil.. At fisrt I'd like to say that I've tried to find some thead with the same problem, but I've foud no answere. That is why I'm typing this new post. Here we go ... I've a Fact table with one metric and two deg
-
Linking jsp with Crystal reports
i want to generate a report(using CR) from database (SQL SERVER) using my jsp coding...could anyone tell me such tutorial or a simple code.. also tell me where i can find CRYSTAL REPORT 10. i have to use that thanks
-
I used to have icloud on my macbook and it now appears I have mobileme? I was hoping someone could assist me with how I can get icloud set back up on my macbook.
-
Stories: Too much time between chapters in playlist.
Hi, There's anyone knows how to eliminate the pause that occur in between chapters in a playlist of a Story? I've been making a long movie dvd with lot of chapters and create more stories from that. At the moment of jump between chapters (as I decide