How html textfield use i jsp tag

hi master
sir see my php code i get input in name and fname text box and pass in php tag for insertion into database
<html>
<body>
<form action="mfa.php" method="post">
First Name<input type="text" name="fname">
Second Name<input type="text" name="lname">
<input type="submit" name"Insert">
</form>
<?php
//Inserting records into database
$firstname=$_POST['fname'];
$lastname=$_POST['lname'];
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("test1");
mysql_query("INSERT INTO persons (Firstname, Lastname) VALUES ('$firstname','$lastname')");
echo "Data Inserted";
?>
<?php
//showing resutls in browser
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("test1") or die(mysql_error());
$result = mysql_query("SELECT * FROM persons") or die(mysql_error());
echo "<table border='1'>
<tr>
<th>First Name</th>
<th>Last Name</th>
</tr>";
while($row = mysql_fetch_array( $result ))
echo "<tr>";
echo "<td>" . $row['Firstname'] . "</td>";
echo "<td>" . $row['Lastname'] . "</td>";
echo "</tr>";
echo "</table>";
?>
</body>
</html>
how i use html text box and pass to jsp tag for insertion data into database
please give me sample code
thank's
aamir

I have never had any problems mixing straight HTML (without the verbatim tag) and JSF tags. OTOH, I use facelets, not JSPs, so my experience may not be applicable.

