Ankush Bhargava

Greenhorn
+ Follow
since Dec 03, 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 Ankush Bhargava

Ulf Dittmer wrote:The easiest would be to have the Tomcat home page (TOMCAT_HOME/webapps/ROOT/index.jsp) perform a redirect to your start page.

Or, if you have just a single web app, you can move that to the ROOT web app.



Thanks! Worked for me.
10 years ago
Thanks.

Eventually what i ended up doing is -
1. unmount the folder


2. create alias in httpd to redirect urls to the specific directory


This seems to work :-)
10 years ago
create a jsp that redirects all requests to the application welcome page. place this jsp in the root folder for tomcat.
10 years ago
I am using httpd with tomcat and mod_jk

My webapp url is something like:
http://localhost:8080/myapp
- which picks up the JSP from /home/webapps/myapp

But when someone else a url such as
http://localhost:8080/myapp/assets/1.gif, or
http://localhost:8080/myapp/assets/2.jpg
- I want tomcat to retrieve the gif from a different directory on the server -
/usr/share/my_images/1.gif and
/usr/share/my_images/2.jpg

To do this, i created a file called myapp#assets.xml, and placed it in
/usr/share/tomcat6/conf/Catalina/localhost
The content of myapp#assets.xml are -
<Context docbase="/usr/share/my_images/" path="/assets/*"></Context>

But this is not working, and the server just does not find http://localhost:8080/myapp/assets/1.gif.
What am i doing wrong?
10 years ago
Finally found the cause -
The build file had a 'resin-web.xml', and that skipped my sight. I added the namespaces
' xmlns="http://caucho.com/ns/resin"; xmlns:resin="http://caucho.com/ns/resin/core"; ' to the web-app tag and presto! EL started working.

Thanks for your help bear. Appreciate it!
13 years ago
JSP
hmmm, i see what your point.

I also tried running this against a Resin 3.0.23 installation. And that din't work either.
Now i am beginning to think if my configuration is not messy...?

Any tips on getting EL to work?
13 years ago
JSP
1. When i don't use the c:out, I get back what I wrote. i.e. the output is -
${result}

2. Resin documentation says that default is JSTL turned on. So i haven't played with that part.
How can I toggle it?

3. web.xml -
<web-app xmlns="http://caucho.com/ns/resin";
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">


4. I guess I'm using the Resin's built in JSTL, as I did not explicitly add any JSTL jar file to the build.
13 years ago
JSP
oh, and this code runs just fine on my 3.0.14 version.
13 years ago
JSP
hey no worries. I did try running the code on a JSP and not an HTML.

Infact here's exactly what i ran -


output -
false | true


I've tried many combinations of values inside the c:if tags and none seem to work.
c:out always works.
13 years ago
JSP
Hello, thanks for you reply.

I tried the code snippet you gave, and the output was -
"${result}"

so i tried:


and i got -
false

what next?
13 years ago
JSP
Hello, thanks for you reply.

I tried the code snippet you gave, and the output was -
"${result}"

so i tried:


and i got -
false

what next?
13 years ago
JSP
Hi,

I am migrating from Resin 3.0.14 to Resin 3.1.0. Everything seems to work fine, except for inconsistencies in JSTL - All jtsl 'if' tags are not working!

example:
adding this to my JSP -
<c:out value="${sessionScope.userSession.sessionValid==true}"/>

outputs a value of 'true' or 'false' based on the value of the variable 'sessionValid' in the 'userSession' bean in the HttpSession object.

but -
<c:if test="${sessionScope.userSession.sessionValid==true}">
<c:out value="${sessionScope.userSession.sessionValid}"/>
</c:if>

does not work. and neither does -
<c:if test="${sessionScope.userSession.sessionValid!=true}">
<c:out value="${sessionScope.userSession.sessionValid}"/>
</c:if>

I dont get any output from the JSP as all.

Clear JSTL is working, but only partly! I tried using c:choose, but even that did not work :-(
What could i be doing wrong?

TIA
13 years ago
JSP
trying to get a nobel to be able to marry an 18yr old???

try now. you have better chances!!

cheers
Ankush
15 years ago
finding the sum of the digits of k.
7+1+4+6 = 18

cheers
Ankush
15 years ago
what is the confusion Pradeep?
is it the use of them that's confusing you? Well, hasNext is used to find out whether another token is available, whereas, next is used to get that 'next' token!

hope this helps.

Cheers
Ankush
15 years ago