Folder « Folder « JSP-Servlet Q&A

1. Where does the Java EE folder go?

I just downloaded from: the Java(TM) Servlet API Specification Interface Classes 2.3 Inside this zip file I have the folder

  • javax (folder)
  • servlet (folder)
  • http (folder)
  • bunch of class files
Where do I ...

2. Eclipse galieo does not show classes directory inside build what can be the reason?

due to this problem servllet does not execute on it. please help

3. Deleting temporary directory

I found some code on here for creating temporary directories in Java.

public static File createTempDirectory() throws IOException
    final File temp;
    temp = File.createTempFile("temp", Long.toString(System.nanoTime()));


4. Servlet container : how to forbid access to a folder

I use Jersey for my REST API. I use JSP files for the views. I put my JSP view files in www/views/.... Now I'd like to forbid access to these views ...

5. Dynamic Folder Creation

i want to make absolute path for register users for example website url is when a user register himself with user name like "Myname" a dynamic folder will create and absolute ...

6. How to reference a jsp in a different folder

I just organized the jsp's in my project into separate folders. Now I need to change the src for menu1.jsp

<td width="16%" valign="top"><iframe id="ifa"

7. JSPs and Active Directory

I'm working on a "change password" JSP which must connect with Active Directory, and let a user change his/her password. It seems like JNDI is the way to go, is this correct? ...

8. How does JVM uniquely identify JSP's with same name in different folder across different applications

How does JVM uniquely identify JSP's with same name in different folder across different applications? To be more clear Say two applications (war's) are deployed on server A1 and A2. Now A1 ...

9. Go to a specific directory in Java Servlet

i have a app folder in tomcat webapps named BankApp, and there is a temp directory in it. I want to get all the files in temp folder I tried this :

File ...

10. how to create a unique folder for each client

one browser means one client but what if two browser from same machine ?? i think it'd be considered as one client because of i see the similar session id for any ...

11. Selecting the directory

Could you sate your requirement in detail ??? If it is a NT system, you can browse the file system with the File API If it is a UNIX flavour and the remote file system is mounted, then you can browse it too using the file APIs.(Never tried it, but common sense says that it would work) Could not offer any ...

12. folder for my classes

I'm new in JSP. I need use my .class file but it's always wrong. This is error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 0 in the jsp file: /priklady/savename.jsp Generated servlet error: [javac] Compiling 1 ...

13. Access protected folder without password

Hi, (Not sure if this is the right forum to post this question). If a folder in IBM HTTP server is protected, then calling the resources (i.e., pdf files) from a browser or a link in another page will pop up a window asking for user name and password. Now I have a jsp page in WAS, in this jsp page, ...

14. Disable Directory Listing

16. How to stop directory viewing

17. Accessing directories using a JSP

18. Not A Directory - MultipartRequest problem

You are using a URL to specify the directory. This must be the actual path to the file in the file system, not a URL. If the file is to be stored within the boundaries of the web app (not a great idea in my opinion), the getRealPath() method can be used to determine the path as Ali pointed out. The ...

19. Microsoft Active Directory and Java

My company is implementing Microsoft Active directory and I have a table in Oracle that has all users names[Matching names appearing in Microsoft Active Directory]. Is there a java call that can be used to extract Microsoft Active directory name from windows of the user running the application - if so I can match that against this table to allow access ...

20. Excel Download Directory location

21. Find folder on Unix

22. jsp looking applet folder for classes

Hi, I got a problem in jsp and I desperately need help. There is an Applet in my jsp page and applet is using a class name My beans also use this class as well. So I have put this class in Web_inf folder and with applet as well so is available in 2 locations. Most of the time ...

23. Showing Parent Folder Links

It's dynamically generated from an Oracle database, particularly from a table called FILEFOLDER. What I have so far are these: I have a .java file called Files in which I declared a vector called getFolderDetails: public Vector getFolderDetails(int id) { Vector vFolders = new Vector(); String query = "SELECT * FROM FileFolder WHERE filefolderid = '"+ id +"'"; String name = ...

24. Getting directory location in JSP

