Display text from MySQL Text Field

Hi,
I am trying to display text which is stored in mysql text field. But it displays nothing. and when i try this code:
<c:out value="${rowSrearch.pDetails}" />
<c:set var="text" value="${rowSrearch.pDetails}"/>
<%
String text = (String)pageContext.getAttribute("text");
out.print(text);
%>
it gives me null.
I am just opening a resultset using <sql:query and trying to retrieve data using <c:forEach loop.
What is the best way to retrieve data from MySQL text field.
I am using:
Apache2
Tomcat 5.5.17
MySQL 5.0.22
mysql-connector-java-5.0.3
Thanks

One way is to enter them into the database with the desired formatting.

Similar Messages

  • How to get a subset of text from a varchar2 field

    Hello.  I am trying to select a subset of text from a varchar2 field.  This is login information from dba_audit_trail view.  Here's an example of the field (comment_text from dba_audit_trail):
    Authenticated by: DIRECTORY PASSWORD;EXTERNAL NAME: cn=orcladmin,cn=Users,dc=idacorp,dc=local; Client address: (ADDRESS=(PROTOCOL=tcp)(HOST=555.555.555.555)(PORT=99999))
    I am trying to just select the "orcladmin" text - i.e. everything after the first "=" up to the first ","
    I can get everything after the first "=" with this:
    select substr(comment_text, instr(comment_text, '=') + 1) from dba_audit_trail
    ... but I don't know how to stop at the first ","
    Any help would be greatly appreciated.
    Thanks!
    Message was edited by: DRC

    Hi,
    Here's one way to do it:
    WITH got_pos    AS
        SELECT  comment_text    -- and whatever other columns you need
        ,       INSTR (cooment_text, '=')   AS equal_pos
        ,       INSTR (cooment_text, ',')   AS comma_pos
        FROM    dba_auit_trail
        WHERE   ...             -- any filtering goes here
    SELECT  SUBSTR ( comment_text
                   , equal_pos + 1
                   , comma_pos - (equal_pos + 1)
                   )   AS first_cn
    FROM    got_pos
    You could do it without a sub-query; you'd just have to do the exact same INSTR 2 times, where I used equal_pos 2 times.
    You could also get the results you want using regular expressions, such as:
    SELECT  REGEXP_SUBSTR ( comment_text
                          , '=([^,]*),'
                          , 1
                          , 1
                          , NULL
                          , 1
                          )      AS first_cn
    FROM    dba_audit_trail
    Although this uses less code, it's slower than using INSTR and SUBSTR .

  • How to email text from a text component in my applet on a the host server ?

    How to email text from a text component in my applet on a the host server, back to my email address ?
    Assuming I have Email Form on the host server.
    Help will be appreciated.

    You can do like below
    =REPLACE(Fields!Column.Value," " & Parameters!ParameterName.value & " ","<b>" & Parameters!ParameterName.value & "</b>")
    The select the expression and  right click and choose placeholder properties
    Inside that set Markup type as HTML 
    then it will highlight the passed parameter value in bold within the full xml string
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Reading text from a text file(what else!!!!!)

    okay to save time here i've managed to read the text from the text file and display in the console
    my question is - is there a way to read the text a character at a time, at present i read it as a string, the reason i need a character is that i have to check each character to check for brackets ({[ and [})
    public void loadFile() {
              JFileChooser fLoad = new JFileChooser();
    fLoad.setFileSelectionMode(JFileChooser.FILES_ONLY);
    int result = fLoad.showOpenDialog(this);
    File file = fLoad.getSelectedFile();
    if(file == null) return;//if no file selected return
              String text = new String();
    try //exception handler
    BufferedReader input;
         input = new BufferedReader(
         new InputStreamReader(
         new FileInputStream(file)));
    while((text = input.readLine()) != null)                                                   //print it out, line by line
                   char array[] = text.toCharArray();
                   checkFile(array);
                   System.out.println(text);//test case
    input.close();//close file
    as listed i have attempted to fill a char array with the characters from the string but when i try to access the array with
    public void checkFile(char array[]) {
         for(int i=0; i<array.length;i++) {
         if(array.equals("(")) System.out.println("(");//doesn't work
                   System.out.println(array[i]);//works
    the if loop gives me an error
    C:\Documents and Settings\korbitz\Desktop\bracket\Bracket.java:168: char cannot be dereferenced
    any help will be appreciated

    if(array.equals("(")) System.out.println("(");//doesn't workinstead try
    if(array.equals("(")) System.out.println("(");
    You could also try the String methods myString.indexOf() (but you'd have to do one for each char you're looking for)
    A better alternative might be using a StringTokenizer
    StringTokenizer stk = new StringTokenizer(myString, "({[]})");
    if(stk.countTokens()!=1)
    // then you must have a bracket/brace dividing your string
    }Good luck,
    Radish21

  • Exporting Text from multiple text boxes?

    I'm using InDesign CS3 on the Macintosh. I need to export text from multiple text boxes/stories into one text file. The Export File command only exports text when the text tool is selected and the cursor is in the text box. Unfortunately, I have 8-20 individual text boxes per page, none are linked, and my document is 100+ pages, so selecting each text box individually is much too time consuming. There must be a better way - Please help!
    Thanks!
    Carolyn

    The text exporter plug-in seems to work! I did a quick test - text still will need some clean-up to make sure it's in the correct order, but MUCH better than exporting each story individually. THANKS!

  • How can i release text from a text box?

    How can I release text from a text box? I want the shape of the text box without the text in it.

    So all you need is to make a line around the text?
    For this you don't need to release the text box from the text. Just apply a stroke to it.

  • Using JTables to display data from a text file

    How do I display data from a .txt file into a column inside a JTable?

    dont quite get the "vectors" part..
    by the way, my program is as follows
    * Damn Java ..
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import java.awt.Dimension;
    import java.awt.GridLayout;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    public class ScoreBoard extends JPanel {
    private boolean DEBUG = false;
    public ScoreBoard() {
    super(new GridLayout(1,0));
    String[] columnNames = {"Player's Name",
    "Time Completed",
    "$ Amount Earned $"};
    /* Object[][] data = {
    {"1",
    new Integer(5), new Integer(500)},
    {"2",
    new Integer(5), new Integer(3200)},
    {"3",
    new Integer(5), new Integer(1000)},
    {"4",
    new Integer(5), new Integer(100)},
    {"5",
    new Integer(5), new Integer(200)},
    final JTable table = new JTable(data, columnNames);
    table.setPreferredScrollableViewportSize(new Dimension(600, 90));
    if (DEBUG) {
    table.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    printDebugData(table);
    //Create the scroll pane and add the table to it.
    JScrollPane scrollPane = new JScrollPane(table);
    //Add the scroll pane to this panel.
    add(scrollPane);
    private void printDebugData(JTable table) {
    int numRows = table.getRowCount();
    int numCols = table.getColumnCount();
    javax.swing.table.TableModel model = table.getModel();
    System.out.println("Value of data: ");
    for (int i=0; i < numRows; i++) {
    System.out.print(" row " + i + ":");
    for (int j=0; j < numCols; j++) {
    System.out.print(" " + model.getValueAt(i, j));
    System.out.println();
    System.out.println("--------------------------");
    * Create the GUI and show it. For thread safety,
    * this method should be invoked from the
    * event-dispatching thread.
    private static void createAndShowGUI() {
    //Make sure we have nice window decorations.
    JFrame.setDefaultLookAndFeelDecorated(true);
    //Create and set up the window.
    JFrame frame = new JFrame("ScoreBoard");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Create and set up the content pane.
    ScoreBoard newContentPane = new ScoreBoard();
    newContentPane.setOpaque(true); //content panes must be opaque
    frame.setContentPane(newContentPane);
    //Display the window.
    frame.pack();
    frame.setVisible(true);
    public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    and i want to display the player name from a textfile.txt to the player column instead of hardcoding it like above. Thanks!

  • Mail reverses display of "from" and "recipient" fields

    Mail 7.1 is reversing the display of the from and recipient fields on the message list window on my Exchange 2010 Account.  So all messages appear to be coming from my address.  In the case of multiple recipients, the multiple recipients are listed as senders.
    The actual message window lists them correctly though.  This does not happen immediately when launching Mail.  I can launch it, and things appear correctly for around 20 seconds prior to reversing the fields.
    I have duplicated this behavior on a MacBook Pro and iMac, both running 10.9.1.  This problem does not occur on iOS devices, or other OSX applications, but only on my Exchange 2010 account on 10.9.1.
    Thanks.

    IMO, if you want to send magazines, then e-mail isn't the vehicle. Better to create PDF files and send them as attachments. This problem you're running into has to do with poorly followed standards in all those e-mail clients and attempting to send magazines as messages. Stick to plain text and there aren't any issues. Just my

  • Indesign CS3-JS - Problem in reading text from a text file

    Can anyone help me...
    I have an problem with reading text from an txt file. By "readln" methot I can read only the first line of the text, is there any method to read the consecutive lines from the text file.
    Currently I am using Indesign CS3 with Java Script (for PC).
    My Java Script is as follows........
    var myNewLinksFile = myFindFile("/Links/NewLinks.txt")
    var myNewLinks = File(myNewLinksFile);
    var a = myNewLinks.open("r", undefined, undefined);
    myLine = myNewLinks.readln();
    alert(myLine);
    function myFindFile(myFilePath){
    var myScriptFile = myGetScriptPath();
    var myScriptFile = File(myScriptFile);
    var myScriptFolder = myScriptFile.path;
    myFilePath = myScriptFolder + myFilePath;
    if(File(myFilePath).exists == false){
    //Display a dialog.
    myFilePath = File.openDialog("Choose the file containing your find/change list");
    return myFilePath;
    function myGetScriptPath(){
    try{
    myFile = app.activeScript;
    catch(myError){
    myFile = myError.fileName;
    return myFile;
    Thanks,
    Bharath Raja G

    Hi Bharath Raja G,
    If you want to use readln, you'll have to iterate. I don't see a for loop in your example, so you're not iterating. To see how it works, take a closer look at FindChangeByList.jsx--you'll see that that script iterates to read the text file line by line (until it reaches the end of the file).
    Thanks,
    Ole

  • Prob in transferring the chinese texts from the text file (UTF-8) into SAP

    Hello SAP Experts ,
    We are using 4.6 C version
    I created a ABAP to upload Chinese Chars from a text file to SAP Database. The coding that I use to read the text file is showed as following:
    CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                CODEPAGE                = '8400'
                FILENAME                  = P_FILE
                FILETYPE                   = 'DAT'
           TABLES
                DATA_TAB                = LT_FILE_ADD_DATA
           EXCEPTIONS
                CONVERSION_ERROR        = 1
                FILE_OPEN_ERROR         = 2
                FILE_READ_ERROR         = 3
                INVALID_TYPE            = 4
                NO_BATCH                = 5
                UNKNOWN_ERROR           = 6
                INVALID_TABLE_WIDTH     = 7
                GUI_REFUSE_FILETRANSFER = 8
                CUSTOMER_ERROR          = 9
                OTHERS                  = 10.
      IF SY-SUBRC NE 0 .
      ENDIF.
    I use ABAP debugger to check the field values of the internal table .  But, the values of the internal table which contains chinese chars are changed to some other Chinese characters . How to fix this problem?
    I have used ASC filedatatype , but it doesn't work .
    Thanks for your reply . 
    Regards,
    Chopra

    Hi
    Not sure it will help. Please  check the link below.
    [http://www.sapfans.com/forums/viewtopic.php?f=23&t=40365]
    ~~~Ganesh Kumar K.

  • Indent /tab position for text from INCLUDE texts in SAPscript

    Hi, ABAP colleagues!
    Need your help on this sapscript problem:  How to align texts taken from "INCLUDE TEXT" in SAPscript, according to tab defined in Paragraph Format?
    Or, how to control tab positions for texts which were extracted from “INCLUDE text” commands in SAPscript?
    I defined a paragraph format with tab stop at 8 CH so that with 2 commas (,,) my text will be displayed there.  However it always appears to the left (e.g. 1st column) and not indented at the proper column for description/text (e.g. which is in second column). 
    Pls help, bec a different heading and information is not acceptable to client for the Thailand characters. 
    Above is the description of the problem.  Below are some technical details.
    For specific example, I am editing Zversion of standard sap MM form MEDRUCK Window Main -  Text Element Item Text.
    BG ,,&TTXIT-TDTEXT&
    /: INCLUDE &T166P-TXNAM& OBJECT &T166P-TDOBJECT& ID &T166P-TDID&
    /: NEW-PARAGRAPH BG
    So far, tried these approaches:
    PARAGRAPH
    NEW-PARAGRAPH
    LANGUAGE '2'
    THANGSAN font
    Any ideas?
    Thank you so much in advance for all your help. Our project team will really appreciate it. May the Lord bless you as we go through our SAP work!
    Sincerely,     
    Celeste

    Hello Caleste,
    Please let me know what settings you have done to solve this issue.
    Help me with steps for Spool Request/Print settings.
    Regards!!
    Surya

  • How can erase incon text from short text when cursor over on pushbutton?

    Hi all.
    I have pushbutton ,i done by fuction code (selection screen)
    Eg:sscrfields-functxt_01 = '@0Y@ Create'
    when i have move on pushbutton by mouse cursor ,i have short discription like @0Y@ Create ,it displayed with icon code, i want remove my icon code from short text.
    pls advice me.
    regards.
    Raju j

    to avoid that use the following code.
    data: itext like SMP_DYNTXT  .
    itext-TEXT = 'Logoff' .
    itext-ICON_ID = '@15@' .
    itext-ICON_TEXT = 'Text to be displayed on the Button' .
    itext-QUICKINFO = 'Quick Info' .
    move: itext to sscrfields-functxt_01 .
    Regards
    Raja

  • How can i display data from mysql (cant do it using netbeans)

    im confused with changing ResultSet-->List->Array;
    i already done displaying a data table from mysql but im lost on how to display mysql rows to ComboBoxes and JLists...
    im new here.
    how does the setModel() work?
    i hate this GUI stuff.. = (
    thanks...

    im new here.
    how does the setModel() work?
    i hate this GUI stuff.. = (You claim you have JDBC working already, if I understand your post correctly. So you're asking a question about GUIs in the JDBC forum. Not a good strategy. Try the Swing forum.

  • How to display data from mySQL database as a graph?

    I am working in DW, is there any function to insert graphs from recordset?

    My webpage is in php, don't tell me i have to work in coldfusion in order to display my data from mySQL graphically.
    Look at this link: http://www.adobe.com/devnet/coldfusion/articles/basic_chart.html

  • Bold Text from Standard Text

    Hi All
    I am using standard text using READ_TEXT and create_From_sapscript methods. Some text in standard text contains BOLD, this is showing in SO10 print priview as well, but in webdynpro BOLDis not coming?? How to create Bold using STandard TExt... pelase help..
    Thanks,
    kris.
    Edited by: kissnas on Oct 20, 2010 8:29 AM

    Hi,
    It should be in the formatting of the SO10 text. Maybe you can save your SO10 text like this:
    This is normal text, but <strong>this word</strong> is bold.
    You can then set this values in your context element and bind it to your formattedtextview.
    Regards,
    Roelof

Maybe you are looking for

  • Printing Problem with 10.6.6

    On computers running 10.6.6, we can no longer print to older network printers (HP Laserjet 6MP and Xerox 340ST) that are not recognized by Bonjour. We keep receiving the message "Network host '[printer name]' is busy; will retry in [5, 15, 20] second

  • Linking for Internal Order with Profit Centre

    Hi Gurus, Can anybody help me out with this query that a particular Internal Order to be matched with a particular Profit Centre If anybody have solution pls share with me I'll assign points for your feedback Usha

  • Alternative for UNION

    Hi I have to simple sets of query Q1 and Q2, both of them have the SUM function used, they work just fine separately, but we want the result in 1 single query. The problem is that Q1 has a master/detail table relation in the join so whenever we join

  • Checkboxes

    I have a form with ten checkboxes, all with the same name : <input type="checkbox" name="error_id" value="1">1 <br> <input type="checkbox" name="error_id" value="2">2 ..etc.. In the action page, a id_no is generated and I do a cfloop to insert : <cfl

  • 24 bit

    Does GarageBand record at 24 bit, 44.1?