Sagar Vyas

Greenhorn
+ Follow
since Feb 17, 2013
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 Sagar Vyas

Hi ,

I have gone through the http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=5001&get_params=p_exam_id:1Z0-899&p_org_id=&lang=.

I have found there is no listener in course.

Just wanted to know from some experts,whether Listener is there or not

Please help me to understand this.

Thanks,
Sagar Vyas

Dinara Berdysheva wrote:Hello guys! I am trying to display table from database using jsp page. Everything works correctly, apart from the layout. The problem is : the more rows I add to my table, the more space increases between table and navigation bar. Please help!
This is part of my jsp, where i display table:



Hi Dinara,

This is one of strong reason to not to use java in JSP.

Readability and Debug capacity is get reduce.

Please try to use JSTL.

Thanks,
Sagar Vyas
11 years ago
JSP

naval kumar wrote:Dear Sir I want to Know the Use of Entry In Web.xml . why we Use ??

1- <context-param>
<param-name>broadvision.demand.uploadAppName</param-name>
<param-value>comcenter</param-value>
</context-param>

2-<context-param>
<param-name>broadvision.demand.cssName</param-name>
<param-value>FA_CSS</param-value>
<description> Style for Commerce Foundation Application. </description>
</context-param>

3- <filter>

<filter-name>User-Session Validation Filter </filter-name>
<filter-class><!-- com.ireps.common.SessionFilter --></filter-class>

</filter>

4- <filter-mapping>

<filter-name>User-Session Validation Filter</filter-name>
<url-pattern>*.do</url-pattern>

</filter-mapping>
5- <init-param>
<param-name>detail</param-name>
<param-value>0</param-value>
</init-param>
6- <mime-mapping>
<extension>asx</extension>
<mime-type>video/x-ms-asf</mime-type>
</mime-mapping>



Hi Kumar,

Or you can check this.

http://docs.oracle.com/cd/E13222_01/wls/docs81/webapp/web_xml.html

HTH.

Thanks,
Sagar Vyas
11 years ago
JSP

vani patel wrote:Hi i new to JSTL and am tring one example code is given below demo2.jsp and my server is Tomcat 7 ,your any help would be appriciated, i added below jar files in build path
core-3.1.1.jar
jsp.2.1.jar
jsp-api.jar
jsp-api-2.1.jar
jstl-1.2.jar
servlet-api.jar

and when i run this jsp file i am getting below error, i tried other files without jstl it is working fine

demo2.jsp

`<%@ page contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>



Hi Vani,

Can you please try with following ?

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

HTH.

Thanks,
Sagar Vyas
11 years ago
JSP

Frits Walraven wrote:Hi Sagar Vyas,

<c:set target=""> must point to a real object and not the name of object as it was with <jsp:useBean> action what I understood from this is its like as we are using <jsp:useBean>'s id attribute it is a same thing ?


With <jsp:useBean> you either create (instantiate) a real object or you point to one that is already available in one of the contexts (page, request, session, application).

In other words you can point to a object that has been created or pointed at with a <jsp:useBean>:

Regards,
Frits



Hey Frits,

That what I was expecting , Thanks for neat clarifications. (And also Thanks for given life to this dead thread ;) )

See you later.

Thanks,
Sagar Vyas
Hi Frist,

First of all Thank you for your reply.

And ya "Thread can never be dead", lots of people may looking at this thread to resolve her/his problem, instead of creating new thread I thought this would be the better approach to ask, I was expecting answer from one of the Java Guru like you only.

I have one more doubt,please help me to understand ?

I read somewhere like
<c:set target=""> must point to a real object and not the name of object as it was with <jsp:useBean> action what I understood from this is its like as we are using <jsp:useBean>'s id attribute it is a same thing ?
correct me if I misunderstood it ?

Thanks,
Sagar Vyas


Hi Veena,

You didn't use a String literal. Instead you used an EL expression (${PetMap}), which evaluates to the "real thing", the object (in your example the Map petMaps).
The following doesn't work (notice: PetMap is now a String literal):


For the c:set var property a String literal works:




I hope I could help.
cheers
Bob>



Hi Bob,

I did not get this , can you please explain How to get what veena wants ?

I mean How to point real object what exactly mean of this ? If i say req.setAttribute("Test",Test);
consider a "Test" is something like MyBean Test = new MyBean();

and if I am doing something like this <c:set target="${Test}" pr.... /> Will I able to set property of Test ? If Not then Y not ?

Thanks,
Sagar Vyas

Stefan Evans wrote:
Because Integer with a value of 2 is NOT equal to a Long with a value of 2 (different classes are never equal) the value fails to be retrieved from the map.

I don't know of any way in EL to not interpret literal numbers as Long.



Hi Stefan,

Thanks for explanations,

That means is there not any way to access map value having integer key ? in EL ?

Thanks,
Sagar Vyas
11 years ago
JSP

Bill Clar wrote:How are you setting the map attribute in the request object (HttpServletRequest)?

Are you using the name "map"?




Hi Bill,

Thanks for prompt reply,

It is not a case that I am using map, I kept name "map" just for example.

Thanks,
Sagar Vyas
11 years ago
JSP
Hello,

This is my first post in Coderanch and very excited to learn lots of new things.

I have one doubt related to EL (expression language).

I have created a map as below.

Map<Integer,String> map = new LinkedHashMap<Integer,String>();
map.put(2, "my value");

when I tried to access an element in my jsp as below I wont be able to get it.

${map[2]}

Then, I have found somewhere that ,it is taking as Long so it wont work.

but here my question is then how do I access integer key with EL ?

What is a way to access it ?

Looking for some help.

Thanks in advance,
Sagar Vyas
11 years ago
JSP