Best practice from passing messages from servlets

Is there a best practice for passing user messages (typically errors) back to the page from servlets?
e.g. http://localhost:4502/content/geometrixx/en.html?message=Some user error message
Dan

Well I suppose that answer to that question depends somewhat on your requirements, but I would say using a query string as you have indicated would be less than ideal because the page with the message would not be cached. No depending on your requirements and what sort of message you are passing that might be OK - especially if you message is highly personalized.
If however you have a limited number of standard messages to display a more common approach is to have each message have it's own page and then to configure the servlet to redirect to the appropriate page based on the desired message.
If you want the user to end up on the same page they submitted to the servlet from then another common approach would be to have the post to the servlet be AJAX and then display the message client side without having to change the URL.

Similar Messages

  • Best practice for linking fields from multiple entity objects

    I am currently transitioning from PHP to ADF. I'm looking for the best practice for linking data from multiple entity objects.
    Example:
    EO 'REQUESTS' has fields: req_id, name, dt, his_stat_id, her_stat_id
    EO 'STATUSES' has fields: stat_id, short_txt_descr
    'REQUESTS' is linked to EO 'STATUSES' on: STATUSES.stat_id = REQUESTS.his_status_id
    'REQUESTS' is also linked to EO 'STATUSES' on: STATUSES.stat_id = REQUESTS.her_status_id
    REQUESTS.his_status_id is independent of REQUESTS.her_status_id
    When I create a VO for REQUESTS, I want to display: REQUESTS.name, REQUESTS.dt, STATUSES.short_txt_descr (for his_stat_id), STATUS.short_txt_descr (for her_stat_id)
    What is the best practice for accomplishing this? It appears I could do it a few different ways:
    1. Create the REQUESTS VO with a LOV for his_stat_id and her_stat_id
    2. Create the REQUESTS VO with the join to STATUSES performed within the query for the VO. This would require joining on the STATUSES EO twice (his_stat_id, her_stat_id)
    3. I just started reading about View Links - would that somehow do what I'm looking for?
    I also need to be able to update his_status_id and her_status_id through the by selecting a STATUSES.short_txt_descr from a dropdown.
    Any suggestions on how to approach such a stupidly simple task?
    Using jDeveloper 11.1.2.2.0 if that makes a difference in the solution.
    Thanks ahead of time,
    CJ

    CJ,
    I vote for solution 1 as it's just your use case. As you said you what to update the his_status_id and her_status_id through the by selecting a STATUSES.short_txt_descr by a drop down. This is exactly the LOV solution.
    ViewLinks are used fro master detail navigation (which you don't do here) and Joining the data make it difficult to update (and you still need a LOV for the drop down box.
    Timo

  • Best Practice on querying Data from Database

    Hello and I was wondering what is the preferred and best practice for querying data from an SQL database inside a JSP page. Is it using the JSTL library or another method? Thanks

    It depends on the size of the application really.
    The "correct and preferred" approach in a large MVC app would be to have a seperate class that does all the database access, retrieving the data into java objects.
    Check out [url http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html] DAO pattern
    You then "save" the data into request/session attributes, and forward to a jsp page to render the result.
    Most approaches recommend a separation between JSP (the view) and SQL code.
    The JSTL sql tags are provided more for "quick and dirty" code applicable in small applications, or for fast prototyping. That approach is not really robust for large scale applications.
    Cheers,
    evnafets

  • Passing messages from BW customer-exit variables to WebI

    Hi
    Is it possible to pass messages from a BW customer-exit variable to WebI?
    We have a scenario where we have some validation done on a customer-exit variable, and under certain conditions a message should be returned to the user running the WebI report. Ideally, then report should stop executing at this time.
    The ABAP is in place, and I can return an error message. If the query is run in RSRT / Web Template, the error message is correctly displayed and processing stops.
    However, in WebI, if the error condition is met, a rather messy looking generic error message is displayed. In this case, the error number I've used in the ABAP is 000, which WebI then interprets as somthing to do with query dimensions could not be retrieved, or a null pointer exception.
    I am not interested in the WebI error message that is being generated ... I know why it is being generated.
    All I'd like to know is whether it is possible to pass an error message from within the customer exit code back to WebI.
    Any ideas?
    Regards,
    Andrew

    Hi,
    I think that the problem is the User Exit is called anew for every query, so the global tables you declared will be empty for the query2.
    One way to do this is create a table using the SE11 and populate it with the Variable from Query1, and use this data to populate the Variable2 of Query2.
    Hope it helps.

  • Best practice for using messaging in medium to large cluster

    What is the best practice for using messaging in medium to large cluster In a system where all the clients need to receive all the messages and some of the messages can be really big (a few megabytes and maybe more)
    I will be glad to hear any suggestion or to learn from others experience.
    Shimi

    publish/subscribe, right?
    lots of subscribers, big messages == lots of network traffic.
    it's a wide open question, no?
    %

  • What's best practice for logging messages in pageflow?

    What's best practice for logging messages in pageflow?
    Workshop complains when I try to use a Log4J logger by saying it's not serializable. Is there a context similar to JWSContext that you can get a logger from?
    There seems to be a big hole in the documentation on debug logging in workflows and JSP pages.
    thanks,
    Rodger...

    Make the configuration change in setDomainEnv.cmd. Find where the following variable is set:
    LOG4J_CONFIG_FILE
    and change it to your desired path.
    In your Global.app class, instantiate a static Logger like this:
    transient static Logger logger = Logger.getLogger(Global.class);
    You should be logging now as long as you have the categories and appenders configured properly in your log4j.xml file.

  • Best Practice for EJB calls from servlet?

    Hi folks
    I could not find general rules for making calls to an stateful EJB from the web container (e.g. from a backingBean). In some books they say it is a bad programming style calling them directly from a common servlet. The book says create first an HTTPSession Object and from there call the stateful EJB.
    I'm a bit confused because, I'm missing some best practice guide from where to initiate such calls.
    Can somebody please point me in the right direction?
    Kind Regards
    Bruno
    Edited by: zajoho on Oct 30, 2008 11:14 PM

    Hi Bruno,
    The main issue with the combination of stateful session beans and servlets is the servlet threading model.
    It is dangerous to store a stateful session bean reference in servlet instance state, since the servlet instance
    can be accessed concurrently, yet a stateful session bean reference is intended to be used by only one
    client.
    As you point out, one alternative is to store the reference in the HttpSession. That associates the reference
    with a particular client, which matches the stateful session bean programming model.

  • Best practices for logging results from Looped steps

    Hi all
    I would like to start a discussion  to document best practices for logging results (to reports and databases) from Looped Steps 
    As an application example - let's say you are developing a test for one of NI's analog input or output cards and need to measure a voltage across multiple inputs or outputs.
    One way to do that would be to create a sequence that switches the appropriate signals and performs a "Voltage Measurement" test in a loop.    
    What are your techniques for keeping track of the individual measurements so that they can be traced to the individual signal paths that are being measured?
    I have used a variety of techniques such as
    i )creating a custom step type that generates unique identifiers for each iteration of the loop.    This required some customization to the results processing . Also the sequence developer had to include code to ensure that a unique identifier was generated for each iteration
    ii) Adding an input parameter to the test function/vi, passing loop iteration to it and adding this to Additional results parameters to log.   

    I have attached a simple example (LV 2012 and TS 2012) that includes steps inside a loop structure as well as a looped test.
    If you enable both database and report generation, you will see the following:
    1)  The numeric limit test in the for loop always generates the same name in the report and database which makes it difficult to determine the result of a particular iteration
    2) The Max voltage test report includes the paramater as an additional result but the database does not include any differentiating information
    3) The Looped Limit test generates both uniques reports and database entries - you can easily see what the result for each iteration is.   
    As mentioned, I am seeking to start a discussion for how others handle results for steps inside loops.    The only way I have been able to accomplish a result similar to that of the Looped step (unique results and database entry for each iteration of the loop) is to modify the process model results processing.  
    Attachments:
    test.vi ‏27 KB
    Sequence File 2.seq ‏9 KB

  • Best Practices for configuring ICMP from the outside

    Question,
    Are there any best practices or best recommendations on how ICMP should be configured from the outside? I have been cleaning up the rules on our ASA as a lot were simply ported over years ago when we retired our PIX. I noticed that there is a rule to allow ICMP any any and began to wonder how this works when the rules above are specific IP addresses and specific ports. This in thurn started me looking to see if there was any documentation or anything to help me determine a best practice. Anyone know of anything?
    As a second part how does this flow on a firewall if all the addresses are natted? It the ICMP traffic simply passed through the NAT and the destiantion simply responds?
    Brent                   

    Here you go, bro!
    http://checkthenetwork.com/networksecurity%20Cisco%20ASA%20Firewall%20Best%20Practices%20for%20Firewall%20Deployment%201.asp#_Toc218778855
    access-list inside permit icmp any any echo
    access-list inside permit icmp any any echo-reply
    access-list inside permit icmp any any unreachable
    access-list inside permit icmp any any time-exceeded
    access-list inside permit icmp any any packets-too-big
    access-list inside permit udp any any eq 33434 33464
    access-list deny icmp any any log
    P/S: if you think this comment is useful, please do rate them nicely :-)

  • Best practice for workflow triggering from Web Dynpro UI

    Hello, workflow community!
    I'm working on a task which allow to trigger the workflow by clicking a button in Web Dynpro UI. As always, there are multiple ways to do that, for instance, to use SAP Workflow API (SAP_WAPI_START_WORKFLOW) or to raise an event upon the button click, which will be caught by workflow template.
    In my opinion, the optimal solution is to call FM, which will call ABAP-class, raising an event, which, in turn, will be caught by workflow template. In this case, FM will service kind of wrapper, where we can implement some additional checks if needed.
    But the question is what approach is the best practice — to raise an event or use SAP_WAPI_*?
    Thanks.

    let combine, use SAP_WAPI_CREATE_EVENT
    usually I would not recommend creating a workflow directly (SAP_WAPI_START_WORKFLOW) since when I look for workflows in a system I usually start from SWE2 (the event linkage) which uses events so the workflow you start by SAP_WAPI_START_WORKFLOW will not be seen there, also SWE2 gives you better control for starting the workflow, you can easily deactivate an event linkage. finding where you called the workflow by SAP_WAPI_START_WORKFLOW will be more difficult and deactivation will require a code change.
    so use events, and start them by SAP_WAPI_CREATE_EVENT
    Also pay attention that you have a check function module option in SWE2.

  • Best Practice for Removing Zeroes from Database

    Does anyone have some clever bits of code or best practices for evaluating a database and instances of zeroes? I'm working on cleaning up our rules file and am thinking the best way to start would be to write some code to look for zeroes and write them to a log file. This would at least indicate if there was even a problem with zeroes (which there may or may not be).
    Any suggestions out there / utilities / code samples?
    Thanks.

    We accomplished this using data extracts from a subset of scenarios/years/entities/accounts to ensure that all of our potential rules could be checked to ensure they were not writting zero's. This worked pretty well for our purposes, a text editor called EmEditor allows for VB macros in it pretty easily and we could write a quick macro to check for strings ending in "; 0." You may also want to review your check box of calculated in your extract and see if the zeros are a result of calculations. A rule output could work pretty well, although it would take some defining as you would have to write it out in a sub and make sure that you capture the data of all subroutines if your zero's are rule driven or actual inputs. May want to review some if you have very small insignificant values getting written, seen items that have one value 13 places to the right of the decimal that were not really signficant.
    JTF

  • Best practice to extract data from Hyperion Enterprise 5.5

    We are looking into extracting high-level data from our Hyperion Enterprise 5.5 and am in the process of researching what are the best practices to do that. I am reading the docs for the APIs that I can call from VB6. I am also interested if there are available Java APIs out there.Thanks in advance and Happy Holidays to everyone!Angelito [email protected]

    The easiest is using HAL (Hyperion Application Link). I have used HAL to extract data, organizations, account, subs, entities, etc.

  • Best Practices for Removing Shots from BDMV folder

    CS6 Production Premium Suite
    Win7x64
    Canon XA10
    I would appreciate feedback on the best practices for the following situation:
    Using Windows Explorer, I copy the BDMV folder from the XA10 to my Talk2 project folder.
    The BDMV folder has three one hour shots (talks) where each shot is one hour called Talk1, Talk2, and Talk3.
    Each shot consists of several MTS files in the STREAM folder since MTS files have a maximum file size so a new MTS file is created when a given MTS file reaches the maximum file size.
    Since I only want to have Talk2 stuff in my Talk2 project folder, I need to remove the Talk1 and Talk3 stuff from the BDMV folder.
    I delete the Talk1 and Talk3 MTS files from the STREAM folder.
    I delete the Talk1 and Talk3 CPI files from the CLIPINF folder.
    I leave the PLAYLIST folder as is.
    Using the Media Browser, I import Talk2 (which consists of two MTS files).
    I edit the clip.
    This procedure seems to work, but I do not know if there are any "got you" issues.
    Thanks in advance.

    Oh, don't do it that way.  I know a lot of people do, heck, my boss does, but it's just asking for trouble.
    Treat your card as if it was your original tape master (because it is).  It is the most important thing you have.  Don't delete or move any part of it. 
    If you want to break up the talks, do it as you shoot them.  Use separate cards for each talk and archive each one separately.  There is too much valuable information in the structure of the card format.  You may not need it now but your editing program may need it later.
    Hard drive space is cheap but digital recordings are priceless

  • What's the best practice to upgrade 3GS from 3.1.2 to 4.2.1

    I was reading the thread which was very helpful:
    http://discussions.apple.com/thread.jspa?threadID=2665989
    But there is a slight difference here with my situation:
    -- I'm planning to upgrade from 3.1.2 to 4.2.1, yet in that thread the guy was trying to upgrade from 4.1
    And recently a friend told me he had an error 1013 during upgrade. Google also mentioned another error code, 1015, related to upgrading to 4.2.1
    1. Does anyone know what exactly caused Error 1013 and 1015?
    2. what is the best practice to upgrade from 3.1.2? Upgrading to 4.1 first and then upgrade from 4.1 to 4.2.1? Will that eliminate the occurring of these itunes errors?
    *(Yes, I know apple has officially terminated supporting upgrading an iphone firmware to anything below 4.3. But can we just discuss my questions hypothetically?)*
    Thanks people.

    paulcb wrote:
    Errors 1013 and 1015...
    http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=iphoneError+1013+and1015
    http://support.apple.com/kb/ts1275
    Thanks a lot, paulcb.

  • Best Practice - Copying styles & skin from OBIEE 11.1.1.5.x to 11.1.1.7.x

    Hi,
    By copying the stye (s_blafp) and skin (sk_blafp) file from OBIEE 11.1.1.5.x to 11.1.1.7.x. What are all issues we will be facing ? and is it a best practice ?
    Thanks in Advance!
    Satheesh

    http://hekatonkheires.blogspot.com/2013/08/custom-style-and-skin-in-obiee-11117.html

