• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble configuring Tomihawk  RSS feed

 
M Burke
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am making a call to AddResourceFactory() in an attempt to inject Javascript into the response header. I am getting a Tomahawk config error but I am not clear what I need to add to the web.xml and perhaps faces-config.xml. I did go to the link, but I still could not find what I need.

error:
java.lang.IllegalStateException: ExtensionsFilter not correctly configured. JSF mapping missing. JSF pages not covered.

Method:

public void callBasicPopupWindow(ActionEvent event){

final String viewId = "/popup.faces";

FacesContext facesContext = FacesContext.getCurrentInstance();

// get the view's url
ViewHandler viewHandler = facesContext.getApplication().getViewHandler();
String actionUrl = viewHandler.getActionURL(facesContext, viewId);

String javaScriptText = "window.open('"+ actionUrl +"', 'popupWindow', 'dependent=yes, menubar=no, toolbar=no');";

// Add the Javascript to the rendered page's header for immediate execution
Dies Here: AddResource addResource = AddResourceFactory.getInstance(facesContext);
addResource.addInlineScriptAtPosition(facesContext, AddResource.HEADER_BEGIN, javaScriptText);

}

 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
M Burke wrote:
java.lang.IllegalStateException: ExtensionsFilter not correctly configured. JSF mapping missing. JSF pages not covered.

Read the Tomahawk documentation how to do it. Basically you need to map the ExtensionsFilter on the servlet-name of the FacesServlet.

http://myfaces.apache.org/tomahawk/extensionsFilter.html
 
M Burke
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bauke, I got it now
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!