Skip to main content

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.

jsp
1768 votes
31 answers
321k views

How can I avoid Java code in JSP files, using JSP 2?

I know that something like the following three lines <%= x+1 %> <%= request.getParameter("name") %> <%! counter++; %> is an old school way of coding and in JSP version 2 ...
chmoelders's user avatar
  • 18.6k
720 votes
14 answers
654k views

How can I upload files to a server using JSP/Servlet?

How can I upload files to server using JSP/Servlet? I tried this: <form action="upload" method="post"> <input type="text" name="description" /> ...
Thang Pham's user avatar
  • 38.6k
499 votes
26 answers
1.0m views

Download a file by jQuery.Ajax

I have a Struts2 action in the server side for file downloading. <action name="download" class="com.xxx.DownAction"> <result name="success" type="stream"> <param name="...
hguser's user avatar
  • 35.7k
61 votes
6 answers
64k views

Show JDBC ResultSet in HTML in JSP page using MVC and DAO pattern

I'm implementing MVC using JSP and JDBC. I have imported a database class file to my JSP file and I would like to show the data of a DB table. I don't know how I should return the ResultSet from the ...
Ashwani Sharma's user avatar
191 votes
23 answers
493k views

How to install JSTL? It fails with "The absolute uri cannot be resolved" or "Unable to find taglib" or NoClassDefFoundError or ClassCastException

I don't know what I've done incorrectly, but I can't include JSTL. I have jstl-1.2.jar, but unfortunately I get exception: org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/...
lukastymo's user avatar
  • 26.6k
33 votes
6 answers
91k views

How to retrieve and display images from a database in a JSP page?

How can I retrieve and display images from a database in a JSP page?
krunal's user avatar
  • 339
368 votes
5 answers
116k views

Design Patterns web based applications [closed]

I am designing a simple web-based application. I am new to this web-based domain.I needed your advice regarding the design patterns like how responsibility should be distributed among Servlets, ...
mawia's user avatar
  • 9,299
86 votes
10 answers
112k views

Browser can't access/find relative resources like CSS, images and links when calling a Servlet which forwards to a JSP

I'm having trouble with loading CSS and images and creating links to other pages when I have a servlet forward to a JSP. Specifically, when I set my <welcome-file> to index.jsp, the CSS is being ...
Brian DiCasa's user avatar
  • 9,417
105 votes
7 answers
74k views

Prevent user from seeing previously visited secured page after logout

I have the requirement that the end user should not be able to go back to the restricted page after logout/sign out. But currently the end user is able to do that by the browser back button, visiting ...
raaz's user avatar
  • 12.5k
887 votes
16 answers
458k views

What is the difference between JSF, Servlet and JSP?

I have some questions. These are : How are JSP and Servlet related to each other? Is JSP some kind of Servlet? How are JSP and JSF related to each other? Is JSF some kind of Pre-Build UI based JSP ...
Cheung's user avatar
  • 15.5k
84 votes
10 answers
171k views

XSS prevention in JSP/Servlet web application

How can I prevent XSS attacks in a JSP/Servlet web application?
newbie's user avatar
  • 24.5k
46 votes
4 answers
158k views

How to transfer data from JSP to servlet when submitting HTML form

I have a JSP page with an HTML form: <form action="SERVLET"> <input type="text" name="name"/><br> <input type="text" name="group"/> <input type="text" ...
Saska's user avatar
  • 1,021
18 votes
5 answers
12k views

EL expressions not evaluated in JSP

There's a small problem with my servlets/jsp web application. I'm trying to use jstl in jsp page. When I use any tag for example: <c:out value="${command}"/> it shows me ${command} in my ...
Gleb S's user avatar
  • 573
223 votes
9 answers
64k views

Java / Jakarta EE web development, where do I start and what skills do I need? [closed]

I want to learn, at least at a basic level, how to build Java web applications (coming from a .NET background). I would like to be able to build, deploy a simple CMS type application from the ground ...
mrblah's user avatar
  • 102k
15 votes
5 answers
45k views

Access Java / Servlet / JSP / JSTL / EL variables in JavaScript

I have a form in JSP. I have to populate it based on the request object (from the servlet). How do I use Java Script for accessing request object attributes or if you can suggest me any other better ...
Reddy's user avatar
  • 1,628

15 30 50 per page
1
2 3 4 5
306