Maybe you are looking for

  • Asrock ION330/Nvidia HDMI - No audio output

    Machine was running archlinux and not been upgraded in over 6mths but HDMI audio worked fine. Decided to do a scratch build since all the changes in that time and have a nice clean system. If it helps, this is what I install. Ssed this exact same ins

  • Attachment table in framework

    I am using attachment table in oracle framework and I get the folllowing error: INSERT INTO FND_LOBS(FILE_ID,FILE_NAME,FILE_CONTENT_TYPE,FILE_DATA,FILE_FORMAT) VALUES (:1,:2,:3,:4,:5)". domain index is marked LOADING/FAILED/UNUSABLE can any one help

  • Labels in Pages?

    I still have the old Appleworks but cannot decipher instructions for making file folder labels. So I went to Pages '09 (4.0.3) & it appears that there is no way to make labels in Pages. Is this true? Given that it's true, is there a way to make file

  • Query Selection screen prompt taking very long time

    Dear All,            We are facing performance issue for a query, where it takes very long time to show selection screen(Around 3 minutes). this query has exteansive calculation and exit variables. Kindly provide your valuable suggestions to fine tun

  • Creative give us some answ

    Dear creative plez could u tell me, sorry plez could u tell everybody wtf are u doing to support your(make that, our cards) as we all have paid u decent money 4, no offence to the mods in here but i would like some answers from the organ grinder and