Raghu Shree

Ranch Hand
+ Follow
since Mar 18, 2005
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Raghu Shree

Using lookup method we can get the remote home object, we need to cast the return object to our desired remote home object. But we can�t explicity casting thsese object because of CORBA standards. (casting is not native). Java RMI-IIOP standards provides the PortbaleRemoteObject.narrow() method to casting the object to appropriate type.

Note: If we using Local interface we can do explicit casting as normal java way.
This error is not only comes from Boolean object. Whenever we try to add two object, compiler shows error message. Below code snippets are show compiler error.

Integer I1 = new Integer(10);
Integer I2 = new Integer(100);
System.out.println ("" + I1+I2); //Compile fines
System.out.println (I1+I2); // show error

If we concatenate the string to any object the toString() method is executed. In wrapper classes the toString() method returns String value.
So the above code shows 10100 in first print Statement.
The factory pattern is a creational pattern. Think the follwing scenario to used factory pattern

1. When the class doesn't know which class of object to be create.
2. A class specifies its subclasses to specify which class object to be create.
3. Based the value the subclass decide to create the specified object.
Normally CLASSPATH is used to locate the specified jar/class file. not for the specified folder. for example [b] set CLASSPATH = c:\jdk\lib\tools.jar;
You give the path in PATH variable. ex [b] set PATH=c:\jdk\bin;%PATH$;.
Do the following steps. add ;.; in your classpath. It specifies the current working directory. So comiler first check the given class file is available in current folder. If it is not present then after search other jar files.
To sortout the problem using debug method in Tomcat. follow the below steps

1. Goto comamnd prompt
2. enter catalina debug
3. After receiving the prompt > enter run
4. Now tomcat is start without any problems. if it is have some problem to start it display the error message in dos prompt window.
16 years ago
I think it is possible. Refer the following snippets.

<title>JS in Body</title>
<form name="test">
<script language="javascript">
alert("welcome to Java Ranch");
see this page. www.2test.com
Hi Bhavna ,
I can reproduce your problem in my machine. I think the problem is in web.xml. Change your <web-app> tag like below

<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">

This tag will enable the EL expression in your jsp file. And also add the directive <%@ page isELIgnored="false" %> (optional) in your jsp file.

I have reproduced the same problem to change the web.xml <web-app> tag like below

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

This tag is used for to disable the el expression in our web application.
Hope this will helps you.

Reply with the result
Add this directive to your jsp file.
<%@ page isELIgnored="false" %>
[ October 20, 2005: Message edited by: Raghu Shree ]
Do u have BeerExpert java file in com.example.model.
In SCJP exam, they provides how many correct answer from the listed answers. for example, choose any two or choose one like this.

int value 3 is converted into float. So Math(3) is executed. For more information about casting refer this link.

To sort out the propbelm remove all jstl tags except the follwing.
String name="neeraj";
name1:<c ut value="${name1}" />

If the error agin occurs give me your whole jsp file.
16 years ago
Try like this
String strCity="XYZ";
pageContext.setAttribute( "city", strCity);


<c:set var="home" value="<%= strCity %>" scope="session"/>


<c:set var="home" value="${strCity}" scope="session"/>

Hope this will helps you.
16 years ago

Using <c:set> we can store values and object and also in different scope.
some examples,
<c:set var="place" value="Chennai"/>
<c:set var="name1" value="value1" scope="page" />
<c:set var="com_mycompany_name2" value="value2" scope="request" />
<c:set var="com_mycompany_name3" value="value3" scope="session" />
<c:set var="com_mycompany_name4" value="value4" scope="application" />
[ October 19, 2005: Message edited by: Raghu Shree ]
16 years ago