Similar Messages

  • How do I use dynamic JSP vars in a form tag with implicit sessions?

    I'm using iAS 6 SP4 and 'lite' sessions w/ sticky LB on Win2K for development and need to use a dynamic variable (via an = scriptlet) to specify the URL a form tag's ACTION method posts to. The implicit URL session encoding attempts to add the hidden input tags to the form but part of it is getting cut off. If I remove the dynamic var scriptlet from the form tag it works fine. How can I use dynamic vars and implicit URL session encoding?
    Here's my code sample:
    <FORM NAME='Create' METHOD='POST' ACTION='<%= servletRootStr %>CreateServlet' TARGET='_top'>
    Output is:
    <FORM NAME='Create' METHOD='POST' ACTION='http://my.server.com/NASApp/WebStuffApp/Create' TARGET='_top'>T NAME="GXHC_gx_session_id_" TYPE="HIDDEN" VALUE="GXLiteSessionID--8351372849698357580" ></INPUT><INPUT NAME="GXHC_GX_jst" TYPE="HIDDEN" VALUE="d692bc3d662d6164" ></INPUT>
    Because the <INPUT> tagon the first session var is cut off, up to the T, the page obviously fails. Can this be fixed with a config setting, or is it a bug in iPlanet??

    Thanks for helping me Anurag.
    The problem I tried to solve was that I want the result from my service methods
    in XML format. I thought a callback/polling was the best alternative, am I right?
    Since the callback option doesn´t work I will try to poll the service.
    Are there any other options for solving my problem??
    Thanks again!!
    /A
    "Anurag Pareek" <[email protected]> wrote:
    >
    Andrej,
    I guess you are trying to invoke a Webservice which defines a callback
    method
    from a JSP, and want the JSP to handle the callback made by the webservice.
    For a client to be able to handle a callback made by a Webservice, it
    has to be
    a web service in itself.
    Even some web service tools do not support 'Solicit responses' and hence
    they
    would not generate handlers for the callback methods by default. You
    can download
    a callback WSDL in such cases and implement it on the client side. The
    server
    side web service will then callback to that webservice.
    The other option to callbacks is to use polling methods. This can be
    done from
    any client such as Java client/ JSP client or a .NET client.
    Hope this helps. Let me know if you have any further questions.
    Regards,
    Anurag
    "Andrej" <[email protected]> wrote:
    I´ve tried this but with no success..
    How do I recieve the data in a servlet/JSP-page?
    Thanks.

  • Can any one tell me how param is used in Jsp:setProperty ?

    Hi Can anyone please explain me with example how param attribute is used in <jsp:setProperty>?
    I have gone through the java doc but it still not clear to me....

    Try the [JSP syntax reference|http://java.sun.com/products/jsp/syntax/2.0/syntaxref2025.html#8856]
    It is very rare that you would use the param attribute, as most times you have your incoming parameter and bean property having the same name.
    Example:
    Say you navigate to http://localhost:8080/myApp/myPage.jsp?username=Bob
    That sends a request parameter "username" with the value "Bob"
    If we have a bean which also has a property username (getUsername(), setUsername()) (ie the property and the parameter have the same name) you can use the following jsp code:
    <jsp:useBean id="user" class="com.mypackage.User"/>
    <jsp:setProperty name="user" property="username">Translates approximately into
    User user = new User();
    user.setUsername(request.getParameter("username"));If instead the bean had a property "username" but the parameter was "userId"
    <jsp:useBean id="user" class="com.mypackage.User"/>
    <jsp:setProperty name="user" property="username" param="userId">
    User user = new User();
    user.setUsername(request.getParameter("userId"));Cheers,
    evnafets

  • How can I use 1 JSP for edit/create functionality?

    Hi All,
    Does anybody have an example of using one JSP for both editing and creating an object? I am pretty sure I can handle most of it, but am not sure about how I can specify different messages from the resource bundle (i.e. modifying the screen title for the different uses, "New Campaign" vs. "Edit Campaign").
    My background is in PHP and DHTML (i.e. more front-end) and I'm just starting with Java and JSF. As such, I want to be sure that I'm using appropriate patterns for my programming.
    Thank you in advance for any help,
    Matt

    I make the difference between modifying an existing object and a new one by the ID in the object. Each object has a unique ID in my app assigned by the database. So if the ID is 0, the user is creating a new object, not stored in the DB yet. I store the object to be edited/modified in the session before displaying the page:
    For the title:
    <h:outputText value="Edit Material" rendered="#{sessionScope.selectedMaterial.materialId != 0}"/>
    <h:outputText value="New Material" rendered="#{sessionScope.selectedMaterial.materialId == 0}"/>For the action buttons:
    <h:commandButton value="Update Material" action="#{MaterialControllerBean.updateMaterial}" rendered="#{sessionScope.selectedMaterial.materialId != 0}"/>
    <h:commandButton value="Create Material" action="#{MaterialControllerBean.createMaterial}" rendered="#{sessionScope.selectedMaterial.materialId == 0}"/>

  • How do i query for a html content using cm:select tag

    Hi i want to query the dmsBase directory for any html file(s).
    I am using..
    <cm:select> tag and using query ="mimeType like 'text/*' "
    But it doesnot work
    HELP....

    Thanks for the reply, however I did find that you can test for a NULL with a Velocity #if statement and it works. Here's what I found this at the below website:
    Conditional. Null can be checked for using #if ($obj) obj not null #end syntax.
    http://today.java.net/pub/a/today/2003/12/16/velocity.html
    Regards

  • How Do I Use the Help Tag/Help Path in LabVIEW to Link to a Specific tag in an HTML File?

    Is there any way to point user to a tag in an HTML file when he click "Click here for more help" ?
    Message Edited by zou on 03-08-2007 02:38 PM
    George Zou
    http://webspace.webring.com/people/og/gtoolbox
    Attachments:
    a.png ‏18 KB

    George,
    I believe you are correct in saying that there is no way to link directly to a specific anchor tag within an html file from the context help.
    I would encourage you to visit our Product Suggestion Center if this is a feature you would like to recommend that our R&D team consider for future versions of LabVIEW.
    Is it possible for you to create a .chm file?  Or perhaps you could have some kind of "table of contents" at the top of your .html help file.  This would require an extra click by the user but may be an option for you.
    Regards,
    Simon H
    Applications Engineer
    National Instruments
    http://www.ni.com/support/

  • What is the standard on using some jsp tags?

    Has it become an industry standard to not use scriplets, expressions and declarative tags in jsp or is it all dependant on the scale of the application and the preference of the developer. I have seen the arguments for not using these tags and while I can see how they can become problematic for large applications with many developers I never had a problem developing a small application just by myself.
    I would like to know how many of you jsp developers still use these tags and how many don't and your reasons why you do or why you don't?
    I wonder if most people actually see these problems for themselves or do they just join the in crowd because it's the new thing
    And if it is a standard why aren't they just phased out of exiistance. Stuff like that makes it hard for people to learn. I can't tell you how many tutorials i've seen teaching scriptlets and expressions

    I started with scripting, etc. but early on switched to CTLs. They can be bundled and distributed very easily.
    I had read many, many times how hard it was to maintain a site that used a lot of scripting, etc. but gave it only a little heed. Like you, I was a one man show, certainly I could remember what I was doing.
    It didn't take long before I could see that they were right. I immediately ceased what I was doing, repackaged nearly all of the logic into tag libraries (8 in all), redesigned the existing applications to use the tag libraries (which was a pain in the beginning, but worth it big time).
    I am now redesigning our company website to include things like order status, event calendars and a lot of neat web-based stuff. I will have this website done in half the time of our old static html website.

  • How do i use the jsp session in web application

    pls i do i go about trying to maintain a user in a web application when he sign in so that his state would be mainain through out the other pages and also adding sound to my pge the page is being design with jsp thank u frm hamzah

    I see what you are saying.
    The JNDI approach should work-we will try to reproduce this internally.
    I would recommend leveraging the OSGi service registry, instead of using JNDI, however. The Event Server is a modular server based on OSGi, so one should use the OSGi service registry whenever possible instead of using the jndi registry. Jndi is primarily there to support legacy code that requires Jndi.
    Any data sources that you configure are automatically registered in the OSGi service registry. When there is more than one data source they can be distinguished using their name.
    There are a couple of options.
    If you want to inject a reference to your datasource into a Spring bean, you can use an annotation, @Service, to annotate a setter method on your bean (see my previous post). The container will then inject a reference to the data source into the bean.
    You can also put the following in your spring application context file
    <osgi:reference id="myDataSource"
    interface="javax.sql.DataSource"/>
    This creates a bean proxy that references the datasource by looking up the datasource in the OSGi service registry. It works similarly to JndiObjectFactoryBean, but it uses the OSGi service registry instead of the JNDI registry. You can read more about it here
    http://www.springframework.org/osgi/specification
    (Look in section 3.3)
    Hope that helps.
    Seth
    Edited by swhite at 08/01/2007 6:19 PM

  • How can I use normal JSP-Scripting in Studio Creator pages ?

    Hello,
    if I try to integrate for example
    <jsp:scriptlet>
    for(int i=0; i < 10; i++) {
    out.println("Txt: " + i);
    </jsp:scriptlet>
    in my JSP Page it dosn't wok because the IDE complains that the jsp-document isn't wellformed due to the < sign.
    If you replace the < by and < the IDE dosn't complain any longer but you get an runtime error during execution of the page because the jsp-page can't be compiled by the jsp-compiler.
    Does everybody nows how to integrate normal jsp-scripting in the page

    Hi
    I have not copied any jar files to any folders. The default installation executes this code without any compilation errors. I am running this on Sun Application Server. I have not tried on Tomcat. But if it asks for tools.jar, you can copy this jar file to <creator-root>/java/lib directory or <Creator-root>/SunAppServer8/lib directory.
    Thanks
    Srinivas

  • How can I use j2ee(jsp) connect msolap

    I look for long,but not find,please tell me.thanks

    I don't think you really searched all that hard.
    http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=jsp+msolap

  • How can i use tag library in the mvc?

    hello
    in some tag libraris such as jakarta tag library and jrun tag library,there is database
    access tag, it provide convenient function to access database from jsp page,but i wonder how can i use such a tag within MVC architecture.
    as we know,in MVC architecture,all requests from the jsp pages are submit to the controller servlet,then the controller manipulate ejb to access database,it don't allow the database access from the jsp page.
    who can tell me how can i combine the tag library with mvc architecture appropriately?
    thank you!

    You can't! If you decide to limit the JSP to be part of the View component, obviously you should not include tags that directly access the database. If the strict MVC architecture is less important to you, then the tags can save coding time. It's your choice.

  • How to use my own tag in XMP

    I have translated HTML to PDF. It is working properly if I use only DC Metadata.
    But if I write other tag in XMP and load this file in PDF, I cannot see right information.
    I want to use my own tag such as "co-author" and "related paper".
    I define this kinds of tags as namespace and XML Schema.
    Then I want to use this tag in PDF. But I don't know how to do after this.
    How can I do? How can I use my own tag(element or attribute) in XMP?
    Actually I don't have much experience to deal with XMP.
    please help.

    Will you clarify where you are looking for your custom information.
    It should display in Acrobat.
    Acrobat 7 File menu > Document Properties... > Additional Metadata... > Advanced > {list of namespaces}
    Your tags should appear under the namespace you used.

  • How to use logic:interate tag in this case? thanks a lot.

    a javabean:
    a{
    int a;
    ArrayList bList (to store some strings);
    request.setAttribute("a",a);
    then how can I use <logic:iterate> tag to loop to use <bean:write> tag to write out the strings contained by bList?

    use getparams and get that attribute(arraylist)
    define a bean in jsp with property as this attribute for which u should have a getter method in context
    the following is to iterate through arralist of arraylist
    <logic:iterate id="accList" name="<%=subAppContextName%>" ="accountsHoldedList">
              <tr>
    <logic:iterate id="accList2" name="accList">
    <td> <bean:write name="accList2"/> </td>
    </logic:iterate>
    <td>
    <jfp:link styleClass="appNavNext" warn="false" bundle="<%=bundleName%>" key="GiveNotice" paramId="selectedAccount" paramName="accList2" href="javascript:submitMyForm();"></jfp:link>
    </td>
    </tr>
    </logic:iterate>
    accountsHoldedList is the one which is set in Context and i am iterating to display it.
    bye

  • How can I create an accessible tagged PDF in Illustrator CS6?

    I have put alt text on the slices but when I save the file as a PDF it isn't tagged. How can I use these alt tags to make the PDF accessible? How can I tag the text in the Illustrator file so it is tagged in the PDF?

    I do wonder why there are instructions on how to add alt tags in Illustrator, and they only work if you create HTML. It sounds like Illustrator is going to be a legacy product in favour of InDesign, if it can't create tagged PDFs with Alt Tags for images. In this case, the Illustrator file is placed in InDesign, so even though InDesign can create tagged PDFs, the tagging doesn't work for placed Illustrator content. So it sounds like we either do the tagging from scratch in Acrobat, as you say, or we try to bring in the content directly into InDesign and tag it there.
    If only Adobe wholeheartedly supported accessible documents so we could more easily use it to meet WCAG 2.0 Level AA standards which are mandatory for our organisation. We are looking at CommonLook software to make the process of creating accessible PDFs easier and quicker. It's just hard to believe the lack of support from Adobe on this. Acrobat doesn't even come close to checking against WCAG 2AA and the online help is very hit and miss and full of broken links. For such an expensive product it's very disappointing, so thank goodness for other companies who see this as an opportunity to provide a better service.

  • Register 12 VerifyError exception when compiling jsp with that jsp tag!

              Hi everybody,
              We implemented a tag which is charged with a simple task like just "out.println"s,
              on production with WL5.1 SP11,jdk1.2.
              Then we got java.lang.VerifyError exception which is also denoted at Giuseppe Madonna's
              mail on ( http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=6834&utag=
              ) that "java.lang.VerifyError: Register 12 contains wrong type"
              To be able to find the inconsistency in class files denoted at VerifyError exception,
              we delete the tmp dir. of web app resides in a war.
              Also the related java beans used in jsp tag and related jsp, are in a jar on our
              classpath and .tld file resides in the .war file of our web application.
              But also, I must define that it is our first tag implemented after we migrate to
              the .war file after the web application directory structure of same application(that
              old dir. also deleted), I know it is silly but, is it possible that WL can now refer
              to something related our previous directory structure of our app. like that old .tld
              file or classes?
              Or may it be related with the difference between jdk versions on the test and the
              production server?
              Any help will be really appreciated..
              Many thanks,
              Banu
              

              Start up weblogic with -
              java -noverify ....
              Mike
              "banu" <[email protected]> wrote:
              >
              >Hi everybody,
              >We implemented a tag which is charged with a simple task like just "out.println"s,
              >on production with WL5.1 SP11,jdk1.2.
              >
              >Then we got java.lang.VerifyError exception which is also denoted at Giuseppe
              >Madonna's
              >mail on ( http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=6834&utag=
              >) that "java.lang.VerifyError: Register 12 contains wrong type"
              >
              >To be able to find the inconsistency in class files denoted at VerifyError
              >exception,
              >we delete the tmp dir. of web app resides in a war.
              >
              >Also the related java beans used in jsp tag and related jsp, are in a jar
              >on our
              >classpath and .tld file resides in the .war file of our web application.
              >
              >But also, I must define that it is our first tag implemented after we migrate
              >to
              >the .war file after the web application directory structure of same application(that
              >old dir. also deleted), I know it is silly but, is it possible that WL can
              >now refer
              >to something related our previous directory structure of our app. like that
              >old .tld
              >file or classes?
              >
              >Or may it be related with the difference between jdk versions on the test
              >and the
              >production server?
              >
              >
              >Any help will be really appreciated..
              >Many thanks,
              >Banu
              >
              

Maybe you are looking for

  • IPod v2.3 no longer recognised by PowerBook G4

    On plug-in to the computer, the iPod lurches ahead a bit, displays the apple symbol and then shows an ominous animation of a rotating disk under a magnifying glass. The iPod does not show on the computer's desktop so I cannot use the disk utility to

  • How to define Side Panels for linked to Child Window Applications

    We are trying to use the NWBC Side Panel with PPM 6.0 in NWBC 3.5.  We have a Role that has a menu defined that gives the users a link to the INM_WORKCENTER_APP which displays the current user's Tasks in a table. When we click on a task in the table

  • Why are fonts very rough in Chrome but fine in the other browsers?

    I just started using BrowserLab about an hour ago (5/5/2011 2030 CST). I am not using the Dreamweaver integration, I'm just going to the BrowserLab site and using the facilities. The page, on one of my sites, I choose to look at first (http://www.sug

  • Differentions between the US and europe...

    I have my ipod with it`s adapter of the US,110W. I`m going to go to Europe, is there an adapter that I can buy?(for the required W, will it be suitable for my 60GB bought in the US ipod?) And Do I need a different Power-Supply from the one I have on

  • Anybody knows where to download the dco.jar file????

    hi, do u guys know where i can download the dco.jar file ??? (Domino Collaboration Object - Lotus Domino) It seems that i really cnt find it.... thanks