Leo Budima

Greenhorn
+ Follow
since Jun 06, 2005
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 Leo Budima

Sorry if I wasn't clear enough, my apologies. Yes, as Bear said, I was refering to a situation where Tomcat's default servlet lists current directory contents when there is no welcome page.

I'm using globalXsltFile to style directory listing and showing this as a download page in my application. However, subdirectories are shown among the other files and the files are not sorted alphabetically at all which is pretty unconvenient. It has nothing to do with the fact that I'm using my own xslt file since it's the same when I use the default behaviour.

Do you think that this is a configuration or installation problem in my specific case?

The only way to change sorting generaly would be to rewrite the default servlet?

Thank you
15 years ago
Tomcat doesn't sort directory listings in my application at all, is there a way to affect this so that subdirs are shown first as usual? I know that default servlet manages this but I haven't found a way to affect this

Thanks!
15 years ago
Related to my previous post, I'm trying to allow a user to click a link and show 3 more file components upload and not to complicate things too much. Since javascript can't be of any help with setting rendered attribute and I don't like the solution of showing and hiding additional div with comps inside (if nothing than because of the possitioning problems), I thought I could try something like this:

If a user clicks a link, I call the same page with "more" parameter:

<a href="upload.jsp?more=1" target="_self">link</a>

and in the page I have:



Logically, it should work ok, but guess what - it doesn't.
Instead of getting 6 upload components followed by a submit button, I
get 3 comps, then a button, 2 more components and again a button ?!

I've tried several variants, mostly placing <h:form> and <h:commandButton> in and out of the JSP code and it gives different results all leading to one conclusion - it is obvious the renderer does not "substitute" component correctly if the new one is different, but I still don't know enough about JSF to solve this myself.

Does anyone have a clue how to solve this? Thanks!
15 years ago
JSF
P.S. Assuming of course that I have fixed set of components on a page and I know what will be the id of a component I need when it's rendered
15 years ago
JSF
Thanks, I wonder why I haven't thought of that But, generally, is it possible to reference JSF component in javascript?

Since JSF renders regular HTML with id attributes, is it possible to access component attributes with something like:


?
15 years ago
JSF
I know of DWR and it's great - this solution has crossed my mind, but is an overkill since I just need to show some hidden components that are allready on the page, and I think this must be possible via client-side scripting, but am to new to JSF to know exactly how
15 years ago
JSF
I would like to enable a user to click a link and as a result show couple of JSF components on the same page without reloading. Is this possible using javascript and altering rendered attribute and what would be the syntax?

Thanks!
15 years ago
JSF
OK, althought I still don't know why it didn't work like that, I managed to get it to by changing servlet mapping to "/faces/*", adjusting all the redirects and faces-config.xml navigation to have the "faces/" prefix. Now it works totally ok.

Thanks for giving me the idea to try that in your post, anyway
15 years ago
JSF
Thanks for trying to help, I appreciate it!

This is from web.xml:



But I'm trying to load a directory contents in an iframe (which is processed by the Tomcat default servlet and does not contain any JSF code), not a JSF page, if that makes any difference. And requesting every other page (using .jsf extension) works ok.

As for the first part, I'm not sure I understand what you mean - that part of the code redirects the user to the login page if it discovers that user is not logged in at all and in my case returns "/DMSsajt/login.jsf" for both admin and normal user.

The main thing that I don't understand is that if an admin is logged in everything works ok, and the only thing that is different for a regular user is in authorization filter. And I tried to trace the error by logging the progress through auth. filter and it goes ok just until chain.doFilter.

This whole thing is pretty tough to figure out, so thanks a lot for trying to help
15 years ago
JSF
Strange problem - I'm using authorization filter to check for access rights of a user when resource is requested. If a user is logged in as admin, he is redirected to a page where the contents of his personal dir is displayed. It works ok, but when a regular user is logged in, the page which is supposed to show directory contents returns famous "Cannot find FacesContext" error.

Directory contents is showed in an htmLib iframe component which is bind to a backing bean property - everything works ok here since it shows the right directory contents for admin. In authorization filter I use the following code:



I added logging to check for errors, and everything works till chain.doFilter, so it seems that there is no problem in authorization filter either. Can someone please help?
15 years ago
JSF