Questions tagged [jsp]
JSP (Jakarta Server Pages, formerly JavaServer Pages) is a Java-based view technology running on the server machine which allows you to write template text in client side languages (like HTML, CSS, JavaScript and so on) and interact with backend Java code.
51,983
questions
0
votes
0
answers
20
views
JSP Page corrupting after closing and re-opening eclipse
This is the second time this has occurred for me. The first one I wasn't sure if I had saved or not before closing Eclipse but this one I'm sure I've saved before closing it.
So, after saving and ...
0
votes
1
answer
34
views
java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.BodyTagSupport
I have the following code in a JSP file for the tags which is included in all of my JSP files at the top:
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
&...
-1
votes
0
answers
19
views
Spring JSP pass object from list to post-endpoint
I have a spring-controller with a post-endpoint that receives a WordDto. Another get-endpoint puts a list of WordDtos in the ModelMap and shows a jsp-file. In the jsp-file, I show each entry of the ...
1
vote
1
answer
35
views
Error: Missing Type HttpServletRequest in Maven Project for File Upload
Question:
I am working on a Maven project for a file upload servlet and encountered an issue. When I try to parse the request using ServletFileUpload, I get the following error:
The method ...
-1
votes
0
answers
28
views
Java servlet path [closed]
I make a dynamic web project now.
Because it was an exercise, I didn’t use the Maven project.
I use Tomcat 10.1.25.
webapp
├── html
│ ├── index.html
│ └── view.jsp
├── META-INF
└── WEB-INF
I ...
-1
votes
0
answers
65
views
Why is my JSP code with a switch expression not working?
I'm trying to run this JSP code but it doesn't work, I get HTTP Status 500. Why? Aren't switch expressions supported? I do not want to use a switch statement, so please do not tell me to use this old ...
-1
votes
1
answer
47
views
In a JSP file use a form to call a method in a java file to create and then download a a csv file for the user [duplicate]
Having a hard time figuring out how to get my JSP file to trigger a method in my java while using a form. The method sends a query to a db, I want to take the result set from that query and turn in ...
-2
votes
0
answers
30
views
Jquery Datatable not working in the JSP file
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="...
-1
votes
0
answers
39
views
Error with login session/cache using Servlets and JSP
I don't know how to describe the problem very well technically, but I'm making an application using Servlets and JSP and I'm having a specific user authentication problem.
When I log in as a user with ...
-1
votes
0
answers
38
views
Escaping outputs by default? [duplicate]
We are using an MVC arch and using JSP for view. Our codebase is a bit old and not many people focused on using escapeXML or c:out tags in JSPs which is causing a lot of XSS vulnerabilities now. We ...
1
vote
1
answer
69
views
How could I escape a value in custom JSP tag handler? [duplicate]
This is one of my field in one of my jsp file:
<input class="form-input" id="login" type="text" name="login"
<c:choose>
<c:when test="${...
-1
votes
0
answers
11
views
JSP redirection trough a servlet is not functioning as expected [duplicate]
Hey so i am running a program that when a cell on a board(on a jsp) is clicked, a servlet is launched, and that servlet can redirect to 1 of 2 jsp, my problem is that this redirection seems to not be ...
0
votes
0
answers
23
views
get javascript table element in jsp [duplicate]
I'm using a jsp and I need to do something like this but it doesn't work, the elements of table doesn't show in my page and I tried to replace the extension of my jsp file into html and it works ...
0
votes
0
answers
10
views
jsp <c:forEach table not generating [duplicate]
This is how I populate table
public List<String[]> listTable = new ArrayList();
String[] foundPost = {"name", "nickName", "datePost", "subject", "...
-3
votes
0
answers
27
views
Unable to use JSTL with embedded tomcat, returns Http Status Code 500 [duplicate]
"The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application"
I've scoured the web for hours trying various ...
1
vote
1
answer
51
views
How to send a redirect after generating a file download in Servlet
I'm developing a web page using Java Servlets and JSP. I have functionality where, depending on the received action (action), different operations are performed. However, I'm encountering an issue ...
0
votes
0
answers
15
views
Unable to compile class for JSP: The method prs(java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest) in the type Htmlforms [duplicate]
I upgraded from Apache Tomcat 9 to 10, but when I uploaded my project (developed a few years ago) I got the following error
An error occurred at line: [9] in the jsp file: [/index.jsp]
The method prs(...
0
votes
1
answer
66
views
404 error when redirecting to Servlet from a html page [duplicate]
So I'm trying to create a WebApp on InteliJ Ultimate about a telecom website and I wanna get familiar with servlets but i can't get them to work properly
<!DOCTYPE html>
<html>
<head>...
0
votes
0
answers
46
views
Controller unable to pass model values to View page [duplicate]
My viewEmployees method in Controller
@Autowired
private EmployeeDao employeeDao;
@GetMapping("/employees")
public String viewEmployees(Model model) {
...
0
votes
1
answer
49
views
How to put files to out/artifacts the JSP file is not generated
How to put files to out/artifacts the JSP file is not generated.
Project structure:
The JSP file shown in the figure is not generated.
I can only put manually copied files into the out/artifacts ...
-1
votes
1
answer
60
views
I want to send data using ajax when the value comes out in jsp
The value comes out from jsp. However, I don't know how to send the value as ajax data.
I tried to print the jsp value and change it, but it failed. What should I do?
What should I put in the data in ...
1
vote
1
answer
93
views
Can't use external css styling with jsp [duplicate]
I'm just trying to learn servlets and using JSP files. I would like to do the format of the start page (/login page) with external css file but I didn't manage to do that. It works with internal css ...
0
votes
0
answers
19
views
when user login the system,if he hasn't operated a long time,how to logout the system and skip to login page
I want to achieve this function:when user login the system,if he hasn't operated a long time,how to logout the system and skip to login page?
I use a filter class which implements Filter,and when ...
1
vote
1
answer
27
views
How to display data from Maria DB in a jsp file
I want to put data values from db into employee class and then display all values in jsp file. However, an error continues to occur saying that the list is empty.
Employee.java
package employee;
...
0
votes
0
answers
24
views
No 'OLE' editor registered against the type of file you were trying to open
In Spring Tool Suite 4, when I try to open a '.jsp' file, it is not showing the syntax highlight.
I tried to open the '.jsp' file as 'Open With' -> 'In-Place Editor', I get the following Error.
...
0
votes
0
answers
17
views
Checkmarks issue in JSP [duplicate]
Check marks is flagging cross site scripting issue in the below code. can you please help me in resolving the issue.
Code in JSP:
<a href="javascript:getData('${sta.Date}','${sta.EndDate}');&...
0
votes
0
answers
9
views
Checkmark flagging an issue with Crosssite scripting [duplicate]
Checkmark is flagging a cross site scripting issue in JSP.
This is the issue checkmark displaying:
The method "javascript:getdata() embeds untrusted data in generated output with BinaryExpr, at ...
0
votes
1
answer
43
views
JSP page unable to get attribute from a Servlet with and without .getSession
I have a web app that must get the city name and, by an API request, it should give the foirecast for that city. But in the JSP file I am not able to get a variable with getAttribute from the ...
0
votes
0
answers
34
views
Getting java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator in my Java Web Application project [duplicate]
I'm working on a Java web application and I'm encountering the following exception when I try to deploy my project:
java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TagLibraryValidator
at ...
0
votes
0
answers
9
views
get client's machine name from weblogic JSP page [duplicate]
I have uploaded JSP page on WebLogic server to retrieve client machine name but it returns WebLogic server host name, I have used Host Name:<%=request.getRemoteHost()%>.
I have to retrieve ...