This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes can not forward after response has been committed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "can not forward after response has been committed" Watch "can not forward after response has been committed" New topic
Author

can not forward after response has been committed

shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 223

<%@ page import="com.example.web.*" %>

name.jsp

<html>
<body>
<center><h1>Your Name Is ::
<br>
<jsp:useBean id="Work" class="com.example.web.Work" scope="request"/>
your job is :: <jsp:getProperty name="Work" property="job" />
</h1></center>
</body>
</html>




Work.java

package com.example.web;
public class Work{
private String wrk;
public void setJob(String wrk1){
this.wrk=wrk1;
}
public String getJob(){
return wrk;
}
}

in between there is a servlet code which have no errors..

must be an error in the highlitted Property atribute...
can sombody resolves it??
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Are you sure Work isn't null in the request? The only thing I can see wrong on that line is the possibility of a NullPointer.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 223

hey jeanne thanks for helping..

yups.. Work in this case is not null..
here is my servlet code..

shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 223

to jeanne...

its showing ""IllegalStateException"" ..
shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 223

thanks jeanne for helping and providing clue of error....
goota my error..

that is ...
request can't be forward more than once from servlet to jsp..

:)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can not forward after response has been committed
 
Similar Threads
how to use "property" attribute in <jsp:getProperty .... /> tag?
strange error with respect to web.xml file
error for first web application : The requested resource (/Beer-v1/SelectBeer.do) is not available.
Why this EL code part is not working
Error allocating a servlet instance