Questions tagged [jsp]

JSP (JavaServer Pages) is a Java based view technology running on the server machine which allows you to write template text in (the client side languages like HTML, CSS, JavaScript and so on) and interact with backend Java code.

0
votes
1answer
7 views

Can't pass the ArrayList object to JSP from Servlet

I have my Servlet @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException { List<String> topics = new ArrayList<>(); ...
1
vote
0answers
27 views

How to collect values from form dynamically

I'm trying to refresh a form (on the client side) when a different user (that are listed in a table) is selected. From my Controller I am sending an object and I show the values of the first user and ...
0
votes
0answers
19 views

Spring boot 404 error after adding JSP file

I'm getting the following error when running my project using Spring Tool Suite, But in case my problem is I have already added the appropriate dependencies to pom.XML file. So what could be the ...
1
vote
0answers
14 views

How to make multiple dependent dropdown list in jsp servlet via mysql

I wanted to make multiple dependent dropdown list including country and city in jsp servlet via mysql. I've done some code based on listing country but I have no idea how to make sub side according ...
0
votes
1answer
19 views

can not resolve to a type in JSP compilation manually deployment in tomcat

I am new to Web Development in Java. I am trying to deploy web application in Apache Tomcat (9.0.17). I have installed Linux OS in which Java OpenJDK is pre-installed. I am not able to compile JSP. ...
0
votes
0answers
23 views

How to add a Controller API to Onclick attribute of <a> tag?

I am trying to send mail to a set of users on click of a button in jsp. How do i set the href or onclick attribute of the anchor tag of a button, so that it calls the method for sending email which is ...
-1
votes
0answers
11 views

How to write Hit counter using jsp, spring controller, hibernate

Hit counter using jsp, spring controller, hibernate for main landing page.
-2
votes
0answers
23 views

How to develop web app using java with JSP [on hold]

How can I make web app by jsp in jsp part I have already written some javascript code. I want to access database in my JSP page. How i can access database inside JSP. I dont know how to acess database ...
-1
votes
0answers
12 views

Load data from DB in first request using servlet and jsp

My project using servlet and jsp. When user first enter web (1st request to web), I want to send a request to servlet to load data from DB and response it back to jsp, I'm still looking for a solution ...
0
votes
0answers
40 views

save logged in user in database

i have a voting website. each user can log in and vote. i need a way to be able to save the logged in username in database after he votes. how can i do it? what i did was this: i get current logged in ...
0
votes
1answer
12 views

Received Id instead of enum text value from dropdown in spring mvc

I have an Enum package com.javarnd.bbms.enums; public enum BloodTypeEnum { A_PLUS(1, "A+"), B_PLUS(2, "B+"), O_PLUS(3, "O+"), AB_PLUS(4, "AB+"), A_MINUS(5, "A-"), B_MINUS(6, "B-"), O_MINUS(...
-1
votes
0answers
5 views

How to use display tag with dynamic title.?

I want table row Pagination using display tag with dynamic title. <display:table name="Form.List" id="test" class="content_FullWith" pagesize="1" style="width:760px;height:100px;"> ...
0
votes
0answers
20 views

How to pass a variable to another JSP page?

I am unfamiliar with jQuery and would like to know the proper way to pass a value to a different JSP. For example, given the code below: function editURL() { var x ="<%=nd.getNodedesc()%>" ...
-1
votes
0answers
25 views

jquery- passing a URL to another jsp page

I have a javascript function on my current JSP page that pass parameter to another JSP page upon a button click. I could pass the file parameter but could not pass the link parameter to editUrl.jsp. ...
0
votes
0answers
16 views

Servlet.service() throwing java.lang.ClassCastException: HashMap cannot be cast to Object

this happens when i am submitting form of my jsf page and redirecting to another page <p:outputPanel id="panelx" > <form method="post" action="https://someUrl/payment/response" id="...
0
votes
2answers
25 views

How to get text between <option> tag in servlet </option>

I have select in my index page. It looks like below <div id="dropdown" class="input-group" style="width:50%"> <select class="form-control" id="select2" name="select2" ...
0
votes
0answers
17 views

ajax RangeError: Maximum call stack size exceeded

my jsp for (int i =0;i<bookings.size();i++){ %> <table> <tr> <td rowspan="3" id="name" ><%=bookings.get(i).getname()%></td> <td id="type"><...
-1
votes
0answers
26 views

Cinema seat selection jsp/servlets [on hold]

I'm currently taking a web design course at university and we just received our first project. I've been staring at it for around 4 days and experimenting with netbeans and eclipse EE because this is ...
0
votes
0answers
10 views

Unable to read object data from http session in one of the jsp classes . I've deployed code on tomcat7

TreeMap<String, HashMap<String, String>> statusList = new TreeMap<String, HashMap<String, String>>(); HttpSession session; session.setAttribute("xStatusList", statusList); ...
0
votes
1answer
20 views

How to know which button is clicked in .JSP file

So I have an application where I show the an userlist on one view, besides the userlist there are buttons that redirect or perform an action. Since the userlist is loaded into HTML via a foreach in ...
0
votes
1answer
27 views

How to pass jsp value to as input tag name = “ ” ? and get it to the servlet using beans

This is my code I want to pass the user.setUser(us) value inside the input tag name(?) and then get that value and then pass it through a servlet to a bean function. ...
0
votes
0answers
10 views

get logged in username and use it where necessary

i'm writing a voting website using spring mvc and jsp. each user can vote only once. so i need to get current logged in username to see if he has voted or not. if not, he can vote. after that the ...
0
votes
0answers
13 views

JSP Errors caused by 'Unknown tag hbj…'

I have ran through other posts and blogs about this, and can at least confirm that hbj imports and configs are in place. I am getting the warning below for my JSP using HBJs. Unknown Tag HBJ Warning ...
-2
votes
0answers
22 views

JSP form going as empty randomly after submitting with post request

JSP form going as empty randomly after submitting with post request. I am using springboott with embedded tomcat in a openshift container. I have seen similar request in 2016 but no reply. Any help is ...
1
vote
0answers
27 views

How to redirect form to a section of a different page?

There is a contact us form on my Web Application. What I want is, when a user fills up the form and clicks on the submit button, it should redirect to a different page's section. In this current case,...
-1
votes
1answer
19 views

How to iterate a hash map in response of ajax call where that map holds 3 lists

here is my hash map and the ajax call Map<String, List<?>> map=new HashMap<>(); List<?> minimumParameters=new ArrayList<>(); map.put("min", ...
1
vote
0answers
25 views

javascript- how to copy multiple URL at once?

I created a JSP page that looks like below: Each file has it's own unique URL link which I can copy individually with no issues.However,I added checkbox so users can tick the files they want and ...
1
vote
2answers
31 views

Dynamic dropdown returns a null from jsp

I have written a dropdown list which is populated by the database. This is my dropdown code in JSP file. <td>Category:</td> <% try { dbConnect dbConnect = new dbConnect(); ...
0
votes
0answers
21 views

Retrieve the values of a nested list from JSP and send it back to form

I will first show you the code structure I am working on. Here is Class MyForm: public class MyForm extends ValidatorForm { private List<ADTO> aDTOList; // getters and setters for ...
0
votes
1answer
28 views

JSP throwing Null Pointer Exception

I keep getting a Null Pointer Exception, and I can't tell from the stack trace exactly what is causing it. It seems to point to line 83 in DisplayAccounts.jsp but the file is only 48 lines long... ...
0
votes
1answer
37 views

Servlet doesn't respond properly after sending request

so i have this simple website in jsp that contains todo list, i've already made Add functionality but now there's a problem with delete function. <ol class="list-group"> <c:...
0
votes
0answers
27 views

Delete row from database using JSP

I have a JSP and a servlet which allow the user to add data in a database, then list the data. I would like to add, next to each row, a "Delete" button which would delete it from the database. I ...
0
votes
0answers
9 views

org.apache.jasper.JasperException: Unable to compile class for JSP at org.apache.jasper.JspCompilationContext.compile

I am trying a Git example at https://github.com/vmware/vidm-saml-toolkit/tree/master/Sample_AuthServer. This is to run it as a server locally https://127.0.0.1:8443/MyAuthServer/. I was able to ...
0
votes
0answers
20 views

Ckeditor image upload error. Not all but one image. no upload image

CKEDITOR.replace('content', { height:'500px', filebrowserUploadUrl:'/Day12/board/upload.jsp?' +'realUrl=/Day12/assets/uploads/' }); CKEDITOR.editorConfig = function( config ) { ...
0
votes
0answers
14 views

How to Redirect to a unique jsp (using jsp id) file by using servlet

I am going to crate a forum by using jsp and servlets. first of all i created a forum layout and i passed relevant question data to that layout when someone click a question. when you go to the ...
0
votes
0answers
14 views

Overriding a JSP tag file with an alternative version bundeled in a jar

I have an existing Spring web application using JSPs and Tiles 3.0.5. It has tag files in WEB-INF/tags/mytags which are referenced in JSPs and other tags. Let's say, a tag example.tag uses a tag line....
-1
votes
0answers
15 views

Struts not getting all request parameters

I am using Struts 1 and I have two multiple select boxes with different names : availableAccounts and selectedAccounts. I have buttons in the middle that move values from one select box to the other. ...
0
votes
1answer
9 views

How can I block an audio (mic) control in spring

I programmed a simple service that have two buttons. If first btn is clicked, browser asks to user "Can you permit the mic in this browser?". Another btn serves as the opposite. This is a first btn's ...
1
vote
1answer
37 views

How do I configure validation check in Spring MVC with JSP?

I need a quick help regarding validation check in Spring MVC. I have a basic HTML form not the JSTL Tag form. How do I check or implement a straight forward data validation check in Spring MVC? One ...
0
votes
0answers
15 views

JSP include page. Pass back the parameter to the caller

I have a jsp file. on that jsp file i have a variable let say an integer. so i would like to call another jsp file and pass this integer variable to the file. then after the called file finish ...
0
votes
0answers
9 views

jsp- how to prevent loophole in a unique URL?

I have a web application that stores files and is able to generate a unique link for each file based on their fileID. The format goes something like below: http://localhost:8080/repository/file/view/...
0
votes
0answers
9 views

Servlet redirecting to wrong .JSP giving 404 error [duplicate]

So I'm trying to let my Servlet redirect to my /login.jsp whenever the user gives an invalid username/password. But when I do this it redirects to a wrong url and gives a 404 error not found. It ...
-3
votes
0answers
18 views

How to create a wishlist ? Using jsp or servlet .. for java web application [on hold]

I am developing an investment portal. i've succesfully displayed investment options to user but now i want to add investment options to wishlist. How can i do that??
0
votes
0answers
22 views

URL not being mapped correctly going through pages

My root URL keep messing up in the Spring MVC application. I have the following resource defined in servlet-context.xml <!-- Resource Mapping --> <resources mapping="/theme1/**" location="...
1
vote
0answers
12 views

Update query not getting executed in jsp

I am designing a attendance system. I am facing problem in the execution of update query. This is the code att.jsp <% String ID=request.getParameter("branch"); session.setAttribute("myUser", ID); ...
-1
votes
0answers
13 views

As far as I know, spring framework is based on JSP, according to oracle they will not update JSP any more, its mean is deprecated Technology

As far as I know, Spring framework is based on JSP, according to oracle they will not update JSP any more, JSP is mean a deprecated Technology. So why Spring is still popular to use, despite it is ...
0
votes
1answer
14 views

@WebInitParam value is null in JSP

I have a simple servlet using annotations, all I want to do is to set initial values using servlet initialization parameters. SimpleServlet.java @WebServlet( description ="A simple servlet",...
0
votes
0answers
33 views

select checkbox values from database using jstl

I want to retrieve the values of checkbox and according to the result set displaying the checked ones on the view jsp here are my first steps <sql:setDataSource driver="com.mysql.jdbc.Driver" url=...
0
votes
1answer
21 views

Do maven create a duplicate of css file? [duplicate]

I'm working on a web project and I get stuck on a reccurent problem. Each two days of work, one of my css file doesn't apply any change on the jsp file it is linked in. I can comment every css ...
0
votes
1answer
32 views

jsp- How to copy URL in a javascript function?

I have a JSP page that looks like this: I added a button Copy URL and it's self explanatory that when I click the button, I need to copy the unique URL for that particular link itself. This is how ...

http://mssss.yulina-kosm.ru