Arut Jothi

Greenhorn
+ Follow
since Sep 14, 2004
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 Arut Jothi

It seems your web.xml has a problem here. just remove the double quote at the end and put slash.

this is what do you have:-
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee"

this is what should have
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/
It should work if it is under webapps. However try this also,

Please go to your Tomcat 4.1\conf\server.xml and open it thru notepad/some text editor and search for the following :-

<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

and insert the follwing thing under that.

<Context path="/ch1"
docBase="C:\Program Files\Apache Group\Tomcat 4.1\webapps\ch1"
debug="5"
reloadable="true" >
</Context>

As per Tomcat 5.x, they suggest that putting <Context path....> should not be part of server.xml. Since you are using tomcat 4.0 and could not solve the problem, so I am suggesting the above.
If it is a new design and new jsp. well things are ok and easy to follow MVC or etc.,. What about legacy code? When you go for fixing a bug or open existing code, you see logics written there in jsp (based on the capabilities of earlier version of JSP). So If we upgrade to app servers supports JSP2.0, obviously one will try to use EL. In that case, immediatly we can not use it until we refactor the code to MVC model or someother way as mentioned in the above replies. It would have been nice if we are able to use EL code inside scriptlet someway. I think Sun clearly enforces that pure java code should be written inside scriptlet.
Thanks Anthony. So we can not use the power of EL. For example,

<%
String s = request.getParameter("name");
String url = "test.jsp';
if (s.equals("jothi"))
url = "test10.jsp";
%>

In the above example I store "name" to a variable and check to see the value. How do I store like above using EL? is there a way to do so?
I get error when i specify like the following

<%
String x = "${param.name}";
%>

OR

<%
String x = ${param.name};
%>

I saw an example case for Java bean in HeadFirst. So please someone help me out
I tried to find a link for book examples in Orielly web site as stated in HeadFirst book (scwcd1.4) but I could not locate that. Can someone help me out?