You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by dsj <de...@gmail.com> on 2009/02/09 12:50:51 UTC

Check if file exist?

Hi, how to check if one image exists in my app-folder? or in other way: how
to check if any file exist im my Web-app\images? 
I am using wicket 1.3.4 e tomcat v6.0.

Thx.
-- 
View this message in context: http://www.nabble.com/Check-if-file-exist--tp21911335p21911335.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Check if file exists?

Posted by dsj <de...@gmail.com>.
Like igor says, 
webapplication.getservletcontext()

thanks, works great! 


Jonas-21 wrote:
> 
> I assume you've tried to cast the wicket Request to a servlet request?
> Maybe you should try and ask google on how to access the servlet
> request from a wicket request:
> http://www.google.com/search?q=wicket+HttpServletRequest
> 
> 
> On Mon, Feb 9, 2009 at 1:31 PM, dsj <de...@gmail.com> wrote:
>>
>> I try this. I have put the servlet.api in my build classpath and try, but
>> wicket claim that not possible cast to servlet anyway. btw, this is a
>> dependence feature of the container?
>>
>>
>> Jonas-21 wrote:
>>>
>>> Not really related to wicket...
>>> Anyway, check javax.servlet.ServletContext#getResourcePaths(String path)
>>>
>>>
>>> On Mon, Feb 9, 2009 at 12:51 PM, dsj <de...@gmail.com> wrote:
>>>>
>>>> Hi, how to check if one image exists in my app-folder? or in other way:
>>>> how
>>>> to check if any file exist im my Web-app\images?
>>>> I am using wicket 1.3.4 e tomcat v6.0.
>>>>
>>>> Thx.
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Check-if-file-exists--tp21911335p21911335.html
>>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Check-if-file-exists--tp21911335p21911898.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Check-if-file-exists--tp21911335p21912735.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Check if file exists?

Posted by Jonas <ba...@gmail.com>.
I assume you've tried to cast the wicket Request to a servlet request?
Maybe you should try and ask google on how to access the servlet
request from a wicket request:
http://www.google.com/search?q=wicket+HttpServletRequest


On Mon, Feb 9, 2009 at 1:31 PM, dsj <de...@gmail.com> wrote:
>
> I try this. I have put the servlet.api in my build classpath and try, but
> wicket claim that not possible cast to servlet anyway. btw, this is a
> dependence feature of the container?
>
>
> Jonas-21 wrote:
>>
>> Not really related to wicket...
>> Anyway, check javax.servlet.ServletContext#getResourcePaths(String path)
>>
>>
>> On Mon, Feb 9, 2009 at 12:51 PM, dsj <de...@gmail.com> wrote:
>>>
>>> Hi, how to check if one image exists in my app-folder? or in other way:
>>> how
>>> to check if any file exist im my Web-app\images?
>>> I am using wicket 1.3.4 e tomcat v6.0.
>>>
>>> Thx.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Check-if-file-exists--tp21911335p21911335.html
>>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Check-if-file-exists--tp21911335p21911898.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Check if file exists?

Posted by dsj <de...@gmail.com>.
I try this. I have put the servlet.api in my build classpath and try, but
wicket claim that not possible cast to servlet anyway. btw, this is a
dependence feature of the container?


Jonas-21 wrote:
> 
> Not really related to wicket...
> Anyway, check javax.servlet.ServletContext#getResourcePaths(String path)
> 
> 
> On Mon, Feb 9, 2009 at 12:51 PM, dsj <de...@gmail.com> wrote:
>>
>> Hi, how to check if one image exists in my app-folder? or in other way:
>> how
>> to check if any file exist im my Web-app\images?
>> I am using wicket 1.3.4 e tomcat v6.0.
>>
>> Thx.
>> --
>> View this message in context:
>> http://www.nabble.com/Check-if-file-exists--tp21911335p21911335.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Check-if-file-exists--tp21911335p21911898.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Check if file exists?

Posted by Jonas <ba...@gmail.com>.
Not really related to wicket...
Anyway, check javax.servlet.ServletContext#getResourcePaths(String path)


On Mon, Feb 9, 2009 at 12:51 PM, dsj <de...@gmail.com> wrote:
>
> Hi, how to check if one image exists in my app-folder? or in other way: how
> to check if any file exist im my Web-app\images?
> I am using wicket 1.3.4 e tomcat v6.0.
>
> Thx.
> --
> View this message in context: http://www.nabble.com/Check-if-file-exists--tp21911335p21911335.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org