[JBoss Portal] - Re: Redirect after logout
by maiky
I try to rewrite the header.jsp with the example of the doc but have erros.
<%@ page import="org.jboss.portal.identity.User" %>
| <%@ page import="org.jboss.portal.api.PortalURL" %>
|
| <%
| User user = (User) request.getAttribute("org.jboss.portal.header.USER");
| PortalURL signOutURL = (PortalURL)request.getAttribute("org.jboss.portal.header.SIGN_OUT_URL");
| PortalURL loginURL = (PortalURL)request.getAttribute("org.jboss.portal.header.LOGIN_URL");
|
|
| if (user == null)
| {
| %>
| <a href="<%= loginURL %>">Login</a>
| <%
| }
| else
| {
| %>
| Logged in as: <%= user.getUserName() %>
| <br/>
| <a href="<%= signOutURL %>">Logout</a>
| <%
| }
| %>
Errors :
15:25:37,046 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
| java.lang.ClassCastException: java.lang.String
| at org.apache.jsp.WEB_002dINF.jsp.header.header_jsp._jspService(header_jsp.java:49)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| ++ MORE...
15:25:37,046 ERROR [STDERR] org.apache.jasper.JasperException: Exception in JSP: /WEB-INF/jsp/header/header.jsp:6
|
| 3:
| 4: <%
| 5: User user = (User) request.getAttribute("org.jboss.portal.header.USER");
| 6: PortalURL signOutURL = (PortalURL)request.getAttribute("org.jboss.portal.header.SIGN_OUT_URL");
| 7: PortalURL loginURL = (PortalURL)request.getAttribute("org.jboss.portal.header.LOGIN_URL");
| 8:
| 9:
|
|
| Stacktrace:
| 15:25:37,046 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.handleJspException
| ++ MORE ...
If I understand the request.getAttribute("org.jboss.portal.header.SIGN_OUT_URL") is a String, not a PortalURL.
So I can't use the portalURL methods. I just can get the SIGN_OUT_URL in a String.
anonymous wrote : May be 2.6 has a smarter solution for integrating this using the pageInterceptor?
Sorry I don't understand what I must do, can you explain plz ? :(
Any Solutions to redirect?
Thanks.
PS: Sorry for my bad English
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060379#4060379
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060379
18Â years, 9Â months
[JBoss Portal] - Re: how to clean the useless table?
by Antoine_h
see the rendering features (documention).
there are rendering option, to change the way the html is produced.
for rewritting your own,
see RegionTagHandler.java class for the jsp tag.
and then DivRegionRenderer.java or EmptyRegionRenderer.java as some example of renderer.
check in the xml descriptor file, where the type of renderer can be set.
(This names are for 2.6... some may have change since 2.4... a few changes have been done, for better portal api).
This is quiet easy.
I did a PortletRenderer that show no border etc....
but it still put the html tag of decoration (with "no visible" css styles),
So that the shape and size is exactly the same as if there was the decoration.
EmptyRenderer do some "no html tag at all".
It is not the same : no table tag etc... and the portlet is not in the same alignement, not the same borders etc.... with the others in the same region.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060378#4060378
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060378
18Â years, 9Â months
[Security & JAAS/JBoss] - JBoss Federated CR1 Connection Refused
by tmarafon
Hey
I'm evaluating JBoss Federated CR1 but I'm getting the following error:
08:17:55,354 ERROR [SSOAutoLogout] org.jboss.security.valve.SSOAutoLogout[/TesteSSOWeb]
javax.servlet.ServletException: java.net.ConnectException: Connection refused: connect
at org.jboss.security.valve.SSOTokenManager.invoke(SSOTokenManager.java:201)
at org.jboss.security.valve.SSOAutoLogout.invoke(SSOAutoLogout.java:172)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11B
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
08:17:55,354 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request pr
javax.servlet.ServletException: java.net.ConnectException: Connection refused: connect
at org.jboss.security.valve.SSOAutoLogout.invoke(SSOAutoLogout.java:178)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11B
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
I'm not using LDAP, but a custom jdbc LoginProvider.
The login module class is "org.jboss.security.idm.UsernameAndPasswordLoginModule".
Can someone help me?
Cheers,
Thiago
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060377#4060377
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060377
18Â years, 9Â months