Which is better? single jsp or inc or diff jsp

hi,
I have 3 modes as a combo in the top of my form say new, enquiry and amend. If the user selects, new, a new screen should appear.The user can enter values and submit, so that it can be updated into the databse.
If the user selects Enquiry, getting some key fields from the user, the form should get submitted and display the result in the screen fields taking from the database.If it is amend, the user can do select and change and update the database..
In this scenaio, which one is advisable? having three different Jsps or having three different includes or working with single jsp(with bean).currently iam working with single jsp(code comes around 4000 lines + bean code comes around 1500 lines), debugging is bit tedious.
The screen has many dynamic combos, growing grids, popups generated from the grids.
Suggest me a solution.
Thanks in Advance,
Shyam

Hi , If i understood properly , u r stuck with design problems. so u follow the MVC controller technique to solve this problem. split all jsp in 4 parts or more than that if posibble. just pass the controll to the MVC object with the parameter based upon the selection of combobox. this MVC will analyse the objects parameter and based upon that will redirect to jsp's
u have to now seperate the business logic as well as the presentation logic. use Jsp's for presentation logic and for dynamic popup of the message boxes or loading combo boxes. Use JSP for business objects and use the usebean tags in the jsp's.
This will solve u r problem . try to break evry thing as simple objects as posibble. let it be even a chain of objects . it will be easy for u to debug as well as for the session management.
Good Luck.
if u need any more please feel free to mail me at [email protected]

