JSP screens at runtime

how can i create JSP screens at runtime with just an XML file. this is my project for the college. actually i'm new to jsp and xml. i've got a mail which was sent by the guide to me. if u can understand what they are trying to explain, then plz help me out.
following is the description of my project as given by my guide.
Framework is designed to customize user needs in Less programming time and deliver with standard. Any Web based enterprise project requires maintenance of masters. These Operations at times have no business logic. Framework deals with such type of operations creating screens for programmer with just an XML file.
In Framework request in the form of parameter is sent to Centralized Servlet.
<< Mention entries in web.xml >>
Servlet reads the value of parameter by name "command". Servlet identifies the command and gets the respective handler and process the request in handler. A Handler is skeletal for servlet, which process the required logic for respective command. Handler helps in forwarding the request to another jsp through Servlet��s Request Dispatcher
The below points can help u all in devloping the project, I mean the format and tags etc. Use this as the basis and try to search in the net to explore more on XML and develop u'r project.
The XML file format is as follows:
1. XML file.
XML file name should be same as table name.
For Eg:- If master maintenance screen has to be created for the table coursemaster, then the XML file name should be coursemaster.xml
2. XML file structure.
It has starting node by name Root. Which indicates parent node.
<Root type = "ca" >
Next specifies the child node under Root, which should be similar to the XML file name.
<coursemaster type = "cp" >
To specify the user-friendly module name, which can be displayed in UI screen. You need to use
<Module name="coursemaster" col="2" />
Note:
The value, which you specify under name attribute, should be the value that is present in language properties file, which helps in displaying the heading in respective languages like German, English, Korean etc.
The attribute col="2" specifies number of columns that the screen should display UI controls. The value specified should be only multiples of 2, i.e. 2,4,6,8 etc.
All the field names , the order in which they occur, and fields used to list on screen for search page should be specified between <Attribute></Attribute> nodes.
To specify order of controls that should occur on screen.
<Order value="vccourseid,vccoursename,vcduration,vccredits,ifee" />
Note:
Fieldnames are separated by commas.(These are the fieldnames present in table)
There should not be space between a comma and fieldname.
To specify fields for querying.
<QryResAttrs value="vccompanycode,vcunitcode,vcitemcode,dtvalidfrom,dtvalidupto" />
Note:
Here the fields, which are keys, and the fields, which are required through out the module, should be specified. First half should contain keys and then followed by fieldname for the rest of module.
To specify type of controls for all fields and there property.
The control properties are specified in <Attr> node with following attributes to specify properties.
Name �� Value should be similar to fieldname in table and one of the attribute in Order node.
Label �� Used to represent label on the screen, should be present in language properties file.
Display �� control type, the following list of controls are present in e-easy framework.
Design Algorithm:
Step 1: In ��Framework��, request in the form of parameter is sent to Centralized Servlet.
Step 2: The Servlet reads the value of parameter by the name ��command��.
Step3: Servlet identifies the command and gets the respective handler and processes the request in handler.
Step 4: Handler helps in forwarding the request to another JSP through Servlets Request Dispatcher.
As soon as Servlet reads the parameter value for ��command��, it accesses AppMap.xml, which stores all information about command values, the respective handler and JSPs. The java class, which reads the contents of AppMap.xml and gets respective information through meaningful methods, is ApplicationMap.class. The structure of AppMap.xml is as follows.
<command handler= ��handler_name�� jsp= ��JSPname.jsp��>
The JSPs used in ��The Framework��:
As the Controls are unknown, Display is unknown; Jsps puts the task to Tag Libraries to create Body for the jsps.
When a request is forwarded to jsp, the jsp executes the TagLibrary present in it. Tag libraries are present in taglib folder in Web-Inf directory as reports.tld file.
Class files for Respective Tag libraries and their actions.
To provide heading to JSP page table.
TagLibrary name is heading.
Java file is com.ample.tag.FormHead.java
<tag>
<name>heading</name>
<tagclass>com.ample.tag.FormHead</tagclass>
<info> Tag for displaying form </info>
</tag>
To provide title to JSP page.
<tag>
<name>title</name>
<tagclass>com.ample.tag.FormTitle</tagclass>
<info> Tag for displaying title </info>
</tag>
To generate Body for JSP with Controls depending on particular table in database:
<tag>
<name>form</name>
<tagclass>com.ample.tag.FormTag</tagclass>
<info> Tag for displaying form </info>
</tag>
To generate label for jsp Controls depending on particular table in database:
<tag>
<name>label</name>
<tagclass>com.ample.tag.FormLabel</tagclass>
<info> Tag for displaying label</info>
</tag>
For example displaying ADD page, to add a record to database.
All Form actions are carried out by tag library ��form�� which calls com.ample.tag.FormTag. Depending on ��command�� from servlet, respective jsps are displayed, which goes to FormTag with body message. In this case, Command=��create�� body message = CRE_USR . FormTag will read this message, and calls respective method to perform the task. The method reads the xml content with all specifications, and generates page writing back to page context of jsp.
Xml file for coursemaster.xml
<?xml version="1.0" ?>
<Root type="ca">
<coursemaster type="cp">
<Module name="coursemaster" col="2" />
<Key name="vccourseid" type="general" />
<Attribute>
<Order value="vccourseid,vccoursename,vcduration,vccredits,ifee" />
<QryResAttrs value="vccourseid,vccoursename,ifee" />
In the xml file, Query Attributes are
<QryResAttrs value="vccourseid, vccoursename, ifee" />
<Attr name="vccourseid" label="courseid" display="text" type="rp" format="String" width="24" table="coursemaster" read="+" write="+" update="-" query="+" jsfunc="isAlphanumeric" errmessage="Should be a String" align="right" />
<Attr name="vccoursename" label="coursename" display="text" type="rp" format="String" width="24" table="coursemaster" read="+" write="+" update="+" query="+" jsfunc="isAlphanumeric" errmessage="Should be a String" align="center" />
<Attr name="vcduration" label="duration" display="text" type="rp" format="String" width="24" table="coursemaster" read="+" write="+" update="+" query="+" jsfunc="isAlphanumeric" errmessage="Should be a String" align="center" />
<Attr name="vccredits" label="credits" display="text" type="p" format="String" width="24" table="coursemaster" read="+" write="+" update="+" query="+" jsfunc="isAlphanumeric" errmessage="Should be a String" align="center" />
<Attr name="ifee" label="fee" display="text" type="p" format="integer" width="24" table="coursemaster" read="+" write="+" update="+" query="+" align="center" jsfunc="isInteger" errmessage="Should be a Integer" />
</Attribute>
</coursemaster>
</Root>

