Best place to store resultset of a Web Application

Hi
The setting:
I have a Web application - The servlet accesses the backend and populates resultset. The results should be stored in beans so JSP can access them and display them.
The database resultset is temp and specific to each user or each request and it either is used across session or across request.
Question1:
How do I store the resultset in beans ? Should I create a list or arraylist? or there are other specific beans that handle such requests? I am just familiar with beans that set or get basic type vars like integers and strings
Question 2:
When resultset is used across session or across request, what is the best option to store them in? Meaning in each case what is the best option?
I really appreciate your advise to make sure my application is set correct from the beginning. If this is not the correct forum to send it to , kindly pointout the correct forum so I can send it.
Yara

I just meant if it should be in a list/array list or
some kind of bean .... I was suggesting a Collection of DTO's. "Bean" is a global term for a class having private properties and public accessors/mutators. DTO's follows this pattern with the goal to transfer data between the data tier and the business tier.
Do you recommend I use JSF ?
will this enable easier access to display the results
in tabular formats ?
Or I can get same results using the model of
servlet/jsp/bean without JSF?Or I recommend it? Well, it depends on your requirements, knowledge and time. You can write it all using plain vanilla servlets and JSP, but you can also consider a MVC framework, which is generally a better choice for an enterprise webapplication (better maintainability, reuseability, etc). If you knows nothing about servlets and JSP, I rather recommend you to learn that first before using any MVC framework. JSF provides the h:dataTable component which eases the displayment of a Collection of DTO's. In JSP you can use c:forEach to iterate through a Collection.