Similar Messages

  • Which is better? PSP or JSP

    Can anybody explain, PSP is better or JSP..

    Sreenath --
    I'm sorry you found JSP to be more cumbersome than PSP. I don't entirely agree with you -- after all using JSP doesn't require the installation of a database, and the configuration of an environment to load your SQL (ie SQLPLUS) code.
    With OC4J, using JSP shouldn't require lots of downloads, setup, and configuration.
    For example, to run a JSP from having nothing on your system, all you'd need to do is:
    a) download oc4j_extended.zip from OTN (25MB).
    b) unzip it.
    c) start it, using the steps
    cd j2ee/home
    java -jar oc4j.jard) construct a JSP page using any text editor you want -- notepad, VI, emacs, ultraedit32, whatever. The below is a trivial JSP, but it's a JSP nonetheless. Save the file as test.jsp.
    <H1>Welcome to JSP!</H1>
    <B>The time is <%=new java.util.Date()%></B>
    <P>Bye Now!</P>
    e) copy test.jsp into the j2ee/home/default-web-app directory
    f) access it from a browser with http://localhost:8888/test.jsp.
    Voila! it works.
    Now to do more advanced things such as query databases, etc. will require more code of course, but the libraries required to access the database are included within the oc4j_extended.zip file you have.
    For people just starting out and wanting to do simple reports, there are even nice tag libraries you can use which will allow you to pretty define a SQL query inside the JSP page, and when run, the page will execute the SQL call and return the data.
    Have a look at :
    http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/generic.903/a97678/dataacc.htm#1004903 for an example of the SQL tag libraries we offer.
    There is also a industry standard set of tag libraries which provide database access tags. These are called JSTL and are described here:
    http://java.sun.com/webservices/docs/1.0/tutorial/doc/JSTL8.html#63722
    Overall JSP provides a very rich and flexible environment for the construction of dynamic content pages.
    cheers
    -steve-

  • Which is better - Applet or JSP?

    I am creating an appilcation. It basically will use a database to allow users to enter new records or edit existing ones. I'm taking over this project from another person, who started it as an applet but didn't get too far. I'm looking at what is better - applet or plain jsp pages. What are the pluses and minues of each?

    Which is better, apples or oranges?
    The are probably no disadvantages to JSP except that you need a JSP server. The main disadvantage to applets is you almost certainly need the users to have the Java Plugin to run it. If they don't, they have to get and install it. JSP doesn't need any of that.

  • Which is better JSF or JSP

    We are planning to start a new Web Based Project, which one we should prefer for UI either JSF or JSP

    JSF is just a MVC framework which can run on top of JSP/Servlets. Knowledge of JSP/Servlets is still required unless you use another view technology instead of JSP, such as Facelets. JSF basically removes the need to write your own controller servlet and provides lot of useful MVC related stuff and capabilities (conversion, validation, etc). If you're going to use plain vanilla JSP without any existing MVC framework, you'll have to create a custom framework and reinvent a lot of wheels which nobody else in the world is going to use.
    Read the JSF specification to get a picture why JSF is there and what you can do with it.
    [http://jcp.org/aboutJava/communityprocess/final/jsr252/index.html]

  • Which is better to use: BEx query or Web Application as an iView in portal?

    Hi gurus!
    Are there any experienced opinions, which is better - publish a BEx query in portal or publish a BEx Web Application in portal? Is it easier to alter the layout attributes etc. if I create a BEx Web Application first before publishing?
    What is the way of fixing for example filter item height if I publish BEx query in portal - is there a Web Application that it uses anyhow which I can fix? Or can I use in that case iView -properties in portal?
    Thankful for advice
    Sari

    ok, means i can use jsp:useBean tag for all my
    classes that are not actually bean. so it will be
    instantiated at run time and provide efficiency .No. Jsp:useBean is used for java bean components.
    >
    but when should i use import statement in my jsp and
    it happen at translation time so will it create any
    type of burden for my code if i import multiple
    classes.For non-java beans, you need to import the classes, period.
    It's not a burden, it's a necessity.

  • Which is better - Add a dimension or create more members in an existing

    Which is better - Add a dimension or create more members in an existing dimension?
    We are trying to figure out which can give us better performance in terms of calculations and retrieving reports - to add another dimension (entity/country) or add about 500-800 more members in an existing location/division dimension?
    Thank you!

    If you have BSO cube i would recommend to add in the same dimension where as ASO you can add members in a new dimension. Adding a new dimension is like creating a new cube you have to change each and every single calc scripts,report scripts,FR reports,Webforms and your rule files .... all the dependencies has to be changed manually . I think 500 members in the exsting BSO dimension will not impact the calc or retrieval times that much .

  • Which is better for servers, Apache or Tomcat?

    Which is better for servers, Apache or Tomcat?

    For some reason that link I gave you isn't working right now, but it was today, weird. I would get Tomcat simple because sun uses it in its examples and recommends it. Here's sun's link then, it's probably more useful anyway. http://java.sun.com/products/jsp/

  • Which is better, many PXI cards or fewer PXI cards with more SCXI cards?

    I have a pretty basic question.  Which is "better", using multiple PXI cards for analog inputs or a single PXI card and multiple SCXI cards?  For example, if I have say 100 channels to sample (all at the same rate), I could use 2 6225s at 80 ch each.  Or I could use 1 6220 and 4 SCXI 1100s (32 ch each).  What are the pros and cons with either approach?  Keep in mind sample rate probably isn't an issue (less than 1 kHz) but it is the same for all channels.
    Thanks.

    The pros/cons will depend on your application now and in the future.  I recommend contacting your local NI sales representative.  Synchronizing across a PXI system is easy to do via the backplane.  There are PXI/SCXI combo chassis available, you could use PXI multifunction DAQ cards and then SCC for signal conditioning for thermocouples for additional functionality later.  There are many possibilities that may be best discussed with your sales representative.
    Regards,
    h_baker
    National Instruments
    Applications Engineer
    Digital Multimeter Resources

  • WHICH IS BETTER JDBC OR SQLJ

    HI
    CAN SOMEBODY EXPLAIN TO ME THE DIFFERENCES BETWEEN JDBC AND SQLJ AND WHICH IS BETTER???
    THANK YOU

    Well, SQLJ has been desupported in 10g, so I would strongly hesitate to do new development there.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Which is better to install Oracle 11g database based on ASM or Filesystem

    We will install 2 sets of Oracle 11.2.0.3 on Redhat Linix 5.6 and configure Data Guard for them further -- one will be a primary DB server, the other will be a physical standby DB server. The Oracle DB stoage is based on SAN Array Disk with 6TB size. Now there are two options to manage the DB datafiles:
    1. Install Oracle ASM
    2. Create the tranditional OS filesystem
    Which is better? in the past, our 10g data guard environment is not based on Oracle ASM.
    Someone think if we adopt the oracle ASM, the shortcomings are :
    1. as there is one more instance that will consume more memory and resource.
    2. as the ASM file system cannot be shown out on the OS level directly such as "df" command, the disk utilization monitor job will be more difficult. at least it cannot be supervised at OS level.
    3. as the DB bshoule be done the daily incremental backup (Mon-Sat) to Local Backup Drive. the bakup job must be done by RMAN rather than user-managed script.
    Who can provide some advices? Thanks very much in advance.

    user5969983 wrote:
    We will install 2 sets of Oracle 11.2.0.3 on Redhat Linix 5.6 and configure Data Guard for them further -- one will be a primary DB server, the other will be a physical standby DB server. The Oracle DB stoage is based on SAN Array Disk with 6TB size. Now there are two options to manage the DB datafiles:
    1. Install Oracle ASM
    2. Create the tranditional OS filesystem
    Which is better? in the past, our 10g data guard environment is not based on Oracle ASM. ASM provides a host of new features ito data management, and performance - to the extent that you can rip out the entire existing storage system, replace it with a brand new storage system, without a single second of database downtime.
    Someone think if we adopt the oracle ASM, the shortcomings are :
    1. as there is one more instance that will consume more memory and resource.Not really relevant on 64bit h/w architecture that removes limitations such a 4GB of addressable memory. On the CPU side... heck, my game PC at home has a 8 core 64bit CPU. Single die and dual core CPUs belong to the distant past.
    Arguing that an ASM instance has overheads would be silly. And totally ignores the wide range of real and tangible benefits that ASM provides.
    2. as the ASM file system cannot be shown out on the OS level directly such as "df" command, the disk utilization monitor job will be more difficult. at least it cannot be supervised at OS level.That is a A Very Good Thing (tm). Managing database storage from o/s level is flawed in many ways.
    3. as the DB bshoule be done the daily incremental backup (Mon-Sat) to Local Backup Drive. the bakup job must be done by RMAN rather than user-managed script.
    rman supports ASM fully.
    I have stopped using cooked file systems for Oracle - I prefer ASM first and foremost. The only exceptions are tiny servers with a single root disk that needs to be used for kernel, database s/w, and database datafiles. (currently these are mostly Oracle XE systems in my case, and configured that way as XE does not support ASM and is used as a pure cost decision).

  • Which is Better Nokia Asha 303 or Nokia Asha 311

    Can you tell me which is better 303 or 311?

    hmm.. as owner of both phones, I would like to say my bet.
    Actually, there are lots of difference on both phones. I'll dice it up.
    1. Homescreen
    On 303 the homecscreen is the same as other s40 devices , you know, the "active standby" thingy, where you can stack up a pile of shortcuts on the homescreen.
    On the 311 however, it has 3 different homescreens, the app drawer where all your apps are displayed, the active standby where you can put your favorite apps and contacts as a shortcut, and your frequently used app (music player, radio, or dialler) which you can jump to and from with just a swipe from left or right.
    2. Input method
    On the 303, it has a full physical keyboard, which eases up the typing experience, branding the 303 as "type smarter". To be honest, I truly miss that keyboard.
    On the 311 however, it has a virtual keyboard and the usual phone keypad (virtual also). They can automatically turn to landscape mode if you will turn the phone to landscape. In writing this comment, I am using my 311, as my 303 died when it plunged into the pool.
    3. Camera
    both features a 3.2mp camera, which is good for a higher than basic photo and video capturing. You can view my videos on my yt channel (MultiCadmiel) where I used a 303, and 311.
    Noticebly, the meer difference on the two is their mic. The 303 can capture every sound pitch, as on my videos I am capturing trains passing by. Whenever a train horns on thr 303, it can capture the sound without distortion. But the story is different on the 311, even a single horn can distort the mic.
    4.Speaker
    the 303 is impresibly a great boom box, voicing out a great sound quality thru it's speakers, again it is not the same with the 311. The 311 is not that loud, but who thr heck would use loudspeaker while inside the bus? Headsets are available.
    5. Internet
    here, the 311 boast as being faster on loading internet pages, as well as download speed.
    There are still many to consider, but overall, both are better for me.
    If you want a full qwerty experience, use the 303, if you want a full touched phone, use the 311.
    Oh, I forgot to mention that the camera on the 311 automatically rotates to landscape or portrait, a thing missing on the 303.
    Nokia Lover since childhood.
    my phones are 3120c, 303, and 311.

  • Droplet or Simple Nucleus component which is better ?

    Hi,
    1)Droplet or Simple Nucleus Component which is better as per memory utilization (performence wise).
    2)extending one  Droplet in another droplet is recomended or injecting droplet which is recomended ?
    Please clear these issues if any body ASAP.
    thanks

    Hi,
    Droplets are intended to connect front end (jsps) with the business functionality thro nucleus components. They are primarily used for presentation logic which involves business rules.
    So, you need to decide to go for a mere nucleus component or droplet based on your requirement.
    It is good to have any business logic / common code in a tools class and call that method from the droplet. In this case, you do not need to extend other droplet and can reuse the code from the tools class by injecting the tools component.
    Please let me know if this helps. Or else, please specify the requirements more specifically.
    Hope this helps.
    Keep posting the updates.
    Thanks,
    Gopinath Ramasamy

  • In the below queries which gives better performance

    Hi All,
    In the below two queries which gives better performance.
    Requirement is I need to find if all the 3 score columns are null then I need to assign -ve value -9999 else some +ve value 2
    1)
    select case when count(CUST_score1)+count(CUST_score2)+count(CUST_score3)=0 then -111111'
    else 11 end
    from
    customer
    where subscriber_id=1050
    and cust_system_code='1882484'
    2)
    select case whenCUST_score1 is null and CUST_score2 is null and CUST_score3 is null then '-9999'
    else '11' end
    from
    customer
    where subscriber_id=1050
    and cust_system_code='1882484'
    Please help, because we have more data in table customer so I need to confirm which is better.
    Regards,
    Chanda

    user546757 wrote:
    Hi All,
    In the below two queries which gives better performance.
    Requirement is I need to find if all the 3 score columns are null then I need to assign -ve value -9999 else some +ve value 2
    1)
    select case when count(CUST_score1)+count(CUST_score2)+count(CUST_score3)=0 then -111111'
    else 11 end
    from
    customer
    where subscriber_id=1050
    and cust_system_code='1882484'
    2)
    select case whenCUST_score1 is null and CUST_score2 is null and CUST_score3 is null then '-9999'
    else '11' end
    from
    customer
    where subscriber_id=1050
    and cust_system_code='1882484'
    Please help, because we have more data in table customer so I need to confirm which is better.
    Regards,
    ChandaThe two statements aren't equivalent. If you know that your where condition is restricting to a single row then there is no point in doing a count as that will introduce an additional aggregate function that isn't required for a single row. If you are dealing with multiple rows from the where condition then the second query will return multiple rows whereas the first query returns 1 row, so they don't do the same thing anyway.

  • Which is better for performance Azure SQL Database or SQL Server in Azure VM?

    Hi,
    We are building an ASP.NET app that will be running on Microsoft Cloud which I think is the new name for Windows Azure. We're expecting this app to have many simultaneous users and want to make sure that we provide excellent performance to end users.
    Here are our main concerns/desires:
    Performance is paramount. Fast response times are very very important
    We want to have as little to do with platform maintenance as possible e.g. managing OS or SQL Server updates, etc.
    We are trying to use "out-of-the-box" standard features.
    With that said, which option would give us the best possible database performance: a SQL Server instance running in a VM on Azure or SQL Server Database as a fully managed service?
    Thanks, Sam

    hello,
    SQL Database using shared resources on the Microsft data centre. Microsoft balance the resource usage of SQL Database so that no one application continuously dominates any resource.You can try the 
    Premium Preview
    for Windows Azure SQL Database which offers better performance by guaranteeing a fixed amount of dedicated resources for a database.
    If you using SQL Server instance running in a VM, you control the operating system and database configuration. And the
    performance of the database depends on many factors such as the size of a virtual machine, and the configuration of the data disks.
    Reference:
    Choosing between SQL Server in Windows Azure VM & Windows Azure SQL Database
    Regards,
    Fanny Liu
    If you have any feedback on our support, please click here. 
    Fanny Liu
    TechNet Community Support

  • Which is better??????

    which is better?Dam really confused which speaker to buy??
    i currently have a creative m2600.but am not getting enough performance or that feel while watching movies like avatar,step up 3 etc......so am planning to buy a 5.1.......not planning but i have decided to buy a 5.1....so..
    which is better? the 6160 or 6060 or 6100.
    which of these will provide me relly great exprience while playing games and most importantly while whatching hd movies and while listening to music.......
    and other than this what i have to ask is...what is this "db" in speakers. i mean while looking at a speaker specs we can see it..like 65db,85db,75db..etc........
    and when i compared specs of the three speakers i mentioned above i saw that the 6160 has low "db"........why is that?

    The specs is just a guide, you won't be able to tell the slight difference in db using just your ears. Besides, it is just a comparison between the level of a music to the level of background noise, it does not necessary mean which speaker sounds better. If possible, please make a trip to your local electronics store and try out the speakers system yourself.

Maybe you are looking for