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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:55:38+00:00 2026-06-05T11:55:38+00:00

My webapp is ready but I just wanted to add a little dropdown menu

  • 0

My webapp is ready but I just wanted to add a little dropdown menu with the username as title. This is my jsp code:

                <i class="icon-user"></i> 
                <%
                    session.getAttribute("name");
                %>
                <span class="caret"></span>

and it sais

session cannot be resolved

9:              <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
10:                     <i class="icon-user"></i> 
11:                     <%
12:                         session.getAttribute("name");
13:                     %>
14:                     <span class="caret"></span>
15:                 </a>

There is a session because I’m logged in.

Kind regards,

  • 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-06-05T11:55:40+00:00Added an answer on June 5, 2026 at 11:55 am

    You can use EL, which is prefered in JSP.

    <c:out value="${sessionScope.name}"/>
    

    Or if the name value is HTML safe, you can use

    ${sessionScope.name}
    

    Make sure the JSP is allow access session.

    <%@ page session="true" %>
    

    To use core JSTL, make sure the following code is included.

    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My webapp (Spring3 + Hibernate3) always worked with services class-annotated with @Transactional and this
EDIT: This question is solved, but I can't accept my own answer just yet.
I'm currently using Backbone.js for my webapp but I just read about batman.js and
My webapp alert looks like this: InputCoordinates.html Latitude must be filled out. I would
I am developing a webapp using PHP and MongoDB. In this app I keep
I got this answer from Kjensen and read the answers, but this is a
I have an Asp.net app that simply reads an xml file and this code
This is for uni homework, but I reckon it is more a generic problem
I read several posts regarding this but still don't understand how to solve my
This feels like a really basic question, but I haven't been able to find

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.