Similar Messages

  • Where's the best place to store email templates?

    Hi all;
    In a web app I store all my email templates in a files folder in the web app. Can't do that with a worker in a cloud service - no files. So where's the best place to store them? In a BLOB? And if so, is there a way to have files in my project get automatically
    written to BLOB entries when I publish?
    thanks - dave
    What we did for the last 6 months -
    Made the world's coolest reporting & docgen system even more amazing

    Hi,
    I think we could use azure blob to save files.
    >>is there a way to have files in my project get automatically written to BLOB entries when I publish?
    If you choose azure cloud service, you could write the upload code at role onstart method. If you choose Azure website, please consider use azure webjob to do this, refer to
    http://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-webjobs-sdk-get-started/ for more details about webjob.
    Regards

  • Where is the best place to store Contacts in order to later print labels and such?

    Where is the best place to store contacts in order to later print labels etc?

    I found this excellent article last week describing how to print labels from your Mac's Contacts application:
    How-to: Print customized address labels for holiday card envelopes ...

  • What is the best place to store salts

    Hi,
    I'm using a combination of flex ,CF and MS SQL
    Where is the best place to store salts for user passwords?

    Hi,
    Table is good if "constant" might change so you can create APEX form to maintain those.
    You could also use package specification just for constants e.g.
    CREATE OR REPLACE
    PACKAGE MY_GLOBALS
    AS
      g_const_1 CONSTANT DATE := TRUNC(SYSDATE) + 365;
      g_const _2 CONSTANT VARCHAR2(30) := 'somestring';
    END;
    Then you can refer those in procedures, functions and APEX processes like (package_name.constant_name) MY_GLOBALS.g_const_1.
    Regards,
    Jari

  • Best place to store application database

    Where is the best (most secure) place to store database files that are application specific?
    I'm writing a kiosk application that runs on Windows 7 x64 as a desktop application.  A non-privileged user will be logged in to Windows and the application runs as this non-privileged user.  It relies on 2 MySql database files, one with read-only
    access and the other with read-write access.  Where is the best place to store these 2 database files such that only the user that the application is running as (the currently logged in user) has access to them?  My concern is keeping them secure
    if someone manages to log into the machine as a different user.  Am I best to put them under %USERPROFILE%\AppData\Local\<MyCompany>\<MyApp> ?

    Yes.  You should programmatically obtain the directory by calling SHGetKnownFolderPath() +
    FOLDERID_LocalAppData
    https://msdn.microsoft.com/en-us/library/windows/desktop/bb762188(v=vs.85).aspx
    By Default the only users with access to a user's %AppData% directory are LocalSystem, Administrators and the user itself.  A different user could not access the directory unless the user was an Administrator who was elevated.
    thanks
    Frank K [MSFT]

  • Best place to store FCPX projects?

    I wanted to find out where is the best place to store FCPX projects? I import the footage/audio to a external harddrive, but save the projects/render files to computer harddrive. Should I save the projects to the external harddrive where the footage is? Or does it even matter?

    See this post from this forum.
    https://discussions.apple.com/message/16411405#16411405

  • Where is the best place to implement business logic in ADF application?

    I am using jdeveloper 11g R2 , JSF Facelet
    Where is the best place to implement business logic in ADF application?
    I mean something like service layer in Spring
    Appreciate your comments
    Regards
    Mohsen

    Depends on what your logic does and what data it deals with, but in general business logic is in the ADF BC layer.
    Some goes into entity objects - for things like attribute or row validation.
    Some goes into view objects - for things like calculation.
    Some goes into AM - for things like service methods for UI clients.

  • Can any body tell where i have to place the mdb file in the web application

    Hi
    I am doing a web application in NetBeans 5.0 and using MSAccess (*.mdb ) file as a backend, so now where i have to place this mdb file in this web application in NetBeans. and tell me the code how to connect to that mdb file.
    The mdb file name is "db.mdb" and i am using a jsp page through which a servlet will be communicated. in servlet i am not able to connect to this mdb file.
    Reply asap.
    Sasi .

    DrClap wrote:
    duffymo wrote:
    Then I'd put it in my CLASSPATH. Maybe WEB-INF/classes.I'm not sure that I like the idea of the database being inside the web application's context. When you deploy a new version of the application, wouldn't that be a problem? My answer to "Where do I place the MDB in the web application" would be "Anywhere but there".DrClap, I'm embarrassed to read this, because you're only too correct. Thanks for the correction.
    When you think about it, your advice makes a great deal more sense. Any database BUT Access would be on a separate server (e.g., Oracle, MySQL, SQL Server, etc.) Why wouldn't that be a good idea for Access, too?
    On the other hand if it's a read-only database that would be different.You're too gracious to leave me this out. I throw myself on the mercy of the court for being a dumb ass. 8)
    %

  • What is the best place to store global constants?

    Hi,
    I want to store some contants and access it through procedures and functions, what would be the best place to do this? I thought substitution strings would work, but it isn't working for me in my procedures. Can we use Substitution string in compile code such as procedures and functions? I use SQL developer to write procedures.
    Cheers

    Hi,
    Table is good if "constant" might change so you can create APEX form to maintain those.
    You could also use package specification just for constants e.g.
    CREATE OR REPLACE
    PACKAGE MY_GLOBALS
    AS
      g_const_1 CONSTANT DATE := TRUNC(SYSDATE) + 365;
      g_const _2 CONSTANT VARCHAR2(30) := 'somestring';
    END;
    Then you can refer those in procedures, functions and APEX processes like (package_name.constant_name) MY_GLOBALS.g_const_1.
    Regards,
    Jari

  • Best place to store game currency

    Hi, where would be the recommended place to store game currency i.e coins?
    ApplicationData::Current->RoamingSettings
    Looks good since this will sync between devices.  However, I get intermittent failures with
    'The RPC server is unavailable.'
    This would be bad if the user had just bought currency.  Also, I like this to work correctly if the user should drop offline for whatever reason,
    I'm guessing this will fail if the user loses connection.  So should I write to both local and roaming settings?
    Finally, if the user does not have a microsoft account, will this work, and if they install the game before they bind it to a microsoft account, will it still work?

    Roaming should be fine. That saves locally then since in the background. The user doesn't need a connection, though it won't roam until there is one.
    The user needs an account to install the app, so that won't be a problem

  • Best place to store a subject's name

    Would it be better to put a subject's name under the People keyword or to put it in the caption?
    I am used to iViewMedia Pro and this is really different for me.
    Suppose I want to find all images of Mary Smith? What's the best way to make sure I find them all in Aperture?
    This is really a whole new way of working but I am starting to like it -- maybe .

    David,
    I'm in the same boat and thinking the Caption field is the best place as you can select it to show in the view options for both the main and grid viewers. It will be interesting to hear other thoughts on this.
    Sam

  • Where is best place to store birthdays ?

    Where is the best place to record people's birthdays  for the year ?  So I don't have to record every  year ?

    I use the calendar that comes with your iPhone. It has a feature that allows you to repeat the event yearly, and it has reminders as well. For example; lets say my son's name is Sam.....I open the calendar to his birthdate, type in.."Sam Smith - B/D" (2000). I then show the event as an ALL DAY event, next I show it to REPEAT YEARLY, then I select a 1st re minder for one week earlier, and the 2nd reminder on the day of the event ( the default time is 9:00 AM....but you can change this>. Hope this info is helpful.

  • Best way to manage images on jsp web application

    Hi,
    Am developing a jsp web application, in that project, the user will upload the image files, now I created an image directory in the context root and when the image is uploaded by the user it is saved in the /images directory and the image path is saved in the database. I can display this image using the <img src="images/a.jsp" > tag.
    but when I rebuild the project all the images in the /images directory get deleated but the image path is remained in the database, is there any method that I make /image dir outside my project context root so that when I rebuild the project the /images dir can get changed and my project will save images outside the context root that is in the /images dir which is now outside the project context root. and is it possible to display those images using <img src""> tag. because this time my /images dir is at D:/images . what could be the best method or way to handle images with the web application.
    any suggestion will be helpfull

    Well my friend as per your given case there are to two ways of approaching your problem.
    Case 1:
    How to save the relevant data ??
    .Create a backup folder Workstation on which you are hosting your application where you can store all the uploaded files which is outside the scope of webserver(However we can write a dedicated servlet which can access that file) and make sure we pickup from any the folder path from a specfic MessageResource bundle or an context/servlet init parameter in web.xml.
    .Write a Upload servlet/Backing Bean which saves all the files in the discussed folder using utility packages like Commons FileUpload,Oreilly MultipartRequest & etc and then register saved fileName in the database user specfic table specific to user.
    How to display the Image ??
    .Write a dedicated servlet which can pickup user related fileName specfic information from the database and the read the file from backup folder by constructing the path from the entry made as a init param in web.xml or any other custom MessageResource bundle and then stream the Image data using the ServletOutputStream.
    NOTE: do not forget to pickup & setImage file ContentType & Set the content length.
    .Just try to render the JSP view file where we are displaying the displaying the images by calling the dedicated ImageServlet.
    <img src="ImageServlet?userid=2345" align="center"/>Try to refer below posts to get a better understading.
    Dedicated Image Servlet:
    http://forum.java.sun.com/thread.jspa?threadID=5208858&messageID=9840042#9840042
    Uploading Files Using Servlet:
    http://muimi.com/j/jakarta/commons/fileupload/
    Case 2
    The second method would more or less the same but here we would save the uploaded file
    content is saved in the Database as a Blob and we would retrive it back using a dedicated image servlet again.
    However,in terms of performance the second case implementation is very costly.
    Try to refer below posts to get a better understading on the second case.
    http://forum.java.sun.com/thread.jspa?threadID=5193481&tstart=50
    http://forum.java.sun.com/thread.jspa?threadID=5211649&messageID=9853670#9853670
    Hope this might help :)
    REGARDS,
    RaHuL

  • The best/clean/free approach to moving SharePoint Web Application between environments?

    Hello Forum,
    I have an environment e.g. (Environment1) Web Application that contains 90 site collections (Including: Lists, Libraries, Workflows, and custom solutions), and its URL is (http://Dept.Company.com/)
    I must move this entire Web Application from the source: Environment1 to the destination: Environment2.
    What is the best and safest way to accomplish that without using any commercial migration third party tools ?
    What I have in mind right now is as below:
    Obviously, I cannot backup and restore all these 90 site collections back and forth between the source: Environment1 to the destination: Environment2. This is very impractical and inefficient.
    I thought about Web Application backup, e.g.
    Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} -Item <WebApplicationName> [-Verbose]
    Restore-SPFarm -Directory <BackupFolderName> -RestoreMethod Overwrite -Item  <WebApplicationName> [-BackupId <GUID>] [-Verbose]
    But, I am not sure if it the way to go or not? I am a bit concerned about GUID and running into unlimited problems. What do you think?
    In case if I followed the: Backup/Restore-SPFarm, Should I create a Web Application in the destination: Environment2 and the URL must be 100% identical to the source: Environment1?
    Well, I would love to hear your thoughts about the best practices and recommendation considering my scenario.

    Hi mate, firstly you could use the method you mentioned, In any method if there is code using GUID references instead of by Name you will run into problems and hence you should do a full prior investigation and analysis to find out any custom code dependant
    on GUIDS and custom solutions required etc, I would personally just take a SQL backup of the content DBs for the web application or dettach them and move them to the new source sql server(if any), create a new web-application in Env2, create the respective
    managed paths, install all custom solutions that need to be installed against this web-application in the new farm, go to manage content dbs and here add the existing content dbs(the backed up ones), make one of them or the only one(if there is only one) default
    and remove the empty current default content DB. URL is on the IIS end, so you can rebind the existing URL to the new web-front-ends however the load-balancer(if any) or HOST A entries need to now point to the new web-front-ends. If you use https or using
    SSL you need to get the cert re-issued for the new servers and load them on the IIS and use them for URL binding. To test no you do not need the same URL, however you will need to add the new path(e.g.
    http://server2:81 to the alternate access mappings for the new web-application), then lets say if you have a site called Site1 you can try after migration doing
    http://server2:81/Site1. I would highly recommend doing a trial migration with backedup content DBs in Env2 and go through the findings and document them for the actual one, the thing to look for are the custom solutions
    and custom code etc and getting the ssl certificates sorted for the new WFEs, if the same URL is not needed, i.e. the new ENV2 is only for UAT or testing then you don't need to use the same URL, however once again if code has hardcoded it somewhere you will
    need to analyse that and fix it before or after migration. So there are some pre and post steps involved. Hope that helps. thanks.

  • [Best Practices] Which versioning strategy for the web applications?

    Hi all,
    An important question when starting to develop a web application is how to correctly make the releases follow-up?
    That involves to adopt a versioning strategy to definitely fix the version numbers which will be associated to each release.
    The versioning strategy i have imagined is based on four different numbers with format like v.X.X.X.X:
       - The first one represents the version number of the database structure.
       - The second number is linked to the different finalized releases of the data model layer.
       - The third number concerns the different releases of the interfaces
       - And finally, the last number is the Subversion (or other code control system) last save.This strategy involves:
       - The subversion number is systematically reported
       - Changes on the database will affect both the data model layer and the interfaces; also, among the three first numbers only the first one will have to change.
       - Changes made on the data model level automatically involve a new interfaces release and will also be represented on the second number and not on the third.
       - Finally, bring some changes only on the interfaces level will affect the third and the fourth numbers only.My questions are:
       1) Is my choice correct?
       2) Maybe it already exists some versioning convention?
       3) What is your strategy?
       4) What is the strategy for the Jdeveloper versions?Best regards,
    Tif

    I would like people to be able to watch it in a flash player embedded on my site (and have it look good even if they click on a full screen button) or download to their iPod.
    Use the H.264 setting for iPod in Compressor. The h.264 file will play in a JW Flash Player and it's able to be downloaded for iPod viewing.

Maybe you are looking for

  • Exit in Tcode MIGO

    Hello Experts, I have got a peculiar Issue. First, I have to find a exit in MIGO, which should repost the primary cost for the WBS element. Inside the exit I have code a program to repost the primary cost for the WBS element. Can any tell me a BAPI t

  • Choose attribute from cursor dynamically

    dear forum, unfortunately, i'm anything but a pl/sql expert, but i have to solve a problem, using pl/sql - and it took me 2 days already, without success :? problem: i have a table with the following columns -> | A1 | B1 | C1 | A2 | B2 | C2 | ... unf

  • Cisco prime 1.2

    Hey guys! We got damaged Prime 1.2 and i want to reimage it, but can't undesrtand how to do it. I got NCS-APL-1.3.0.20-1-K9.iso, i know that is for 1.3 but i hope its not a problem. so idlike to perform full remage from this iso but when i burn thist

  • Importing development class into SAP from out site

    Hi Guys, I am integrating SAP-GIS Using Smallworld business integrator 4 for SAP. In the doumentaion they asked to import K900363.DEV D900363.DEV R900363.DEV into SAP from SBI4 with TR All development classes are located in one single transport reque

  • In what order will select * return the data?

    hi guys, 1) if we just do a select * from emp, will it return the data in the order of the data blocks in the extents. i.e. return all data blocks from extent 1, then from extent 2 and so forth? 2) if we do a select * from emp, and say half the data