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 6210221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:07:17+00:00 2026-05-24T06:07:17+00:00

I have a situation in which I think it is a good idea to

  • 0

I have a situation in which I think it is a good idea to use an EL function that is a void java method. This is a simple jsp to update a database of people’s first and last name. So, there are two text fields, name and password. The user enters them and clicks submit, and it forwards these with POST to another jsp. This jsp simply calls the EL function, let’s call it “put” that takes two parameters and is derived from a java method putPerson(String, String) that gets a connection to the database and puts the first and last name in their proper places. Now, putPerson is void because all it does is put the strings in the database. So, is this bad programming practice, and if so, why? It seems to me to be a quick and elegant solution, and it works. The only problem is that you can’t just call it by saying ${put(first, last)} because that prints out “<“, for some reason, but that’s easy enough to work around. So why do they recommend to not use EL functions with void return types?

  • 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-24T06:07:18+00:00Added an answer on May 24, 2026 at 6:07 am

    Printing < would be coming from somewhere else, or is a bug in the EL parser. But either way, you should not do that in an EL function.

    EL functions are meant to be utilities – for example .substring(), .join() (arrays), etc. And they are used while you are displaying the page and need some more complex presentation logic.

    What you want to do is a typical story and it is done in a servlet (or any other action component, if you are using a framework).

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

Sidebar

Related Questions

I have come across a situation (which I think is weird but is possibly
I have the situation where i use GIS software which stores the information about
I have situation in which I read a record from a database. And if
I have a situation in which a managed DLL calls some unmanaged DLL. I
I have a situation in which I need to convert a text data into
I have a situation in which user can single tap a control, which show
I have a situation in which the ideal relationship, I believe, would involve Value
I have a situation in which I am putting the UITableView in editing mode,
let us have a situation in which the following program prints some 10 lines
I have an odd situation in which I need to modify the position of

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.