Linked Questions

34 votes
7 answers
39k views

I've been told that the use of scriptlets (<%= ... %>) in my JSP pages isn't such a great idea. Can someone with a bit more java/jsp experience please give me some pointers as to how to change ...
Chris's user avatar
  • 41k
22 votes
3 answers
9k views

I read about JSP in a book many years ago, and recently decided to learn on my own. I now know how to use JSP scriptlets, expressions, and declarations <%! String str = "Hello World" %...
vikarjramun's user avatar
  • 1,042
4 votes
5 answers
7k views

What is the advantage (if there is one) of using a custom action instead of a scriptlet? For example, which is better in a performance context? <c:if test="${param.Clear}"> <font color="#...
6 votes
4 answers
772 views

I need to build a table in a JSP. I have an arraylist with a bunch of beans, and the beans were made from a resultset, just from the rows returned from a DB call. Depending on the data, I want to ...
bmw0128's user avatar
  • 13.8k
0 votes
1 answer
4k views

I have this problem. Is there any problem on directly accessing POJO class or an entity class in JSP, what is the best practice for that ?
jithin's user avatar
  • 13
0 votes
1 answer
3k views

I'm trying to set 2 variables in 1 JSP: session.setAttribute("name", aName); session.setAttribute("amount", amount); response.sendRedirect("transferSuccess.jsp"); And trying to access this ...
2 votes
2 answers
2k views

I want to know the whole thing about using scriplet. Why is it not recommended when coding JSP(s). Everytime I ask about coding with scriptlet, they pointing me not to use it and use JSTL instead.
myRM's user avatar
  • 249
3 votes
1 answer
1k views

I have inherited a large legacy web application that is constructed mainly of JSP files linked together with HTML frames. I've been reading Working Effectively with Legacy code and I've found a good ...
-1 votes
3 answers
1k views

I am new to JSP. I created a web application using JSP. I written the java code inside the JSP scriptlets(<%.....%>). For database connection also I fallowed the same manner. Example: html ...
0 votes
1 answer
796 views

I was assigned a task of making a NetBeans jsp page to run on Tomcat so that the code interfaces and queries a MySql table in order to retrieve its data and display them on an IE page. I did that and ...
0 votes
1 answer
657 views

In Below code JDBC connection is done in JSP file itself. What the harm in that. I am new to this and finding in most of the sites its asked to use JSTL for SQL data, what is the difference between ...
3 votes
1 answer
516 views

I tried turning these scriptlets into jstl tags with no success, is it not doable with these lines of codes, and if it can how so? thanks <% //String file = application.getRealPath("C:/...
0 votes
3 answers
524 views

i am tring to avoid java code in jsp file. But i couldnt figure the solution. Can anyone help me? JSP file : <select> <% try { Class.forName("oracle.jdbc.driver.OracleDriver"); String url=...
Mong2203's user avatar
0 votes
1 answer
256 views

Is it good to use scriptlets in jsp files? I'm using them in one of my project but it have been so frustrating using them. Especially simple if statements, whenever I add if statement and do ...
0 votes
1 answer
169 views

I am trying to integrate open office in java. What I am doing is creating a document, and want to get that document in a pdf as a jsp response.. But i am not able to do that. I am able to create an ...

15 30 50 per page
1
2 3 4 5
...
61