ahh
no that is not going to work
The context path is only there when one request is happened
Thats the stupid thing of the servlet spec. You can't ask the context path
on the servlet context.
only from a request.

johan


On 12/20/06, ChuckDeal <[EMAIL PROTECTED]> wrote:


Thanks, I missed that method when I was glancing through that class.

When I did this, I do get a handle to my Application object, but it is not
fully populated.

getApplicationSettings().getContextPath() returns null and getRootPath()
throws a NPE.  Both methods return the correct value when called from
within
a Page. So, it leads me to believe that Application initialization is sort
of lazy.  Do I need to do something else to force my Application to get
fully initialized earlier?

Chuck


Johan Compagner wrote:
>
> you could use Application.get(String)
>
>
>
> On 12/20/06, ChuckDeal <[EMAIL PROTECTED]> wrote:
>>
>>
>> I'm using 1.3 with the WicketFilter.  I have to interface with my
legacy
>> JSP
>> app.  My old app is the main processing unit and I am planning on
running
>> wicket side-by-side making calls to wicket pages as necessary until the
>> entire app can be rehosted.
>>
>> My old app uses a Servlet at startup to do its configuration.  I want
to
>> get
>> the ContextPath and Root Path from the WebApplication object but since
>> the
>> WicketFilter isn't being used to access the Serlvet, it doesn't
associate
>> a
>> Appication object with the current thread (Application.get() fails).  I
>> want
>> to know what the best way to get to my Application object would be in
>> this
>> scenario.  I had thought I would subclass the WicketFilter and make it
a
>> Singleton to allow me to get to the instantiated object but the
>> WebApplication reference is private, so that is of no help.
>>
>> So, how can I get at the Application object or WicketFilter object at
>> server
>> init?
>>
>> Chuck
>> --
>> View this message in context:
>>
http://www.nabble.com/Get-Application-from-a-Servlet-tf2861903.html#a7996841
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>
-------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>
>
-------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

--
View this message in context:
http://www.nabble.com/Get-Application-from-a-Servlet-tf2861903.html#a7997830
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to