Rakesh,

Further clarification still needed... i must be missing something!

Randy

Tomba Rakesh wrote:

Hi Randy

1. did you register and add the new servlet in the web.xml of the security app?

I am adding new servlet as well as new servlet entry to web.xml (web.xml for 
jetspeed app, not web.xml for security app).

2. what functionality would you have added if you were successful in using your own servlet?

Functionality added: just redirected to user specific psml file. For example 
for user01
it redirected to
http://localhost:8080/jetspeed/portal/user01.psml
Are you really redirecting to a user specific failed login page? This seems strange to me. We have lots of support to redirect to a user/role/group specific page on successful login. Seems like a failed login might want to redirect to a common page. Am I reading this wrong?

Ok... you took down the J2 DB? If so, I missed that. I'd prefer to handle that as part of the J2 product if at all possible... this is not unique to the ProfilerValveImpl but it may show up there first. Most likely, we'll end up returning an HTTP error status code and you can customize the returned page in the container for the HTTP page. Will that work for you?

I took "External Database" down not the J2 DB (Hypersonic). External database 
is the place where actual user data are stored.

To be specific: the database you shutdown contains J2 tables for portlets, security, etc., or just your application data? Seems like only missing J2 data would effect the page mapping of request urls, no?

Randy


Regards
Rakesh

Randy Watler <[EMAIL PROTECTED]> wrote:
Rakesh,



Tomba Rakesh wrote:

Hi Randy



Is there some feature that is missing here that you'd like to see? If so, it might be general enough to be added to the product.


For login, jetspeed use LoginProxyServlet. When I try new servlet(same 
functionality as LoginProxyServlet) for login it does not work. Is there any 
way to provide a new servlet (without touching LoginProxyServlet) for login.

I am not sure what is going wrong here... two points for clarification:

1. did you register and add the new servlet in the web.xml of the security app? 2. what functionality would you have added if you were successful in using your own servlet?


For Database connection fail, Jetspeed use ProfilerValveImpl for redirecting.


This seems incorrect. The portlets themselves must take responsibility for handling errors. In turn, they can redirect and/or modify session state so that subsequent requests to the portal are routed based on a dfferent set of profiling rules.

Every user we have specific psml file, for user user01 we have
http://localhost:8080/jetspeed/portal/user01.psml [Contains our portlets]

After database is down. Any try to open 
"http://localhost:8080/jetspeed/portal/user01.psml"; goes to jetspeed default 
page.

Our portlets takes the responsibility for handling errors, but the portlets are 
not being call. Instead of calling the portlets specified in the psml file. 
Jetspeed calls ProfilerValveImpl. So by modifying ProfilerValveImpl I could 
redirect to any page.

Suggest me how to tackle this issue. Is there any better approach....


Ok... you took down the J2 DB? If so, I missed that. I'd prefer to handle that as part of the J2 product if at all possible... this is not unique to the ProfilerValveImpl but it may show up there first. Most likely, we'll end up returning an HTTP error status code and you can customize the returned page in the container for the HTTP page. Will that work for you?

Randy

Regards
Rakesh
Randy Watler wrote:
Rakesh:



For login error, redirect using LoginErrorServlet.



Seems correct, but I cannot contribute much here because it has been a while since I did much with the login processing. It seems to me that the existing implementation handles this smoothy, including login failure counts and other security features. Is there some feature that is missing here that you'd like to see? If so, it might be general enough to be added to the product.



For Database connection fail, Jetspeed use ProfilerValveImpl for redirecting.



This seems incorrect. The portlets themselves must take responsibility for handling errors. In turn, they can redirect and/or modify session state so that subsequent requests to the portal are routed based on a different set of profiling rules. The security application uses this technique to force the end user to change passwords using the "MyAccount.psml" page. Here, you may want to simply force the display of a DBIsDown.psml page using a profiling rule override. Note that the profiler is very flexible and can be used in many different ways to interpret request urls... all without code modification of any sort. So, yes, the profiler is performing the "redirection" in a sense, but it does not require programmatic extension.

HTH,

Randy



The way I tested:
1. Shut down external database (Not Hypersonic Database )
2. In normal, when user login, it goes to user specific psml file. And whatever 
portlets mentioned in the psml file gets displayed. The information displayed 
by the portlets are from external database.
3. As in step 1 database is down. As database is not available, by default jetspeed call 
ProfilerValveImpl (portlet code are not executing) and redirects to jetspeed default 
page. So instead of displaying jetspeed default page, I would like to display some error 
message as "Database is down".

Please correct me if I am wrong: I use ProfilerValveImpl for handling psml file Exception (No database available).

Regards
Rakesh

Randy Watler wrote:
Rakesh,

I am afraid I do not understand your needs fully, so it is hard to suggest the best implementation.

Exactly under what conditions do you want to redirect to an error page instead of the default page? If it is after a failed login, there might be a better way to accomplish what you are after.

Randy

Tomba Rakesh wrote:





Hi Randy

Thanks for your quick response. Sorry I really forgot, that's why it was cross 
post.
Actually my requirement is redirect to our error page if something goes wrong. 
By default it redirect to jetspeed's default-page.psml

Types of Login:
Type 1. Once user sucessfully login to our application, username and password 
is redirected to jetspeed's LoginProxyServlet.
Type 2. Login from jetspeed's default page.

For login Type 2, we would like forward to jetspeed default page. For Type 1, 
we would like forward to our error page.

So if have a class MyProfilerValveImpl this will always redirected to our page. 
Where to put this entry before or after ProfilerValveImpl.





class="org.apache.jetspeed.profiler.impl.ProfilerValveImpl"




init-method="initialize"








Regards
Rakesh

Randy Watler wrote:
Rakesh,

I have asked before... please do NOT cross post to this list and the dev list.

The ProfilerValveImpl is part of the J2 request pipeline. It is configured using spring in the assembly/pipelines.xml file.

However, it is non-trivial to replace its functionality. If you simply want to extend it, you might want to consider adding additional stages in the pipeline before or after the existing impl instead.

Randy

Tomba Rakesh wrote:







Hi All

1. Which class or servlet calls 
org.apache.jetspeed.profiler.impl.ProfilerValveImpl
2. Is it possible to provide a new ProfilerValveImpl, if so where where to 
configuration?

Thanks in advance

Regards
Rakesh


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com







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


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com





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


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com




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


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com




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


                
---------------------------------
Start your day with Yahoo! - make it your home page



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

Reply via email to