No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
404 error.requesting the resource while i click submit, i included lib files of struts in web-inf dir in this project. build success, not forwarding as per code in mainpage.java. index page(run): <body> <h1>Hello World!</h1> <a href="mainpage">Main page</a> </body> main page: out.println("<html>"); out.println("<head>"); out.println("<title>Servlet mainpage</title>"); out.println("</head>"); out.println("<body>"); out.println("<form action='strapp' method='post'>"); out.println("<input … |
|
When i click hlink in index.jsp , showing null.. and so the output shd be helloworld. i use netbeans 6.9. initservlet.java: public class initservlet extends HttpServlet implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { ServletContext con=sce.getServletContext(); try{ System.out.println("Hello world"); con.setAttribute("p",con.getInitParameter("print"));// setting context attribute here... }catch(Exception e) { con.log("Error occured",e);}// throw … |
|
While compiling the error is build failed; I want to access the listofdvd.txt as getInitparameter using servletcontext and to setAttribute dvdlist in initservlet. Meanwhile also i need to getattribute the dvdlist in listdvdservlet.java; # Somebody help me in this case.. # initservlet.java: public class initservlet implements ServletContextListener { ServletContext sc; … |