Browse to folder in JSP
Hi,
I want to browse to folder in a JSP page.
so that I can locete a specific folder on the system instead of file then able to specify file name which may not be existing on the system.
PaulOckleford wrote:If you mean using jsp tags then I dont know, but if you want to use html then google for 'multi part form data' and the input type of 'file'Ya i have used the <input type="file">..but it can select files only
eg:d:\mydata\photo.gif....but what i need is i only want to select the directory eg:d:\mydata
How can i do this either in jsp or in html?
Similar Messages
-
Browse for folder button in JSP Page
Trying to create a browse for folder button in a JSP page. Anybody with some ideas on how to do this? Applet, Bean, some other way? Has anybody done this before? Is it even possible?
Thanks in advance!We have done it with Struts before. Also seen it done with javascript.
-
Problem with Copy To/Browse for Folder
Don't know when it started doing this, but now when I right-click and select Copy To and select Browse for Folder it only shows me folders that are under my W7 user name.
I need to get to my external drive, but it doesn't display Computer.
Strange and very inconvenient.
Looking for a solution.Hmm, can't imagine how my workspace would relate to what drives Bridge reads using the Copy To. My drives show up just fine in the folders view. And also in the Export to dialog.
I keep my images on an external drive.
Folders that are not under my user name on C drive, but still on another drive show up in the recent ones in Copy To and access just fine.
So it makes no sense that Copy To>Browse for Folder only displays my drive C Windows user folder on that other drive. -
How can I creat a folder by jsp
import java.io.*;
class folder
public static void main(String args[])
folder foIns = new folder();
foIns.makeDir("E:\\test");
public static void makeDir(String dir)
File d = new File(dir);
if (!d.exists()) {
d.mkdir();
I can creat a folder by java , but how can I creat a folder by jsp??
thanks all ^_^import java.io.*;
class folder
public static void main(String args[])
folder foIns = new folder();
foIns.makeDir("E:\\test");
public static void makeDir(String dir)
File d = new File(dir);
if (!d.exists()) {
d.mkdir();
I can creat a folder by java , but how can I creat a
folder by jsp??
thanks all place this class file in web-inf/classes of your web application,and in jsp page use
<jsp:useBean id="fold" class="your complete class name" scope="page"/>
<%
fold.makeDir("dir name");
%> -
Browse for Folder takes 3-1/2 minutes!
I am using LR3.3. Everything seems to work well except when I want to export a photo. I choose "Export To ---> Specific Folder" and then it takes a full 3-1/2 minutes (not seconds, but minutes), which is like an eternity, for the "Browse to Folder" dialog box to pop up. This happens every time. I appreciate your help.
UPDATE: I remembered that when I am at home and want to start my computer, I have to disconnect the internet cable or it takes almost 5 minutes to start Windows. The IT guy in my office told me that this is because the computer is trying, many times, to connect to the office server before giving up and finally allowing Windows to start. So in a moment of inspiration, I turned off the wireless on my computer, started Lightroom and attempted to export a photo. This time, the folder box appeared as fast as lightening! This is great, except now I must disconnect from the internet each time. Do you have any ideas?In any case I'm feeling good that we're making progress on this conundrum.
-
I am trying to display a "Browse For Folder" dialog
Note that this is not the JFileChooser with the DIRECTORIES_ONLY flag
It is this one
http://i.msdn.microsoft.com/Bb964683.ed6b0efa-d190-4995-861d-abc3571b06ac(en-us,office.12).gif
There have been several posts over the years on these forums asking similar questions without answers.
I can't believe that noone has ever made one since so many people want this functionality.
There doesn't appear to be one in the Swing Package.
Does anyone know of a free jar that contains this?JDirectoryChooser
And while we are with choosers, we might also want to try the folowing choosers for colors and dates:
[Quick Color Chooser|https://colorchooser.dev.java.net/]
[MultiDateChooser |http://www.javafr.com/codes/SELECTEUR-DATES-MULTIPLES_48407.aspx] (to download the zip you must be connected with your CodeS-SourceS account wich is totally free)
Edited by: Andre_Uhres on Feb 23, 2009 6:02 AM -
How to trap client browser window closing thru JSP or servlets
How to trap client browser window closing thru JSP or servlets?
GunjanHi
Though some JavaScripts may provide you with solutions , yet there is no reliable way to detect the closing of the browser by the servlet. One way to achieve detection of user quitting a session is setting session timeouts ion the server side. This can be done either through the web.xml file or programatically by setting the session.setMaxInactiveInterval().
Good Luck!
Eshwar Rao
Developer Technical Support
Sun microsystems Inc
http://www.sun.com/developers/support -
Hi all,
I was using "JFileChooser" for selecting a directory by setting it's selection mode to "DIRECTORIES_ONLY".
But, we noticed that the users are getting a little confused with the "JFileChooser" when they have to select a directory. And Windows OS uses something called the "Browse for folder" control which shows all the directories in a Tree structure and the users are less confused by this component.
So, is there any swing component which looks like the "Browse for folder"???
Thank you.The GET_FILE_NAME built-in allows you to search for a directory as well as a file - check out the on-line help for it.
-
Browse for Folder function for PHP?
can anyone recommend a good plug-in to implement the Windows
"browse for folder"
function in php? I am looking for something like the menu you
get when you want
to select a folder in theDreamweaver "Find and replace"
function.
ClancyLook on Gary White's site -
http://www.apptools.com - for
his tutorial on
how to create a dynamic sitemap in PHP. With modifications,
that's exactly
what you need.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Clancy" <[email protected]> wrote in message
news:[email protected]...
> "SnakEyez02" <[email protected]> wrote:
>
>>My suggestion would be to head over to
www.hotscripts.com and take a look
>>at
>>the File Management section of the PHP scripts.
>>
>> Any file script will open a window to browse for
files, but there are
>> scripts
>>which make the process as easy as possible on the end
user and can do what
>>you
>>need to do with the file.
>>
>> If you provide more detail about what you need the
script to do someone
>> can
>>probably recommend a good script to accomplish the
job.
>
> Thank you.
>
> I have been working on several similar programs to
manipulate data files,
> and
> have got them working pretty well. The one serious
shortcoming is in the
> procedure for specifying which file to read. In the
current version the
> initial
> menu has a simple text entry box for the user to enter
the name of the
> data file
> to load. What I want to do is to extend the
functionality of this, so
> that the
> user can browse the directory to find a particular file
to load.
>
> I want to replace the current Text box with something
that looks like a
> Select
> box, but when you click the arrow at the right you get
the directory tree,
> with
> each directory preceded by a + or - symbol which you can
click to show or
> hide
> the subdirectories and the files in the directory. The
window would have
> to
> have vertical and probably horizontal scroll bars, so
that you could find
> a
> particular file you wanted, then click it to highlight
it, and finally
> close the
> window and load the file.
>
> So what I want is basically a Select box, but with
functionality somewhere
> between Dreamweaver's 'Files' menu, and Disc Explorers
'Folders' menu.
> For this
> application I only want to be able to select a
particular file to load,
> but in
> the future it might also be nice to have the ability to
drag and drop
> files, as
> in Windows Disc Explorer.
>
>
> Clancy -
Has anyone else had the problem where they cannot go to any subfolders in their "Browse for Folder" dialog box?
I have all of my photos organized by year and then by month.
I have made changes to various photos and want to save them. However, when I go to export my changes, I can only export to my "Main" folder. When I click on the plus (+) sign, nothing happens besides the plus (+) sign disappearing. Nothing locks up.
For now, I am saving to my main folder and then manually moving them to the folder I want them in.
Thanks,
-LouAll I'm trying to do is find a folder to export my modified photo to.
For example, I pull up photo DSN_5678. It was imported from My Pictures\2007\06-June folder. I make my changes to the image and now want to "save" the changes so I can have it available for other users on my network. (NOTE: Ignore the network comment since I use another program to backup my pictures to my network from my local hard drive. I keep all my pictures on my local hard drive and back up to a server for everyone else to see and use.)
When I click on Export, the dialogue box comes up just as it should.
I then click on the "Choose..." button in order to change the directory. When I go to "choose" the folder I want to save/export the image to, it doesn't allow me to select any other folders than the ones listed in the "Browse for Folder" dialogue box (My Computer, My Pictures, Shared Documents and a few others that I do not want my pictures saved to). Everytime I click on the plus (+) sign to expand the tree, nothing happens beside the plus (+) sign disappearing.
Any suggestions? -
Export presets now direct me to the "Browse For Folder" dialog box
Suddenly Lightroom will not remember the name of the "export to" folder when I use my export presets in certain ways, even though the name of the "export to" folder appears in the "Export" dialog box. The prolem exists in Library and Develop modules. This is what's happening…
IF I CLICK ON "FILE":
1. And choose the "Export" option, LR displays the Export dialog box, from which I can select an user preset and export a JPG file to the proper folder, as intended. (OK)
2. And choose the "Export with Previous" option, LR exports the JPG file immediately to the proper folder. (OK)
3. And I choose the "Export with Preset option, LR displays the menu of Lightroom presets and user presets, but clicking on a user preset displays the "Browse for folder" dialog box from which I must manually browse to the export folder before a file can be exported. (NOT OK)
IF I RIGHT-CLICK ON THE IMAGE:
LR displays a menu containing these options: Export, Export with Previous, the Lightroom presets, and my user presets.
4. If I then choose "Export," LR works properly---same as example 1 above. (OK)
5. If I then choose "Export with Previous," LR exports the JPG file immediately. (OK)
6. If I then choose one of my presets, LR does not work properly: it acts as it does in example 3 above. (NOT OK)
BACKGROUND:
I have been using these presets for almost a year without fail---they're great! Two days ago I moved my Lightroom catalog to a new external drive. I also renamed the "export to" folder (that new name is stored in the "Export" dialog box).
I sure would appreciate hearing from anyone on this because it's driving me crazy. Thanks.SOLUTION FOUND:
I created yet another folder for storing exported JPGs. Then for each export preset I used the "Browse For Folder" dialog to point that preset to that new folder. All presets now work as before. This fix was tolerable for the seven presets I have, but a large number of presets would have made it a real chore. -
How to open a browse a folder dialog box
Hi,
Please tell me,
how to open a 'browse a folder' dialog box in java SE. I dont need showopenDialog or showSaveDialog methods.
User have to be prompted to select a folder(not a file), and clicks on 'OK'. That path have to come in a text field.
In my program user has to give a folder path....bhuvanavijayam wrote:
Thank you very much..........
i got the answer............ we have to set
jfilechsr.setFileSelectionMode(1);
1 -> DIRECTORY_ONLY
No!
Never use "Magic Numbers" They may change in a future verison and your code will break. Also anyone who reads your code (that includes you, months/years from now) won't know what the code is supposed to do.
jfilechsr.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);Not DIRECTORY_ONLY
db -
Access protected web folder with jsp code or servlet transparently
Hi.
I'm developing a web site. I want to place some of the web pages (*.swf)
a protected web folder so that no one can DIRECTLY access them through wget or browser.
However these *.swf files will be called by other jsp or servlets to display their content
in broswer. What kind of authentication mechanism should I use? Should I use filter?
Please give me some ideas.
Best regards.A Filter is perfectly applicable. But you also have to define the requirements which a request must fullfill to retrieve the contents. For example a login mechanism of which the User is been stored in the session, or an unique key provided as request parameter, or maybe the referrer, etcetera.
-
Hi all,
Using BC4J and BC4J JSP to generate Browse and Edit Form, e.g. EmpView_browse.jsp, and EmpView_Edit.jsp, I want to show only a few attributes in browse, and all fields in edit. If I change the "display" in control hint to hide, the attribute will not be displayed in both pages.
Please help.
Regards,
Terry LukHi,
try something like this :
<jbo:ViewObject id="voBrowse" name='<%=dsParam%>' />
<jbo:AttributeIterate id="df" datasource="<%=dsParam%>">
<% if (df.getName() == "InvoiceNr") {
<th class="clsTableHeader" title="<jbo:ShowHint hintname='TOOLTIP'></jbo:ShowHint>" ><jbo:ShowHint hintname="LABEL"></jbo:ShowHint></th>
<% }%>
</jbo:AttributeIterate>
<jbo:RowsetIterate datasource="<%=dsParam%>" changecurrentrow="false" userange="true">
<tr>
<jbo:AttributeIterate id="dfv" datasource="<%=dsParam%>">
<% if (dfv.getName() == "InvoiceNr") {
<td title="<jbo:ShowHint hintname='TOOLTIP'></jbo:ShowHint>" valign="top" > <jbo:RenderValue datasource="<%=dsParam%>"/> </td>
<% } %>
</jbo:AttributeIterate>
</tr>
</jbo:RowsetIterate> -
Conditionally opening a new browser window from a JSP page
When the user clicks on a button in my JSP page, I'd like to launch a new browser and display certain things in that browser window while leaving the original browser window open. The new browser should only be displayed if certain conditions are met.
My thought was to invoke a javascript method in 'onLoad' which would determine if the new window needs to be launched.
This is kinda what my page looks like:
<jsp:root version="1.2" ................>
<jsp:directive.page import="java.util.*, com.test.Configuration" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<ui:body binding="#{Page1.body1}" id="body1" onLoad="launchWindow();">
</ui:body>
</f:view>
<script type="text/javascript">
function launchWindow(){
if (Configuration.openWindow()) {
window.open("hello.jsp", "newWindow", 'toolbar,width=400,height=400');
</script>
</jsp:root>
My problem is that the call to "Configuration.openWindow()" does not resolve correctly. If I remove that call and simply make a call to "window.open()" all works. But once I put the condition in, nothing happens. I do not see an exception in my browser window but a new browser window does not open.
Is my syntax correct. Can I make a call to the static method 'openWindow()' in my class 'Configuration.java'.
I posted this same query on the JSF forum but received now replies. My question is more suited to the JSP forum and hence I'm posting this question here.
thanks,
tscI have made some changes so that I do not directly access the 'Configuration' class in my javascript.
I have a hidden field on my form and when the user clicks the button, in my back bean, I set a value for the hidden field. In the javascript function 'launchWindow()' I check if a value has been set for the hidden field and if yes, I open a new window.
<ui:body binding="#{Page1.body1}" id="body1" onLoad="launchWindow(document.forms[0]);">
<h:inputText id="hiddenField" value="#{formBean.hiddenValue}" />
<script type="text/javascript">
function launchWindow(form){
alert("in lw");
var test = form["form1:hiddenField"].value;
alert("got test");
if (test != "")
window.open("hello.jsp", "newWindow", 'toolbar,width=400,height=400');
alert ("done test");
</script>When my page is first loaded, the launchWindow() is called and all the alerts popup as expected.
When I click on the button (the back bean sets the value on the hidden field), my page is reloaded but this time its blank.
Any ideas as to why this maybe the case?
thanks,
tsc
Maybe you are looking for
-
Collect one sample at a time.
This seems like it ought to be incredibly simple, but I am brand new to labview... I am acquiring data at a given rate (between 10 and 100 Hz) for the purpose of the read outs in my vi. What I would like to do is set up the DAQ and the experiement an
-
IMovie 09 BUG ? Amendments to Titles not reflected.
Something irritating happens to me in using iMovie '09. I made a short 5 mins movie, after testing and what not & after being satisfied, I then goto Share > Export Movie, type a filename then press ENTER. A message then appeared and say "Preparing pr
-
Do I need the Migration and DVD/CD Sharing Update...
...if I run only an iMac and a Windows laptop?
-
Hi all, I need to implement additional field checks for the Business Partner in the PC-UI (for example, I need to validate that some fields are not empty and send a custom message). I already did it for the SAP GUI using the BDT (transaction BUS3), b
-
What is the difference from RTPSessionMgr and RTPManager?
I find some people dont use RTPManager but RTPSessionMgr. I don't know the difference from the RTPSessionMgr and RTPManager.Help me!! RTPSessionMgr belongs to the package of com.sun.media. There is another pakcage name com.ibm.media. I want to know h