Error while accessing a file located in the server from JSP
Hi
I am having problem while accessing the file located in the server from a JSP
page. I am not getting the RealPath from a JSP page using getRealPath(request.getServletpath()).
The same code is working if the jsp placd under defaultwebApp directory and not
working if i create a war and deploy the same.
I am using weblogic server 7.0 trail version.I am setting the context path also.
Can any help me in this regard.
Thank And Regards
Anand Mohan
Hi
Thank you.Is there a way to read a file which is existing in the war file.
Regards
Anand Mohan
"Wenjin Zhang" <[email protected]> wrote:
>
>In Weblogic, if your files are archived in a WAR, you cannot get an entry
>as individual
>file since it is only bytes in a large archive file. So getRealPath will
>give
>you null result. If you only want the path, try to use other getXXXPath,
>getURL,
>or getURI method. If you want to read the content, use getResource.
>
>
>"Anand" <[email protected]> wrote:
>>
>>Hi
>>I am having problem while accessing the file located in the server from
>>a JSP
>>page. I am not getting the RealPath from a JSP page using getRealPath(request.getServletpath()).
>>
>>The same code is working if the jsp placd under defaultwebApp directory
>>and not
>>working if i create a war and deploy the same.
>>
>>I am using weblogic server 7.0 trail version.I am setting the context
>>path also.
>>
>>Can any help me in this regard.
>>
>>Thank And Regards
>>
>>Anand Mohan
>
Similar Messages
-
Error while accessing excel file using ODBC
Hi
I am getting the below error message while accessing excel sheet using ODBC from Oracle:
ERROR at line 1:
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: preceding 2 lines from EXCL
Can anyone help me on this...
Cheers
Pradeep
Message was edited by:
user634393Hi
Thank you.Is there a way to read a file which is existing in the war file.
Regards
Anand Mohan
"Wenjin Zhang" <[email protected]> wrote:
>
>In Weblogic, if your files are archived in a WAR, you cannot get an entry
>as individual
>file since it is only bytes in a large archive file. So getRealPath will
>give
>you null result. If you only want the path, try to use other getXXXPath,
>getURL,
>or getURI method. If you want to read the content, use getResource.
>
>
>"Anand" <[email protected]> wrote:
>>
>>Hi
>>I am having problem while accessing the file located in the server from
>>a JSP
>>page. I am not getting the RealPath from a JSP page using getRealPath(request.getServletpath()).
>>
>>The same code is working if the jsp placd under defaultwebApp directory
>>and not
>>working if i create a war and deploy the same.
>>
>>I am using weblogic server 7.0 trail version.I am setting the context
>>path also.
>>
>>Can any help me in this regard.
>>
>>Thank And Regards
>>
>>Anand Mohan
>
-
Error while accessing jar file at url
Hi all
I get following error when I try to access http://192.168.0.100:8090/test/mysql-connector-java-3.0.17-ga-bin.jar
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoSuchMethodError: org.apache.naming.resources.ResourceAttributes.getCanonicalPath()Ljava/lang/String;
org.apache.catalina.servlets.DefaultServlet.checkSendfile(DefaultServlet.java:1521)
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:839)
org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:348)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.-------------------
Could someone help me what is the wrong setting at my system.
Thanks
AamirHi
Thank you.Is there a way to read a file which is existing in the war file.
Regards
Anand Mohan
"Wenjin Zhang" <[email protected]> wrote:
>
>In Weblogic, if your files are archived in a WAR, you cannot get an entry
>as individual
>file since it is only bytes in a large archive file. So getRealPath will
>give
>you null result. If you only want the path, try to use other getXXXPath,
>getURL,
>or getURI method. If you want to read the content, use getResource.
>
>
>"Anand" <[email protected]> wrote:
>>
>>Hi
>>I am having problem while accessing the file located in the server from
>>a JSP
>>page. I am not getting the RealPath from a JSP page using getRealPath(request.getServletpath()).
>>
>>The same code is working if the jsp placd under defaultwebApp directory
>>and not
>>working if i create a war and deploy the same.
>>
>>I am using weblogic server 7.0 trail version.I am setting the context
>>path also.
>>
>>Can any help me in this regard.
>>
>>Thank And Regards
>>
>>Anand Mohan
>
-
I keep getting this message "Sync encountered an error while connecting: Failed to connect to the server. Please try again" What's the problem in English
Hi,
Sometimes the server is not available and you can get an error like this one. Usually it works if you try to sync later. If this doesn't work, take a look to [https://philikon.wordpress.com/2011/06/13/how-to-file-a-good-sync-bug/ this post] to learn how to report a bug.
Let me know if this is helpful. -
"Sync encountered an error while connecting: Failed to connect to the server. Please try again." message has appeared on both my desktop (OS 10.6.8, FF 6.0.2) and laptop (same).
This error is not covered in your help documentation.
I have an active internet connection.
I have tried resetting the Sync on the laptop several times over the last few weeks.
Please advise.
ThanksHi!
It seems that you are not using the latest version of Firefox. Please, update and try again: http://www.mozilla.org/firefox -
SWF to play mp3 files located on the server
Hello,
Does anyone know if it is possible to create an SWF file that can play mp3 files directly from the server, without the need for a streaming media server or external JS.
And also for the application to read the current directory its located in and build a playlist based on the files inside.
any information of examples would be greatly appreciated.
Peter.As for loading and playing the files there is no issue. Simply load them as you would load any file. You can even use a relative path if they are in the same folder as the SWF, or a sub-folder that is in the folder with the SWF.
As for looking at the server directory for what files are there, and using them - I know of no way to do this. That doesn't mean it is impossible, just that I haven't come across a method in my experience.
What I typically do is to archive the list of files in an XML file, and load the XML. I know, that adds an extra step, and an extra file, but it is the easiest method for approximating what you want to do.
Let me edit this response.
You could use javascript, or a server language to grab the list of files in the directory and pass it into Flash via the ExternalInterface classes. -
Where are the jar files located in the server in which the MS SQL Server is installed?
Hello All,
Please tell me the place where jar files are located in the system in which the MS SQL Server is installed.
Please help me as early as possible.
Thanks in advance.
Thanks and Regards, Readers please vote for my posts if the questions i asked are helpful.Check BOL page: Using the JDBC Driver
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
OTL TIme card: ldt file location on the server
Hi,
In order to customize time card layout, I am trying to copy the ldt file from the server.
Where can I find these files on the server?In order to customize time card layout, I am trying to copy the ldt file from the server.
Where can I find these files on the server?Check under $HXC_TOP/patch/115/import and $HXC_TOP/patch/115/import/US directories.
OTL - Download Timecard ldt File To Be Configured By User [ID 216942.1]
Oracle 11i and R12 Time And Labor (OTL) Timecard Configuration [ID 304340.1]
Creating Timecard Audit Trail Report For Configured Layouts [ID 842159.1]
Thanks,
Hussein -
Does this mean the server is down? How would I know? Is there a status page somewhere? I'm not having any internet connectivity issues.
[http://tjl.name/images/Screen%20shot%202011-04-23%20at%2010.01.19%20AM.png Screenshot]I don't see a way to delete my question. A simple restart of the browser fixed the problem.
-
Open a pdf file located on Application Server from forms 10g
Dear all,
I want to open a pdf file which is stored in a folder on Application Server.
I have the following codes but could not be able to open the file.
1. host('rundll32 url.dll,FileProtocolHandler C:\REP012.pdf');
in this code I mentioned the path on local machine which is okey.
but the question is that how to open the file which is located in a folder on application server?
the following code don't show and file or error:
host('rundll32 url.dll,FileProtocolHandler /EMS/MANUALS/ACC001.PDF');
This is the file on Application Server not on local machine.
2. web.show_document('//EMS/MANUALS/ACC001.PDF/','_blank');
This give HTTP 404 NOT FOUND error
I think the problem is in path, how to mention the path of my Application Server file?
Regards:
Muhammad NadeemHi,
Did you find a solution to this?
We are running into the same problem where we need to open a file present on the application server (path /opt/webapps/applications/ISL/)
When we try this from the local machine it works (path D:/forms) however it does not work while trying to open it from the application server.
Regards,
Pooja -
Error while starting Apache WebServer in SAP Content server from sapcs user
Dear Consultants,
We are facing a Issue while staring Apache Server from SAPCS user
We have installed SAP Content server 6.4 with SAP MAX DB 7.6 on RHEL
Linux 64 bit OS, we also installed Apache web server server following SAP
Standard Installation guide,
When We run Apache server using sapcs user we are facing a error
Error (1) -
[sapcs@hpsebdev1 bin]$ apachectl start
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Error (2) - same issue we get when we use httpd script to start apache
service.
[sapcs@hpsebdev1 bin]$ httpd -k start
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Please Help regarding the issue
Regards
Gagan Sharma
SAP BASIS ConsultantHello Gaghan,
From the error it seems that port 80 is being already used. Did you install the second Apache under a different user?
Can you please try using another port?
Regards,
Blanca -
Sync encountered an error while syncing: Failed to connect to the server
Th new sync is just not ready for realease yet in my opinion.
After switching to the new sync on 2 of my 3 devices (netbook: lubuntu 14.10 and notebook ubuntu 14.04) the new sync was working perfectly. Two days ago i added my windows PC to it and now its not working anymore at all.
Only thing that does work if i add or remove bookmarks on windows the other devices will sync, however all bookmarks added in (l)ubuntu wont sync anymore. Same gies for adblock.
I also deleted my sync account and recreated it or i created new profiles.
I dont know why mozilla didnt keep the old sync.It seems some firewall or extension is preventing Firefox from connecting with Sync servers.
''What is a firewall?'' A firewall is an application designed for preventing programs from connecting or receiving data in certain modes. Windows has one enabled by default, and may block some untrusted connections, such as Sync ones, that may work on a port different than 80 which Firefox uses usually.
''How do I disable it?'' If you have a Internet Security solution or regular firewall, refer to its instructions to disable it. If you have Windows Firewall, go to Start / Control panel / Security Center and disable it by clicking on Windows Firewall.
If this doesn't work, what do I do?
The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
To Reset Firefox do the following:
#Go to Firefox > Help > Troubleshooting Information.
#Click the "Reset Firefox" button.
#Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
#Firefox will open with all factory defaults applied.
Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
Did this fix your problems? Please report back to us! -
Help!
I have FF at two locations, at home and at work, first I created FF at home and change the device name to home, then I copied it to a flash memory stick as a portable FF, at work I have changed the device name to Work. is that makes any sense with that issue ?
-
I've been getting this error message and it also shows preferences from the error message. How can I make this message stop from appearing?
I don't see a way to delete my question. A simple restart of the browser fixed the problem.
-
InvalidSecurity Error while accessing Webservice
Hi,
I am getting an "*InvalidSecurity*" error while accessing webservice.
Below is the error, which I got while invoking the webservice :
<env:Envelope
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header/>
<env:Body>
<env:Fault
xmlns:ns0="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<faultcode>ns0:InvalidSecurity</faultcode>
<faultstring>InvalidSecurity : error in processing the WS-Security security header</faultstring>
<faultactor/>
</env:Fault>
</env:Body>
</env:Envelope>
Thanks
Abheek
Edited by: 1005832 on May 14, 2013 6:16 AMThe error was generated on the endpoint and indicates that the SOAP request message had incorrect WS-Security information in its headers. The SOAP response message you included doesn't contain specific information about what is wrong (we wouldn't want to reveal too much to hackers, of course!).
Without seeing the SOAP request message and the WS-SecurityPolicy that the endpoint requires, it's impossible to tell what's wrong.
Other important information:
- what version of WLS are you running?
- is the endpoint a WLS JAX-WS or a WLS JAX-RPC web service?
- is WS-Security configured using native WLS WS-Security (e.g. @Policy) or using OWSM WS-Security (i.e. @SecurityPolicy)?
- what specific policy is being used to enforce security at the endpoint (the advertised WSDL for the endpoint should contain this)
Maybe you are looking for
-
I keep getting an Error -23 on my Ipad? Now when I try to restore it, I get the same error? What do I need to do to fix this issue.
-
An error occurred while trying to access the audit log
Hi I have run Set-Mailbox ian.shapton -AuditOwner Update, Move, MoveToDeletedItems, SoftDelete, HardDelete I then created and deleted an email and ran Search-MailboxAuditLog -Identity "ian shapton" -LogonTypes Owner -StartDate "12/21/2014 12:00" -End
-
How to choose paper type in PSE 12 running on OSX version 10. 9. 2
I have read all the posts and answers bu none of them apply to my predicament can someone help please.
-
SAP Scripts : Conditions on amount values
Dear All, I have to compare a Netvalue and Print a somthing if value is less than 20,000. So I wrote .. /: if &VAR(CT)& LT '20000.00'. Z2 xxxxxxx /: ELSE. Z2 yyyyyy /: ENDIF. But this is not working properly. I wonder how can I compare a amount value
-
Remove Color Correction Preset?
Being able to save a color correction preset is great (in the sprocket menu in the color board.) But to avoid clutter, and since I'll probably never use the one I just created again after this project, anybody know how to remove them? Is it possible