Reputation: 1124
I'm new to Wicket and have made an application using some tutorials.
How do I create a servlet and pass on the input from that to a web page without database transactions?
Upvotes: 1
Views: 810
Reputation: 4707
I'm assuming you are trying redirect to a Wicket page (parameterized) from outside the Wicket application.
You can do this by using one of the URL encoding strategies (BookmarkablePageRequestTargetUrlCodingStrategy
, QueryStringUrlCodingStrategy
, ...) which will give that page a clean URL which can be referenced easily. Or you can put a BookmarkablePageLink
in your web application somewhere, copy the link that it generates and use it to redirect to.
You can reference that link anywhere you wish passing parameters to it using the normal ?par1=val&par2=val
system.
To read these parameters in your page you will need to define your page constructor like so:
...
public MyPage(final PageParameters parameters) {
final String par1 = parameters.getString("par1");
final String par2 = parameters.getString("par2");
}
...
Upvotes: 3