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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:09:40+00:00 2026-06-16T15:09:40+00:00

I have an ActionListener for a JSF button as follows, <h:commandButton id=id1 action=#{Mybean.Submit} value=Click>

  • 0

I have an ActionListener for a JSF button as follows,

<h:commandButton id="id1" action="#{Mybean.Submit}" value="Click">
    <f:actionListener binding="#{Mybean.actionListenerImpl}" type="bean.ActionListenerImpl" />
</h:commandButton>

The ActionListener is implemented as follows,

public void processAction(ActionEvent event) throws AbortProcessingException {
    FacesContext fc = FacesContext.getCurrentInstance();
    HttpServletRequest req = (HttpServletRequest)fc.getExternalContext().getRequest();
    PortletBackingContext pbc = PortletBackingContext.getPortletBackingContext(req);
    pbc.fireCustomEvent("test", "test");
}

But this is throwing the follwing exception:

java.lang.ClassCastException: com.bea.portlet.container.ActionRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
    at bean.ActionListenerImpl.processAction(ActionListenerImpl.java:18)

I need access to HttpServletRequest to get PortletBackingContext object through which I can fire a custom event.

I am using JSF 1.2 in weblogic 10.3.0

  • 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-16T15:09:42+00:00Added an answer on June 16, 2026 at 3:09 pm

    I got HttpServletRequest by accessing “javax.servlet.request of ActionRequest.

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

Sidebar

Related Questions

I currently have a navigation-menu: ... <p:menuitem id=id1 value=Page 1 action=home.xhtml?faces-redirect=true actionListener=#{homeBean.someMethod(1)}/> <p:menuitem id=id2
I have an actionlistener that fires when I click a button lets call it
I have a JSF h:datatable with rows of data: <h:dataTable id=dataTable value=#{SessionsController.dataList} binding=#{table} var=item>
I have something like the code below: for(int i=0;i<10;i++){ button=new JButton(buttons[i]); button.addActionListener(new ActionListener(){ public
I have a problem with using jQuery Dialog and Ajax submit in JSF. I
I have a JSF page with a button and a label. When the user
I have simple JSF page and simple backing bean. I have p:commandButton on the
HI, I have a doubt on calling the ActionListener method in the JSF beans.
I have a following code: <div id=mws-navigation> <ul> <li><p:commandLink value=#{contentMB.msg.welcome_title.value} actionListener=#{cleanUpMB.alChangeArea} styleClass=mws-i-24 i-home action=#{welcomeMB.aLoadDashboard}
Im used JSF and PrimeFaces. I have an ActionListener that fires when someone clicks

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.