• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

PDF in JSF

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi everybody,

I am trying to open a PDF file from my JSF app on click of a link.

But when I click on this link my browser throws the error saying ...

SRVE0255E: A WebGroup/Virtual Host to handle localhost:10040 has not been defined.

but i have the MIME type defined in my web.xml file

and below is the code I am having in my jsp

<hx:outputLinkEx value="/abc.pdf" target="_blank"
styleClass="outputLinkEx" id="linkEx1">

the file abbc.pdf is in my webcontent.

can any one help me on this.

Thankyou.
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you actually understand how relative URL's work? The leading slash moves you to the domain root.

If the page is requested at e.g. http://example.com/webapp/page.jsf and the relative URL to the PDF file is linked as /abc.pdf, then it will in fact point to http://example.com/abc.pdf. Is the file for sure there?
 
srinivas bodapati
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the reply Bauke Scholtz ,

Yes, my file is there.

This is working fine if try to open another jsp file in the same path, but unable to open a PDF.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, that error isn't shown for decoration only. The URL is simply not reachable.

The resource is actually not there. There may be a typo in the URL (keep case sensitivity in mind!). There may be something which blocked or malformed the request, for example some odd Servlet or Filter configuration or so which runs at the same url-pattern.

Have you read the complete appserver logs? Don't you see something being logged right before the error occurs?
[ December 18, 2008: Message edited by: Bauke Scholtz ]
 
srinivas bodapati
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont know whats goinn on exactly with my browser,

because the same works when I try to access it using my internal browser available with RAD.

But the same fails to open when I use my external browser.

Any how, thanks for the response though.
 
reply
    Bookmark Topic Watch Topic
  • New Topic