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

  • Home
  • SEARCH
  • 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 947879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:09:05+00:00 2026-05-15T23:09:05+00:00

I need to have this link: http://myserver:/myproject/innerpage/clip.jsf&id=9099 to extract the id from a code

  • 0

I need to have this link:

http://myserver:/myproject/innerpage/clip.jsf&id=9099

to extract the id from a code like this:

HttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance().getExternalContext().getRequest();
String clipId = request.getParameter("id");

When I run it on tomcat I get:

message
/OnAir/innerpage/clip.jsf&id=9099

description The requested resource
(/OnAir/innerpage/clip.jsf&id=9099)
is not available.

When I run it without &id=9099 it runs all right.

How can I make it run?

  • 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-15T23:09:06+00:00Added an answer on May 15, 2026 at 11:09 pm

    The separator character between path and query string in URL is ?, not &. The & is separator character for multiple parameters in query string, e.g. name1=value1&name2=value2&name3=value3. If you omit the ?, then the query string will be seen as part of path in URL, which will lead to a HTTP 404 page/resource not found error as you encountered.

    So, this link should work http://myserver:port/myproject/innerpage/clip.jsf?id=9099


    That said, there’s a much better way to access the request parameter. Set it as a managed property with a value of #{param.id}.

    public class Bean {
    
        @ManagedProperty(value="#{param.id}")
        private Long id;
    
        @PostConstruct
        public void init() {
            System.out.println(id); // 9099 as in your example.
        }
    
        // ...
    }
    

    The EL #{param.id} returns you the value of request.getParameter("id").

    A tip: whenever you need to haul the “raw” Servlet API from under the JSF hoods inside a managed bean, always ask yourself (or here at SO): “Isn’t there a JSF-ish way?”. Big chance you’re unnecessarily overcomplicating things 😉

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

Sidebar

Related Questions

Say i have this PHP code: $FooBar = a string; i then need a
i need help with disk_total_space function.. i have this on my code <?php $sql=select
This is different than the simple 2 column layout. I need to have this
I have this scenario where I need data integrity in the physical database. For
I have this large C++ project that I need to build on a platform
We have this set of data that we need to get the average of
I have this in my installer and I need to change the name of
I have this idea for a free backup application. The largest problem I need
So, I have this situation where I need to see if an object is
I need to have a single instance application (as per this answer ), but

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.