Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. Can not Access RequestAttribute in JSTL

Can not Access RequestAttribute in JSTL

Scheduled Pinned Locked Moved Java
questionjava
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AmbiguousName
    wrote on last edited by
    #1

    Hello there. I am trying to get rid of scriptlets. I attach an object from servlet and try to access it in JSTL. But the logs say that JSP can not find the properties of this object. Here is the servlet sample

    request.setAttribute("student", student);

    Here is the JSTL sample, with different combinations - all producing no result at all (how ever scriptlets do)

    // scriptlets work fine - I just want to use JSTL for this
    <input type='text' value='${student.FirstName}' /> // without single quotes
    <input type='text' value='${student.FirstName}' /> // with single quotes

    <input type='text' value='' /> // using - with single quotes
    <input type='text' value= /> // using - without single quotes

    As you can see, I have tried different combinations but could not get and display value of request attribute using JSTL. What is wrong? Thanks for any input.

    This world is going to explode due to international politics, SOON.

    R 1 Reply Last reply
    0
    • A AmbiguousName

      Hello there. I am trying to get rid of scriptlets. I attach an object from servlet and try to access it in JSTL. But the logs say that JSP can not find the properties of this object. Here is the servlet sample

      request.setAttribute("student", student);

      Here is the JSTL sample, with different combinations - all producing no result at all (how ever scriptlets do)

      // scriptlets work fine - I just want to use JSTL for this
      <input type='text' value='${student.FirstName}' /> // without single quotes
      <input type='text' value='${student.FirstName}' /> // with single quotes

      <input type='text' value='' /> // using - with single quotes
      <input type='text' value= /> // using - without single quotes

      As you can see, I have tried different combinations but could not get and display value of request attribute using JSTL. What is wrong? Thanks for any input.

      This world is going to explode due to international politics, SOON.

      R Offline
      R Offline
      rah_sin
      wrote on last edited by
      #2

      May be this article can be useful The JSTL Expression Language | Expression Language Overview | InformIT[^]

      rahul

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups