Validating HTML form generated by servlet

Hi, folks. I have a dynamic html form generated by a servlet class. Once user fills up the form and submits it, i have another servlet does the form validation. My question is how can i reload the generated html form with error messages when user's inputs failed validation?
I am not able to use JavaScript pop-up windows for doing validation cause the page will be displayed on PDA and cell phone as well. Any help is greatly appreciated.

Could you combine the servlets.
I'm not sure but then you may be able to have the generator servlet in the doGet method and the validator in the doPost method. (don't quote me on this)
If you combine the servlets you have access to the original data (the form), that way if any validation errors occur you can repost the form with their entered data and an error message.

Similar Messages

  • Buttons in HTML Forms attached to servlets

    Hi,
    This seems like it should be a simple thing to me, but I haven't done enough html (or maybe it's enough servlets) to know what to do here.
    I have a section of my webpage that is entirely servlet-based. On one page (created by a servlet), I have a form. I'd like to put two buttons on the bottom of this form and be able to distinguish which one was pushed. The form sends to another servlet and I am getting other data out of the form in that servlet. (Text fields, which is text input type, that show up in the requestParameters). I tried the following:
    out.println( "<input type=\"submit\" value=\"Button1\" name=\"button1\">" );
    out.println( "<input type=\"submit\" value=\"Button2\" name=\"button2\">" );in the servlet that the form connects to, I tried the following:
    String buttonOne = request.getParameter( "button1" );
    String buttonTwo = request.getParamter( "button2" );
    if(buttonOne != null)
         System.out.println( buttonOne );
    if(buttonTwo != null)
         System.out.println( buttonTwo );
    }But when I do this, nothing prints to the screen, so obviously it isn't right.
    Anyways, if anyone could tell me a way I could tell which button was clicked, that's all I want!!!
    Thanks for any help you might give!!

    But when I do this, nothing prints to the screen, so obviously it isn't right.And don't expect System.out.println() in a servlet to print to any "screen". It certainly won't appear in the browser in response to your request; it should appear in one of your servlet container's log files. If it doesn't, then use the servlet log() method instead. Or just generate HTML containing your debugging output and send that back as the response.
    PC&#178;

  • Applet:how to display a html-page generated by servlet?

    hi everybody,
    I have an applet which posts data do a servlet and receives a response from the servlet (html-code). can anybody please tell me if there is a possibility to display this received html-page?
    (I HAVE to use a post-request to the servler due to a lot of data to send...)
    all my applet-servlet-communication is within a session with a jsessionid.
    does anybody have a hint for me?
    thanks a lot in advance,
    frank

    One possibility is to have the servlet create a new .html file on the server and output the HTML code to that file. Then the servlet can pass the name of the file back to the applet, and the applet can useshowDocument(new URL(yourUrlHere), "_blank"); to display the page.
    Just a thought. Good luck!
    - Sheepy

  • Getting a servlet to write a HTML form

    The problem is that I'm writing an auction website for a uni coursewor. In the main index, it has a "View Auctions"link, linked to a servlet that looks up the data in the database. It then generates a webpage with the results. At the bottom of the HTML page generated by the servlet, I want it to create a form so that the user can enter a bid by filling in the fields and click the submit button. My plan is to then have it go to another servlet that records the bid in the database.
    The main problem is the HTML line: <form name="makeBidForm" method="post" action="servlet/Bid">
    Because it has (and needs) quotes in the HTML coding, I'm finding it difficult to build a string with the quotes in it; everytime I enter a " character, Java is assuming I'm either opening or closing a Java ", instead of just wanting to have the " as part of the string.
    Is there a way to get around this, or a better way to do what i'm doing?
    So far the webpage shows up ok, but I'm getting ' " expected ' errors when i add the form line.
    The code I have so far is below:
    //ViewAuction.java, view and place bids user interface class
    //Gopinath Chandran, 2137957, 11.11.2004
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ViewAuction extends HttpServlet{
         public void init() throws ServletException{
              super.init();
              FindAuctionDA.initialize();
         public void destroy(){
              super.destroy();
              FindAuctionDA.terminate();
         public void doGet(HttpServletRequest request, HttpServletResponse response)     throws IOException, ServletException{
              response.setContentType("text/html");
              PrintWriter out = response.getWriter();
              out.println("<html>");
              out.println("<head>");
              String title = "Today's Auctions";
              String array[];
              FindAuctionDA fa = new FindAuctionDA();
              array = fa.findAuction();
              out.println("<title>" + title + "</title>");
              out.println("</head>");
              out.println("<body bgcolor=\"white\">");
              out.println("<h1>" + title + "</h1>");
              for (int i = 0; i < 10; i++){
                   out.println(array);
              out.println("out<form name=" + "makeBidForm" + " method=" + "post" + "action=" + ""> action="servlet/NewBuyer">
              out.println("<p>Place A Bid");
              out.println("<table width=" + "294" + " border="+ "0" + ">");
              out.println("<tr>");
              out.println("<td><div align=" + "right" + ">AUCTION ID: </div></td>");
              out.println("<td><div align=" + "right" + ">");
              out.println("<input type=" + "text" + " name=" + "textfield" + ">");
              out.println("</div></td>");
              out.println("</tr>");
              out.println("<tr>");
              out.println("<td><div align=" + "right" + ">BUYER'S ID: </div></td>");
              out.println("<td><div align=" + "right" + ">");
              out.println("<input type=" + "text" + " name=" + "textfield" + ">");
              out.println("</div></td>");
              out.println("</tr>");
              out.println("<tr>");
              out.println("<td><div align=" + "right" + ">PRICE:</div></td>");
              out.println("<td><div align=" + "right" + ">");
              out.println("<input type=" + "text" + " name=" + "textfield" + ">");
              out.println("</div></td>");
              out.println("</tr>");
              out.println("</table>");
              out.println("<p>");
              out.println("<input type=" + "submit" + "name=" + "Submit" + "value=" + "Submit" + ">");
              out.println("</p>");
              out.println("<hr>");
              out.println("<p>Back");
              out.println("</body>");
              out.println("</html>");

    Might I suggest you use a JSP for the presentation rather than a servlet.
    You can still use the servlet to load the data, but then just forward on to a JSP to do the presentation.
    Use the right tools for the right jobs.
    If you are generating this amount of HTML with out.println() from a servlet, then you should be using a JSP.
    I particularly cringe at seeing all the + strings - they are all strings! Why do the + concatenation?
    ps: I think the problem is that you are closing your form tag twice in the string, and have two action attributes for it. You have ">" outside of a string, and you are not closing your parentheses.
    Do it in JSP - you will find it a lot easier.

  • Uploading an image to a servlet with out  html form

    Hello,
    I had a look around the forum and could not find an answer to my question.
    I am trying to unload an image that is in a byte array to a servlet. the image is on the mobile phone. the mobile phone does not have html form to upload the picture.
    Is there any other way of uploading instead of using html form to invoke the servlet. It is just the connection bit that is confusing me. When the servlet is invoked then it can open an inputstream and take in the image.
    I hope this is clear and that some one else has done it.
    thanks
    martin

    search here and/or search google for "send byte array to servlet"
    it's certainly easy to find as far as i can tell
    first google result:
    http://forum.java.sun.com/thread.jspa?messageID=10173137&tstart=0

  • Error when using a HTML form along with a servlet

    Hi All,
    I am using Sun Studio 4 to create a HTML form that takes in 4 inputs and then
    passes them on to a servlet to be processed.
    In my HTML form i have the form heading.. <form method = post action="processServlet">
    my directory structure is as follows:
    /home/cosmo/projects/testservlet/processServlet ... processServlet being the servlet underneath the testservlet directory.
    inputForm.html is also under the same testservlet directory. I am running TOMCAT.. and under the run time tab under tomcat --> Internal --> it has localhost:8081 and under that the default context is /home/cosmo/projects/testservlet
    NOW, when i execute my HTML page the URL on top says "http://localhost:8081/inputForm.html
    which seems correct. I get my form correctly. When i input the data,and i hit the submit button, the URL says "http://localhost:8081/processServlet" which i think is also correct, but i get a "404 Error and the error description says " The requested resource( /processServlet)
    is not available." I have coded the servlet to give me just a few lines of output, but instead, the above error shows up.
    Why would this be happening? Do i have my directory structure messed up? Do i have the wrong type of template? I used a web module to do this. I also compiled my Servlet from Sun Studio without any errors.
    Any help would be appreciated.
    Thanks
    Kal.

    You can't post directly to a servlet the way you can to an HTML or JSP page. You must map your requests to specific servlets for the request to get directed there. There are entries in the web.xml for this.
    You need to map the request for "processServlet" to "edu.xxx.yyy.processServlet", or the servlet engine won't know what to do with that request.
    Often times, an app will route all requests for a particular extension to a router servlet, which then figures out which class to actually send the request to. This keeps you from having to map all servlets in the web.xml file.

  • Uploading File To MySQL from HTML form via Servlet

    Hello all !
    I hope this is better place to ask.
    I'm working on simple Servlet/Jsp application trying to hold to MVC pattern and got stuck on uploading file to MySQL db.
    Here's what I'm trying to accomplish:
    1) client submits a JPEG image via a simple html form on a webpage.
    2) JPEG is put into a database table, column field of type BLOB.
    3) Servlet processes the request, gets a connection to the db and inserts the image into the table.
    4) after that user is able to retrieve an image from db and display it in JSP page.
    This is pretty much the same task Angela was trying to do here:
    http://forum.java.sun.com/thread.jspa?threadID=667597&messageID=3905449
    I could use her snippets if i knew what is what and decided to figure out this myself. Aftet some investigation i found out that i need to import org.apache.commons.fileupload.*;which i found here: http://jakarta.apache.org/commons/fileupload/
    what am i driving at ?
    -----------------------1-----------------------
    After first line of code
    boolean isPart = FileUpload.isMultipartContent(request);netBeans 5.5 beta2 with bundled Tomcat 5.5.17 underlines this with warning saying that
    org.apache.commons.fileupload.FileUploadBase
    has been depreceted
    is it a reason for concern ?
    -----------------------2-----------------------
    Is it actually good idea to store images in db as blob ?
    what about large ammounts of text ?
    thank you
    -Dominik

    is it a reason for concern ?Yes.
    You should take a look at the method in the documentation and find out exact reason for depricating it.
    If it is depricated becouse they going to remove it in the future you should use the new alternative method becouse if you use the old method your app will not work in the future releases of the API.
    If it is depricated becouse it is not safe to use the method you should clearly understand the risks involved in using the method and see if that can give you any trouble in your project.
    -----------------------2-----------------------
    Is it actually good idea to store images in db as
    blob ?I think that it is ths best option available when you want to store binary data
    what about large ammounts of text ?You can use clob columns.
    By the way when you store files in the database its better you put some extra columns to store the file name and file type(mime) becouse you cant directly detect those things later by just looking at the data of the file.

  • JDBC + SERVLET: inserting text data  to access file from Html form

    Hi everybody !
    I'm trying to insert text data from my html form to access database using servlet and jdbc technologies.
    The problem that I'm that the data is TEXT, but not the English language !!!
    So my access db file gets - ???????? symbols instead the real text.
    This is the form line that sending data to my servlet:
    <form
    method="POST"
    ACTION=http://localhost:8080/servlet/myServlet enctype="text/html">
    And this is servlet line that defines response content:
    res.setContentType( "text/html" );
    What can I do to get in access db file the right text format and not a ???????? symbols.
    Maybe I must to ad some <meta ...> , but where ?

    You're dealing with Unicode, I'd guess, and not ASCII.
    I guess I'd have two questions:
    (1) Is the character encoding on your pages set properly for the language you're trying to use?
    (2) Does Access handle Unicode characters?
    Access isn't exacly a world-class database. (If it was, there'd be no reason for M$ to develop SQL Server.) I'd find out if it supports other character sets. If not, you'll have to switch to a more capable database that does. - MOD

  • Displaying images in HTML Forms inside Servlets

              Dear friends
              How are you?
              I am developing Servlets in WebGain Studio Pro V4.1 VisualCafe
              V4.1 to display dynamic HTML forms with embedded
              images (*.jpg and *.gif).
              Please see the following sample code -
              "<DIV ID=\"Logo\" STYLE=\"position:absolute; left: 4%; top: 4%;
              width: 25%; height: 12%; z-index:1; visibility:visible\">" +
              "<IMG SRC=\"FigLogo.gif\" WIDTH=\"100%\" HEIGHT=\"100%\">" +
              "</DIV>"
              Then I deploymed servlets to BEA WLS 6.0 by including Servlets
              in the Web.xml file. However, I do not see the images when
              viewed in IE5.0 browser.
              I appreciate all comments and suggestions.
              Thanking you
              Very truly yours
              Sriram (Ram) Peddibhotla, PhD
              

              Dear Friends
              How are you?
              I moved all images (*.jpg, *.gif) to the subdirectory
              /myDomain/applications/DefaultWebApp_myServer/images
              and they are displaying now in the servlets with HTML forms.
              Thanking you
              Very truly yours
              Sriram (Ram) Peddibhotla, PhD
              "Sriram (Ram) Peddibhotla" <[email protected]> wrote:
              >
              >Dear Friends
              >
              >How are you?
              >
              >When the Servlet displays in the browser (IE5.0), when I click on where
              >the image
              >should be, I see the path
              >http://localhost:7001/servlet/FigureName.jpg (????). Why did it add
              >the /servlet
              >part to the path, I thought that was exclusively for deploying servlets
              >in web.xml
              >file.
              >
              >Thanking you
              >Very truly yours
              >Sriram (Ram) Peddibhotla, PhD
              >
              >
              >"Xiang Rao" <[email protected]> wrote:
              >>
              >>Check access.log to see the status of your image request (status code
              >>and response
              >>size). You can also check weblogic.log. On the other hand, IE cache
              >setup
              >>(e.g.,
              >>"Never") could cause this problem.
              >>
              >>"Sriram (Ra) Peddibhotla" <[email protected]> wrote:
              >>>
              >>>Dear friends
              >>>
              >>>How are you?
              >>>
              >>>I am developing Servlets in WebGain Studio Pro V4.1 VisualCafe
              >>>V4.1 to display dynamic HTML forms with embedded
              >>>images (*.jpg and *.gif).
              >>>
              >>>Please see the following sample code -
              >>>"<DIV ID=\"Logo\" STYLE=\"position:absolute; left: 4%; top: 4%;
              >>>width: 25%; height: 12%; z-index:1; visibility:visible\">" +
              >>>"<IMG SRC=\"FigLogo.gif\" WIDTH=\"100%\" HEIGHT=\"100%\">" +
              >>>"</DIV>"
              >>>
              >>>Then I deploymed servlets to BEA WLS 6.0 by including Servlets
              >>>in the Web.xml file. However, I do not see the images when
              >>>viewed in IE5.0 browser.
              >>>
              >>>I appreciate all comments and suggestions.
              >>>
              >>>Thanking you
              >>>Very truly yours
              >>>Sriram (Ram) Peddibhotla, PhD
              >>>          
              >>
              >
              

  • Can a HTML form send data to two servlets?

    I would like to know if an HTML Form can send data to two servlets, I guess I am askin is that can the parameters be passed to two ACTION attributes??

    Hmmmm, well I'm not sure if that is possible, but you could do something of the sort on the server side by chaining them.... the technieque is called Servlet Chaining
    Hope this helps
    Omer

  • Generating XSD files from an HTML form......

    What is the best way to generate XML Schema files from an HTML form? Are there any APIs, Frameworks, software products, that already do this for you? What is the best way to do this programmatically?
    I was thinking about using DOM...
    Any help and/or advice will be greatly appreciated...
    With thanks,
    Unnsse Khan

    users select what they want in their schemas
    If the Schema info is added in a JSP.
    Element Name: elementA
    Data Type: string
    Sub-Elements(Sequence): elementB, elementC
    The field values may be retreived with with the getParameter method.
    String elementName=request.getParameter("ElementName");
    String type=request.getParameter("DataType");
    From the values retreived a Schema may be constructed with the org.w3c.dom.* classes.

  • Help : Calling a Servlet.doPost from a HTML Form (404 Error !!!)

    All
    I trying to make a call to a doPost method of a servlet from the doGet method of the same servlet.
    The call is made from an HTML form, so
    *<form name="input" action="servlet/deleteAlertPage" method="post">*
    ======================================================================
    The web.xml file entry is as follows:
    *<servlet>*
    *<servlet-name>deleteAlertPage</servlet-name>*
    *<servlet-class>bsp.perceptive.custom.webapp.deleteAlert.deleteAlertPage</servlet-class>*
    *<load-on-startup>0</load-on-startup>*
    *</servlet>*
    *<servlet-mapping>*
    *<servlet-name>deleteAlertPage</servlet-name>*
    *<url-pattern>/deleteAlertPage</url-pattern>*
    *</servlet-mapping>*
    So when I run my Servlet from my JDeveloper, I do see the “doGet” method getting executed successfully and I see my HTML from appearing on a browser page.
    As soon as I press the submit button, where I want the “doPost” method to get executed, I get the following error:
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    *10.4.5 404 Not Found*
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead.
    The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource
    is permanently unavailable and has no forwarding address.
    Any ideas ? Is my Servlet Setup and Execution Correct ?
    Any help is appreciated.
    My JDeveloper Version is the latest release :
    About
    Oracle JDeveloper 11g Release 1 11.1.1.2.0
    Studio Edition Version 11.1.1.2.0
    Build JDEVADF_11.1.1.2.0_GENERIC_091029.2229.5536
    Copyright © 1997, 2009 Oracle and/or its affiliates. All rights reserved.
    IDE Version: 11.1.1.2.36.55.36
    Product ID: oracle.jdeveloper
    Product Version: 11.1.1.2.36.55.36
    Any help and advice is greatly appreciated.
    Regards
    patrice

    John
    I got it to work !!
    I had to place the application name in the action value also I had to change the port number, from 8080 to be 7101.
    However
    It was not that straight forward, because when I created my web Application I gave it the application Name of "BSPCustPerWebApps" and Project Name of "BSPCustPerWebApps"and this is reflected in my JDeveloper folder structure: "....\mywork\BSPCustPerWebApps\BSPCustPerWebApps\src\bsp\perceptive\custom\webapp\deleteAlert"
    now when I run my Servlet initially I noticed that Browser URL is saying : http://localhost:7101/BSPCustPerWebApps-BSPCustPerWebApps-context-root/deleteAlertPage
    which means that the web application is : BSPCustPerWebApps-BSPCustPerWebApps-context-root
    so I changed my action value to be
    action="http://localhost:7101/BSPCustPerWebApps-BSPCustPerWebApps-context-root/deleteAlertPage"
    and that worked.
    Weblogic must have created/defauled the application name using the application name and project name that I gave duriung the servlet creation.
    Is there a way of changing the application name to be something shorter and more meaningfull ?
    Also I did not want to hard code the server name, port etc in the action value, so again is there way of making this to be derived ?
    Do you know how to access the WebLogic Console ? , considering I have only installed JDev, which has an embedded weblogic server.
    Thanks for your help.

  • Very big problem with JSF about FORM and "id=" for HTML form's elements and

    I have discovered a very big problem with JSF about FORM and "id=" for HTML form's elements and java instruction "request.getParameterNames()".
    Suppose you have something like this, to render some datas form a Java Beans :
    <h:dataTable value="#{TablesDb2Bean.myDataDb2ListSelection}" var="current" border="2" width="50%" cellpadding="2" cellspacing="2" style="text-align: center">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:outputText id="nameTableDb2" value="#{current.db2_name_table}"/>
    </h:column>
    </h:dataTable>
    Everything works fine...
    Suppose you want to get the name/value pairs for id="nameTableDb2" and #{current.db2_name_table} to process them in a servlet. Here is the HTML generated :
    <td><span <span class="attribute-name">id=<span class="attribute-value">"j_id_jsp_1715189495_22:0:nameTableDb2">my-table-db2-xxxxx</span></td>
    You think you can use the java instructions :
    Enumeration NamesParam = request.getParameterNames();
    while (NomsParam.hasMoreElements()) {
    String NameParam = (String) NamesParam.nextElement();
    out.println("<h4>"++NameParam+ "+</h4>);
    YOU ARE WRONG : request.getParameterNames() wants the syntax *name="nameTableDb2" but JSF must use id="nameTableDb2" for "<h:outputText"... So, you can't process datas in a FORM generated with JSF in a Servlet ! Perhaps I have made an error, but really, I wonder which ?
    Edited by: ungars on Jul 18, 2010 12:43 AM
    Edited by: ungars on Jul 18, 2010 12:45 AM

    While I certainly appreciate ejb's helpful responses, this thread shows up a difference in perspective between how I read the forum and how others do. Author ejb is correct in advising you to stay inside JSF for form processing if form processing is what you want to do.
    However, I detect another aspect to this post which reminds me of something Marc Andreesen once said when he was trying to get Netscape off the ground: "there's no such thing as bad HTML."
    In this case, I interpret ungar's request as a new feature request. Can I phrase it like this?
    "Wouldn't it be nice if I could render my nice form with JSF but, in certain cases, when I REALLY know what I'm doing" just post out to a separate servlet? I know that in this case I'll be missing out on all the nice validation, conversion, l10n, i18n, ajax, portlet and other features provided by JSF".
    If this is the case, because it really misses the point of JSF, we don't allow it, but we do have an issue filed for it
    https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=127
    If you can't wait for it to be fixed, you could decorate the FormRenderer to fix what you want.
    I have an example in my JSF book that shows how to do this decoration. http://bit.ly/edburnsjsf2
    Ed

  • Gettting values from HTML elements in a servlet

    Hello
    I have some Java and embedded HTML code in a servlet which is asking the user to enter a value as below:
    out.println("<form name=\"generategraph\" action=\"/monolith2/graphingoutput\" method = \"get\">");
    out.println("<h3>Pick slope for graph type</h3>" +
    "<input type = \"text\" name = \"slope\" size = \"3\" value = \"1\" align = \"right\>");
    out.println("<input type = \"submit\" value = \"Generate graph\"></form>\n");
    However, I cannot access the contents of the element slope which I need to validate. I have tried:
    String str = request.getParameter("slope");
    But without success; I simply get null.
    Have you any ideas?
    Thanks
    Martin O'Shea.
    Message was edited by:
    Martin_OShea

    skp71
    I tried:
    out.println("<form name=\"generategraph\" action=\"/monolith2/graphingoutput\" method = \"get\">");
    out.println("<h3>Pick slope for graph type</h3>" +
    "<input type = \"text\" name = \"slope\" size = \"3\" value = \"1\" align = \"right\>");
    out.println("<input type = \"submit\" value = \"Generate graph\"></form>\n");
    String str = (String) request.getParameter("slope");
    But without success: I still get null
    Have I done something wrong?
    Martin O'Shea.

  • JSTL forEach inside html form

    I am using JSTL to display data in an editable menu. The data is retrieved from a database and the user may change it if required. The problem is that I get a blank page inside the forEach tag.
    %@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <sql:query var="rs" dataSource="jdbc/agenda">
    SELECT * FROM cardapios WHERE username="${pageContext.request.remoteUser}"
    </sql:query>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <form action="../ChangeMenu" method="POST">
    Everything I write here I can see!!!
    <c:forEach var="r" items="${rs.rows}">
    Restaurante: <input type="text" name="restaurante" value="${r.restaurante}" />  I cant see it!!
    Here I have many <input type="text" ..... etc />
    </c:forEach>
    <input type="submit" value="Salvar" />
    </form>
    </body>
    </html>Well, if I remove the form action, it works properly. So, the data is being retrieved from the database.
    Also, do I really have to use <c:forEach> since it will always retrieve just one line from the table? Is there any other way I can get the data from "rs" ?
    Thanks!

    If you know for certain there is exactly one and only ever one row returned, then you can just access it directly:
    <c:set var="r" value="${rs.rows[0]}"/>With regards to the query, it would probably be better using parameter rather than the variable directly:
    <sql:query var="rs" dataSource="jdbc/agenda">
      SELECT * FROM cardapios WHERE username=  ?
      <sql:param value="${pageContext.request.remoteUser}"/>
    </sql:query>I don't think that would change the functionality, but it would prevent SQL injection attacks.
    I don't see how removing the form action would change the display of the html page.
    My suggestion would be to view source on the generated HTML page, and see what is being produced by running the page.
    Did the query return the results that you wanted? Is it generating valid HTML?
    Cheers,
    evnafets

Maybe you are looking for

  • Opening Multiple Windows

    How are is one supposed to organize events into albums when you cannot see both at the same time? Which photos have been put in the albums? Which have not? Smart Albums is not really the answer as I mix and match. If you have only five pictures or so

  • For character animation is frame by frame, motion or classic tween?

    Hi, i'm very new to adobe flash. I'm using cs5 Am i right in thinking that for detailed character animation, of cartoons or people, i would still need to do frame by frame animation, and then probably use tweening for big movements like making that s

  • ITunes crashes each time I import a CD

    I just updated to 8.0 (MISTAKE) and now everytime I import a CD iTunes/explorer stop working. I have to ctrl/alt/delete to get out of it and restart the computer to use iTunesor explorer again. Additional error messages say Agnt.exe and mmjb.exe are

  • Administration web-site speed

    Hello Community, I have a big problem while using Administration-Websites pf iplanet enterprise 6. in the internal LAN the application and administrator Website loading very slow (gifs,jpgs ando so on) at external (using dial-in connection to ISP) th

  • I desparately need to read a Japanese Clarisworks cwk file!

    Hello Folks; I am a volunteer with an anime convention. One of our japanese musical guests has sent us a list of tech requirements in a clarisworks file. I need to import it to something current (or find a place where i can buy something old ) that p