Hi, In my jsp code, I need to get the directories under the directory "files" and then display in the the jsp page. I have my code below. I dont want to hardcode the path "C:/Tomcat5/webapps/insurance/files", How can I do it ? -------------------------code--------------------------- String filedir=""; File file = new File("C:/Tomcat5/webapps/insurance/files"); File fileDirs[] = file.listFiles(); String s =""; for(int i=0; i< fileDirs.length ...

25. mapping of web folder

Hi all .. I have deployed war file on my websphere setup.. The war file got deployed in the default folder where all the application get deployed.. /webSphere/AppServer/installedApps/mywar.war.ear/mywar/.... If i have a web folder in the above path it works fine ie /webSphere/AppServer/installedApps/mywar.war.ear/mywar/web/test.jsp and my jsp's are picked up properly but i would like to keep my jsp's somewhere else say ...

26. Active Directory Validation

27. How to read name of the folders

28. Finding a directory? JSP

30. Code for Creating a Folder in JSP

31. directory listing

32. windows active directory authentication

33. problem in Accessing a shared directory

34. Select Directory

38. Directory chooser

40. user to create folder

41. user create folder at local

42. Where is servlet Folder?

44. Help with directory tree in JSP/Servlet

I think you have put the files in the wrong places. Servlet classes should be in webdev/WEB-INF/classes and files to serve should be in webdev The you can redirect to the servlet from the JSP (or invoke the servlet on its own). To read a file from a servlet or JSP, you should always use "getPathTranslated", as the servlet container may ...

46. why we put all classes that we need to access from jsp in directories under classes?

Hi All why do we need to put always classes that we need to access from within jsp in directories under classes directories with tomcat? can we put them in classes directory?and how we import them then? here is me code that i use to access classe in coreservlet directory and it works,but when i put my class(Toc.class )in classess directory ...

47. servlets directory

48. Retrieving a directory listing from JSP

Sure, you can do this, but the directories that you will see will be from the server that the JSP is running. You wont be able to see the client's directory structure since the JSP is compiled and executed on the server, so dont waste your time if this is your intention. SAF

49. jsp/servlet reading directory

51. Check user of NT domain or active directory in servlet?

Originally posted by Lijun An: Dear all, Is there a way in which a user from NT domain or active directory is verified in a servlet? I mean when a user logs in a J2EE web application by using his/her NT user account, how this user is authenticated against NT domain's user account database in JSP/servlet. If you have the solution, ...

52. servlets and new web directory

53. servlet querying active directory

I'm not sure if this post is in the right area, but I'm in need of some direction. I've been working through a document library web app and it's working like a champ. I've come to find out that the project is requiring that the users come from win2000 active directory instead of a database. Does anyone have information or know ...

55. How do I setup servlet directory ?

58. create a folder from a servlet

59. create a directory under the servlet

is it possible to create a directory under the web-inf folder? I'm to create a directory at the moment a user registers: say login: john than creates: web-inf/users/john I'm using: File newDir = new File(servlet.getServletContext().getRealPath("/WEB-INF/users/")+userDAO.getLogin()+"/"); but it does't create, when I change the dir to outside the web-inf it acepts if its not possible, how can I create the dirs without ...

60. Creating a directory within a webapp

Hi guys, My ultimate goal is to create a directory for each user of my webapp within Tomcat. So I'd have /ROOT/users/user1. So I made a test jsp within /tomcat/webapps/ROOT: <%String pwd = ""; pwd = request.getRealPath(request.getServletPath()); out.println("the initial relative path is : "+pwd); //pwd = System.getProperty("user.dir"); //out.println("the initial system path is : "+pwd); File mtF = new File(pwd); try {// ...

61. Use http to get a directory list

On the client jsp page I have a textbox that is auto populated from parts inventory database. Beside it is a link to view the associated drawing of the part. The drawings reside on a network server. The drawing are accessible using http url path. Alot of times the inventory part numbers may vary from the drawing number such as inventory ...

63. Relative directory issues

Hi All, I've got a bit of a problem that someone out there might be able to help me with. I'm trying to read the contents of a directory relative to the location of a JSP page. Let me give you the specifics. I have a project on my local machine. The project is located in the "c:/public_html" directory. I'm trying ...

65. Virtual Folders

67. Suggest the Directory location in JSP program

Dear Friends, I am creating a JSP Program using bean Class to set the name, lastname & address of an emplyee. But I am getting Confused to Put the bean folder , So please tell me the exact location of bean folder as I used in my program like bean.Employees. <%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%>

Get Value from bean

68. Create UNIX folder from JSP code

71. Directory Chooser in jsp

72. Question about the Current directory in my servlet

Hi, guys I am using eclipse and Tomcat to develope a simple Web tool. I have a question on the "new "." ).getCanonicalPath()" in my servlet/jsp. When I run the web project in my eclipse, I found the new "." ).getCanonicalPath() is D:\eclipse, But after I export the web project and put it into my CATALINA_HOME\webapp, the "." ...

73. JSP - Link tcreate Folder (servlet)

74. Folder Creation On Shared Hosting Account

75. Public folder in JavaEE webapp

Hi everybody. I started using java for web apps a few months ago and i still have much to learn. I have one simple question to which i found no answer on the internet. We all know the directory structure of a webapp / /WEB-INF /WEB-INF/lib /WEB-INF/classes Files in the root directory are available via HTTP to the end user. But ...

76. [SOLVED] base directory for servlets

This is one of the reasons I use NetBeans. It makes a .jar or .war, you just put it where Tomcat wants, and a miracle happens. The whole jar, .ear, .war stuff drives me crazy. Its different, sort of, but not really. I can't ever remember where anything goes from one thing to another.

78. Servlet -> Writing to the webapps directory

ok, i'll start again. i have a servlet which must write images to a directory on the web server so that when a user wants to go directly to that URL they can see the images. If i write to the servlet directory /MySerlvet/images and try and access the image via: /MyServlet/images/theimage.jpg it calls the servlet. So i want to write ...

79. Ways to map a servlet directory in web.xml and weblogic.xml

I have 3 JSP's :

Is there any way that i can map these three jsp's to "servlet" directory? for ex: With /servlet/* and this maps to "servlet" directory where my three servlets login, logout and process exist. Are there any such options in web.xml or weblogic.xml?