Can I HTTP Post from static html page to a Wicket page?

2007-08-18 Thread Chris Lintz

Hi all,
I want to post to a Bookmarkable page from a static (non-Wicket page).  I am
having a tough time figuring out exactly how this can be done.  For example,
I simply want a static home page  to contain a basic form with the form
action=/auth/login .  

Is this possible with a Wicket page?  I can't find any examples for pure
http posts to a wicket page/form.

thanks 


chris
-- 
View this message in context: 
http://www.nabble.com/Can-I-HTTP-Post-from-static-html-page-to-a-Wicket-page--tf4289562.html#a12211582
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



A Relative path question

2007-08-21 Thread Chris Lintz

Hi all,

I have a non-Wicket domain lets say, www.mydomain.com .  This domain passes
requests to the Wicket filter via mod_jk to this path:
www.mydomain.com/myapp .  The home page on www.mydomain.com is completely
static except for a wicket form that is dyamically written via a Java script
document write (i.e. script
src=/myapp?wicket:bookmarkablePage=:com.mysite.LoginFormSnippet.).  We
dont want the entire domain of www.mydomain.com to be Wicketized, hence
the small snipppet writen via the script tag.  

The problem is everything wicket related is written from the relative path
(i.e. / ) not with the /myapp prefixed in front. Therefore, the component,
Wicket Javascript references, etc are broke because of the relative path. 
What can I possibly do to over come this?   

I have received nothing but great responses from this forum, hopefully I can
get one here because I really dont want to mount the entire app at the root
of the domain in Apache for various reasons :)

thanks in advance.

chris
-- 
View this message in context: 
http://www.nabble.com/A-Relative-path-question-tf4303862.html#a12250696
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: A Relative path question

2007-08-21 Thread Chris Lintz

Ok, I think may see the start of my problem.  I have been unable to setup a
WicketFilter with JkMount /myapp* .   I have only been able to successfully
use the WicketWilter if my JkMount is JkMount /* default for example.  I
have been trying exactly what you mention below but to no success (sorry for
the confusion):

-- Run a Wicket webapp on http://appserver.com:8080/
--(Note that's a root context path.)
--  - Map Wicket to the root using servlet mapping/filter mapping of /*.
--  - Pass requests from an Apache which land on www.mydomain.com through
--to the Apache, unless they land on /myapp/*, in which case send them
--to Wicket.

Here is my filter:

   filter
filter-nameMyWebsite/filter-name

filter-classorg.apache.wicket.protocol.http.WicketFilter/filter-class
init-param
param-nameapplicationClassName/param-name
param-valuecom.mywebsite.MyApplication/param-value
/init-param
init-param
 param-namefilterMappingUrlPattern/param-name
param-value/*/param-value
 /init-param
/filter

