Prakash Moorthy

Greenhorn
+ Follow
since Aug 03, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prakash Moorthy

Hi

I am able to see the folder contents as listing in html page, i need to open the folder as a window.. please help.

or is there any way to download all the contents displayed in listing with single click without making zip file of all those contents.
10 years ago
please let me the differences between java version 1.5 and 1.6.
12 years ago
Hi Ashwin

the jsp code

<%@ page import="com.work.bean.Branch, java.io.*, java.util.*" %>

<%!
ArrayList<Branch> bList = new ArrayList<Branch>();
%>

<%

String prevAction = (String)session.getAttribute("prevAction");

if(prevAction == null || !prevAction.equals("add"))
bList.clear();

String action=request.getParameter("saction");

session.setAttribute("prevAction",action);

Branch br = new Branch();
br.setName(request.getParameter("bname"));
System.out.println("bname ="+request.getParameter("bname")+"\n");
bList.add(br);

session.setAttribute("bList",bList);

if(action.equals("add")){
RequestDispatcher view = request.getRequestDispatcher("branch.html");
view.forward(request, response);
}
%>

12 years ago
JSP
Hi

am calling a jsp(chk.jsp) from a html file(branch.html) by the html form action, then in chk.jsp forwarding the requset to the branch.html page by using requestDispatcher

RequestDispatcher view = request.getRequestDispatcher("branch.html");
view.forward(request, response);

am getting the following error,

org.apache.jasper.JasperException: java.lang.IllegalStateException: getOutputStream() has already been called for this response
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:534)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:421)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

root cause

java.lang.IllegalStateException: getOutputStream() has already been called for this response
org.apache.catalina.connector.Response.getWriter(Response.java:608)
org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:200)
org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:189)
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:122)
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:79)
org.apache.jsp.chk_jsp._jspService(chk_jsp.java:115)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:73)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:378)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

but if i use the <jsp:forward page="branch.html" />, then its working fine, and it's also working fine, if i use the branch.html as branch.jsp

please clarify.

Thanks.
12 years ago
JSP
hi

please suggest the best books and best way to prepare for SCWCD 5 exam.

thanks
Hi Ganesan,

Please let me know if a beginner can get comprehensive understanding of the fundamentals and clear the OCPJP certification by just going through SCJP 6 Certification Training Lab.