-----Original Message-----
From: Danh Hoai [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 6:38 PM
To: [EMAIL PROTECTED]
Subject: Questions from a novice
General questions:
1. Trying to understand this URL in the databasetest example:
http://localhost:8080/jetspeed/portal/user/turbine/page/default.psml
we have a vague idea of what is going on: /portal is like /servlet, there is
directory user/turbine, but where is page, we see html directory
/portal is a servlet, the Turbine servlet. Here is the jist of how it works:
init() method initializes the properties in the ResourceService.
After initialization the Servlet waits for a HTTPRequest from the Servlet engine.
HTTP Request is handed to the Servlet from the servlet engine. doGet/doPost is called
The request is used to create a RunData object. The RunData object is just a big
context object with references to all sorts of useful stuff.
Rundata data = RunDataFactory.getRunData(req, res, getServletConfig()
Service initialization takes place next and is invoked with init(RunData rd). This
method calls initializes the services in
TurbineServices specified in the TR.props file.
The following parameters are checked and stored in the RunData object. Parameters can
be specified either way:
/portal/action/Login or /portal?action=Login, the DefaultParameterParser
class(ParameterParser interface) that is built into the RunData will handle either
format.
data.setScreen(data.getParameters().getString("screen"));
data.setAction(data.getParameters().getString("action"));
There is some Login action checks. This allows for the Login action to specficied in
a the TR.props file.
Next the ActionLoader is loaded with actions and executed. The RunData object is
passed into the exed method
The next couple of methods are called.
// This is where the validation of the Session information
// is performed if the user has not logged in yet, then
// the screen is set to be Login. This also handles the
// case of not having a screen defined by also setting the
// screen to Login. If you want people to go to another
// screen other than Login, you need to change that within
// TurbineResources.properties...screen.homepage; or, you
// can specify your own SessionValidator action.
ActionLoader.getInstance().exec(
data, TurbineResources.getString("action.sessionvalidator"));
// Put the Access Control List into the RunData object, so
// it is easily available to modules. It is also placed
// into the session for serialization. Modules can null
// out the ACL to force it to be rebuilt based on more
// information.
ActionLoader.getInstance().exec(
data, TurbineResources.getString("action.accesscontroller"));
// Start the execution phase. DefaultPage will execute the
// appropriate action as well as get the Layout from the
// Screen and then execute that. The Layout is then
// responsible for executing the Navigation and Screen
// modules.
//
// Note that by default, this cannot be overridden from
// parameters passed in via post/query data. This is for
// security purposes. You should really never need more
// than just the default page. If you do, add logic to
// DefaultPage to do what you want.
String defaultPage = TurbineTemplate.getDefaultPageName(data);
Finally the some redirection code and then RunData object is put back into the
RunDataFactory.
2. Logic for default.psml: Again our vague understanding is that, when a page is
submitted, URL above is submitted with parameters like js_pid. And the class
specified in default.psml corresponding to this id is then called with specified
parameters. the js_pid is dynamic--changes when the pane is registered, so this
dynamic js_pid is inserted into the jsp page everytime it is sent to the browser.
For clarification I am assuming when you say "when a page is submitted" you are
referring to a browser making an HTTP REQUEST to your Servlet engine.
The above URL refers to the turbine user and their respective PSML file stored either
in the file system or in the database. You can change the page/default.psml to
page/news.psml if that file exists. You could also specify it with
/user/turbine?page=news.psml
3. If I submit a HTML page and do not want js_pid to be dynamic, can I have a static
one defined in default.psml? Guess not because default.psml is generated everytime
the pane is configured
If you want specific information on URL building checkout $jslink which refers to
tool.request.jslink=org.apache.jetspeed.util.template.BaseJetspeedLink <<== TR.props
4. We are trying to add portlet functionality to a servlet based transformation
engine. Look like if we implement HttpSession, HttpServletRequest and
HttpServletResponse in the portlet environment we should be able to use our
transformation engine. Let us know if there are items we have missed
Create a new portlet that extends AbstractPortlet and do whatever you want. This is
where you can link to your transformation engine. Parameters are passed to your
Portlets PortletConfig object. Check out the examples in the source tree. They
actually very simple.
5. Please point us to any tutorial type links or overall architecture of jetspeed if
there are any.
See the Jakarta web site.
r,
hugh
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>