webtier@glassfish.java.net
Re: creating a file from managed bean.
This message
: [
Message body
] [ More options (
top
,
bottom
) ]
Related messages
: [
Next message
] [
Previous message
] [
In reply to
] [
Next in thread
] [
Replies
]
Contemporary messages sorted
: [
by date
] [
by thread
] [
by subject
] [
by author
] [
by messages with attachments
]
From
: <
webtier_at_javadesktop.org
>
Date
: Tue, 17 Aug 2010 00:00:28 PDT
Hello samanosuke31,
to my knowledge, the servlet standard defines a way to get the path of a webapp on the disk.
http://download.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String
)
i.e. if I'm not mistaken you should be able to get the path on disk via
[code]servletContext.getRealPath("/");[/code]
In order to fetch the servletContext from Faces, you can do
[code]ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext();[/code]
I hope this helps,
Manuel
[Message sent by forum member 'manuelbernhardt']
http://forums.java.net/jive/thread.jspa?messageID=480355
This message
: [
Message body
]
Next message
:
webtier_at_javadesktop.org: "insertChildren in composit componenets beahving wierd"
Previous message
:
webtier_at_javadesktop.org: "creating a file from managed bean."
In reply to
:
webtier_at_javadesktop.org: "creating a file from managed bean."
Next in thread
:
webtier_at_javadesktop.org: "Re: creating a file from managed bean."
Reply
:
webtier_at_javadesktop.org: "Re: creating a file from managed bean."
Contemporary messages sorted
: [
by date
] [
by thread
] [
by subject
] [
by author
] [
by messages with attachments
]