filter-mapping
   filter-nameMyWebsite/filter-name
   url-pattern/*/url-pattern
/filter-mapping

Here is JkMount:
 IfModule mod_jk.c
 JkMount /myapp* default
 JkMount /myapp/* default
 JkUnMount /images default
 JkUnMount 
/IfModule

If i could get this to work, I bet all of my hard to explain issues go away. 
Those JkMounts above result in 404 errors.  I have no mod_rewrites of any
sort that would be interfering.  If I do this though, it works 

  IfModule mod_jk.c
 JkMount  /* default
 JkUnMount /images
  /IfModule

I have no mod_rewrites or anything that would conflict.  I am viewing the
source of the WicketFilter and see the filterMappingUrlPattern which i why I
included it web.xml init params, although it is not mentioned on the
migration docs: 
http://cwiki.apache.org/WICKET/migrate-13.html#Migrate-1.3-FilterinsteadofaServlet
.

So, rather than confuse you any more, is it obvious from the the above why
the Filter only works when I JkMount /* default ?  If I could get it to
JkMount /myapp* default, all of my relative path issues would most likely go
away according to what you have explained. 

Thanks again




Al Maw wrote:
 
 Chris Lintz wrote:
 Thanks for the response.  Yes I am using Wicket 1.3 Beta 2.  I First
 mapped
 the WAR at root, and let everything fall through Apache with JkUnMounts
 (i.e. JkUnMount /images default), but the issue is I could not solve the
 problem of I did not want / served by wicket.
 
 Basically it comes down to this.  I cannot seem to make a reference to
 Wicket page on a path www.mydomain.com/myapp  from my static home page
 www.mydomain.com because the relative path is / .  I need the Wicket
 components to render under /myapp even from requests coming from / .
 
 OK. I'm slightly confused at the moment, because you haven't quite 
 specified well enough how you're trying to achieve this. Please could 
 you clarify the following points:
 
   - What context path is your app running in? Is it the root?
   - Is Wicket running using a filter or a servlet?
   - Is Wicket mapped to /myapp/* in web.xml?
   - What is your mod_jk forwarding set-up, exactly?
 - You say you're forwarding from www.mydomain.com to
   www.mydomain.com/myapp, but obviously you're not quite,
   as otherwise you'd just get an infinite loop there. ;)
 - Specifically, where are your wildcards if there are any?
 
 You seem to be concentrate too much on the specifics of what's wrong 
 with your set-up, rather than what you're trying to achieve here.
 
 As far as I can tell, you want to do the following:
   - Run a Wicket webapp on http://appserver.com:8080/
 (Note that's a root context path.)
   - Map Wicket to the root using servlet mapping/filter mapping of /*.
   - Pass requests from an Apache which land on www.mydomain.com through
 to the Apache, unless they land on /myapp/*, in which case send them
 to Wicket.
   - You don't want your static resources served from within Tomcat.
 
 Is that right?
 
 Even if that's so, I still don't understand what specific issue you're 
 having. Actually giving us some URLs might be illustrative here.
 
 If you get a request for this:
   - www.myserver.com/myapp/path/to/mounted/page/
 
 Assuming your context path is /, that will get mapped to:
   - appserver.com:8080/path/to/mounted/page/
 
 If you add a HeaderContributor with a ResourceReferences, or something 
 similar, Wicket will give you URLs relative to that, so something like 
 this in your generated HTML:
   - href=../../../../resources/com.company.HomePage/foo.css
 
 This will resolve to the following in your browser:
   - www.myserver.com/myapp/resources/com.company.HomePage/foo.css
 
 ...which is perfectly correct, as obviously

Bookmarkable page and session object problem? (1.3 beta3)

2007-09-07 Thread Chris Lintz

Hi all,
This seems like a bug to me but I am hoping some one can lead me the right
way to a solution.  I basically have non-bookmarkable page that puts the a
User object in the session.  After this, if i click on a bookmarkable page
link, that page does not have the user in the session.  If I go back to my
non-bookmarkable page, the user is there.

How can i get this bookmarkable page to see the same session object?   
Maybe this has something to do with Pagemaps.  But in any case, the same
session object should be available to bookmarkable and non-bookmarkable
pages correct?


thanks in advance
-- 
View this message in context: 
http://www.nabble.com/Bookmarkable-page-and-session-object-problem--%281.3-beta3%29-tf4403473.html#a12562289
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bookmarkable page and session object problem? (1.3 beta3)

2007-09-07 Thread Chris Lintz

Actually i just realized it has something to do with a stateless form. Maybe
you can tell me if this is a bug or not.  I am pasting the code below, but
let me first explain.  I basically have a LoginPanel that is included on all
non-bookmarkable and bookmarkable pages.   My LoginPanel is using a
StatelessForm.  I want this stateless form because generating a Session for
every request for simple login form is a crazy idea to me (especially in a
clustered session environment).

The problem is that it seems you cannot set objects in the session from
within the Stateless form. Although i implemented a work around by getting
the Page from within the stateless form and setting the User object on the
session from the Page itself.   When I do so this User object is not in the
session on the non-bookmarkable pages I click on.

Here are the snippets of code (LoginPanel.java and WebPageTemplate.java)

public LoginPanel(String id)
{
Form f = new StatelessForm(lFrm)
   {
  @Override
  protected void onSubmit()
 {
try
{
   User u = AuthenticationService.login(getUserName(), getPassword());
   if (u == null)
   {
 feedback.error(Invalid login); 
 return;
   }
   feedback.info(You are now logged in.  Welcome.);
  ((WebPageTemplate) getPage()).setUserInSession(u);
  setResponsePage(getPage().getClass());
}
catch (AuthenticationException ae)
{
   error(There was a problem logging in.  Please try again later);
   se.printStackTrace();
}

  }
   };

WebPageTemplate.java snippet:

  public void setUserInSession(User u)
  {
MediumSession session = (MediumSession) getSession();
session.setUser(u);
   }






Matej Knopp-2 wrote:
 
 We can't help you with this if you don't post any code. The session
 object should of course be available for bookmarkable and
 non-bookmarkable objects.
 
 -Matej
 
 On 9/7/07, Chris Lintz [EMAIL PROTECTED] wrote:

 Hi all,
 This seems like a bug to me but I am hoping some one can lead me the
 right
 way to a solution.  I basically have non-bookmarkable page that puts the
 a
 User object in the session.  After this, if i click on a bookmarkable
 page
 link, that page does not have the user in the session.  If I go back to
 my
 non-bookmarkable page, the user is there.

 How can i get this bookmarkable page to see the same session object?
 Maybe this has something to do with Pagemaps.  But in any case, the same
 session object should be available to bookmarkable and non-bookmarkable
 pages correct?


 thanks in advance
 --
 View this message in context:
 http://www.nabble.com/Bookmarkable-page-and-session-object-problem--%281.3-beta3%29-tf4403473.html#a12562289
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Bookmarkable-page-and-session-object-problem--%281.3-beta3%29-tf4403473.html#a12563267
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bookmarkable page and session object problem? (1.3 beta3)

2007-09-07 Thread Chris Lintz

That worked.  Thanks so much for your help.  I am trying to find verbage on
what exactly session.bind() actually does that fixed my problem.



Matej Knopp-2 wrote:
 
 Well, just call session.bind() after set session attribute, and you'll
 see if it helps.
 
 -Matej
 
 On 9/7/07, Chris Lintz [EMAIL PROTECTED] wrote:

 Actually i just realized it has something to do with a stateless form.
 Maybe
 you can tell me if this is a bug or not.  I am pasting the code below,
 but
 let me first explain.  I basically have a LoginPanel that is included on
 all
 non-bookmarkable and bookmarkable pages.   My LoginPanel is using a
 StatelessForm.  I want this stateless form because generating a Session
 for
 every request for simple login form is a crazy idea to me (especially in
 a
 clustered session environment).

 The problem is that it seems you cannot set objects in the session from
 within the Stateless form. Although i implemented a work around by
 getting
 the Page from within the stateless form and setting the User object on
 the
 session from the Page itself.   When I do so this User object is not in
 the
 session on the non-bookmarkable pages I click on.

 Here are the snippets of code (LoginPanel.java and WebPageTemplate.java)

 public LoginPanel(String id)
 {
 Form f = new StatelessForm(lFrm)
{
   @Override
   protected void onSubmit()
  {
 try
 {
User u = AuthenticationService.login(getUserName(),
 getPassword());
if (u == null)
{
  feedback.error(Invalid login);
  return;
}
feedback.info(You are now logged in.  Welcome.);
   ((WebPageTemplate) getPage()).setUserInSession(u);
   setResponsePage(getPage().getClass());
 }
 catch (AuthenticationException ae)
 {
error(There was a problem logging in.  Please try again
 later);
se.printStackTrace();
 }

   }
};

 WebPageTemplate.java snippet:

   public void setUserInSession(User u)
   {
 MediumSession session = (MediumSession) getSession();
 session.setUser(u);
}






 Matej Knopp-2 wrote:
 
  We can't help you with this if you don't post any code. The session
  object should of course be available for bookmarkable and
  non-bookmarkable objects.
 
  -Matej
 
  On 9/7/07, Chris Lintz [EMAIL PROTECTED] wrote:
 
  Hi all,
  This seems like a bug to me but I am hoping some one can lead me the
  right
  way to a solution.  I basically have non-bookmarkable page that puts
 the
  a
  User object in the session.  After this, if i click on a bookmarkable
  page
  link, that page does not have the user in the session.  If I go back
 to
  my
  non-bookmarkable page, the user is there.
 
  How can i get this bookmarkable page to see the same session object?
  Maybe this has something to do with Pagemaps.  But in any case, the
 same
  session object should be available to bookmarkable and
 non-bookmarkable
  pages correct?
 
 
  thanks in advance
  --
  View this message in context:
 
 http://www.nabble.com/Bookmarkable-page-and-session-object-problem--%281.3-beta3%29-tf4403473.html#a12562289
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Bookmarkable-page-and-session-object-problem--%281.3-beta3%29-tf4403473.html#a12563267
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Bookmarkable-page-and-session-object-problem--%281.3-beta3%29-tf4403473.html#a12564017
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to force a delete (from disk) of the session from the session store?

2007-09-09 Thread Chris Lintz

Interesting.  I was using session.invalidateNow() which did not remove it
from disk.  But session.invalidate() worked like a charm.  Should
session.invalidateNow() also remove the session from disk immediately?

thanks for your help


Eelco Hillenius wrote:
 
 Chris Lintz wrote:
 
  Hi,
  When a user logouts of the site, i want to kill the session and have it
 be
  removed from disk immediately.  I have extended WebSession properly,
 but
  no methods on the WebSession class seem to do the trick for me.
 
  Is there a way to to trigger the removal of the session cleanly from
 disk
  via the SessionStore or some other approach?
 

 I think this is done automatically when you call session.invalidate().
 
 Yep, that should do the trick.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-force-a-delete-%28from-disk%29-of-the-session-from-the-session-store--tf4404925.html#a12580502
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to force a delete (from disk) of the session from the session store?

2007-09-10 Thread Chris Lintz

Thanks all.  I submitted a JIRA -
https://issues.apache.org/jira/browse/WICKET-953 
session.invalidateNow() does not remove the session from disk.  invalidate()
does though.


Matej Knopp-2 wrote:
 
 Sure it should. And breefly looking at the code it looks like it does.
 But if it's not the case please file a jira issue for it. Thanks.
 
 -Matej
 
 On 9/9/07, Chris Lintz [EMAIL PROTECTED] wrote:

 Interesting.  I was using session.invalidateNow() which did not remove it
 from disk.  But session.invalidate() worked like a charm.  Should
 session.invalidateNow() also remove the session from disk immediately?

 thanks for your help


 Eelco Hillenius wrote:
 
  Chris Lintz wrote:
  
   Hi,
   When a user logouts of the site, i want to kill the session and have
 it
  be
   removed from disk immediately.  I have extended WebSession properly,
  but
   no methods on the WebSession class seem to do the trick for me.
  
   Is there a way to to trigger the removal of the session cleanly from
  disk
   via the SessionStore or some other approach?
  
 
  I think this is done automatically when you call session.invalidate().
 
  Yep, that should do the trick.
 
  Eelco
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-to-force-a-delete-%28from-disk%29-of-the-session-from-the-session-store--tf4404925.html#a12580502
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-force-a-delete-%28from-disk%29-of-the-session-from-the-session-store--tf4404925.html#a12606296
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in IndexedParamUrlCodingStrategy 1.3 Beta3

2007-09-14 Thread Chris Lintz

Actually I just realized what causes this but have no idea how to get past
it. The InviteAcceptacePage has a Panel within another Panel.  The nested
Panel contains a simple form submit button.  The IndexParamUrlStrategy's
appendParameters() function is called  with this Map parameters (from an
eclipse debug):

wicket:interface =
:4:moduleColumnPanel:moduleColumnFrag:loginPanel:loginBoxPanel:loginBox:lFrm::IFormSubmitListener::

Here is the appendParameters() function inside
IndexedParamUrlCodingStrategy:

protected void appendParameters(AppendingStringBuffer url, Map parameters)
{
int i;
for (i = 0; parameters.containsKey(String.valueOf(i)); i++)
{
String value = (String) 
parameters.get(String.valueOf(i));
if (!url.endsWith(/))
url.append(/);
url.append(urlEncode(value)).append(/);
}

String pageMap = (String) parameters.get(wicket:pageMapName);
if (pageMap != null)
{
i++;
pageMap = 
WebRequestCodingStrategy.encodePageMapName(pageMap);
if (!url.endsWith(/))
url.append(/);

url.append(wicket:pageMapName).append(/).append(urlEncode(pageMap)).append(/);
}
if (i != parameters.size())
throw new WicketRuntimeException(
Not all parameters were encoded. Make 
sure all parameter names are
integers in consecutive order starting with zero. Current parameter names
are: 
+ 
parameters.keySet().toString());
else
return;
}

The pagemap is null and the statement if (i != parameters.size()) evaluates
to true and generates the error.

Why does the panel with these Map parameters generate the error inside that
function? 



thanks for any help




Chris Lintz wrote:
 
 Hi all,
 So i think there is a bug in IndexedParamUrlCodingStrategy .  I have this
 simple mount in my extened WebApplication:
 
mount(new IndexedParamUrlCodingStrategy(/joinme,
 InviteAcceptancePage.class));
 
 
 In my InviteAcceptancePage class, i simply do this snippet of code:
 
 public InviteAcceptancePage(PageParameters params)
 {
String code = params.getString(0);
logger.debug(code:+code);
...
 
 }
 When i do this in my browser for example: 
 http://www.mydomain.com/joinme/5
 
 The following 5 parameter is logged just fine, but after the
 constructor returns I get the below exception:
 
 22:23:43,600 ERROR [RequestCycle] Not all parameters were encoded. Make
 sure all parameter names are integers in consecutive order starting with
 zero. Current parameter names are: [wicket:interface]
 org.apache.wicket.WicketRuntimeException: Not all parameters were encoded.
 Make sure all parameter names are integers in consecutive order
 
 
 
 Any ideas?
 
 thanks
 

-- 
View this message in context: 
http://www.nabble.com/Bug-in-IndexedParamUrlCodingStrategy-1.3-Beta3-tf4440109.html#a12669640
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in IndexedParamUrlCodingStrategy 1.3 Beta3

2007-09-14 Thread Chris Lintz

Yes I am using a stateless login form.  Wow.  Thanks for getting that
response out.  I was able to see exactly where it fails inside the
appendParameters() function of the IndexParamUrlCodingStrategy (see my
follow up post).  Now that you mention the stateless form, it seems it must
simply not know how to handle the Map parmeters sent in.  As well the
pagemap is null.


Sebastiaan van Erk wrote:
 
 I had the same problem; it was caused by a StatelessForm on the page. 
 When replacing StatelessForm with Form it went away. Are you using a 
 stateless form as well?
 
 BTW, I made a JIRA issue for this:
 https://issues.apache.org/jira/browse/WICKET-950
 
 Regards,
 Sebastiaan
 
 Chris Lintz wrote:
 Hi all,
 So i think there is a bug in IndexedParamUrlCodingStrategy .  I have this
 simple mount in my extened WebApplication:
 
mount(new IndexedParamUrlCodingStrategy(/joinme,
 InviteAcceptancePage.class));
 
 
 In my InviteAcceptancePage class, i simply do this snippet of code:
 
 public InviteAcceptancePage(PageParameters params)
 {
String code = params.getString(0);
logger.debug(code:+code);
...
 
 }
 When i do this in my browser for example: 
 http://www.mydomain.com/joinme/5
 
 The following 5 parameter is logged just fine, but after the
 constructor
 returns I get the below exception:
 
 22:23:43,600 ERROR [RequestCycle] Not all parameters were encoded. Make
 sure
 all parameter names are integers in consecutive order starting with zero.
 Current parameter names are: [wicket:interface]
 org.apache.wicket.WicketRuntimeException: Not all parameters were
 encoded.
 Make sure all parameter names are integers in consecutive order
 
 
 
 Any ideas?
 
 thanks
 
  
 

-- 
View this message in context: 
http://www.nabble.com/Bug-in-IndexedParamUrlCodingStrategy-1.3-Beta3-tf4440109.html#a12669643
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in IndexedParamUrlCodingStrategy 1.3 Beta3

2007-09-14 Thread Chris Lintz

yeah sorry i missed that last line in your post or I wouldnt have submitted. 
I guess better 2 Jira's for it than none :)

Sebastiaan van Erk wrote:
 
 Maybe WICKET-950 should be marked as a duplicate of this one then.
 
 Regards,
 Sebastiaan
 
 Chris Lintz wrote:
 I Have submitted the following Jira on this issue:
 http://issues.apache.org/jira/browse/WICKET-976
 
 
 Chris Lintz wrote:
 Actually I just realized what causes this but have no idea how to get
 past
 it. The InviteAcceptacePage has a Panel within another Panel.  The
 nested
 Panel contains a simple form submit button.  The IndexParamUrlStrategy's
 appendParameters() function is called  with this Map parameters (from an
 eclipse debug):

 wicket:interface =
 :4:moduleColumnPanel:moduleColumnFrag:loginPanel:loginBoxPanel:loginBox:lFrm::IFormSubmitListener::

 Here is the appendParameters() function inside
 IndexedParamUrlCodingStrategy:

 protected void appendParameters(AppendingStringBuffer url, Map
 parameters)
 {
 int i;
 for (i = 0; parameters.containsKey(String.valueOf(i)); i++)
 {
 String value = (String) 
 parameters.get(String.valueOf(i));
 if (!url.endsWith(/))
 url.append(/);
 url.append(urlEncode(value)).append(/);
 }

 String pageMap = (String) parameters.get(wicket:pageMapName);
 if (pageMap != null)
 {
 i++;
 pageMap = 
 WebRequestCodingStrategy.encodePageMapName(pageMap);
 if (!url.endsWith(/))
 url.append(/);
 
 url.append(wicket:pageMapName).append(/).append(urlEncode(pageMap)).append(/);
 }
 if (i != parameters.size())
 throw new WicketRuntimeException(
 Not all parameters were encoded. Make 
 sure all parameter names are
 integers in consecutive order starting with zero. Current parameter
 names
 are: 
 + 
 parameters.keySet().toString());
 else
 return;
 }

 The pagemap is null and the statement if (i != parameters.size())
 evaluates to true and generates the error.

 Why does the panel with these Map parameters generate the error inside
 that function? 



 thanks for any help




 Chris Lintz wrote:
 Hi all,
 So i think there is a bug in IndexedParamUrlCodingStrategy .  I have
 this
 simple mount in my extened WebApplication:

mount(new IndexedParamUrlCodingStrategy(/joinme,
 InviteAcceptancePage.class));


 In my InviteAcceptancePage class, i simply do this snippet of code:

 public InviteAcceptancePage(PageParameters params)
 {
String code = params.getString(0);
logger.debug(code:+code);
...

 }
 When i do this in my browser for example: 
 http://www.mydomain.com/joinme/5

 The following 5 parameter is logged just fine, but after the
 constructor returns I get the below exception:

 22:23:43,600 ERROR [RequestCycle] Not all parameters were encoded. Make
 sure all parameter names are integers in consecutive order starting
 with
 zero. Current parameter names are: [wicket:interface]
 org.apache.wicket.WicketRuntimeException: Not all parameters were
 encoded. Make sure all parameter names are integers in consecutive
 order



 Any ideas?

 thanks


 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/Bug-in-IndexedParamUrlCodingStrategy-1.3-Beta3-tf4440109.html#a12680931
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can we chain WebRequestCodingStrategies (CryptedUrlWebRequestCodingStrategy and an SSL coding strategy)

2007-10-04 Thread Chris Lintz

Hi,
Can we chain WebRequestCodingStrategies?  I want to use the
CryptedUrlWebRequestCodingStrategy and an SSL coding strategy as seen on
http://cwiki.apache.org/WICKET/how-to-switch-to-ssl-mode.html#HowtoswitchtoSSLmode-CreateNewResponseStrategy
.

Is this possible to use multiple WebRequestCodingStrategy objects?

thanks

chris
-- 
View this message in context: 
http://www.nabble.com/Can-we-chain-WebRequestCodingStrategies-%28CryptedUrlWebRequestCodingStrategy-and-an-SSL-coding-strategy%29-tf4570425.html#a13045451
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



StringResourceModel toString() changed in Beta4 - why??? Must use getString() now.

2007-10-17 Thread Chris Lintz

Hi all,
I swapped beta3 for beta4 and to my surprise all of my StringResourceModels
that have worked (even back to 1.2) suddenly dont work.  The toString() call
no longer returns the resource String. I dont see this in the release notes
so to say the least, this was a very frustrating find.

For example, this use to work:

public String getPageTitle()
{
   return new StringResourceModel(page.title, this, new
Model(this)).toString();
}

Now I have to say:

public String getPageTitle()
{
StringResourceModel(page.title, this, new Model(this)).getString();
}

A subtle change that that took some time to finally track down... Why did
this change?  I believe the toString() is referenced in many docs.


chris

-- 
View this message in context: 
http://www.nabble.com/StringResourceModel-toString%28%29-changed-in-Beta4---why-Must-use-getString%28%29-now.-tf4638851.html#a13249098
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StringResourceModel toString() changed in Beta4 - why??? Must use getString() now.

2007-10-17 Thread Chris Lintz

I also read documentation - it may have been on the Pro Wicket book.. I dont
recall.  Nonetheless I thought it was strange to also reley on toString()..
but seeing documentation and examples of toString() pushed me into using it
without much thought.  And like I said this worked all the way back to
Wicket 1.2 .  I dont care what it is.. I'll refactor to getString().  It
would just be nice to know ahead of time whats coming.  


Jan Kriesten wrote:
 
 
 Hi Thomas,
 
 Fair enough, was I reading more importance into the second sentence
 (useful for debugging...). I still would not rely on toString() for
 anything but debugging purposes unless someone passes me an object of a
 well known, final class
 
 right - but there are exceptions to rules. :-)
 
 In my case, the documentation for IChoiceRenderer.getIdValue() explicitely
 suggest using toString().
 
 Anyway, clearifcation of the API or a return to the old behavior is
 needed:
 
 https://issues.apache.org/jira/browse/WICKET-1080
 
 Regards, --- Jan.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/StringResourceModel-toString%28%29-changed-in-Beta4---why-Must-use-getString%28%29-now.-tf4638851.html#a13255680
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Button component bug - all uses of a Button cause a 302 redirect

2007-10-23 Thread Chris Lintz

Hey all,
We are quite puzzled why this is happening.  Every use of a Button onSubmit
causes a 302 redirect no matter if it posts a form or does a get.  I have
simplified this down to a simple page with a Button and guaranteed there are
no Apache redirects or .htaccess files in play.  I also ensured the default
WebRequestCodingStrategy is used and the WebApplications
newRequestCycleProcessor() is not overloaded.

We are running Wicket 3 Beta4 inside Tomcat 5.5 (although I believe Beta3 
has the same issue) .  This only occurs with Buttons.  Ajax posts and other
Link components make it through just fine.  A Button as simple as this
causes the redirect:

Button testBtn1 = new Button(testBtn1)
{
  @Override
   public void onSubmit()
  {
 info(No response page );
  }
};
 
Below is the proof a redirect is sent (with ourdomain.com in replace of our
real domain for privacy).


POST /?wicket:interface=:3:testForm::IFormSubmitListener:: HTTP/1.1

Host: ourdomain.com

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.4)
Gecko/20070515 Firefox/2.0.0.4

Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://ourdomain.com/?wicket:interface=:3

Cookie: JSESSIONID=2888082B1246E97B83C30DEC73479AE4.node1

Content-Type: application/x-www-form-urlencoded

Content-Length: 34

testForm7_hf_0=testBtn1=Info+Only

HTTP/1.x 302 Moved Temporarily

Date: Wed, 24 Oct 2007 03:23:46 GMT

Server: Apache/2.2.4 (Unix) mod_ssl/2.2.4 OpenSSL/0.9.8e DAV/2 mod_jk/1.2.22

X-Powered-By: Servlet 2.4; JBoss-4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA
date=200707131605)/Tomcat-5.5

Location: http://ourdomain.com/?wicket:interface=:3

Content-Length: 0

Keep-Alive: timeout=5, max=100

Connection: Keep-Alive

Content-Type: text/plain



Any ideas why this is happening?

Thanks


chris


-- 
View this message in context: 
http://www.nabble.com/Button-component-bug---all-uses-of-a-Button-cause-a-302-redirect-tf4681842.html#a13378576
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Button component bug - all uses of a Button cause a 302 redirect

2007-10-24 Thread Chris Lintz

Ok.  Its a good thing.. I didnt know it was the default setting.  I guess i
should thank you because it exposed a classic issue seen when having SSL
accelerators proxying requests to port 80 .  The redirect was redirecting
off https.  I have fixed this by setting correct headers at the accelerator
box.

Anyways, I don't need to change to ONE_PASS_RENDERER but for my knowledge
going forward,  it appears this cannot be set per request?



Eelco Hillenius wrote:
 
 On 10/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote:
 yep, this is called a redirect-after-post pattern - i suggest you look
 it up. it is the preferred way of building webapps and wicket gives
 you it for free. so actually this is a Good Thing (tm).
 
 Yup. Read the docs on IRequestCycleSettings#RenderStrategy. The
 default is REDIRECT_TO_BUFFER. If you don't like this behavior, you
 can set it to ONE_PASS_RENDER.
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Button-component-bug---all-uses-of-a-Button-cause-a-302-redirect-tf4681842.html#a13379870
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is Beta5 coming soon? Beta4 has caused these issues for us....

2007-10-29 Thread Chris Lintz

Any chance of getting a Beta5 out soon.   As luck would have it, Beta4 to say
the least has been frustrating for us.

So far beta4 has caused these problems in our app (all stuff that worked in
Beta3)

1) AJAXLink is broke when using the Crypted URL encoding strategy.
2) StringResourceModel change on toString() method (this is fine, we
refactored and are now using getString() )
3) UpdateFeedback gone -
http://www.nabble.com/1.3.0-beta4%3A-updateFeedback%28%29-gone--tf4707707.html
4) Pages are stateful now because of -
http://www.nabble.com/Stateless-page-creating-session-tf4604432.html#a13147396

Any chance of getting a Wicket beta5 out with at least the stateless page
fix?   We have a high traffic site so the thought of generating some where
in the neighborhood of hundreds of thousands session IDs on disk for pages
as simple as a WebMarkupcontainer and a Label is very scary thought.




chris
-- 
View this message in context: 
http://www.nabble.com/Is-Beta5-coming-soon---Beta4-has-caused-these-issues-for-us-tf4713647.html#a13473915
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Chris Lintz

Guys I am on the same project so I can speak a bit more.  The real issue is
that on Redhat the default max directories is something like 32K.  We ran
out of file descriptors.  Basically for every unique session there is a
directory created for the second level cache. 

I think the real issue for us is that when a session expires the
corresponding second level cache is not removed from disk.  This seems like
a serious bug to me.  I have yet to see a second level cache be removed
unless a forced session invalidate() occurs. 

Any ideas on how we can get these page store files to be removed when a
session times out?   I have looked at tuning the DiskPageStore, but the
constuctor args dont appear as if they will help the issue:

DiskPageStore(java.io.File fileStoreFolder, int maxSizePerPagemap, int
maxSizePerSession, int fileChannelPoolCapacity) 



Johan Compagner wrote:
 
 But 50 is nothing (at least i think it is nothing) and linux should be
 able
 to handle that just fine
 Can somebody peak how many handles we take on those session files? Maybe
 we
 leak somewhere
 or do take more then we think.
 
 johan
 
 
 
 On Nov 8, 2007 2:04 AM, Matej Knopp [EMAIL PROTECTED] wrote:
 
 There is a constructor parameter in DiskPageStore constructor (the
 last int parameter) that says how many handles DiskPageStore will keep
 opened.

 But the default number of file handles is 50. If this is causing your
 server file handle problems than you should consider changing the
 configuration. Are you sure there are no other file handles leaking?
 What are the files opened?

 -Matej

 On 11/8/07, Brandon Harper [EMAIL PROTECTED] wrote:
  Hello All,
 
  Long story short, we're in the process of load testing an application
  built against Wicket 1.3 snapshot.  Unfortunately we've seen some
  server issues with sessions/page maps in the file store during
  testing, and I was wondering how I'd go about programatically changing
  the default page map size in DiskPageStore just to see if changing
  this value affects what we're seeing.
 
  FWIW, right now it looks like we're having issues under load with
  Wicket creating too many open file handles on a fairly default install
  of RHEL 5 which results in exceptions like this:
 
  java.lang.RuntimeException: java.io.FileNotFoundException:
  /usr/local/jboss-
 4.2.1.GA/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
  (No such file or directory)
   at
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
 (FileChannelPool.java:104)
   at
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel
 (FileChannelPool.java:171)
   at
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage
 (DiskPageStore.java:224)
   at
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList
 (DiskPageStore.java:788)
   at
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run
 (DiskPageStore.java:851)
   at java.lang.Thread.run(Thread.java:619)
  Caused by: java.io.FileNotFoundException:
  /usr/local/jboss-
 4.2.1.GA/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
  (No such file or directory)
   at java.io.RandomAccessFile.open(Native Method)
   at java.io.RandomAccessFile.init(RandomAccessFile.java:212)
   at
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
 (FileChannelPool.java:99)
 
  Thanks,
 
  - Brandon
 
  --
  http://bharper.com
  http://devnulled.com
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13651858
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: facebook support

2007-11-08 Thread Chris Lintz

I am curious what type of Wicket components/functionality you are hoping for?

Just on a side note, we are using Octazen - http://www.octazen.com/ for
social network slurping of contacts, etc.  Of course there is a small
license fee for the product, so it would be ideal to have a free library to
work with.  

 

Matt Jensen-2 wrote:
 
 
 I am working on this, though I'm trying to leave the door open to also 
 supporting MySpace in the future.  I have not done much yet--and nothing 
 Wicket-specific--but I do plan to include a Wicket module.
 
 Jonathan Locke wrote:
 I'd like to get facebook support into Wicket.  If anyone out there has
 interest and would like to cooperate(particularly anyone with Facebook
 experience), please get in touch with me.  Thanks.
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/facebook-support-tf4773546.html#a13658830
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Chris Lintz

How can we limit the number of files and/or directories?  I only see the
option to limit the size of the session or the size of the pagemap for the
DiskPageStore ( DiskPageStore(java.io.File fileStoreFolder, int
maxSizePerPagemap, int maxSizePerSession, int fileChannelPoolCapacity) 



Matej Knopp-2 wrote:
 
 On Nov 8, 2007 6:43 PM, Eelco Hillenius [EMAIL PROTECTED] wrote:
  Guys I am on the same project so I can speak a bit more.  The real
 issue is
  that on Redhat the default max directories is something like 32K.  We
 ran
  out of file descriptors.  Basically for every unique session there is a
  directory created for the second level cache.

 But the file handles are pooled as far as I know? Matej, do we
 actually still need separate directories now that we use a page file?
 
 Yeah, we do. We are using one file per pagemap. I believe that the
 number of files can be limited as well as the number of directories.
 So if you have one directory per session you'll have less entries than
 one file per pagemap in one common directory.
 
 -Matej
 

  I think the real issue for us is that when a session expires the
  corresponding second level cache is not removed from disk.  This seems
 like
  a serious bug to me.  I have yet to see a second level cache be removed
  unless a forced session invalidate() occurs.

 As far as I know, we do our best to delete those old sessions.
 AbstractHttpSessionStore puts a HttpSessionBindingListener in the
 user's http session when it starts so that the gets notified when
 DiskPageStore#unbind gets called by the second level cache session
 store and that should then take care of removing the files for that
 session.

 Can you debug why this isn't happening in your case?

 Eelco


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13657063
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is it possible to get AjaxLink stateless?

2007-11-08 Thread Chris Lintz

Hi.  So i have tried setting the stateless hint and my AjaxLink is still
statefull.  I read some where where even Ajax components can be stateless. 
What am I missing?

AjaxLink addFriend = new AjaxLink(addFriend)
{
@Override
protected boolean getStatelessHint() 
{
return true;
}

private static final long serialVersionUID = 1L;

public void onClick(AjaxRequestTarget request)
{
makeFriends(sessionUserName, profileUserName);
}
}
-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-get-AjaxLink-stateless--tf4774228.html#a13657606
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How To Change Page Store Size in DiskPageStore?

2007-11-08 Thread Chris Lintz

Ok here is a bit more clarity after digging further.  Timed out sessions do
trigger a removal of the of the PageStore file.  However if Tomcat is
restarted there is no cleanup of the PageStore files on disk.  In other
words the Page Store will leak those cache files and never clean them up.   
From these results, here are my questions now on all of this:

1)  Shall we file a Jira for a enhancement to the DiskPageStore which would
be a cleanup of any dangling cache files not part of the current
DiskPageStore instance? 

2)  I am stlll trying to figure out how to limit the max number of
directories and or files created by the DiskPageStore.  I am less concerned
about max sizes of sessions and page map and more concerned about the numer
of directories/files - any ideas?

thanks all for your quick responses and insight.



Matej Knopp-2 wrote:
 
 I see. That would be a serious bug indeed. Can you please file a high
 priority JIRA issue? We'll look at it as soon as possible.
 
 -Matej
 
 On Nov 8, 2007 6:35 PM, Chris Lintz [EMAIL PROTECTED] wrote:

 Guys I am on the same project so I can speak a bit more.  The real issue
 is
 that on Redhat the default max directories is something like 32K.  We ran
 out of file descriptors.  Basically for every unique session there is a
 directory created for the second level cache.

 I think the real issue for us is that when a session expires the
 corresponding second level cache is not removed from disk.  This seems
 like
 a serious bug to me.  I have yet to see a second level cache be removed
 unless a forced session invalidate() occurs.

 Any ideas on how we can get these page store files to be removed when a
 session times out?   I have looked at tuning the DiskPageStore, but the
 constuctor args dont appear as if they will help the issue:

 DiskPageStore(java.io.File fileStoreFolder, int maxSizePerPagemap, int
 maxSizePerSession, int fileChannelPoolCapacity)




 Johan Compagner wrote:
 
  But 50 is nothing (at least i think it is nothing) and linux should be
  able
  to handle that just fine
  Can somebody peak how many handles we take on those session files?
 Maybe
  we
  leak somewhere
  or do take more then we think.
 
  johan
 
 
 
  On Nov 8, 2007 2:04 AM, Matej Knopp [EMAIL PROTECTED] wrote:
 
  There is a constructor parameter in DiskPageStore constructor (the
  last int parameter) that says how many handles DiskPageStore will keep
  opened.
 
  But the default number of file handles is 50. If this is causing your
  server file handle problems than you should consider changing the
  configuration. Are you sure there are no other file handles leaking?
  What are the files opened?
 
  -Matej
 
  On 11/8/07, Brandon Harper [EMAIL PROTECTED] wrote:
   Hello All,
  
   Long story short, we're in the process of load testing an
 application
   built against Wicket 1.3 snapshot.  Unfortunately we've seen some
   server issues with sessions/page maps in the file store during
   testing, and I was wondering how I'd go about programatically
 changing
   the default page map size in DiskPageStore just to see if changing
   this value affects what we're seeing.
  
   FWIW, right now it looks like we're having issues under load with
   Wicket creating too many open file handles on a fairly default
 install
   of RHEL 5 which results in exceptions like this:
  
   java.lang.RuntimeException: java.io.FileNotFoundException:
   /usr/local/jboss-
 
 4.2.1.GA/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/website/work/jboss.web/localhost/_/Website-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
   (No such file or directory)
at
  
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
  (FileChannelPool.java:104)
at
  
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.getFileChannel
  (FileChannelPool.java:171)
at
  
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore$SessionEntry.savePage
  (DiskPageStore.java:224)
at
  
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore.flushPagesToSaveList
  (DiskPageStore.java:788)
at
  
 
 org.apache.wicket.protocol.http.pagestore.DiskPageStore$PageSavingThread.run
  (DiskPageStore.java:851)
at java.lang.Thread.run(Thread.java:619)
   Caused by: java.io.FileNotFoundException:
   /usr/local/jboss-
 
 4.2.1.GA/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-nullhttp://4.2.1.ga/server/me.dium.com/work/jboss.web/localhost/_/MediumWebsite-filestore/688F01368693E1A90ED61C8060A51A3E.n1/pm-null
   (No such file or directory)
at java.io.RandomAccessFile.open(Native Method)
at
 java.io.RandomAccessFile.init(RandomAccessFile.java:212)
at
  
 
 org.apache.wicket.protocol.http.pagestore.FileChannelPool.newFileChannel
  (FileChannelPool.java:99)
  
   Thanks

Re: Is it possible to get AjaxLink stateless?

2007-11-08 Thread Chris Lintz

Ok that makes sense.  To me i can chalk this up as one thing in the framework
that would be a real joy to fix - that being having AjaxLink or other
related Ajax components stateless.  I think its a real down fall that
sessions are created (and hence Page store cache files) for an Ajax link. 

On a really high traffic site that uses clustered session replication, there
are affects on the back end from generating all of these sessions just for a
link.  Part of my current tasks are trying to minimize session creation.





Johan Compagner wrote:
 
 no because the ajax behaviors are also not stateless.
 So even if you make the link stateless then the behaviors it has make them
 statefull again.
 
 Sometimes ajax things can be stateless but i still think it is a bit
 strange
 for 90% or more of the cases
 Why is the link an ajax link?. Because in my eyes if you use ajax you
 still
 use the old page
 and the ajax call just updates parts of the page. But if you do that. Then
 ajax can't be that easy
 stateless because how are you going to make exactly the same state as the
 client sees in the browser
 for the next click?
 
 And ajax clicks should be lean and mean in my eyes because they should be
 fast and could happen frequently
 and creating constantly a page for that is pretty heavy.
 
 johan
 
 
 
 On Nov 8, 2007 11:50 PM, Chris Lintz [EMAIL PROTECTED] wrote:
 

 Hi.  So i have tried setting the stateless hint and my AjaxLink is still
 statefull.  I read some where where even Ajax components can be
 stateless.
 What am I missing?

 AjaxLink addFriend = new AjaxLink(addFriend)
{
@Override
protected boolean getStatelessHint()
{
return true;
}

private static final long serialVersionUID = 1L;

public void onClick(AjaxRequestTarget request)
{
makeFriends(sessionUserName,
 profileUserName);
}
 }
 --
 View this message in context:
 http://www.nabble.com/Is-it-possible-to-get-AjaxLink-stateless--tf4774228.html#a13657606
 Sent from the Wicket - User mailing list archive at
 Nabble.comhttp://nabble.com/
 .


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-get-AjaxLink-stateless--tf4774228.html#a13658887
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is it possible to get AjaxLink stateless?

2007-11-09 Thread Chris Lintz

I haven't added any behaviors.  You are asking me to override any default
behaviors associated with AjaxLink ?


Johan Compagner wrote:
 
 what happens if you also override your behaviors
 
 *public* *boolean* getStatelessHint(Component component)
 
 {
 
 *return* *false*;
 
 }
 
 
 
 and return true. I dont know if all the urls are generated right then..
 
 
 On Nov 9, 2007 4:51 PM, Chris Lintz [EMAIL PROTECTED] wrote:
 

 The onsubmit is adding a friend to XCP. An Ajax call decorator is then
 displaying a message on the client side... so the page doesnt change.
  Here
 is the link:

 AjaxLink addFriend = new AjaxLink(addFriend)
{
@Override
protected boolean getStatelessHint()
{
return true;
}

private static final long serialVersionUID = 1L;

public void onClick(AjaxRequestTarget request)
{
makeFriends(sessionUserName,
 profileUserName);
}

protected IAjaxCallDecorator
 getAjaxCallDecorator()
{
return new AjaxCallDecorator()
{

private static final long
 serialVersionUID = 1L;

@Override
public CharSequence
 decorateScript(CharSequence script)

{
return
 super.decorateScript
 (script);
}

@Override
public CharSequence
 decorateOnSuccessScript(CharSequence script)
{
script = getSuccess() +
 script;
return
 super.decorateScript
 (script);
}

@Override
public CharSequence
 decorateOnFailureScript(CharSequence script)
{
script = getFailure() +
 script;
return
 super.decorateScript
 (script);
}

private String getSuccess()
{
return
 friended('addFriend','A friendship request was sent.');;
}

private String getFailure()
{
return
 friendingFailed('Sorry, we were unable to send your friendship
 request.  Please try again later.');;
}
};
};
};

 Johan Compagner wrote:
 
  but my question remains, what are you doing inside that ajax link??
 
  On Nov 9, 2007 1:17 AM, Chris Lintz [EMAIL PROTECTED]
 wrote:
 
 
  Ok that makes sense.  To me i can chalk this up as one thing in the
  framework
  that would be a real joy to fix - that being having AjaxLink or other
  related Ajax components stateless.  I think its a real down fall that
  sessions are created (and hence Page store cache files) for an Ajax
 link.
 
  On a really high traffic site that uses clustered session replication,
  there
  are affects on the back end from generating all of these sessions just
  for
  a
  link.  Part of my current tasks are trying to minimize session
 creation.
 
 
 
 
 
  Johan Compagner wrote:
  
   no because the ajax behaviors are also not stateless.
   So even if you make the link stateless then the behaviors it has
 make
  them
   statefull again.
  
   Sometimes ajax things can be stateless but i still think it is a bit
   strange
   for 90% or more of the cases
   Why is the link an ajax link?. Because in my eyes if you use ajax
 you
   still
   use the old page
   and the ajax call just updates parts of the page. But if you do
 that.
  Then
   ajax can't be that easy
   stateless because how are you going to make exactly the same state
 as
  the
   client sees in the browser
   for the next click?
  
   And ajax clicks should be lean and mean in my eyes because they
 should
  be
   fast and could happen frequently
   and creating constantly a page for that is pretty heavy.
  
   johan
  
  
  
   On Nov 8, 2007 11:50 PM, Chris Lintz [EMAIL PROTECTED]
  wrote:
  
  
   Hi.  So i have tried setting the stateless hint and my AjaxLink is
  still
   statefull.  I read some where where even Ajax components

Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Chris Lintz

That makes sense.  Another thought that possibly makes it a bit easier is to
name the page store directories with a unique process identifier. For
example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1 and the
process ID is 123456, then the Page store directory would be:

   MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1

With a structure like that it would be easy for a thread to remove the Page
store directories that do not have the current process ID.

Just a thought.





Johan Compagner wrote:
 
 Yes the pagestore knows which files it makes, but it is not the controller
 of those files
 because the only thing that controls if the file must be deleted or not is
 the servlet container
 with the session objects.
 
 and as far as i know there is no api where i can ask which sessions are
 still active.
 So the only thing we could do is have a thread running that is waking up
 every day once
 and checks if there are files older then X. And that thread must be
 configured by you
 explicitly setting the timeout that you want to have.
 
 johan
 
 
 
 
 On Nov 14, 2007 12:04 AM, Chris Lintz [EMAIL PROTECTED]
 wrote:
 

 I think from previous threads there was discussion about something that
 you
 could do.  For instance, the Page store should know what cache files it
 is
 controlling.  By that logic alone it can deduce what it is no longer
 referencing and cleanup what was left form it.

 It seems silly to me to ask people to rely on graceful restarts or write
 your own cleanup script from a framework that created cache files.  It
 seems
 fairly standard to ask clean up what was yours.   I'd like to hear
 other
 input from average users.



 Johan Compagner wrote:
 
  as long as your server doesn't crash and isn't terminate by a kill -9
  no files are leaked..
 
  When that does happen then yes you have to clean it up.
  If you dont care about those files after a restart then in the script
 that
  starts your webcontainer
  you will just remove all the files in the work dir.
 
  I don't think wicket can do much about it.
 
  johan
 
 
  On Nov 13, 2007 10:41 PM, Chris Lintz [EMAIL PROTECTED]
  wrote:
 
 
  All,
  I have submitted a Jira on this topic.  I will leave it to the great
  minds
  to debate.  In any case, it appears restarting the container cannot
  notify
  the HttpSessionListeners that are bound to the page store files.  It
  would
  be nice if the framework can cleanup what I consider a leak of the
 cache
  files it created.  Otherwise folks like myself living in an high
 traffic
  site are forced to generate script look for old page store cache
 files.
 
  https://issues.apache.org/jira/browse/WICKET-1158
 
 
  Johan Compagner wrote:
  
  
And from top of my head there is no api to get all the current
  session
   id's
from
an instance when the instance does start up..
  
   But we could ditch ALL the directories it can find in the temp
   directory the page store uses when starting up, right?
  
  
   No we can't do that, If you as you should terminate your web
 container
   gracefully
   then the web container will save all the sessions to disk. Then if
 you
   restart it again
   all the sessions are loaded again. And yes the application works
 just
  as
   it was never
   restarted. But if we throw away all the page stores. Then we loose
 all
  the
   data
   of sessions that are currently active.
  
   The only thing i can think of is having some check that only deletes
   things
   that are not touched for X hours or days.
  
   johan
  
  
 
  --
  View this message in context:
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13735298
  Sent from the Wicket - User mailing list archive at
  Nabble.com http://nabble.com/http://nabble.com/
  .
 
 
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13736689
  Sent from the Wicket - User mailing list archive at
 Nabble.comhttp://nabble.com/
 .


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13751284
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Chris Lintz

The process ID is just an idea for a unique ID.  If that wont work for you,
lets dream another unique ID .



Johan Compagner wrote:
 
 ohh wait that also doesn't work (process id can also be generated once
 ofcourse) but you can have mulitply dirs created with 10 different
 processes that are all valid. so that doesn't solve anything
 
 On 11/14/07, Johan Compagner [EMAIL PROTECTED] wrote:
 can you get the current process id by general api in java? have to
 look at Runtime then.

 On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:
 
  That makes sense.  Another thought that possibly makes it a bit easier
 is
 to
  name the page store directories with a unique process identifier. For
  example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1 and
 the
  process ID is 123456, then the Page store directory would be:
 
 MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1
 
  With a structure like that it would be easy for a thread to remove the
 Page
  store directories that do not have the current process ID.
 
  Just a thought.
 
 
 
 
 
  Johan Compagner wrote:
  
   Yes the pagestore knows which files it makes, but it is not the
 controller
   of those files
   because the only thing that controls if the file must be deleted or
 not
 is
   the servlet container
   with the session objects.
  
   and as far as i know there is no api where i can ask which sessions
 are
   still active.
   So the only thing we could do is have a thread running that is waking
 up
   every day once
   and checks if there are files older then X. And that thread must be
   configured by you
   explicitly setting the timeout that you want to have.
  
   johan
  
  
  
  
   On Nov 14, 2007 12:04 AM, Chris Lintz [EMAIL PROTECTED]
   wrote:
  
  
   I think from previous threads there was discussion about something
 that
   you
   could do.  For instance, the Page store should know what cache files
 it
   is
   controlling.  By that logic alone it can deduce what it is no longer
   referencing and cleanup what was left form it.
  
   It seems silly to me to ask people to rely on graceful restarts or
 write
   your own cleanup script from a framework that created cache files. 
 It
   seems
   fairly standard to ask clean up what was yours.   I'd like to hear
   other
   input from average users.
  
  
  
   Johan Compagner wrote:
   
as long as your server doesn't crash and isn't terminate by a kill
 -9
no files are leaked..
   
When that does happen then yes you have to clean it up.
If you dont care about those files after a restart then in the
 script
   that
starts your webcontainer
you will just remove all the files in the work dir.
   
I don't think wicket can do much about it.
   
johan
   
   
On Nov 13, 2007 10:41 PM, Chris Lintz
 [EMAIL PROTECTED]
wrote:
   
   
All,
I have submitted a Jira on this topic.  I will leave it to the
 great
minds
to debate.  In any case, it appears restarting the container
 cannot
notify
the HttpSessionListeners that are bound to the page store files. 
 It
would
be nice if the framework can cleanup what I consider a leak of
 the
   cache
files it created.  Otherwise folks like myself living in an high
   traffic
site are forced to generate script look for old page store cache
   files.
   
https://issues.apache.org/jira/browse/WICKET-1158
   
   
Johan Compagner wrote:


  And from top of my head there is no api to get all the
 current
session
 id's
  from
  an instance when the instance does start up..

 But we could ditch ALL the directories it can find in the temp
 directory the page store uses when starting up, right?


 No we can't do that, If you as you should terminate your web
   container
 gracefully
 then the web container will save all the sessions to disk. Then
 if
   you
 restart it again
 all the sessions are loaded again. And yes the application
 works
   just
as
 it was never
 restarted. But if we throw away all the page stores. Then we
 loose
   all
the
 data
 of sessions that are currently active.

 The only thing i can think of is having some check that only
 deletes
 things
 that are not touched for X hours or days.

 johan


   
--
View this message in context:
   
  
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13735298
Sent from the Wicket - User mailing list archive at
Nabble.com http://nabble.com/http://nabble.com/
.
   
   
   
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/How-To-Change-Page-Store-Size-in-DiskPageStore--tf4768072.html#a13736689
Sent from

Re: How To Change Page Store Size in DiskPageStore?

2007-11-14 Thread Chris Lintz

There are still other ways around this.  If every process registered itself
via unique file in a known directory and a Page Store thread touched this
file every say 5 minutes, this gives more information to a thread to know
whether or not delete a Page Store directory associated with unique ID.   

For example,

MyWebSite-filestore/running_processes/uid1
MyWebSite-filestore/running_processes/uid2
MyWebSite-filestore/running_processes/uid2

Each Page store thread would then check the uid files that it did not
create.  For example, process 1 would check to see if uid1 and uid2 have
been touched in the last hour (just making up something way greater than 5
minutes).  If not, remove their associated PageStore files.

I will admit this is a bit more involved, but i am trying to present a
solution that doesn't require any configuration from a user perspective.




Johan Compagner wrote:
 
 no it doesnt matter what id i generate or get. This is still not
 enough because it doesnt say any thing if i can delete it or not. i
 have an id 1 then i restart and i have id 2 can i then delete
 everything from 1? No i cant because there could be live sessions from
 1.
 
 On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:

 The process ID is just an idea for a unique ID.  If that wont work for
 you,
 lets dream another unique ID .



 Johan Compagner wrote:
 
  ohh wait that also doesn't work (process id can also be generated once
  ofcourse) but you can have mulitply dirs created with 10 different
  processes that are all valid. so that doesn't solve anything
 
  On 11/14/07, Johan Compagner [EMAIL PROTECTED] wrote:
  can you get the current process id by general api in java? have to
  look at Runtime then.
 
  On 11/14/07, Chris Lintz [EMAIL PROTECTED] wrote:
  
   That makes sense.  Another thought that possibly makes it a bit
 easier
  is
  to
   name the page store directories with a unique process identifier.
 For
   example, if my session ID is B31598D4B206B75161AFE08FB5610D54.n1 and
  the
   process ID is 123456, then the Page store directory would be:
  
  MyWebSite-filestore/123456/B31598D4B206B75161AFE08FB5610D54.n1
  
   With a structure like that it would be easy for a thread to remove
 the
  Page
   store directories that do not have the current process ID.
  
   Just a thought.
  
  
  
  
  
   Johan Compagner wrote:
   
Yes the pagestore knows which files it makes, but it is not the
  controller
of those files
because the only thing that controls if the file must be deleted
 or
  not
  is
the servlet container
with the session objects.
   
and as far as i know there is no api where i can ask which
 sessions
  are
still active.
So the only thing we could do is have a thread running that is
 waking
  up
every day once
and checks if there are files older then X. And that thread must
 be
configured by you
explicitly setting the timeout that you want to have.
   
johan
   
   
   
   
On Nov 14, 2007 12:04 AM, Chris Lintz
 [EMAIL PROTECTED]
wrote:
   
   
I think from previous threads there was discussion about
 something
  that
you
could do.  For instance, the Page store should know what cache
 files
  it
is
controlling.  By that logic alone it can deduce what it is no
 longer
referencing and cleanup what was left form it.
   
It seems silly to me to ask people to rely on graceful restarts
 or
  write
your own cleanup script from a framework that created cache
 files.
  It
seems
fairly standard to ask clean up what was yours.   I'd like to
 hear
other
input from average users.
   
   
   
Johan Compagner wrote:

 as long as your server doesn't crash and isn't terminate by a
 kill
  -9
 no files are leaked..

 When that does happen then yes you have to clean it up.
 If you dont care about those files after a restart then in the
  script
that
 starts your webcontainer
 you will just remove all the files in the work dir.

 I don't think wicket can do much about it.

 johan


 On Nov 13, 2007 10:41 PM, Chris Lintz
  [EMAIL PROTECTED]
 wrote:


 All,
 I have submitted a Jira on this topic.  I will leave it to the
  great
 minds
 to debate.  In any case, it appears restarting the container
  cannot
 notify
 the HttpSessionListeners that are bound to the page store
 files.
  It
 would
 be nice if the framework can cleanup what I consider a leak of
  the
cache
 files it created.  Otherwise folks like myself living in an
 high
traffic
 site are forced to generate script look for old page store
 cache
files.

 https://issues.apache.org/jira/browse/WICKET-1158


 Johan Compagner wrote:
 
 
   And from top of my head there is no api to get all the
  current
 session
  id's
   from
   an instance when the instance does start up

Need to redirect to the current page upon a page expire - how??

2008-02-20 Thread Chris Lintz

Hi,
So i have searched the forums regarding overriding
RequestCycle#onRuntimeException(Page page,RuntimeException e) .  It seems we
are completely stuck because there is no way to determine what page threw a
PageExpiredException .  

What I want to do is this:

When my SearchPage expires, and the user again clicks a button search, they
are immediately returned to the SearchPage potentially with any request
parameters the user searched on. It seems the only way to get a custom Page
when an PageExpiredException is thrown is to override onRuntimeException and
return the custom page.  Unfortunately the page is null when passed into
onRuntimeException (which makes sense because there is no longer a valid
session).

How can i accomplish this within the framework?  I hope we can avoid a hack
like setting a cookie that represents the current page upon every page
request. (atleast it seems to me there should be a framework solution for
this).

thanks for any ideas


chris


-- 
View this message in context: 
http://www.nabble.com/Need-to-redirect-to-the-current-page-upon-a-page-expire---how---tp15602103p15602103.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need to redirect to the current page upon a page expire - how??

2008-02-21 Thread Chris Lintz

That would work, except the search results do contain some AJAX
functionality, which of course result in a stateful page.


Mr Mean wrote:
 
 how about using a stateless searchpage?
 that way you should not get a page expired.
 
 Maurice
 
 On Thu, Feb 21, 2008 at 1:14 AM, Chris Lintz
 [EMAIL PROTECTED] wrote:

  Hi,
  So i have searched the forums regarding overriding
  RequestCycle#onRuntimeException(Page page,RuntimeException e) .  It
 seems we
  are completely stuck because there is no way to determine what page
 threw a
  PageExpiredException .

  What I want to do is this:

  When my SearchPage expires, and the user again clicks a button search,
 they
  are immediately returned to the SearchPage potentially with any request
  parameters the user searched on. It seems the only way to get a custom
 Page
  when an PageExpiredException is thrown is to override onRuntimeException
 and
  return the custom page.  Unfortunately the page is null when passed into
  onRuntimeException (which makes sense because there is no longer a valid
  session).

  How can i accomplish this within the framework?  I hope we can avoid a
 hack
  like setting a cookie that represents the current page upon every page
  request. (atleast it seems to me there should be a framework solution
 for
  this).

  thanks for any ideas


  chris


  --
  View this message in context:
 http://www.nabble.com/Need-to-redirect-to-the-current-page-upon-a-page-expire---how---tp15602103p15602103.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Need-to-redirect-to-the-current-page-upon-a-page-expire---how---tp15602103p15613198.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is there something like HybridUrlCodingStrategy for normal GET parameters?

2008-03-17 Thread Chris Lintz

Hey all,
So the HybridUrlCodingStrategy is great for AJAX pages.  I have a bit of an
issue where I need something like the HybridUrlCodingStrategy except it can
take GET parameters and not lose its mount point.  Anyone know of something
like this out there?  From the Wicket Java docs, it doesn't appear there is
one.


chris
-- 
View this message in context: 
http://www.nabble.com/Is-there-something-like-HybridUrlCodingStrategy-for-normal-GET-parameters--tp16101902p16101902.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to lookup Page or Class from a URI path ?

2008-05-04 Thread Chris Lintz

Sorry I should be more clear. I know how to use mounts.  What I need to
lookup the Class associated to a particular mount point.  Please see my code
below:

return new WebRequestCycle(this, (WebRequest) request, response)
{
   @Override
   protected void onBeginRequest()
   {
 super.onBeginRequest();
 HttpServletRequest req=(HttpServletRequest)request;
 String path=req.getServletPath();
 // I need to lookup the Page or Class from this path 
 ...
   }
 }



martin-g wrote:
 
 http://wicketstuff.org/wicket13/niceurl/the/homepage/path
 
 Browse the source code of NiceUrlApplication.java to see how to use
 mounts
 
 On Sat, 2008-05-03 at 18:35 +0200, Johan Compagner wrote:
 Use mounts
 
 On 5/2/08, Chris Lintz [EMAIL PROTECTED] wrote:
 
  Hi,
  Any one know how I can directly lookup a Page or the Page Class from a
 URI
  path?  For example, say I have /pic/convert .  How can I get the
  associated Page or Page class that path?
 
  thanks for any help
 
  chris
 
  --
  View this message in context:
 
 http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17020708.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17048153.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to lookup Page or Class from a URI path ?

2008-05-04 Thread Chris Lintz

Because I need the Class so i can check for the presence of an annotation
(@InternalPage).  If that annotation is present, only internal requests from
10.x.x.x are allowed.  Otherwise a 403 (Forbidden) will be generated.

Obviously i can control access with Apache, or a ServletFilter..heck for
that matter in the Page constructor itself.  I feel the better solution is
with my annotation and before the Page constructor is called.

Thanks for clearing that up for me. Where can I check for this annotation
within the Web Request Cycle before the Page constructor is called?
 

Johan Compagner wrote:
 
 why do you want to know it there?
 you are to early there. Wicket only knows it much later when it generates
 a
 RequestTarget from the url
 
 johan
 
 
 On Sun, May 4, 2008 at 6:09 PM, Chris Lintz [EMAIL PROTECTED]
 wrote:
 

 Sorry I should be more clear. I know how to use mounts.  What I need to
 lookup the Class associated to a particular mount point.  Please see my
 code
 below:

return new WebRequestCycle(this, (WebRequest) request, response)
{
   @Override
   protected void onBeginRequest()
   {
 super.onBeginRequest();
 HttpServletRequest req=(HttpServletRequest)request;
 String path=req.getServletPath();
 // I need to lookup the Page or Class from this path
 ...
}
 }



 martin-g wrote:
 
  http://wicketstuff.org/wicket13/niceurl/the/homepage/path
 
  Browse the source code of NiceUrlApplication.java to see how to use
  mounts
 
  On Sat, 2008-05-03 at 18:35 +0200, Johan Compagner wrote:
  Use mounts
 
  On 5/2/08, Chris Lintz [EMAIL PROTECTED] wrote:
  
   Hi,
   Any one know how I can directly lookup a Page or the Page Class from
 a
  URI
   path?  For example, say I have /pic/convert .  How can I get the
   associated Page or Page class that path?
  
   thanks for any help
  
   chris
  
   --
   View this message in context:
  
 
 http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17020708.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17048153.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-lookup-Page-or-Class-from-a-URI-path---tp17020708p17048402.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Invoulentary session sharing/leakage in Wicket 1.3.x

2008-05-15 Thread Chris Lintz

Guys has this been resolved??  We have been having some customers complain as
well (some sending screen shots of others peoples data as proof).   Because
our users click streams are available publically at their control, we had
thought jsessionids occurring in the click stream were being maliciously
hijacked. We  plugged that hole disallowing any jsessionid to be part of url
(via Servlet filter) - yes this of course means JavaScript must be enabled.  
This involuntary session sharing is still occurring.  We are running release
1.3.2.  


Johan Compagner wrote:
 
 I know all that, but i dont know how this could happen in wicket. I
 think it is user code because if you have a bufferedresponse that has
 a string buffer filled then it is very strange that the output stream
 is already used, i am very curios how both can be used by wicket in
 the same request, wicket only uses outputstream itself for resources
 and a redirect to buffer (the actual redirect) the last part this
 really cant happen because there shouldnt be anything in the response.
 
 The first part cant also happen because we dont render a page or
 something if a resource request target is the response target..
 
 So it seems to me that that it is usercode that writes directly to the
 stream and let wicket still do something
 
 
 On 5/5/08, lars vonk [EMAIL PROTECTED] wrote:
 Hi Johan,

 This exception occurs if you obtained the servletresponse via the
 ServletResponse.getOutputStream() and are *trying *to obtained the writer
 via ServletResponse.getWriter() at the same time. According to the
 javadoc
 of ServletRespone you can either use getOutputStream or getWriter to
 write
 the body:

 Either this method or [EMAIL PROTECTED] #getOutputStream} may be called to 
 write the
  body, not both.
 

 Jetty tracks this using an inner flag. This flag is only reset on the
 ServletResponse.reset()  method, which I believe is called at the end of
 the
 servletrequestcycle.

 If I look at Wicket's the WebResponse class I see several
 ServletResponse.getWriter *and* ServletResponse.getOutputStream calls.
 You
 can't mix those two when writing the servletresponse.

 Maybe this helps with tracking where it goes wrong.

 Cheers Lars

 PS. The exception would have been IllegalStateException(WRITER') if you
 obtained the ServletResponse.getWriter() and are *trying* to obtain the
 ServletResponse.getOutputStream at the same time.

 On Mon, May 5, 2008 at 4:39 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:

  it was really a pretty rare exception
 
  285154 [btpool0-9] ERROR org.mortbay.log - /undefined
  java.lang.IllegalStateException: STREAM
at org.mortbay.jetty.Response.getWriter(Response.java:585)
at
  org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:355)
at org.apache.wicket.protocol.http.BufferedWebResponse.close
  (BufferedWebResponse.java:73)
at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter
  .java:371)
at
  org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter
  .java:194)
at
 
 
 org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
 
  i have no idea how this exception can happen.
  It seems that there is already streamed something but then close does
 find
  also some stuff and wants to write it..
 
  That did result in an exception on close() so the unset wasnt called.
 
  johan
 
 
 
  On Mon, May 5, 2008 at 3:34 PM, Erik van Oosten [EMAIL PROTECTED]
  wrote:
 
   Isn't this problem serious enough to release 1.3.4?
  
   Regards,
  Erik.
  
  
   Johan Compagner wrote:
the only thing we found was the finalize block that could be
 skipped
   because
of an exception again in that block
   
That is fixed in current 1.3.x branch (and 1.4)
   
   
  
   --
   Erik van Oosten
   http://day-to-day-stuff.blogspot.com/
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 

 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Invoulentary-session-sharing-leakage-in-Wicket-1.3.x-tp16550360p17266484.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: StatelessForm doesn't work with GET method

2008-06-26 Thread Chris Lintz

Is there a patch for this in the 1.3.x branch or something i can override as
a fix?  I am using 1.3.3. 


Doug Donohoe wrote:
 
 As part of my effort to submit a form to a bookmarkable page, I discovered
 this bug when trying to uses a stateless form with the GET method of a
 form.  I've documented my saga at 
 
 http://wiki.donohoedigital.com/wiki/Wiki.jsp?page=Bookmarkable%20Form%20Submission%20in%20Wicket
 
 The original thread was
 http://www.nabble.com/submit-form-to-bookmarkable-page-to16912974.html
 
 Post method seems to work fine.  The error message is:
 
 WicketMessage: Internal error parsing wicket:interface =
 %3A1%3Aform%3A%3AIFormSubmitListener%3A%3A
 
 Root cause:
 
 org.apache.wicket.WicketRuntimeException: Internal error parsing
 wicket:interface = %3A1%3Aform%3A%3AIFormSubmitListener%3A%3A
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:583)
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.addInterfaceParameters(WebRequestCodingStrategy.java:554)
 at
 org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:199)
 at org.apache.wicket.Request.getRequestParameters(Request.java:171)
 at org.apache.wicket.RequestCycle.step(RequestCycle.java:1224)
 at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1331)
 at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
 at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:363)
 at
 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:613)
 
 

-- 
View this message in context: 
http://www.nabble.com/StatelessForm-doesn%27t-work-with-GET-method-tp16983393p18147733.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]