Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3214636
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:05:03+00:00 2026-05-17T15:05:03+00:00

I have to create a simple form that uses JSP for the view with

  • 0

I have to create a simple form that uses JSP for the view with the Model and the controller being Servlets, the communication needs to be done using JavaBeans.

I’ve created a JSP powered form to accept a user name and a password which needs to be authenticated for the user to be able to post & view messages in the Forum I’ve used the following code to read the JSP textbox:

<%@page import="forum.beans.*" %>

<html>
  <head>
    <title>Login - Meassage Bord</title>
        <%
                String uname = request.getParameter("uname");
            String pass = request.getParameter("pass");

%>
  </head>
  <body bgcolor="LightSteelBlue">
    <font face="Calibri, Centuary Gothic, Times New Roaman">
        <table border="0" align="center">
          <form method="post" action="servlet\Controller">

                <tr>
                    <td>Username: *</td>
                    <td><input name="uesername" value="<%=uname%>" type="text" /></td>
                </tr>

                <tr>
                    <td>Password: *</td>
                    <td><input name="password" value="<%=pass%>" type="password" /></td>
                </tr>
                <tr>

                    <td align="center"> <br /><br /><input type="submit" value="Login" /></td>

                    <td align="center"> <br /><br /><input type="reset" value="Clear" /></td>
                </tr>

            </form>
        </table>

    </font>
  </body>
</html>

My questions are, instead of what I’ve used should I use

<%request.getParameter("uesername");%>

secondly the how can transfer these values in to JSP tags??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:05:03+00:00Added an answer on May 17, 2026 at 3:05 pm

    instead of what I’ve used should I use

    <%request.getParameter("uesername");%>
    

    You should be doing this in the doPost() method of the controller servlet which is listening on the form’s action URL. Noted should be that in case of a good JSP/Servlet model/view/controller design, the JSP should not contain any scriptlet line. Keep this in mind. See also this topic for several hints.

    secondly the how can transfer these values in to JSP tags?

    You can retain them by ${param} in EL. It basically refers to a Map<String, String> where the parameter name is the key.

    <input name="username" vaule="${param.username}">
    

    Noted should be that this is sensitive to XSS attacks. You might earn extra points if you figure how to solve this 😉


    Another unrelated comment: the HTML <font> tag is deprecated since 1998. I am not sure where you’ve learnt about it, but those sources are far outdated. You sould be using CSS to give style to the HTML document.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple PowerShell script that uses WMI to create a web site
i have very simple problem. I need to create model, that represent element of
I have a VERY simple windows form that the user uses to manage Stores.
I have a simple form that uses jQuery validation to notify the user of
I have a model that uses the low level validate_on_create method, based on a
I am trying to create a usercontrol that is an extremely simple form. This
I have a requirement to create a simple database in Access to collect some
I have stfw but I cannot find a simple / standalone way to create
I'm new to postgreSQL and I have a simple question: I'm trying to create
I have a simple Delphi program that I'm working on, in which I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.