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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:13:09+00:00 2026-05-31T07:13:09+00:00

Im using JSP and Websphere to host a page that tells the user what

  • 0

Im using JSP and Websphere to host a page that tells the user what browser they are using.

right now it says:

 Browser used to access this page is Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.1)       Gecko/20100101 Firefox/10.0.1

but i want it to say just Firefox.
does anyone know how i can do this?

heres my code for the java and h1:

 <% String userAgent = request.getHeader("User-Agent");%>
 <h1>Elon CSC430 Browser used to access this page is <%=userAgent%></h1>
  • 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-31T07:13:11+00:00Added an answer on May 31, 2026 at 7:13 am

    As you have a String, can’t you just use indexOf to check if Firefox is in the userAgent?

    Or better yet, inject an object into the page that will do this determination (and checking for other browsers), and return the string you want put into the page, maybe?

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

Sidebar

Related Questions

I'm making a website using JSP and servlets and I have to now break
I am creating an user registration form using jsp,in which there is an option
How do you get Client IP and Browser information using JSP?
I'm generating a page using jsp, it has a list element which shows a
I am generating dynamic page using JSP, I want to save this dynamically generated
I am using JSP 2.1 in a Java EE web application. My JSP page
i am using JSP. Now assume I have three tables in mysql related as
I know that using JSP scriptlets is generally frowned upon, which is why I'm
I am using JSP for my webpage. I used JavaScript to get a dynamic
I am using jsp and jquery. After logging in, the home page is displayed,

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.