Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to send bean objct to another jsp

 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i need to send bean objct to another jsp
here is my jsp


this is the jsp i need to get the bean object


INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 360 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 797 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 156 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 188 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 172 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 203 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 500 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 172 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 204 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 203 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 187 ms
SEVERE: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: PWC6049: Attempted a bean operation on a null object.
at org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(JspRuntimeLibrary.java:644)
at org.apache.jsp.test.Dispathcher_jsp._jspService(Dispathcher_jsp.java from :58)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
SEVERE: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: PWC6049: Attempted a bean operation on a null object.
at org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(JspRuntimeLibrary.java:644)
at org.apache.jsp.test.Dispathcher_jsp._jspService(Dispathcher_jsp.java from :58)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)
SEVERE: PWC6117: File "C:\Program Files\sges-v3-prelude\glassfish\domains\domain1\docroot\Dispathcher.jsp" not found
SEVERE: PWC6117: File "C:\Program Files\sges-v3-prelude\glassfish\domains\domain1\docroot\Dispathcher.jsp" not found
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 438 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 688 ms
INFO: classLoader = WebappClassLoader
delegate: true
repositories:
WEB-INF/classes/
----------> Parent Classloader:
org.glassfish.internal.api.DelegatingClassLoader@1eb1db2
INFO: SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@15a142f
INFO: Unknown loader org.glassfish.internal.api.DelegatingClassLoader@1eb1db2 class org.glassfish.internal.api.DelegatingClassLoader
INFO: Loading application First at /First
INFO: Deployment of First done is 188 ms
SEVERE: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: PWC6049: Attempted a bean operation on a null object.
at org.apache.jasper.runtime.JspRuntimeLibrary.handleGetProperty(JspRuntimeLibrary.java:644)
at org.apache.jsp.test.Dispathcher_jsp._jspService(Dispathcher_jsp.java from :58)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)


[/code]
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i try changing my class below


then also i get error


how can i transfer my dog object to another jsp?
 
Swastik Dey
Rancher
Posts: 1603
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not simply use forward action?
 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i change my class

this jsp file and Dispathcher file are in same folder.
here is error i am getting?

 
Swastik Dey
Rancher
Posts: 1603
5
Android Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the error
java.lang.IllegalArgumentException: PWC1222: Path Dispathcher.jsp does not start with a "/" character

but your code says

getRequestDispatcher("Dispathcher.jsp") which should have been getRequestDispatcher("/Dispathcher.jsp")

more over why to go for java code in jsp why not use forward action as I said

 
Samanthi perera
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok.thanks
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And spell "dispatcher" correctly.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic