Best way to output a string

I have a JAVA Bean, and I need to output a string to the JSP output, how to do that? I am new to the JAVA world.
public String retrieveBottomLine()
     bottomLine = bottomLineDAO.retrieveBottomLine(FacesUtil.getServletRequest().getParameter("bottomLineKey"));
     bottomLine.setInShoppingCart(FacesUtil.getServletRequest().getParameter("inCart").equals("true"));
     calculatedItem = null;
String customer=FacesUtil.getServletRequest().getParameter("bottomLineCustomer");
System.out.println(customer); // <---this output the string fine.
this.customer = customer;
     return "bottomLine";
public BottomLine getBottomLine()
return bottomLine;
public void setBottomLine(BottomLine value)
bottomLine = value;
public String getCustomer() {
return customer;
public void setCustomer(String customer) {
this.customer = customer;
My jsp page
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<html>
<head>
<jsp:useBean id="simple" class="com.mdi.air.formBeans.BottomLineBean" />
</jsp:useBean>
<td style="vertical-align: top;" height="18"><strong>Customer</strong></td>
<td colspan="5" style="vertical-align: top;"><jsp:getProperty name = "customer" property = "customer"/></td>
<td style="vertical-align: top;"> </td>
<td style="vertical-align: top;"> </td>
<td style="vertical-align: top;"> </td>
<td style="vertical-align: top;"> </td>
</body>
</html>
Customer is not coming up.
Edited by: ITR0952 on Jun 11, 2008 12:54 PM

<jsp:useBean id="simple" scope="session" class="com.mdi.air.formBeans.BottomLineBean" />
<td></td>
<td> </td>
<td style="vertical-align: top;" height="18"><strong>Customer</strong></td>
<td colspan="5" style="vertical-align: top{color:#ff0000};"><jsp:getProperty name = "simple" property = "customer"/>{color}</td>
<td style="vertical-align: top;"> </td>
<td style="vertical-align: top;"> </td>
<td style="vertical-align: top;"> </td>
<td style="vertical-align: top;"> </td>
in my backing bean.
public String retrieveBottomLine()
bottomLine = bottomLineDAO.retrieveBottomLine(FacesUtil.getServletRequest().getParameter("bottomLineKey"));
bottomLine.setInShoppingCart(FacesUtil.getServletRequest().getParameter("inCart").equals("true"));
calculatedItem = null;
String customer=FacesUtil.getServletRequest().getParameter("bottomLineCustomer");
System.out.println(customer);
this.customer = customer;
HttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);
session.setAttribute("simple", bottomLine);
return "bottomLine";
I now get this error
Error 500: com/mdi/air/domain/BottomLine incompatible with com/mdi/air/formBeans/BottomLineBean
All I need is to put the "customer" value string and put it into the JSP page.
Thanks.

Similar Messages

  • What's the best way to output a high quality ready to send to the printer PDF?

    I'm designing a photo book for a friend and we're having output issues. We're working with a professional printer but for some reason our prints keep coming out soft or pixelated. The images are 300 dpi and formatted correctly for an InDesign document so the issue is likely output.
    What's the best way to output the HIGHEST quality PDF you can out of InDesign? Everyone seems to have different answers.
    Thanks in advance!

    Check a couple things.
    One would be for broken links. If there are broken links then ID will use the preview image instead of the linked image.
    Another would be to select an image that prints poorly in the Links Panel and check the effective resolution. If it is below your stated 300 dpi then the image has been enlarged greater than 100%.
    Then just use the PDF/X-4 profile for your PDF.
    Mike

  • What is the best way to output audio to my DJ system?

    I have a few questions I was hoping you all could help me out with!
    First off I am a mobile DJ and I DJ primarily weddings and use the program djay.
    I just need a primary output and a second output to cue songs.
    Currently I DJ using the 1/8 stero jack on my macbook to the RCA connectors on my mixer.
    Is this considered "digital" ? And is this a quality connection?
    I read that the output on the mac is analog/optical, what does this mean?
    What is my best way to connect my mac to my DJ system? What type of product will be best?
    I don't want to spend too much. Thank you so much for your time!

    http://eshop.macsales.com/shop/SSD/OWC/

  • Best Way to Output to New Page for Printing

    On my website, I have a page called
    &quot;form.cfm&quot;. The output from the form gets
    processed, and results displayed onscreen, by
    &quot;formProcess.cfm&quot; What is the best way to take
    the form data displayed on formProcess.cfm and output it to a new
    page suitable for landscape printing? I want to have a link on
    formProcess.cfm that says something like &quot;Printer Friendly
    Version&quot;. When the user clicks that link, a new window
    opens with a printer-friendly page. The same form data displayed on
    formProcess.cfm is now displayed on the printer-friendly page. My
    biggest question is, how to get the form data to formProcess.cfm,
    and then to a third page without a bunch of fancy coding that's
    above my thick head?
    Code samples are deeply appreciated.
    Many thanks,
    Gwen H
    www.ResumesForLess.com

    New page named formPrint.cfm with just the following:
    <cfdocument format="pdf" orientation="landscape">
    <cfinclude template="formProcess.cfm">
    </cfdocument>
    have the print link on your formProcess.cfm page submit the
    original form data to the formPrint.cfm page.
    OR, you might just want to put the cfdocument tags in the
    formProcess.cfm page and just automatically provide a pdf page that
    can be printed rather than generating both the htm and pdf
    versions.

  • Best way to find a string contains a list of keywords

    Could anyone do any different or is this good enough?
    @ String line Line to be tested
    @ String keyline Line that contains comma delimited keywords
    private boolean containsAll(final String line, final String keyline) {
            int count = 0;
            String[] keywords = keyline.split(",");
            for (String keyword : keywords) {
                if (line.indexOf(keyword.trim()) != -1) {
                    count++;
            return count == keywords.length;
        }Is Regex faster?
    Thanks.

    geeflow wrote:
    Well! It looks that in my context the method needs to return FALSE if test string does not have ALL the items in the key word line. In my context, if keyword line = "", I run into trouble. That's an example of new requirements making the solution not good enough. Here's a way to incorporate splitting the keyword into the method, that should also eliminate the need for calling trim():
    private boolean containsAll(String line, String keyLine) {
        for (String keyword : keyLine.split("[, ]+")) {
            if (!line.contains(keyword)) return false;
        return true;
    } If line is empty, this will return false; no problem there. If keyLine is empty, you'll get a false positive. And if either one is null, you'll get a NullPointerException; you should probably check for those conditions first so you can throw a more helpful exception. You also have a case issue: "Double" is not the same as "double". You can get around that problem by using indexOfIgnoreCase() instead of contains().
    So I am still wondering if I can get away with not using a counter.Yes, you can--at least until the next time the requirements change. ;-)

  • Best way to output a movie to dvd

    Hello,
    I have created a full 1-hour lasting movie past months. Now I want to export this movie to a final .avi and also to a dvd. I have worked with DVD menu's before (using TMPGEnc) but I'm not sure how to maintain the best quality in Premiere while the final size is less then 4,7 GB. Just exporting the movie results in a .avi file of 15 GB, which is far too big. Using the Adobe Media Encoder is a possibility, but I'm not sure which settings to chose.
    It's a quite technical question I guess, I just need some help with the export settings and which other decoding programs to use.
    Greets,
    Jim

    Jim,
    Much will depend on which version of PrPro you have.
    The fail-safe method, regardless of version, is to Export your Sequence(s) as elemental streams, i.e. one video-only and one audio-only file. Choose DV-AVI Type II for the video-only and 48KHz 16-bit PCM/WAV for the audio-only files. Import the video-only file into Encore as a Timeline, then Import the audio-only file as an Asset. From En's Project Panel, drag the Audio Asset to the appropriate Timeline, where it will snap into place.
    There are other methods, and Harm mentioned one of them, provided that you have CS3, or CS4. Still, the "fail-safe" method will work too.
    Good luck,
    Hunt

  • What is the best way to output query result in jsp page?

    I have several pages with 2-3 queries on each one.
    My jsp pages call a class that I've created, the class will create a connection with the db, execute the query and returns the ResultSet to the jsp page. Then I iterate the RS on the jsp page.
    Is there a better way of sending the data back to the jsp? I was thinking of .xml.

    Send it back as a java.util.List, or some other Collection. Then iterate through the collection. My preference is to make a Bean of the date that represents a Row on the ResultSet and put those in the List. Then when we get to the JSP, iterate the List to get the beans, and call get methods to get the values...
      /* In a method that traverses ResultSet and fills a List of  beans... */
      List data = new ArrayList();
      while(results.next())
        MyBean mb = new MyBean();
        mb.setProperty1(rs.getString(1)); //But give properties good names
        mb.setProperty2(rs.getString(2)); //Not 'Property1 and Property2
        data.add(mb);
      return data;If you are using JSTL you can do something like this:
      <c:set var="myBeans" value="${theDbObject.results}"/> //Assuming the above method was called 'getResults()'
      <table>
      <c:forEach var="mb" items="${myBeans}">
        <tr><td>${mb.property1}</td><td>${mb.property2}</td>...</tr>
      </c:forEach>
      </table>

  • Best way to output to dvd.

    Ok I have to output 18hrs of media to dvd.Compressor is slow and I hesitate to use toast as I fear the quality may suffer, The project was shot on a consumer.prosumer cam (hvx 200) and keeping a decent image for TV is tough enough.
    So I want to use a PC based product. As i believe render/encoding times are faster. I have already exported QT's of my projects ( I hoped this would speed up compressor but it did not, or if it did it was minimal) so what would anyone suggest i use in the PC world. I have access to Avid express and Vegas. This project will allow for the purchase of other software though. thanks for any input.

    18 hrs??? Not all at once, I hope ... I mean, you are going to edit all this down into managble chunks for encoding right ... I generally don't try to go much beyond for 2 hours per DVD (Single Layer)in order to maintain quality. Depending upon your computer processor, RAM et al, Compressor should be able to handle this nicely .. mind you, MPEG2 compression is just long ... get used to it.
    I don't know about PC solutions being all that faster thought it's been a while since I encoded a DVD on a PC. Compressor and DVD Studio Pro .. or even just DVD Studio Pro all by itself for that matter ... can certainly give excellent results.
    Compressor gives you lots of compression options beyond their presets. I routinely make very well accepted product with that

  • Best way to output this CS3

    Using Canon 550D I made some videos which are in .mov
    I assumed you guys would like to know the flavour of it
    I need it in .avi I tried experimenting but it all turns out crappy, I don't think I have the right compressors or whatever you call it lol so I gave up. In the end I exported it in .wmv There is a logo in it as well  imported as .png file, to appear as watermark in right lower angle.  It is brillant in .wmv but as I said I need it in .avi
    It's resolution (source file) is 1920x1088, total birate 45944kbps 25fps
    And my target is 1920x1080 and total birate around 10320kbps 25fps
    Don't tell me to convert it, the quality is of major imporatnce

    First, what is the watermark? Those usually appear, when one has a trial 3rd party Effect. Do you have such?
    For the H.264 to AVI, what flavor of AVI do you need? MOV, like AVI, are but "wrappers," and can contain almost anything. This ARTICLE will give you some background.
    When starting with MOV/H.264, I find that Apple's QuickTime Pro (US$29 upgrade/unlock) does a good job with Export to other formats.
    Good luck,
    Hunt

  • Best way to output 140 minutes of video to DSP?

    i have a video project that is 145 minutes long. My desire is to make it into one DVD...not two. Can compressor squeeze this so that it can fit onto a 2 hour DVD?

    Sure, Compressor can squeeze it down to fit - there is even a preset for 150 minutes of material in Compressor 2 & 3 - but the question is whether or not the quality will be acceptable. Also, you've got to make sure your audio is Dolby Digital (not an issue for Compressor 3.0.x - as it has no AIFF preset - but definitely something to look out for if you're using Compressor 2.x)
    At those bit rates (I believe about 3.5 average, 5 max) anything with reasonable motion can fall apart - pixelation, etc - very quickly. Taking heads stuff should be fine though.
    Or are you asking this question because you've tried the Compressor preset already?

  • Best way to split a single string containing 2 words into word1 and word2

    Whats the best way to take a string containing 2 words and split it into 2 strings ?
    eg. "red ferrari"
    string1 "red"
    string2 "ferrari"

    If your list is always going to have exactly two words, then yes.  Otherwise it depends on your requierments.

  • Please Suggest best way to pass Strings in a pipeline

    I'm working in a project in which a line passes in a pipeline kind of situation.
    The String is passed between different modules and each module adds some more data to it (or may even remove some of it).
    Which is the best way to pass the String? I think java.lang.String might not be an efficient method because the String i'll be passing will be modified many times.
    Thanx

    Yes. StringBuffer or StringBuilder you can use.
    String string = "test";
    StringBuffer sb = new StringBuffer(string);later you will add some more strings to the StringBuffer
    sb.append("Hello World");No additiional String object will be created.

  • Best way to remove unwanted signs from string

    Which is the best way to purify a string from possible dangerous signs? I want to remove all characters that is not a-z or 0-9? how would I go about?

    read the string character by character, and check to
    see if they're characters you want to remove or not,
    by comparing them to the ascii values of characters
    you permit. I've used this before, but I can't
    remember what exactly it permits, and I'm too lazy to
    look up the ascii table :) But this sort of thing
    works.
    int c = in.read();
    while(c!=-1){
    if((c<33)||(c<58&&c>44)){
         out.write(c);
    I thought about that too. But the values in the ASCII table... arn't they a little volatile to use? I mean, will my application work on other systems or systems with other languages?

  • Best way to set up 3-hour videos in DVDSP

    I have a series of 10 video lectures, each about 60 minutes long, that I've edited in FCP7. Standard definition (talking heads and slides).
    The client wants 3 lectures per finished DVD master.
    What's the best way to output these from FCP7, into DVDSP? Can I just create QuickTime files (bypassing Compressor), and pull those QT files into DVDSP? Do I have to use dual-layer discs to fit 3 hours on each?

    Your best bet is encoding outside of DVD SP. Talking heads and slide may be able to fit on a DVD-5 since it is low motion/complexity it sounds like.
    http://www.videohelp.com/calc.htm
    3 hours with 160 AAC audio should fit with an encode rate of 3.2, worthwile to run a test on a short section or two to see how it holds up. I have done some of those and it is fine. There are some other options also.
    I would export each lecture as a self contained movie and encode in Compressor in case you need to re-encode and tweak things it is often easier (plus dropping a movie in DVD SP will not compress the audio, you could always do that seperately though.)
    Also if the graphics (slides) are coming on and off screen you could also put Compression markers in those transition areas to focus on the encodes in that area (effectively). If the background is static and just a talking head there is not much movement in the background so definately worth a try.

  • Any Easy way to get Delimited String

    Hi,
    I have use create-delimited-string function in my BPEL process to create "," delimited string. i.e string1,string2,string3.
    What is best way to parse this string to get individual string.
    I want to parse string1,string2,string3 to get
    string1
    string2
    string3
    like StringTokenizer in java.
    Thanks
    Jigar

    Off the top of my head, you could create a bpel while loop, that loops until a string contains(',') function returns false.
    Then within the while loop do a substring-before() function to obtain each string before the comma.
    The issue above is that you will have to predefine the variables you are populating, so if you do not know how many results there are this may be a problem.
    I'm sure there are a couple of ways of doing this though. If you're not happy with it all and need a quick solution then there is always embedded java.

Maybe you are looking for

  • USE of HUGE PAGES  in 10G on Linux

    Hello, we are trying to use the Hugepages in Oracle 10.2... env Environment :- Linux Version :- 2.6.9-55.ELsmp Oracle Version :- Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit What I understand * should be Hugepages * Hugepagesize

  • Print tiling in Acrobat Pro 7

    I have an oversize document  110cm x 55cm I want to tile onto A4 paper on my Deskjet 730c. Unfortunately, the page scaleing "tile large pages" option is greyed out and can't be selected. Why? HJ

  • Merging two roles

    Hi I have created two roles under each role i have created one folder and under each role. and i have added to pages under each folder. X Role --> New_Folder ---> Page1,Page2. Y Role --> New_Folder ---> Page3,Page4. How to merge with both roles from

  • Exporting symbols in a .exe for external DLLs

    Hello,  I am facing a strange problem. Basically, I have my application that loads a DLL (I developped). My DLL exports functions I can call from my application : OK I would also like to call functions of my application from my DLL : it does not work

  • HT1687 I created a password to disable my phone.  But forgot it and repeatedly try combos.  Nothing works.  What do I do?

    I forgot my password to enable my phone.  What do I do?