How to find the path of the file at enduser system
Hi Frndz..
Am per my requirement i need to read XL file from enduser PC, for this i need to kno the path on the enduser PC i.e . ,lets assume that test.xsl file is there an enduser PC on his desktop , so i need the path where its like "C:\Docsandsettings\desktop\test.xsl"..
Plz suggest me
Regards
Rajesh
Hi,
You have to first upload this file using fileupload UI element.
Then you can do the rest.
Following tutorial will explain you it in detail
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71
Regards
Ayyapparaj
Similar Messages
-
How to find complete path of a file in computer by java
Hi frens !!
i want to have a simple java program which takes the input file name say one.html and yields the complete path of the that file ,which is already stored somewhere in computer.
my problem is that i am not getting the method in java ,which could do the same.i am using jdk 1.4.
Thanks
Allwynsimply PATHETIC !!!
btw thanks for advise.The options are:
- Search your computer manually for the file, TELL your code where it is by typing in the path.
- Have some operating system tool (e.g. Windows Explorere) search your hard drive for you. When it finds it, TELL your code where it is by type in the path.
- TEACH your code how to search your entire computer, all hard drives, all directories, for the file by that name.
- Create a new file by that name, either in the 'current' directory (which it appears you alraedy have), or some other path you give it.
- go hungry -
clean SC 2012 R2 RTM.
1. had problems with WSUS installation/post configuration
2. found a blog with an identical problem where the problem was solved with the call to Microsoft. Tools directory was missing.
I followed the suggestion: reinstalled WSUS using ps and wsusutil.
I canceled WSUS configuration at recommended step. Everything looked fine.
But after SUP creation I found SMS_WSUS_CONFIGURATION_MANAGER warning.
I checked WCM.log and found Could not find a part of the path 'C:\Program Files\Update Services\Schema\baseapplicabilityrules.xsd'.
When checked there was no Schema folder in the path above. So it's just missing as folder TOOLS before troubleshooting.
Any suggestions for fixing this.
Thanks.
Here is partial WCM that could help to find the issue, I clearly see that there is no Schema directory in C:\Program Files\Update Services:
Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
Verify Upstream Server settings on the Active WSUS Server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
No changes - WSUS Server settings are correctly configured and Upstream Server is set to Microsoft Update SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
Refreshing categories from WSUS server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:00 PM 4536 (0x11B8)
Successfully refreshed categories from WSUS server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:14 PM 4536 (0x11B8)
Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:20 PM 4536 (0x11B8)
Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:20 PM 4536 (0x11B8)
Successfully inserted WSUS Enterprise Update Source object {91F81925-CC1D-40C0-98C3-902AD3717594} SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:21 PM 4536 (0x11B8)
Configuration successful. Will wait for 1 minute for any subscription or proxy changes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:09:21 PM 4536 (0x11B8)
Setting new configuration state to 2 (WSUS_CONFIG_SUCCESS) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:21 PM 4536 (0x11B8)
Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:21 PM 4536 (0x11B8)
Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:21 PM 4536 (0x11B8)
Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
PublishApplication(8427071A-DA80-48C3-97DE-C9C528F73A2D) failed with error System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Update Services\Schema\baseapplicabilityrules.xsd'.~~ at System.IO.__Error.WinIOError(Int32
errorCode, String maybeFullPath)~~ at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath,
Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)~~ at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)~~
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)~~ at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)~~ at System.Xml.XmlTextReaderImpl.FinishInitUriString()~~
at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)~~ at System.Xml.Schema.XmlSchemaSet.Add(String targetNamespace, String schemaUri)~~ at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage.Verify(String
packageFile)~~ at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage..ctor(String packageFile)~~ at Microsoft.UpdateServices.Internal.BaseApi.Publisher.LoadPackageMetadata(String sdpFile)~~ at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetPublisher(String
sdpFile)~~ at Microsoft.SystemsManagementServer.WSUS.WSUSServer.PublishApplication(String sPackageId, String sSDPFile, String sCabFile) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
ERROR: Failed to publish sms client to WSUS, error = 0x80070003 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
STATMSG: ID=6613 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_WSUS_CONFIGURATION_MANAGER" SYS=confman.contoso.lan SITE=MON PID=1716 TID=4536 GMTDATE=Sat Dec 07 22:10:22.831 2013 ISTR0="8427071A-DA80-48C3-97DE-C9C528F73A2D" ISTR1="5.00.7958.1000"
ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
Failed to publish client with error = 0x80070003 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
completed checking for client deployment SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
HandleSMSClientPublication failed. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
Waiting for changes for 58 minutes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:10:22 PM 4536 (0x11B8)
Shutting down... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:51:31 PM 4536 (0x11B8)
Shutting Down... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:51:31 PM 4536 (0x11B8)
SMS_EXECUTIVE started SMS_WSUS_CONFIGURATION_MANAGER as thread ID 4168 (0x1048). SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:38 PM 2008 (0x07D8)
This confman.contoso.lan system is the SMS Site Server. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
Populating config from SCF SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
Setting new configuration state to 1 (WSUS_CONFIG_PENDING) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
Changes in active SUP list detected. New active SUP List is: SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
SUP0: confman.contoso.lan, group = CONFMAN, nlb = SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
Updating active SUP groups... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
Waiting for changes for 1 minutes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:42 PM 4168 (0x1048)
Wait timed out after 0 minutes while waiting for at least one trigger event. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:43 PM 4168 (0x1048)
Timed Out... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
Checking for supported version of WSUS (min WSUS 3.0 SP2 + KB2720211 + KB2734608) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
Checking runtime v2.0.50727... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
Did not find supported version of assembly Microsoft.UpdateServices.Administration. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
Checking runtime v4.0.30319... SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
Found supported assembly Microsoft.UpdateServices.Administration version 4.0.0.0, file version 6.3.9600.16384 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
Found supported assembly Microsoft.UpdateServices.BaseApi version 4.0.0.0, file version 6.3.9600.16384 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
Supported WSUS version found SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:53 PM 4168 (0x1048)
Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:55 PM 4168 (0x1048)
Verify Upstream Server settings on the Active WSUS Server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:55 PM 4168 (0x1048)
No changes - WSUS Server settings are correctly configured and Upstream Server is set to Microsoft Update SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:56 PM 4168 (0x1048)
Setting new configuration state to 4 (WSUS_CONFIG_SUBSCRIPTION_PENDING) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:56 PM 4168 (0x1048)
Refreshing categories from WSUS server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:56 PM 4168 (0x1048)
Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:56 PM 4168 (0x1048)
Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:53:56 PM 4168 (0x1048)
Successfully refreshed categories from WSUS server SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:54:27 PM 4168 (0x1048)
Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:54:32 PM 4168 (0x1048)
Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:54:32 PM 4168 (0x1048)
Configuration successful. Will wait for 1 minute for any subscription or proxy changes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:54:32 PM 4168 (0x1048)
Setting new configuration state to 2 (WSUS_CONFIG_SUCCESS) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:32 PM 4168 (0x1048)
Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:32 PM 4168 (0x1048)
Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:32 PM 4168 (0x1048)
Attempting connection to WSUS server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:34 PM 4168 (0x1048)
Successfully connected to server: confman.contoso.lan, port: 8530, useSSL: False SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:34 PM 4168 (0x1048)
PublishApplication(8427071A-DA80-48C3-97DE-C9C528F73A2D) failed with error System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Update Services\Schema\baseapplicabilityrules.xsd'.~~ at System.IO.__Error.WinIOError(Int32
errorCode, String maybeFullPath)~~ at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath,
Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)~~ at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)~~
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)~~ at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)~~ at System.Xml.XmlTextReaderImpl.FinishInitUriString()~~
at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)~~ at System.Xml.Schema.XmlSchemaSet.Add(String targetNamespace, String schemaUri)~~ at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage.Verify(String
packageFile)~~ at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage..ctor(String packageFile)~~ at Microsoft.UpdateServices.Internal.BaseApi.Publisher.LoadPackageMetadata(String sdpFile)~~ at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetPublisher(String
sdpFile)~~ at Microsoft.SystemsManagementServer.WSUS.WSUSServer.PublishApplication(String sPackageId, String sSDPFile, String sCabFile) SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
ERROR: Failed to publish sms client to WSUS, error = 0x80070003 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
STATMSG: ID=6613 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_WSUS_CONFIGURATION_MANAGER" SYS=confman.contoso.lan SITE=MON PID=1668 TID=4168 GMTDATE=Sat Dec 07 22:55:35.051 2013 ISTR0="8427071A-DA80-48C3-97DE-C9C528F73A2D" ISTR1="5.00.7958.1000"
ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
Failed to publish client with error = 0x80070003 SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
completed checking for client deployment SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
HandleSMSClientPublication failed. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
Waiting for changes for 58 minutes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
Trigger event array index 0 ended. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:35 PM 4168 (0x1048)
SCF change notification triggered. SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:40 PM 4168 (0x1048)
Populating config from SCF SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:40 PM 4168 (0x1048)
Waiting for changes for 58 minutes SMS_WSUS_CONFIGURATION_MANAGER 12/7/2013 5:55:40 PM 4168 (0x1048)
"When you hit a wrong note it's the next note that makes it good or bad". Miles Davis>Any Errors in SUPSetup.log and WSUSCtrl.log log files?
No errors in these files. As I mentioned there is no Schema folder in Could not find a part of the path 'C:\Program Files\Update Services\Schema\baseapplicabilityrules.xsd'.~~
Here are 3 repetitive errors in WCM.log:
1. PublishApplication(8427071A-DA80-48C3-97DE-C9C528F73A2D) failed with error System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Update Services\Schema\baseapplicabilityrules.xsd'.~~ at System.IO.__Error.WinIOError(Int32
errorCode, String maybeFullPath)~~ at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath,
Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)~~ at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)~~
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)~~ at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)~~ at System.Xml.XmlTextReaderImpl.FinishInitUriString()~~
at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)~~ at System.Xml.Schema.XmlSchemaSet.Add(String targetNamespace, String schemaUri)~~ at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage.Verify(String
packageFile)~~ at Microsoft.UpdateServices.Administration.Internal.UpdateServicesPackage..ctor(String packageFile)~~ at Microsoft.UpdateServices.Internal.BaseApi.Publisher.LoadPackageMetadata(String sdpFile)~~ at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetPublisher(String
sdpFile)~~ at Microsoft.SystemsManagementServer.WSUS.WSUSServer.PublishApplication(String sPackageId, String sSDPFile, String sCabFile)
2. Failed to publish client with error = 0x80070003
3. HandleSMSClientPublication failed.
"When you hit a wrong note it's the next note that makes it good or bad". Miles Davis -
Function Module to find the Path of the file in the Application Server
Hi All,
Any function module available to find the path of the file stored in the application server. Please let me know.
Thanks.Check this code:
DATA: dl_file TYPE ibipparms-path. " File name
CONSTANTS: c_dir TYPE rlgrap-filename.
* F4 filename for Application server
CALL FUNCTION '/SAPDMC/LSM_F4_SERVER_FILE'
EXPORTING
directory = c_dir
filemask = ' '
IMPORTING
serverfile = dl_file
EXCEPTIONS
canceled_by_user = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e000 WITH 'Error while getting the file name'(006).
EXIT.
ELSE.
p_file = dl_file.
ENDIF.
Thanks & Regards,
Siri.
Message was edited by:
Srilatha T -
How to get the Path of the Current File using Import & Export File -Reg.
Dear all,
I have a mega (big) doubt. I have manually inserted the Figures from the figure folders. Now i need, fully automated. So How can I get the Figure path
Example :
PMString path = "E://development/Figures/";
now i checked, How many subFolders is there in "path", get the All Subfolders and check to the Article Name.
Example
Article Name == subFolder name then get the Files from the SubFolders(E://development/Figures/ChapterF/*.eps files").
now I paste the Document using to For Loop.
Please any one can suggest me, How can We get the Path in SDK.
Note:
Should I have to create the relative path by myself?
No method supplied in SDK to do this directly?
Please I need a help of this Query as soon as posible.
Thanks & Regards
T.R.Harihara SudhaNhttp://msdn.microsoft.com/workshop/author/dhtml/reference/objects/input_file.asp?frame=true
When a file is uploaded, the file name is also submitted. The path of the file is available only to the machine within the Local Machine security zone. The value property returns only the file name to machines outside the Local Machine security zone. See About URL Security Zones for more information on security zones.
i need to know on how to get the compelete path /directory of the filename
using <input type="file"> tag You can't. Its a security thing.
is there any other way to get an input file from a local host aside from <input type="file"> tag?No. Not using just html.
You could always go into activex components, but thats different again.
Cheers,
evnafets -
how 2 get the path of a file Using jsp
i have tried getPath...but i'm geting the error
The method getPath(String) is undefined for the type HttpServletRequest
any idea how 2 get the path of a fileYou need ServletContext#getRealPath().
API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String) -
How 2 get the path of a file Using jsp
how 2 get the path of a file Using jsp
i have tried getPath...but i'm geting the error
The method getPath(String) is undefined for the type HttpServletRequest
any idea how 2 get the path of a fileYou need ServletContext#getRealPath().
API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String) -
How to determine the path of the jar file cache of javawebstart?
Hello, I need to know how to determine where the java web start application
file jar cache is stored on windows system hard drive.
I would have launch of the inner processes
I have need to know the path of file jar .
example if my application is myAppliation.jar
in code generic class of myAppliation.jar i have the command runtime
String strCmd =
System.getProperties().getProperty("java.home") + "\\bin\\java" +
" -cp " +
System.getProperties().getProperty("java.class.path") + ";"
+ " anotherClass.class ";
Runtime.getRuntime().exec(strCmd);
the anotherClass.class has need
of the contained library in myAppliation.jar.Thanks i have tried this metod and function
java.net.URL resource = classLoader.getResource("myResource");
if (resource != null) {
String s = resource.toString();
if (s.startsWith("jar:")) {
int index = s.indexOf("!");
if (index > 4) {
String fileurl = s.substring(4, index);
if (fileurl.startsWith("file:")) {
String path = fileurl.substring(5);
// now path is the path to the jar file in the cache containing the resource
System.out.println("file jar: "+path);
} -
How do i get the path of the file selected for opening in JFileChooser
hi
I need to get the path of the file selected for opening or saving in the JFileChooser dialog box.Is there any method available.if not how do i get that?
Thanks and Regards
Saminathan.don't know if its the best/only way, but you could use the getSelectedFile() method in JFileChooser which returns a file and then use the getAbsolutePath() file method
-
I have a cannon mg2100. When I scan the error message says it can't find a path to the file
My cannon mg1200 prints and scans but suddenly the scanned photo/doc can't find a path to any file. I just started having this problem yesterday.
Hi, trikerider47!
So that the Community can help you better, we will need to know exactly which operating system is running on your computer (Windows or Mac, and which version thereof). That, and any other details you'd like to give will help the Community better understand your issue!
If this is a time-sensitive matter, our US-based technical support team is standing by, ready to help 24/7 via Email at http://bit.ly/EmailCanon or by phone at 1-800-OK-CANON (1-800-652-2666) weekdays between 10 AM and 10 PM ET (7 AM to 7 PM PT).
Thanks and have a great day! -
How to retrieve the path and the name of the destination file in a link annotation
Hi,
In C++:
How to retrieve the path and the name of the destination file in a link annotation and a Launch action.
Sample of my code:
//Determine if the annotation is a Link annotation
if (PDAnnotGetSubtype(annot) == ASAtomFromString("Link")) {
//Determine if the action is a Launch action
if (PDActionGetSubtype(action) == ASAtomFromString("Launch")) {
// What is the method ?
Regards
David GIn general, get the annotation as a Cos object and examine it, in
accordance with the PDF Reference.
Aandi Inston -
How to find the path where the program resides
I need to use the path where the running program file resides.
My purpose is to make a program where some parameters are in a separate file. I want to have it in the same directory as the .jar program is. This way I could start and run the program from a memory stick.
Is there a way to get the program path?
Urpo Pietil?
Edited by: urpo on Feb 12,:12 AM
Edited by: urpo on Feb 12,:12 AMThis will tell you the directory that contains the running program:
System.getProperty("user.dir") -
Displaying the path of the file selected by a FileChooser in a TextField
I'm just getting started with Swing. I developed a simple dialog box that has two text fields and two buttons. The objective is to open two files using those two buttons. I used FileChooser to select the files. Now, I want to display the path of the selected files in their corresponding TextFields. I use the following code to do that.
final FileChooser fc1 = new FileChooser();
final FileChooser fc2 = new FileChooser();
final TextField tf1 = new TextField();
final TextField tf2 = new TextField();
private void button1ActionPerformed(ActionEvent evt)
int returnVal1 = fc1.showOpenDialog(labelPhpFile);
if (returnVal1 == JFileChooser.APPROVE_OPTION)
File file1 = fc1.getSelectedFile();
String fileName1 = file1.getName();
String filePath1 = file1.getPath();
tf1.setText(filePath1);
private void button2ActionPerformed(ActionEvent evt)
int returnVal2 = fc2.showOpenDialog(labelPhpFile);
if (returnVal2 == JFileChooser.APPROVE_OPTION)
File file2 = fc2.getSelectedFile();
String fileName2 = file2.getName();
String filePath2 = file2.getPath();
tf2.setText(filePath2);
}The above code works fine only for the first file. Mean the path of the file selected using fc1 is getting displayed in the tf1 TextField. But, the file selected using fc2 is not getting displayed tf2 TextField. Please help me.
Thank you :)h1. The Ubiquitous Newbie Tips
* DON'T SHOUT!!!
* Homework dumps will be flamed mercilessly.
* Have a quick scan through the [Forum FAQ's|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ].
h5. Ask a good question
* Don't forget to actually ask a question. No, The subject line doesn't count.
* Ask once
- Don't Crosspost!
- Two people answering one question independantly is a waste of there time.
* Don't even talk to me until you've:
(a) [googled it|http://www.google.com.au/] and
(b) looked it up in [Sun's Java Tutorials|http://java.sun.com/docs/books/tutorial/] and
(c) read the relevant section of the [API Docs|http://java.sun.com/javase/6/docs/api/index-files/index-1.html] and maybe even
(d) referred to the JLS (for "advanced" questions).
* [Good questions|http://www.catb.org/~esr/faqs/smart-questions.html#intro] get better Answers. It's a fact. Trust me on this one.
- Lots of regulars on these forums simply don't read badly written questions. It's just too frustrating.
- FFS spare us the SMS and L33t speak! Pull your pants up, and get a hair cut!
- Often you discover your own mistake whilst forming a "Good question".
- Many of the regulars on these forums will bend over backwards to help with a "Good question",
especially to a nuggetty problem, because they're interested in the answer.
* Improve your chances of getting laid tonight by writing an SSCCE
- For you normal people, That's a: Short Self-Contained Compilable Example.
- Short is sweet: No-one wants to wade through 5000 lines to find your syntax errors!
- Often you discover your own mistake whilst writing an SSCCE.
- Solving your own problem yields a sense of accomplishment ;-)
h5. Formatting Matters
* Post your code between a pair of {code} tags
- That is: {code} ... your code goes here ... {code}
- This makes your code easier to read by preserving whitespace and highlighting java syntax.
- Copy&paste your source code directly from your editor. The forum editor basically sucks.
- The forums tabwidth is 8, as per [the java coding conventions|http://java.sun.com/docs/codeconv/].
- Indents will go jagged if your tabwidth!=8 and you've mixed tabs and spaces.
- Lines longer than 80 characters should be wrapped.
- Proper indentation illustrates program logic.
* Post your error messages between a pair of {code} tags:
- That is: {code} ... errors here ... {code}
- To make it easier for us to find, Mark the erroneous line(s) in your source-code. For example:
System.out.println("Your momma!); // <<<< ERROR 1
- Note that error messages are rendered basically useless if the code has been
modified AT ALL since the error message was produced.
- Here's [How to read a stacktrace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/].
* The forum editor has a "Preview" pane. Use it.
- If you're new around here you'll probably find the "Rich Text" view is easier to use.
- WARNING: Swapping from "Plain Text" view to "Rich Text" scrambles the markup!
- To see how a posted "special effect" is done, click reply then click the quote button.
If you (the newbie) have covered these bases *you deserve, and can therefore expect, GOOD answers!*
h1. The pledge!
We the New To Java regulars do hereby pledge to refrain from flaming anybody, no matter how gumbyish the question, if the OP has demonstrably tried to cover these bases. The rest are fair game. -
How to get the path of the web-archive on the local filesystem?? [Apache]
Hello all,
Im running a webapplication on a tomcat server.
I need to find out the path of the web-archive on the local filesystem to access several files.
How can I do that with out having an instance of HttpRequest or whatever??Hello Bruce.
Please take a look at the following KBase article. It has a sample that will retrieve the folder structure for a specified Crystal Report template based on the instance name in the file store. The sample there can be easily modified so that it is based on a specific infoObject id.
1549728 - How to find the folder structure in the CMC of a report template based on the instance file name in the output file store.
The KBase can be retrieve from the following link:
https://bosap-support.wdf.sap.corp/sap/support/notes/1549728
Please note that the KBase article is retrieved through the Service MarketPlace.
I hope this helps.
Regards.
- Robert -
Hi all,
when a create a SQL Server Project using "File > New ...", I find the following settings defaulted:
SQL Server is (local)\Version12.0 and
DefaultDataPath, DefaultFileprefix and the DefaultFilename(s) for MDFs and LDFs point to the Project directory.
Initial settings of file size and increments are also not settable but defaulted.
Because my projects have to verify performance by testing with large volume of data, we have to use a different SQL Server with files stored on that Server. The Project settings have a button to changes DB properties, but these are not part of that
dialog.
So I spent some fruitless hours in vain to find a way to change the project's connection to my development SQL Servers.
How to cope with that?
Thanks in advance.
Regards UweHi Caillen,
thanks for Your response. I have to apologize for being a little late with my answer. I'll try to clarify my case more precisely:
This is surely a topic related to VS2013 handling new "SQL Server Database Projects". When one clicks "OK" the following steps are executed by VS2013 (surely controlled by standard templates or the like):
VS2013 creates the new project in a selectable directory and uses the projectname as a subdirectory whre the directory elements (*.sqlproj, bin\, obj\) where later all the *.sql are placed, too. This is normal and expected.
VS2013 creates a new database with its DB-files
and attaches it to "(localdb)\ProjectsV12". The name of the database is the name of the project. The path to the DB-files (*.mdf and ldf) and their sizes are also defaulted to small values. The DB-server and the
path to the DB-files is taken from the registry (!) HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\SSDT\LocalDbDatabaseFilePaths. I don't know when and by what tools these values are set.
The path to DB-Files is typically also the path to the projects. The (local)-server places all system database files in the User\<user-ID>\Appdata\.. tree. Which is OK for small databases. The templates extracts some data from the DB-file path and
places it in the deployment SQLs to populate the SQLCMD variables DefaultDataPath, DefaultFileprefix and the DefaultFilename(s) which are generated when pressing "Executed" or "Debug" the project.
My problem is that we have to test database performance with larger volumes of data (e.g. two million rows and more). These cannot be stored in the User-path but must be handled by some kind of professional DB-Manager on various storage devices. When everything
is tested, the publishing function of VS2013 will extract the structure and you are done incl. all the performance taming things.
The dialog from the project properties can change to a different Server, but that server does not know your project database. The server and the DB-Files should be specified by the developer before VS2013 creates the database.
So the right forum would be a forum, where people developing SQL Server solutions with VS2013 are reading the questions.
Thanks again for your patience.
Regards Uwe
Maybe you are looking for
-
I have two email accounts that my iTunes keeps getting mixed up. How do I delete one of the emails from my iTunes so it only goes to my .me account?
-
Why the extra space after an h3 title on the page?
I am somewhat a newbie and I am working on a webpage for a lady. She wants me to remove the extra space below the title and I have it set as an h3 tag. The title is at the top, "eMarketing - Standing out in the In-Box"... and then there is this big s
-
DNG Profile Editor vs. Adobe Standard
I'm working in PS CS3, I shoot in Leaf 11.2 and process my files in Camera Raw 4.6. I've mostly be unhappy with the color differences between PS and Leaf. The adobe standard profile brings me close, but not enough. I've attempted to shoot a color che
-
Proper functioing of Data Sockets
Hello, I'm using Data Sockets to transfer waveform data from one computer to another over a network. This is a test for a future application where the data acquisition computer well be inaccessible. The basics of the program are that the acquisition
-
What is the difference between when you "Install Domain Controller as a Global Catalog or without a Global Catalog"?