Hi all,
I'm using JBoss AS 4.0.4GA + JBoss Portal 2.4 Beta1.
I've to redirect from a servlet to a portlet, but I don't know how. I always
get a 500 error:
2006-07-04 18:08:50,171 INFO
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myportal]]
Marking servlet centralController as unavailable
| 2006-07-04 18:08:50,171 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/myportal].[centralController]]
Allocate exception for servlet centralController
| java.lang.ClassCastException: mywork.controllers.CentralController
| at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1055)
| at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
| at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641)
| at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
| at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
| at mywork.utility.uploadfile.UploadFile.service(UploadFile.java:130)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
My flow is PORTLET --> JSP --> SERVLET --> PORTLET
I've tried mapping portlet class into web.xml file without succes.
here's the code within the servlet (note that sc is the ServletContext):
request.setAttribute("azione",String.valueOf(Costanti.UPLOAD_FILE));
| rd = sc.getRequestDispatcher("/controller/CentralController");
| rd.include(request,response);
here's relative web.xml part:
<servlet>
| <servlet-name>centralController</servlet-name>
| <servlet-class>mywork.controllers.CentralController</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>centralController</servlet-name>
| <url-pattern>/controller/CentralController</url-pattern>
| </servlet-mapping>
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3955316#3955316
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3955316
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user