Struts -Hello World – HTTP Status [404]

I am simply trying to created Hello World Struts Application . I have implemented every possible configuration , Still 404 error didnot resolved . My Server config and Project Structure Index.jsp <%@ page language=”java” contentType=”text/html; charset=ISO-8859-1″ pageEncoding=”ISO-8859-1″%> <%@ taglib prefix=”s” uri=”/struts-tags”%> <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <html> <head> <title>Hello World</title> </head> <body> … Continue reading “Struts -Hello World – HTTP Status [404]”

JavaScript code is not getting called in marquee tag

I am stuck in a weird problem. In my application data is getting passed from servlet to jsp and in jsp I am trying to split the data at – and display in a marquee tag. The problem I am facing is when I use the variable directly without splitting I am able to see … Continue reading “JavaScript code is not getting called in marquee tag”

Maven dependencies for Jetty 9.3+ with JSP support (NOT embedded)

I’m in the process of upgrading my jetty 9.2 server running some webapp using tanukisoftware wrapper to run on my server. However, the switch to apache-jsp seems to have introduced all sorts of dependency issues. I cannot even render JSP pages any more! Does anyone have an example, non-embedded JSP Jetty 9.3+ maven project using … Continue reading “Maven dependencies for Jetty 9.3+ with JSP support (NOT embedded)”

JSP can't find my servlets, sometimes it gives error 500 and sometimes error 404

I’ve been trying it for 2 days now, tomcat sometimes shows error 500, and then after some time, it shows error 404. I have my directory listed as – The link to the image The code for my web.xml is : <?xml version=”1.0″ encoding=”UTF-8″?> <web-app xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://xmlns.jcp.org/xml/ns/javaee” xsi:schemaLocation=”http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd” id=”WebApp_ID” version=”3.1″> <servlet> <servlet-name>CustomerController</servlet-name> <servlet-class>com.loginpanel.web.CustomerController</servlet-class> </servlet> … Continue reading “JSP can't find my servlets, sometimes it gives error 500 and sometimes error 404”

How to Delete and Modify Datas using Struts2 and Hibernate

I created a jsp page that shows me the list of doctors (medecin in french) contained in my mysql database via the hibernate framework and struts2 . I have a delete button supprimer (in french), to remove a doctor, and a button , modifier , to edit the doctor’s data . The edit button , … Continue reading “How to Delete and Modify Datas using Struts2 and Hibernate”

Method coming from nowhere?

I’m getting this error: Error in line: 87 in file jsp: /modules/login/pages/loginExtranet.jsp The method setTest(boolean) in the type IfTag is not applicable for the arguments () 84: <span>*</span> . . . The code around is this: <div> <label for=”pass”> Pass </label> <input type=”password” value=”” id=”pass” name=”j_password” onfocus=”this.value=”; this.onfocus=null;” /> <span>*</span> </div> Where is coming from … Continue reading “Method coming from nowhere?”

request.getAttribute returns null in jsp

I’m basically setting attribute in Servlet and trying to get it into jsp but it keeps returning null. Any idea why? Servlet : protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(“text/html;charset=UTF-8”); try (PrintWriter out = response.getWriter()) { combobox=request.getParameter(“selectedid”); Test t=new Test(); String content=t.giveSelected(combobox); request.setAttribute(“contentData”, content); response.sendRedirect(“/WebTest-iFrame/iFrame.jsp”); } JSP: <% String content=(String)request.getAttribute(“contentData”); %> … Continue reading “request.getAttribute returns null in jsp”

How to get the form data with POST submission from the previous URL after login with CSRF in Spring Security?

I am trying redirect to the previous URL with POST form submission after successful login for that i configured below bean i am able to redirect with POST submission but here i am trying to upload a file but i am unable to get the multipart object after login i.e., i am getting file object … Continue reading “How to get the form data with POST submission from the previous URL after login with CSRF in Spring Security?”

How to query the database by clicking a link in a jsp file

hi i want to add a news section to my site. so that the news list is shown in newslist.jsp and when the user clicks on news another page is opended with the link of for example shownews.jsp?id=1 and for every news eech id is diffrent. would you please someone told me how to do … Continue reading “How to query the database by clicking a link in a jsp file”

SQL exception not redirecting to .jsp page

In my catch block below for some reason is not redirecting with the output error message back to my jsp page. The default tomcats Exception report instead shows up with HTTP Status 500. And the error message shows correctly in the console window. But it’s not showing the error message on the jsp page as … Continue reading “SQL exception not redirecting to .jsp page”