[Q] struts:link with forward attribute on WebLogic 6.0
I try to forward the request in a jsp page as follows: <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %> I have the "ibohome" defined in the action.xml as follows, However, I got the following exception when I am trying to run it (I got the same exception if I replace "success" with "ibohome"). Could not deserialize context attribute java.io.NotSerializableException: org.apache.struts.action.ActionForwards at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148) at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366) at weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.ja va:71) at weblogic.servlet.internal.WebAppServletContext.getAttribute(WebAppServle tContext.java:211 ) at weblogic.servlet.jsp.PageContextImpl.getAttribute(PageContextImpl.java:1 64) at org.apache.struts.taglib.LinkTag.hyperlink(LinkTag.java:348) at org.apache.struts.taglib.LinkTag.doStartTag(LinkTag.java:270) at jsp_servlet._ibiomaticsportal._struts_test_zli._jspService(_struts_test_ zli.java:87) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:208) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:244) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl etContext.java:11 27) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl. java:1529) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) > <[WebAppServletContext(8068452,DefaultWebApp_myserver)] Root cause of ServletException javax.servlet.jsp.JspException: Cannot locate forwards mapping table at org.apache.struts.taglib.LinkTag.hyperlink(LinkTag.java:351) at org.apache.struts.taglib.LinkTag.doStartTag(LinkTag.java:270) at jsp_servlet._ibiomaticsportal._struts_test_zli._jspService(_struts_test_ zli.java:87) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:208) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl. java:244) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl etContext.java:11 27) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl. java:1529) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) == What I am trying to do is that when the index.html or index.jsp is invoked, it will forward the request to my main page without user to type anything. Any other approach I can take. Thanks, Zhiyong Li Portal Development iBiomatics LLC , a SAS Company (919) 653-2746 [EMAIL PROTECTED]
Re: [Q] struts:link with forward attribute on WebLogic 6.0
Zhiyong Li wrote: > I try to forward the request in a jsp page as follows: > > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %> > > > > Note that you'll probably want some text in between the beginning and ending tags, so you can actually see the hyperlink on the browser screen. > > > > I have the "ibohome" defined in the action.xml as follows, > > >path="/generic.do?jsp=/iBiomaticsPortal/MainContents.jsp"/> > > However, I got the following exception when I am trying to run it (I got > the same exception if I replace "success" with "ibohome"). > > Could not deserialize context attribute > java.io.NotSerializableException: > org.apache.struts.action.ActionForwards > WebLogic 6.0 currently has a restriction that all servlet context attributes in a webapp have to be Serializable (not just session attributes). I've been going through the various objects that Struts itself creates, and ActionForwards (among others) was recently made Serializable -- you should be able to do this with a very recent nightly build. NOTE: The Struts example application still won't work, though -- it uses a context attribute that is not serializable, so it won't work correctly on this platform. Craig McClanahan
RE: [Q] struts:link with forward attribute on WebLogic 6.0
Do you have a quick answer to my last question in my previous note? The question is included below. What I am trying to do is that when the index.html or index.jsp is invoked, it will forward the request to my main page without user to type anything. The main page is a jsp which will be invoked by one of the actions I will write. (I think what I need is to directly invoke the Struts servlet with certain parameters without using struts:link). Any other approach I can take. Thanks, Zhiyong -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, January 05, 2001 12:40 PM To: [EMAIL PROTECTED] Subject: Re: [Q] struts:link with forward attribute on WebLogic 6.0 Zhiyong Li wrote: > I try to forward the request in a jsp page as follows: > > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts.tld" prefix="struts" %> > > > > Note that you'll probably want some text in between the beginning and ending tags, so you can actually see the hyperlink on the browser screen. > > > > I have the "ibohome" defined in the action.xml as follows, > > >path="/generic.do?jsp=/iBiomaticsPortal/MainContents.jsp"/> > > However, I got the following exception when I am trying to run it (I got > the same exception if I replace "success" with "ibohome"). > > Could not deserialize context attribute > java.io.NotSerializableException: > org.apache.struts.action.ActionForwards > WebLogic 6.0 currently has a restriction that all servlet context attributes in a webapp have to be Serializable (not just session attributes). I've been going through the various objects that Struts itself creates, and ActionForwards (among others) was recently made Serializable -- you should be able to do this with a very recent nightly build. NOTE: The Struts example application still won't work, though -- it uses a context attribute that is not serializable, so it won't work correctly on this platform. Craig McClanahan
Re: [Q] struts:link with forward attribute on WebLogic 6.0
Zhiyong Li wrote: > Do you have a quick answer to my last question in my previous note? The > question is included below. > > What I am trying to do is that when the index.html or index.jsp is > invoked, it will forward the request to my main page without user to > type anything. The main page is a jsp which will be invoked by one of > the actions I will write. (I think what I need is to directly invoke the > Struts servlet with certain parameters without using struts:link). Any > other approach I can take. > If you want to forward totally transparently, doesn't do the trick? > > Thanks, > Zhiyong > Craig
RE: [Q] struts:link with forward attribute on WebLogic 6.0
What is the syntax? I tried, None of them work. ("generic" is a action defined in the action.xml). Zhiyong -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, January 05, 2001 2:23 PM To: [EMAIL PROTECTED] Subject: Re: [Q] struts:link with forward attribute on WebLogic 6.0 Zhiyong Li wrote: > Do you have a quick answer to my last question in my previous note? The > question is included below. > > What I am trying to do is that when the index.html or index.jsp is > invoked, it will forward the request to my main page without user to > type anything. The main page is a jsp which will be invoked by one of > the actions I will write. (I think what I need is to directly invoke the > Struts servlet with certain parameters without using struts:link). Any > other approach I can take. > If you want to forward totally transparently, doesn't do the trick? > > Thanks, > Zhiyong > Craig
Re: [Q] struts:link with forward attribute on WebLogic 6.0
Zhiyong Li wrote: > What is the syntax? I tried, > > > > > None of them work. ("generic" is a action defined in the action.xml). > It should be a context-relative path to your action or page. For example, if you use the normal style of mapping the Struts servlet to "*.do", it would be NOTE: The tag mentioned earlier is only in Struts 1.0 -- I don't think it was in Struts 0.5. > > Zhiyong > Craig > > -Original Message- > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 05, 2001 2:23 PM > To: [EMAIL PROTECTED] > Subject: Re: [Q] struts:link with forward attribute on WebLogic 6.0 > > Zhiyong Li wrote: > > > Do you have a quick answer to my last question in my previous note? > The > > question is included below. > > > > What I am trying to do is that when the index.html or index.jsp is > > invoked, it will forward the request to my main page without user to > > type anything. The main page is a jsp which will be invoked by one of > > the actions I will write. (I think what I need is to directly invoke > the > > Struts servlet with certain parameters without using struts:link). Any > > other approach I can take. > > > > If you want to forward totally transparently, doesn't do > the > trick? > > > > > Thanks, > > Zhiyong > > > > Craig
RE: [Q] struts:link with forward attribute on WebLogic 6.0
That fixed problem. I actually need to add extra path to "/generic.do", but the idea is correct. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, January 05, 2001 4:21 PM To: [EMAIL PROTECTED] Subject: Re: [Q] struts:link with forward attribute on WebLogic 6.0 Zhiyong Li wrote: > What is the syntax? I tried, > > > > > None of them work. ("generic" is a action defined in the action.xml). > It should be a context-relative path to your action or page. For example, if you use the normal style of mapping the Struts servlet to "*.do", it would be NOTE: The tag mentioned earlier is only in Struts 1.0 -- I don't think it was in Struts 0.5. > > Zhiyong > Craig > > -Original Message- > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 05, 2001 2:23 PM > To: [EMAIL PROTECTED] > Subject: Re: [Q] struts:link with forward attribute on WebLogic 6.0 > > Zhiyong Li wrote: > > > Do you have a quick answer to my last question in my previous note? > The > > question is included below. > > > > What I am trying to do is that when the index.html or index.jsp is > > invoked, it will forward the request to my main page without user to > > type anything. The main page is a jsp which will be invoked by one of > > the actions I will write. (I think what I need is to directly invoke > the > > Struts servlet with certain parameters without using struts:link). Any > > other approach I can take. > > > > If you want to forward totally transparently, doesn't do > the > trick? > > > > > Thanks, > > Zhiyong > > > > Craig