Bug Menot

Greenhorn
+ Follow
since Oct 15, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Bug Menot

ahhh.... here it is... although i expect it to be deleted very soon.
19 years ago
Hi,

By default:

1- all logs in Tomcat 5.5.9 are written in CATALINA_HOME/logs directory.

2- at least we have 2 log's files:

catalina.YYYY-MM-DD.log and localhost.YYYY-MM-DD.log

I am trying to move elsewere the logs, by changing the default path.

For localhost's log file, it is an easy thing to set up. We have to write it down in server.xml by using AccessLogValve etc.

My question:

what about catalina.YYYY-MM.DD.log? How can I change the default path for this file to point elsewhere.


Thx.
19 years ago
I'm using Tomcat 5.5.9. Is it possible to use EL in the web.xml?
I'm just wondering because I noticed there's ${catalina.home} on the manager.xml:

<Context docBase="${catalina.home}/server/webapps/manager" ...
19 years ago
Gavi,
It checks for a valid session by checking for a session attribute that was assigned to the session when it was first created. The attribute assigned corresponds to the role of the user (when they logged in).

Jeanne,
I already thought about making the url-pattern alike for servlets, it's just huge work because I have lots of servlets. Consider the jsp's that <a href= or <form action= to these servlets.
If reg.exp. was available however, I could probably just say !(/images/ | /js/) and stuff.

Thanks for the reply!
19 years ago
JSP
I have this filter.

<filter>
<filter-name>authenticator</filter-name>
<filter-class>ex.sample.filters.Auth</filter-class>
</filter>

<filter-mapping>
<filter-name>authenticator</filter-name>
<url-pattern>/*</url-pattern>
</fitler-mapping>

The idea is to validate a user for every request. However, I don't want it to be applied to a request for images or javascripts and such. I only want it to be applied to a request for servlets and JSP's.

Is it possible to use reg-exp for <url-pattern>? If not, what is the best way to do this?
19 years ago
JSP
I have a clear understanding of the difference between RequestDispatcher.forward(request, response) and HttpServletResponse.sendRedirect(...). I was just wondering however, if it is possible to change the URL (on the address bar) after a RequestDispatcher.getRequestDispatcher("/someJSP").forward(...) to "http://host/app/someJSP" ?
19 years ago
Why is the Filter better than the Listener in this case? Seems like there's a lot of work involve using Filters.
Is that the most commonly used pattern?
19 years ago
JSP
Here's the deal:
1. User logs in
2. After 10 min. their session times out (using <session-timeout>
3. After that, I want them to be redirected to a timeout page or display a message (not using javascript).

So, what are the customary patterns?
19 years ago
JSP
well. kinda like

<error-page>
<error-code>TimeOutException</error-code>
<location>/timeout.html</location>
</error-page>


I guess I'll have to use the session listener.
But is there a way to distinguish between a timeout and a harcoded invalidation?
19 years ago
JSP
Is there a simpler way to redirect to a page after a session times out?

I dont want to have to create a class that implements HttpSessionListener for something so simple.
19 years ago
JSP
you probably have this jsp page included in another jsp page.
in that case, you can't use response.sendRedirect() because the response is already committed hence, the error...
19 years ago
Your the bear. Thanks!
19 years ago
JSP
so we're forced to use scriptlets?
19 years ago
JSP
is there a better way to acces static fields using EL?

i.e.

class Math {
public double sqrt() ...
...
public static final int PI = ...;
}

jsp page:

<c ut value="${Math.PI}" /> <!-- doesn't work -->
19 years ago
JSP
The solution is to not use IE.
19 years ago