Could it be that your import should state the package only, and not the class and therefore your're confusing the compiler?
Example:
From:
<%@ page import="com.aquitecintl.procurement.item.SCItemCopyApp" %>
<jsp:useBean id="iCpy" type="com.aquitecintl.procurement.item.SCItemCopyApp" scope="session" />
To:
<%@ page import="com.aquitecintl.procurement.item.*" %>
<jsp:useBean id="iCpy" type="com.aquitecintl.procurement.item.SCItemCopyApp" scope="session" />

Similar Messages

  • Rule Author-How to use own JSP screen instead of Rule Author Customization

    hi' I am using Oracle Business Rules and creating Rule Repository using Rule Author however
    I want to use my own JSP screen for customization of Rules instead of using Rule Author customization screen.
    please tell me how to do this.
    thanks
    Yatan
    Edited by: Yatanveer Singh on Jan 29, 2009 5:19 AM

    oracle provides API to edit rule repository programmatically. To use your custom JSP pages you need to write your wrapper classes over following oracle rule API classes:
    oracle.rules.sdk.editor.ruleset.Rule
    oracle.rules.sdk.editor.ruleset.RuleSet
    oracle.rules.sdk.editor.ruleset.Action;
    oracle.rules.sdk.editor.ruleset.AdvancedExpression;
    oracle.rules.sdk.editor.ruleset.Expression;
    oracle.rules.sdk.editor.ruleset.Pattern;
    oracle.rules.sdk.editor.ruleset.SimpleTest
    Once you create wrapper you can use them as pojos to build your custom rule author screen.

  • Replacement of OAF LOV with Java\JSP screens?

    Hi All,
    Am facing performance issue in one of my LOV. Query has been tuned at its best but still behaving worse.
    Got an idea of embed\invoke the jsp\java screens which can query the data faster. If anyone had already tried this, please let me know your experience. Or If you foresee any impact due to this design,please throw your opinion on this. Thanks.
    Regards, Soorya

    I would suggest to tune at the OAF side if query is already tuned.
    There are many parameters on VO wizard that can be used to tune the performance of LOV VO.
    Advanced View Object Techniques:
    •Section 35.2, "Tuning Your View Objects for Best Performance"
    http://docs.oracle.com/cd/E15051_01/web.1111/b31974/bcadvvo.htm

  • Unable to change .jsp file at runtime using weblogic 8.1 server

    Hello all,
    I'm running weblogic 8.1 and the development environment is workshop.
    I have several .jsp files in the application.
    when the server is running and I try to change the .jsp file and access it throw the browser, I'm getting compilation errors and when I copy the original file again everything is OK.
    I'm gessing the problem occurs due to the date of the new .jsp file(if I compile the .jsp file it creates a new servlet with newer date then the file generate when compiling the application before running the server).
    Your advice will be welcome.

    Hi Robert,
    Take a look at the SAP Note "[1553921 - Is there a utility that would help in writing database logon code?"|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%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333533353333333933323331%7D.do]
    The utility provided in above SAp Note will generate the logon code for your existing report, update the logon information of the target database in the code.
    Also search for the sample application 'change database at runtime' in top right corner search box.
    Hope it helps,
    Thanks,
    Bhushan.

  • Black Screen with Runtime.exec()

    To all;
    When I do(example) Runtime.exec("C:\\Pager.exe"),
    everything works perfectly except, I have that awful
    DOS Black screen flash. I've been through most
    of this forum, there are lots of threads on the
    topic, but no solutions.
    Q. Is this fixable?
    Bruce Houghton

    No. This has been fixed in 1.4, so you could download that JRE version, or you can run from the command prompt in the first place, in which case the problem doesn't manifest.

  • Buffered output on screen using runtime.exec()

    Hi i've got the following jsp code which calls a unix shell script.. That shell script basically takes back up of a mysql database.. The problem is i've written quite a number of "echo" statements there. Now i want to print them out in the web page asynchronously i.e one by one.. What actually happens is, after the ENTIRE process has completed, i.e the long backup process, then all the messages appear at once.. I know this has got to do with buffering.. Any way to disable buffering or making the runtime call the thread synchronously? Hope any of you got my point.. help will be appreciated!..
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <%@ page import="java.io.*"%>
            <%@ page import ="java.util.*"%>     
        </head>
        <body>
            <%  int j;
                char c;           
                String databasename = (String)request.getParameter("database"); //Values that i get from the html page
                String path = (String)request.getParameter("path");           
                Runtime r = Runtime.getRuntime();
                Process p = null;
                String cmd = "backscript.sh " + databasename + " " + path;
                try {
                    p = r.exec(cmd);
                    BufferedWriter buffout = new BufferedWriter(new OutputStreamWriter(p.getOutputStream()));
                    BufferedReader br = new BufferedReader(new InputStreamReader(p.getErrorStream()));               
                    String line = "", database = null;
                    while ((line=br.readLine())!=null ){
                            out.println(line);                           
                            out.println("<br>");
                    buffout.close();
                    br.close();
                    p.waitFor();
                } catch (Exception e) {
                    e.printStackTrace();
                } finally {
                    int ret = p.exitValue();
                    if (ret == 0) {
                        out.println("<br>");                   
                }%>
        </body>
    </html>

    out.flush() will work most of the time. Setting the buffer size to none in the page directive (first line of JSP) usually works as well:
    <%@ page buffer="none" %>
    When data gets written to the client and is flushed or has no buffer then you can't forward or redirect the page, which can cause problems/weird behavior if you get an error on the page.

  • Changing the Size of A screen at runtime

    Is it possible to change the size of a screen , just before it is called, or to move it it after it has been called.
    Bascally I'm using
    CALL FUNCTION 'Z_SIM_TEST' starting new task 'PDF Spools'
    to create a new screen asynchronously, in a new session, and want the user to be aware that the older session is still there?
    Thanks.

    you can use CALL SCREEN 2009 STARTING AT x-cor y-cor ENDIGN AT x-cor y-cor to put the screen. You can change x and y coordinates.

  • Generating Jsp Page On Runtime

    I have a problem regarding generating jsp page on the run time.according to the prefrence the user selects i have to generate a jsp page.suppose 25 feilds are there to be displayed for User A then these 25 feild will be equally divide in two column one column will contain 13 row and one colunm will have 12 rows.these values come from the database and according to that value i have to make the rows and column in the jsp page.the value can be different for different users.can anyone please let me know how this is done.if there is an code example please let me know.
    Regards
    Ved

    you don't need to generate the JSP, but simply generate the HTML according to the user settings (I don't know if this was clear or not, so I have made it explicit)
    Obviusly how to achieve this could be quite complex, but you can try to generate html table according to user preferences (#columns, #rows or try to find out these infos from #total elements)
    Sorry, I've no examples for yuo
    --=> Ivan

  • How to disable an I/O field at runtime of the screen

    Hi Guru's,
    Here's the scenario..I have to diable one I/O field in the screen at runtime. If I will click one radio button, one I/O field should be disalbed. How can I do that? Please help!! I'm doing a report program, do someone have an idea how to make this work?
    Any help will be appriciated
    Thanks and regards,
    Mackoy

    Hi Morris,
    Still got no answer..here's my code below..
    selection-screen begin of block scr01 with frame title text-001.
    *& select options
    select-options: ps_matnr for mara-matnr,            "Article
                          ps_date  for mkpf-budat obligatory. "Date
    selection-screen  end of block scr01.
    selection-screen begin of block scr02 with frame title text-002 no intervals.
    parameters:  Site radiobutton group rb1,
                       Article radiobutton group rb1.
    selection-screen end of block scr02.
    *& Events
    at selection-screen on radiobutton group rb1.
      if article = 'X'.
         loop at screen.
           if screen-name = 'PS_MATNR-LOW' and screen-name = 'PS_MATNR-HIGH'.
              SCREEN-INPUT = 0.
              screen-invisible = 0.
             MODIFY SCREEN.
           ENDIf.
         ENDLOOP.
         perform display_site.
    endif.
    thanks and regards,
    Mackoy

  • Jsp calling a function in js -- object expected runtime error

    Hi,
    I have a js file. script.js
    *function popup( url ) {*
    newWin=window.open(url,'popupWindow,resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=yes');
    newWin.focus();
    void(0);
    and a jsp calling the function in js
    *<HTML>*
    *<HEAD>*
    *<SCRIPT>*
    *<jsp:include page="script.js"/>*
    *</SCRIPT>*
    *</HEAD>*
    *<BODY onLoad="javascript:popup('http;//www.google.com');">*
    *</BODY>*
    *</HTML>*
    Now when i execute the jsp, it gives runtime error -> object expected..
    Not able to figure out why this occurs.. am I doing it the right way ?

    Do you think is this the right way to include .js file...
    <SCRIPT>
    <jsp:include page="script.js"/>
    </SCRIPT>I generally do this way...
    <head>
    <script language="javascript" src = "script.js">
    </script>
    </head>

  • BW Statistics - Runtime for Variable Screen Processing?

    Hi,
    Am trying to generate key figure below
    -> Runtime (until Variable Screen generated)
    -> Runtime from Variable Screen until Report Generation
    Anyone has knowledge how to get this? I tried using 0TCT_C01/2 but i can't find any object that tells me exactly this steps. Am i missing somehting?
    Thanks
    eddie

    Thanks Josh. The statistics cube contains all the events occured when executing the report all the way to generating the report. However, we want to distinguish the runtime between selection screen generation and execution of report.
    In the stats cube, though there are all runtimes for all events, but there is no events or fields that tell me exactly where is the start and end time of these two steps i requires.
    anyone has done this before? At the end we want to achieve this report
                 Select Screen Rendering  Report Exec  Total
    Web Tmpl 1   2.5 seconds              15 seconds   17.5s
    Web Tmpl 2   1 seconds                4 seconds    5s
    thanks
    Message was edited by:
            Eddie Ng

  • JSP Programming Course Available

              Hello:
              wAppearances now offers a 5-day hands-on JSP programming course.
              Visit www.wAppearances.com for details.
              Robert Burdick
              wAppearances
              Co-author, "Professional JSP, 2nd Edition," Wrox Press.
              

    Hi Neha,
    there are two different runtime options in MI - JSP and AWT - that you already mentioned corredtly.
    Depending what dev model you choose, you have to install the related runtime. That is a logical step. Well, if you are aware, JSP pages are displayed in a browser and are hosted on a server. In our case MI client JSP runtime is that server and especially if you run the application on a small device like a PDA, you will see significant performance issues. The screen response time is something around 2-5seconds. this is due to the messages and the processing time of the different components.
    If you use AWT on the other hand, you are running it in the MI AWT client runtime and so all runs as a single application. This has a better screen response time.
    So from this perspective the decision should clearly be the AWT component. BUT!!!
    If you ever have developed an AWT app, you have noticed, that it is not that easy to develop tables for example in AWT. It is possible, but it is getting complex and slow soon. So depending on the complexity of your screens it can be soon, that JSP itself has a faster rendering time then an AWT application. And because JSP screen development is taht simple, most apps are JSP apps at the moment.
    With MI7.1 this will change. You have the possibility to use eSWT and WebDynpro for UI development as well, and so the development of MI applicartions that use les system performance for the runtime itself will be more easy.
    Hope this helps!
    Regards,
    Oliver

  • JSP Programming model for MI application development

    Hi All,
    While we are using JSP programming model for developing MI applications, there are some Pros and Cons for it.
    one of the Cons is :-
    1. JSP requires more system resources ( local web server)
    Any idea what exactly does it means ?
    2. When we use AWT as the programming model, do we need any additional resources to run this application ?
    Thanks and Regards
    Neha Mahanty

    Hi Neha,
    there are two different runtime options in MI - JSP and AWT - that you already mentioned corredtly.
    Depending what dev model you choose, you have to install the related runtime. That is a logical step. Well, if you are aware, JSP pages are displayed in a browser and are hosted on a server. In our case MI client JSP runtime is that server and especially if you run the application on a small device like a PDA, you will see significant performance issues. The screen response time is something around 2-5seconds. this is due to the messages and the processing time of the different components.
    If you use AWT on the other hand, you are running it in the MI AWT client runtime and so all runs as a single application. This has a better screen response time.
    So from this perspective the decision should clearly be the AWT component. BUT!!!
    If you ever have developed an AWT app, you have noticed, that it is not that easy to develop tables for example in AWT. It is possible, but it is getting complex and slow soon. So depending on the complexity of your screens it can be soon, that JSP itself has a faster rendering time then an AWT application. And because JSP screen development is taht simple, most apps are JSP apps at the moment.
    With MI7.1 this will change. You have the possibility to use eSWT and WebDynpro for UI development as well, and so the development of MI applicartions that use les system performance for the runtime itself will be more easy.
    Hope this helps!
    Regards,
    Oliver

  • Regarding Selection Screen field making display field  in ALV report

    Hi All,
               In ALV Report,  at runtime how can i make the field as Display Field in selection screen .
    Thks & Regds
    Shailesh

    hii,
    Go to se38 and give the below progra name execute.... check the source code it is very easy to understand.
    1.demo_dynpro_modify_simple
    2.demo_dynpro_modify_screen
    if tou are using grid,u can refer to foll link
    sequencing / choosing fields in report screen at runtime,
    Display the Columns in the grid at run time
    rgrds,
    Shweta

  • Report Parameter Default Value at runtime

    Post Author: DMiller
    CA Forum: .NET
    Hi,
    I need to be able to create new parameters at runtime and have been somewhat successful in this endeavor. I have one remaining issue that I am hoping that somebody can help me with. Let me explain.
    When you create a parameter from within the Crystal XI designer, you are able to specify a number of default values that will display as a list box at runtime. Eg. ParameterName is MaritalStatus and default values are ("Married", "Single", "Divorced" etc). There is also the ability to specify the Default Value in the Value Options area of the screen. This value could be set to any one of the default values above - let's say that I set it to "Single". By setting the Default Value, this causes the Parameter Fields screen, at runtime, to "Select" the specific default value set above - in this case "Single", instead of showing "..." as the parameter value.
    The default value setting in the Value Options is beneficial when you have reports that are usually run with certain parameter values and only occasionally these need to change. Instead of having to specify every parameter value, the user only has to set the ones that have not been defaulted or they want to change.
    So, I have been successful in creating the parameters at runtime and successfully running the report. I have been unsuccessful in setting the "Default Value" as seen in the Value Options area. I have tried a number of properties on the report parameter object and have not found anything to set this.
    Does anybody know how to set the "Default Value" as seen in the Value Options area in the designer at runtime?
    Thanks for any help.

    Post Author: JerryB
    CA Forum: .NET
    You have described my scnario to a tee.  Did you ever figure out how to get the single default value that is available in the "value options" area when working within the Crystal Reports development environment.  I am using VB.Net and have a nice report menu form and viewer but recently a user ask me to set the default value in one of my combo boxes and I have been unsuccessful in finding the correct property to use.

Maybe you are looking for