Smitha Jain

Greenhorn
+ Follow
since Apr 23, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Smitha Jain

Sorry didnt knw that its copyrighted material.
Appologise for it.
Christophe,

Thanks for sharing the link.
If you have 'Hanumant Deshmukh' soft copy. Could you please share that also?
Hi Jesper,

Thanks for the reply.
I meant --- which includes the materials and questions. Coz for SCWCD1.4 we have many mocks and materials. But for SCWCD1.5 I hardly found any.
So, if any ranchers having any useful material. Could you please share it.
15 years ago
Congrats!!

Can you share the --- you used for preparation.
Thanks in Advance.
15 years ago
In eclipse, I am getting a warning message for isELIgnored.

Here is the code:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" isELIgnored="false" %>

I am displaying some value from request using ${}. Getting some warning message.
i.e, ${userName} --> The word is not correctly spelled.

I am using:
Eclipse: 3.3
JSP: 2.0
JSTL: 1.1

Can any one tell me, do I have to add any extra plugin n Eclipse?
Congrags Madhuri...

I am planning to take SCWCD5.0.
Where can I get the HFSJ1.5 document?
15 years ago
I read some where that in JSP2.0 by default:
<%@ page isELIgnored="false" %> <!-- default for JSP 2.0 -->
If we are using JSP1.2, then we have to set the value as false for EL externally.

I am using JSP2.0. But still code not working without isELIgnored=false.

And also we have two options to set the EL flag either in web.xml or in page directive in JSP. Tried adding it in web.xml, its not working.

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-enabled>true</el-enabled>
<scripting-enabled>true</scripting-enabled>
</jsp-property-group>
</jsp-config>

</web-app>
15 years ago
JSP
Hey it worked..... Thanks

I have added the ELEnable code in web.xml.
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<el-enabled>true</el-enabled>
<scripting-enabled>true</scripting-enabled>
</jsp-property-group>
</jsp-config>

I dont know why thats not working.

I have one doubt:
For every page do I have to add isELIgnored="false"?
15 years ago
JSP
i am trying an example for EL.
Here is the code snippet frm Servlet:

ArrayList userList = null;
userList = new ArrayList();
userList.add("admin");
userList.add("superuser");
userList.add("user");
userList.add("enduser");

sessionObj.setAttribute("userlist", userList);
req.setAttribute("testattribute", userList);

${testattribute} in JSP, is displaying all the values in the ArrayList.
But the c:forEach is not working.
I tried doing it with HashMap as well that also didnt work.
I have downloaded the jstl.jar and standard.jar for JSTL1.1.
And extracted the .tld files from standard.jar.
Do I have to add any other jar or tld file?
15 years ago
JSP
Thanks

ya.... I overlooked it.
I tried changing as below:
<c:forEach var="product" items="${testattribute}">
<tr><td>${product}</td></tr>
</c:forEach>

now I am getting error:

org.apache.jasper.JasperException:
According to TLD or attribute directive in tag file, attribute items does not accept any expressions
Am getting error @ <c:forEach> line.
15 years ago
JSP
I am new to JSTL, trying out some examples on EL.
Have set an ArrayList to request/session in Servlet.
Am trying to iterate the List in JSP using c:forEach.

Have used:
JSTL1.1, JSP2.0, Servlets2.4, Tomcat5.x


Servlet:
req.setAttribute("testattribute", userList);
sessionObj.setAttribute("userlist", userList);
//userList is the ArrayList

JSP:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
${userlist}
<br />
${testattribute}

<br/>

<c:forEach var="product"
items="$(testattribute}">
<tr><td>${product}</td></tr>
</c:forEach>

</body>
</html>


Output:
[admin, superuser, user, enduser]
[admin, superuser, user, enduser]
$(testattribute}

Its not looping with the request attribute value.
Can you let me know, whats wrong in the above code?
15 years ago
JSP