Cannot find JSP file through web.xml

Content of a.jsp
function Thisthing (id, name) {
this.id = id;
this.descr = name;
I want to access a.jsp from b.jsp. like
<script type="text/javascript" src="a.js"></script>
I have web.xml content
<servlet>
<servlet-name>DomainObjectis</servlet-name>
<jsp-file>/a.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>DomainObjectis</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
However its showing me an error -> .Thisthing undefined whenever I run this in Tomcat 5.5.
I appears its not finding my a.jsp file. It's working fine when I do
<%@ include file="a.jsp" %>

thanks for replying jgalacambra.
I have deployed several web applications before. But this is the first one where I am trying to include a JSP file as a javascript.
tomcat recognizes when I simply including the jsp file with import but when I try to include it as a script it's not working. So I am hoping that there are some experts here who can help me. I saw this being done in a project and am trying to build a similar web application myself.

Similar Messages

  • Use of jsp-file in web.xml

    hello
    can anybody explain about , when we need <jsp-file> in web.xml
    and why we use this tag in place of <url-pattern>?

    If you want to declare a JSP in your web.xml file you use the jsp-file tag instead of the servlet-class tag. Normally there is no need to declare a JSP in the web.xml file unless you want to use init-params.
    Usually people can access a JSP directly wether it is declared in the web.xml or not. So it is not that the jsp-file tag replaces the url-pattern tag so much as the url-pattern tag is not needed for a JSP. However notthing prevents you from declaring the JSP in the web.xml and then mapping the JSP to a different url that doesn't end in '.jsp'.

  • Issue with Java WebDynpro iView Cannot find JSP file: WDC_ControlJRE.jsp

    Running NW 7.0 SP16...
    We have a WD Java app which runs fine on its own.
    But I created an iVIew using the SAP WD App iview template.
    The iview throws an error when attempting to run/preview.
    The default trace file says:
    [EXCEPTION]
    com.sapportals.portal.prt.component.PortalComponentException: Cannot find JSP file: WDC_ControlJRE.jsp
    at com.sapportals.portal.prt.core.broker.JSPComponentItem.getComponentInstance(JSPComponentItem.java:139)
    at com.sapportals.portal.prt.core.broker.PortalComponentItemFacade.service(PortalComponentItemFacade.java:355)
    at com.sapportals.portal.prt.core.broker.PortalComponentItem.service(PortalComponentItem.java:934)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:435)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:527)
    at com.sapportals.portal.prt.component.AbstractComponentResponse.include(AbstractComponentResponse.java:89)
    at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:232)
    at com.sapportals.portal.appintegrator.Utils.includeJSP(Utils.java:220)
    at com.sapportals.portal.sapapplication.webdynpro.wdclient.JavaRenderLayer.render(JavaRenderLayer.java:34)
    at com.sapportals.portal.appintegrator.LayerProcessor.processContentPass(LayerProcessor.java:219)
    at com.sapportals.portal.appintegrator.AbstractIntegratorComponent.doContentPass(AbstractIntegratorComponent.java:117)
    at com.sapportals.portal.appintegrator.AbstractIntegratorComponent.doContent(AbstractIntegratorComponent.java:98)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.doPreview(AbstractPortalComponent.java:240)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:168)
    at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
    at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
    at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
    at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
    at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
    at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
    at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:524)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
    at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Any ideas?
    Regards

    Killing due to no answers.

  • Cannot find the file MsDtsSrvr.ini.xml

    My SSIS 2008 book says that - 
    The MSDTSServer100 service is configured through an XML file that is located by default in the following path: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\MsDtsSrvr.ini.xml. 
    I cannot find this file in the given folder. But, I did find a MsDtsSrvrUtil.dll file which is of no use to me. 
    The book also says that if you cannot find the path, go to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\SSIS\ServiceConfigFile registry key in the Registry. By default, the XML file should look like the following: 
    < ?xml version=”1.0” encoding=”utf-8” ? >
    < DtsServiceConfiguration xmlns:xsd=”http://www.w3.org/2001/XMLSchema”
    xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” >
    < StopExecutingPackagesOnShutdown > true < /StopExecutingPackagesOnShutdown >
    < TopLevelFolders >
    < Folder xsi:type=”SqlServerFolder” >
    < Name > MSDB < /Name >
    < ServerName > . < /ServerName >
    < /Folder >
    < Folder xsi:type=”FileSystemFolder” >
    < Name > File System < /Name >
    < StorePath > ..\Packages < /StorePath >
    < /Folder >
    < /TopLevelFolders >
    < /DtsServiceConfiguration >
    But, I don't see this either inside regedit. All i see is a blank "thing" (photo attached). What is happening and how do I complete these steps ? 

    Hello,
    Are you sure you have SSIS installed on your machine? Please check it with Windows Service Manager (services.msc) if you have an entry like "SQL Server Integration Services 10.0"
    BTW, the blank "\SSIS\ServiceConfigFile" registry key exists also on machines, where only the client tools are installed, but not SSIS itself.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]
    Thanks for your answer. This is very embarrassing, I did find the xml file there. But, what is the difference between SSIS and SSIS client tools ?

  • Upgrading to MBAM 2.5: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0.....the system cannot find the file specified.

    Upgrading from MBAM 1.0 to 2.5 on the Administration and Monitoring server (database server already upgraded). To upgrade the administration server, I uninstalled MBAM 1.0 -> Deleted the MBAM website from IIS manually -> Reboot -> Installed MBAM
    2.5. After upgrade if I go to selfservice portal via
    https://myserver.mycompany.com/selfservice, I get this error:
    Server Error in '/SelfService' Application.
    Could not load file or assembly 'System.Web.WebPages.Razor,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its
    dependencies. The system cannot find the file specified.
    Description:
    An unhandled exception occurred during the execution of the current web
    request. Please review the stack trace for more information about the error and
    where it originated in the code.
    Exception Details:
    System.IO.FileNotFoundException: Could not load file or assembly
    'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot
    find the file specified.
    Source Error:
    An unhandled exception was generated during the execution of the
    current web request. Information regarding the origin and location of the
    exception can be identified using the exception stack trace below.
    Stack Trace:
    [FileNotFoundException: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.]
    System.Web.Mvc.PreApplicationStartCode.Start() +0
    [InvalidOperationException: The pre-application start initialization method Start on type System.Web.Mvc.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..]
    System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +12980619
    System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +12980328
    System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +280
    System.Web.Compilation.BuildManager.ExecutePreAppStart() +172
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1151
    [HttpException (0x80004005): The pre-application start initialization method Start on type System.Web.Mvc.PreApplicationStartCode threw an exception with the following error message: Could not load file or assembly 'System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..]
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12979668
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12819261
    Anyone know how to solve this? Thanks in advance

    Sorry for late response. I fixed the issue by installing the correct version of ASP .NET 4 from
    here.
    If .NET Framework 4.5 is already installed, also run aspnet_regiis -i from C:\windows\microsoft.net\Framework\v4.0.30319

  • While creating web application prokect getting error: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

    I am getting error on creating even the empty web application project. The error message is as given below:
    The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
    I am using following build of Visual Studio:
    Visual Studio Professional 2013. Version 12.0.30723.00 Update 3
    Looks like it is the problem with the installation of the visual studio. But I can't take risk of re-installing now because it would stop my going on development work.
    Any would help to resolve this would be appreciated.
    P.S. I am also having Visual Studio 2010 and Visual Studio 2012 Ultimate on my system.
    Regards, Randeep

    Hello Randeep,
    Will you get the same error when creating any other apps, like C# WinForm?
    If only web application project has the problem, you can try the following to reset the templates:
    Please open Windows Explorer, and navigate to  <Visual Studio Installation Path>\Common7\IDE (by default is C:\Program Files \Microsoft Visual Studio 12.0\Common7\IDE);
    Delete the ItemTemplatesCache, ProjectTemplatesCache folder;
    Open Visual Studio Tools/Developer Command Prompt for VS2013
    under Start menu -> All Programs -> Microsoft Visual Studio 2013 -> Visual Studio Tools (run it with Administrator privilege: right-click the program -> Run as administrator);
    Run the devenv /InstallVSTemplates switch;
    Run the devenv /Setup switch
    If all your projects get this error, please try repair the installaiton from control panel first. By the way, can you use Visual Studio Web projects before you get this error? And have you tried to use the Visual Studio Update 4, I see you still used
    Update 3, is there any reason for you to still use the Update 3 version?
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Bitlocker "The system cannot find the file specified"

    I am trying to get Bitlocker working on the C: drive of a Dell Venue 11 (5130) 32bit, running Windows 8.1Update Enterprise. I click Turn on BitLocker and the system checks the perrequisites and is happy. Then I type in a PIN (6 numbers) and confirm it and
    hit Set PIN. At this point it fails with a message saying "The system cannot find the file specified".
    I am an Admin on the machine. TPM is working fine. GPO is not setting either BitLocker or TPM to store on the AD DS. Secure Boot is turned on in BIOS. Plus I've tried the reverse of all of these.
    I've spent hours reading through web articles without any joy, so I'm hoping someone can give me a pointer. Please.

    Hi guys,
    Almost have the same problem, and still not able to solve it now [despite lots of search].
    I used to have BitLocker working on my laptop, but I removed it before cloning [with Paragon] my SSD to a new and bigger one. When I replaced the SSD the system did not boot, and I had to create a new BCD store by copying UEFI boot files from the system
    directory on fix the UEFI boot partition. When the boot problem was fixed, I used gParted to extend my C: partition and delete useless recovery partitons at the end of the drive. So actual partitioning is as follow [as per Diskpart]:
      Partition ###   Type                Size         Offset
      Partition 1         Recovery         500 MB   1024 KB
      Partition 2         System            300 MB    501 MB
      Partition 3         Reserved         128 MB    801 MB
      Partition 4         Primary            930 GB    929 MB
    So I guess I made something wrong when I tried to repair the UEFI boot partition... Well, now it boots correctly, but I can't enable BitLocker anymore and get the not-so-explicit "The system cannot find the file specified" error you had. Here is
    what I get with a "bcdedit.exe /enum ALL":
    Firmware Boot Manager
    identifier              {fwbootmgr}
    displayorder            {bootmgr}
                            {d10304b6-5db7-11e4-bf1c-806e6f6e6963
                            {d10304b1-5db7-11e4-bf1c-806e6f6e6963
                            {d10304b2-5db7-11e4-bf1c-806e6f6e6963
                            {d10304b4-5db7-11e4-bf1c-806e6f6e6963
                            {d10304b3-5db7-11e4-bf1c-806e6f6e6963
                            {d10304b5-5db7-11e4-bf1c-806e6f6e6963
    timeout                 0
    Windows Boot Manager
    identifier              {bootmgr}
    device                  partition=\Device\HarddiskVolume2
    path                    \EFI\Microsoft\Boot\bootmgfw.efi
    description             Windows Boot Manager
    locale                  en-gb
    inherit                 {globalsettings}
    default                 {current}
    resumeobject            {4496c237-5dd0-11e4-be46-f1ba631dfb0b
    displayorder            {current}
    toolsdisplayorder       {memdiag}
    timeout                 30
    Firmware Application (101fffff)
    identifier              {d10304ae-5db7-11e4-bf1c-806e6f6e6963
    description             Setup
    Firmware Application (101fffff)
    identifier              {d10304af-5db7-11e4-bf1c-806e6f6e6963
    description             Boot Menu
    Firmware Application (101fffff)
    identifier              {d10304b0-5db7-11e4-bf1c-806e6f6e6963
    description             Recovery
    Firmware Application (101fffff)
    identifier              {d10304b1-5db7-11e4-bf1c-806e6f6e6963
    description             SATA HDD:
    Firmware Application (101fffff)
    identifier              {d10304b2-5db7-11e4-bf1c-806e6f6e6963
    description             USB CD:
    Firmware Application (101fffff)
    identifier              {d10304b3-5db7-11e4-bf1c-806e6f6e6963
    description             USB FDD:
    Firmware Application (101fffff)
    identifier              {d10304b4-5db7-11e4-bf1c-806e6f6e6963
    description             USB HDD:
    Firmware Application (101fffff)
    identifier              {d10304b5-5db7-11e4-bf1c-806e6f6e6963
    description             NETWORK:
    Firmware Application (101fffff)
    identifier              {d10304b6-5db7-11e4-bf1c-806e6f6e6963
    device                  partition=\Device\HarddiskVolume2
    path                    \EFI\Microsoft\Boot\bootmgfw.efi
    description             Windows Boot Manager
    Windows Boot Loader
    identifier              {current}
    device                  partition=C:
    path                    \Windows\system32\winload.efi
    description             Windows 8.1
    locale                  en-gb
    inherit                 {bootloadersettings}
    isolatedcontext         Yes
    allowedinmemorysettings 0x15000075
    osdevice                partition=C:
    systemroot              \Windows
    resumeobject            {4496c237-5dd0-11e4-be46-f1ba631dfb0b
    nx                      OptIn
    bootmenupolicy          Standard
    detecthal               Yes
    Resume from Hibernate
    identifier              {4496c237-5dd0-11e4-be46-f1ba631dfb0b
    device                  partition=C:
    path                    \Windows\system32\winresume.efi
    description             Windows Resume Application
    locale                  en-gb
    inherit                 {resumeloadersettings}
    isolatedcontext         Yes
    allowedinmemorysettings 0x15000075
    filedevice              partition=C:
    filepath                \hiberfil.sys
    bootmenupolicy          Standard
    debugoptionenabled      No
    Windows Memory Tester
    identifier              {memdiag}
    device                  partition=\Device\HarddiskVolume2
    path                    \EFI\Microsoft\Boot\memtest.efi
    description             Windows Memory Diagnostic
    locale                  en-gb
    inherit                 {globalsettings}
    badmemoryaccess         Yes
    EMS Settings
    identifier              {emssettings}
    bootems                 No
    Debugger Settings
    identifier              {dbgsettings}
    debugtype               Serial
    debugport               1
    baudrate                115200
    RAM Defects
    identifier              {badmemory}
    badmemorylist           0x10007
    Global Settings
    identifier              {globalsettings}
    inherit                 {dbgsettings}
                            {emssettings}
                            {badmemory}
    Boot Loader Settings
    identifier              {bootloadersettings}
    inherit                 {globalsettings}
                            {hypervisorsettings}
    Hypervisor Settings
    identifier              {hypervisorsettings}
    hypervisordebugtype     Serial
    hypervisordebugport     1
    hypervisorbaudrate      115200
    Resume Loader Settings
    identifier              {resumeloadersettings}
    inherit                 {globalsettings}
    I also enabled Fast Bios and ACHI Mode in my BIOS [along with enabling Secure Boot on UEFI mode], as well as tried to clear TPM and reinitialize it, but that didn't change anything. And thanks to your posts I had a look to C:\Windows\System32\Recovery\ReAgent.xml
    but it does not seem to be populated with the any GUIDs:
    <?xml version='1.0' encoding='utf-8'?>
    <WindowsRE version="2.0">
      <WinreBCD id="{24b2af92-fddf-11e1-bfa1-001377e67dbe}"/>
      <WinreLocation path="\Recovery\WindowsRE" id="0" offset="254619418624" guid="{f2ebfdb1-aa8c-453d-9c40-68aed6c32395}"/>
      <ImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}"/>
      <PBRImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}" index="0"/>
      <PBRCustomImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}" index="0"/>
      <InstallState state="1"/>
      <OsInstallAvailable state="0"/>
      <CustomImageAvailable state="0"/>
      <IsAutoRepairOn state="1"/>
      <WinREStaged state="0"/>
      <OperationParam path=""/>
      <OsBuildVersion path="9600.16384.amd64fre.winblue_rtm.130821-1623"/>
      <OemTool state="0"/>
      <IsServer state="0"/>
      <DownlevelWinreLocation path="\Recovery\WindowsRE" id="0" offset="1048576" guid="{f2ebfdb1-aa8c-453d-9c40-68aed6c32395}"/>
      <IsWimBoot state="0"/>
      <ScheduledOperation state="5"/>
    </WindowsRE>
    Nevertheless I have a ReAgent_Merged.xml1 file in that same folder, which contains:
    <?xml version='1.0' encoding='utf-8'?>
    <WindowsRE version="1.0">
        <WinreBCD id="{24b2af8c-fddf-11e1-bfa1-001377e67dbe}"/>
        <WinreLocation path="\Recovery\WindowsRE" id="0" offset="1048576" guid="{f2ebfdb1-aa8c-453d-9c40-68aed6c32395}"/>
        <ImageLocation path="\recovery\WindowsRE" id="0" offset="1048576" guid="{f2ebfdb1-aa8c-453d-9c40-68aed6c32395}"/>
        <OsInstallLocation path="\RecoveryImage" id="0" offset="231720616448" guid="{f2ebfdb1-aa8c-453d-9c40-68aed6c32395}" index="1"/>
        <CustomImageLocation path="" id="0" offset="0" guid="{00000000-0000-0000-0000-000000000000}" index="0"/>
        <InstallState state="1"/>
        <OsInstallAvailable state="1"/>
        <CustomImageAvailable state="0"/>
        <IsAutoRepairOn state="1"/>
        <WinREStaged state="0"/>
        <OperationParam path=""/>
        <OsBuildVersion path="9200.16384.amd64fre.win8_rtm.120725-1247"/>
        <OemTool state="0"/>
        <BootKey state="0"/>
        <IsServer state="0"/>
        <ScheduledOperation state="4"/>
    </WindowsRE>
    So I'm stuck, and any pointer would be greatly appreciated. :-/
    Cheers,
    Kwansetsu

  • The system cannot find the file specified!!

    hi
    i am new to java web start. i am trying to run a program which copies the contents of a text file farrago.txt to a new file in some other directory.
    i have packed farrago.txt in the jar file with the program but
    when i run the program through webstart i am getting error:
    the system cannot find the file specified(farrago.txt)
    in my program the code to read the file is:
    File inputFile = new File("farrago.txt");
    how can i access my file from the jar file??
    please help!
    zamir

    You need to read in the file using loadResource() - see:
    http://java.sun.com/products/javawebstart/docs/developersguide.html#dev

  • Java.io.FileNotFoundException: test.txt (The system cannot find the file sp

    Hi All,
    am getting the following error, help me out. Thanks in advance...
    java.io.FileNotFoundException: test.txt (The system cannot find the file specified)
         java.io.FileInputStream.open(Native Method)
         java.io.FileInputStream.<init>(FileInputStream.java:106)
         java.io.FileInputStream.<init>(FileInputStream.java:66)
         BinaryStreamServlet.doGet(BinaryStreamServlet.java:13)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    I have placed "test.txt" in the path"D:\Backup\Tomcat web server\apache-tomcat-6.0.14\webapps\examples\WEB-INF\classes\test.txt".
    web.xml entry is as follows,
    <servlet>
    <servlet-name>demoservlet2</servlet-name>
    <servlet-class>BinaryStreamServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>demoservlet2</servlet-name>
    <url-pattern>/demoservlet2</url-pattern>
    </servlet-mapping>
    Source code:
    import java.io.*;
    import java.net.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class BinaryStreamServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException{     
    response.setContentType("text/plain"); /* set the MIME type */
         File f= new File("test.txt");
         byte[] arBytes = new byte[(int) f.length()];
         FileInputStream is= new FileInputStream("test.txt");
         is.read(arBytes);
         OutputStream os = response.getOutputStream();
         os.write(arBytes);
         os.flush();
    }

    I have one Drivers.xml file in /WEB-INF that i want to read .but everytime i get exception file not found..
    i m trying to read this xml file in DriverUtilties.java (a non servlet class)
    inside of /WEB-INF/classess folder is there and hierarchy for non-servlet class DriverUtilties is :- com.dds.apps.ptes.pidentifier.admin.util.common.DriverUtilties
    what code shall i write so that i can read the xml file. ???
    where i set in classpath ?
    MYCODE is like this :
    public static final String DEFAULT_FILE = "/WEB-INF/drivers.xml";
    InputStream in = new FileInputStream(DEFAULT_FILE);
    Thanks in advance

  • Xalan, xsl:include, The system cannot find the file specified

     

    Hi
    Xalan is unable to parse stylesheets which contain xsl:include
    directives, even if the file being included is in the same directory.
    I'm currently porting our web application to weblogic 6.0 sp2 running on
    Windows 2000. The application works fine except for one annoying problem,
    this problem only manifests on Weblogic 6.0 sp2.
    I've got a servlet which makes use of a jsp tag. The tag uses the
    ServletContext.getResource() to reference a stylesheet in the webapps' xsl
    subdirectory. If that stylesheet contains an xsl:include e.g. <xsl:include
    href="myother.xsl"/>, myother.xsl is contained in the same directory as the
    stylesheet containing the include. Xalan fails to parse the stylesheet. The
    following exception is thrown "org.apache.xalan.XSLProcessorException: The
    system cannot find the file specified".
    I've currently amended the weblogic classpath as follows
    set
    CLASSPATH=.;c:\myjars\xerces.jar;c:\myjars\xalan.jar;c:\myjars\bsf.jar;c:\my
    jars\js.jar;.\lib\weblogic_sp.jar;.\lib\weblogic.jar
    xerces v1.4
    xalan v1.2.2
    bsf (as supplied with xalan 1.2.2)
    js (Mozilla Rhino 15R2)
    The code in the jsp tag to load the stylesheet is as follows
    XSLTProcessor processor =
    XSLTProcessorFactory.getProcessorUsingLiaisonName("org.apache.xalan.xpath.xd
    om.XercesLiaison");
    URL styleSheetUrl =
    pageContext.getServletContext().getResource("/xsl/myxsl.xsl");
    StylesheetRoot stylesheet = processor.processStylesheet(new
    XSLTInputSource(styleSheetUrl.toExternalForm()));
    Any help would be appreciated.
    Regards
    Tony

  • Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

    Hi,
    Our development team is trying to run a report on our report server through web application but they are getting the below error. Report Viewer both version 10 and 11 are already installed on our reporting server. 
    [System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
    File name: 'Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
    The files are in place in assembly folder 'C:\Windows\assembly' and DLLs are also in place in folder 'C:\Program Files (x86)\Microsoft Visual Studio 10.0\ReportViewer. 
    Can anyone please help us with this issue. 
    Thanks

    Hi Saurabh,
    This error means you're using the SQL Server Reporting Services ReportViewer control in your web application and the server can't find the proper DLL.
    Please check details information below to add the 'Microsoft.ReportViewer.WebForms.dll 10.0.0.0 to see if your problem will be resolved:
    Go to right click on project name to select the properties
    Check the References on the left and click "Add", then click Browse to the path "C:\Windows\assembly\GAC_msil" to select Microsoft.ReportViewer.WebForms.dll 10.0.0.0 , then click ok
    If above didn't help. please also the web.config file which path like:
    C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportManager
    C:\Program Files\Microsoft SQL Server\MSRS12.MSSQLSERVER\Reporting Services\ReportServer
    Please check to add below configuation:
    <system.web>
         <httpHandlers>
           <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    validate="false" />
         </httpHandlers>
     </system.web>
    Similar thread in below article for your reference:
    http://praveenbattula.blogspot.com/2010/03/fix-to-report-viewer-problems-in-iis-7.html
    User can not run a winForm with the ReportView Control
    Can not load Reportviewer
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Sending audio files through web service

    Hi,
    How can we send audio (mp3,wmv) files through web services ? i have tried making a byte array of the file and then sending the byte array through the web service, but it give OutOfMemory error. so is there any better and practical way of doing it ?

    Just read catalina.bat and find where $JAVA command is called, for NT it should be "%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% "
    "%_EXECJAVA% is java
    %JAVA_OPTS% and %CATALINA_OPTS% are enviroment parameter for java command. Just added one of them in your case.
    By the way, " i am using a HP PDA on the client side, so i cannot increase the JVM heap size there", you should info. the client, otherwise the client may be get "out of memory".

  • Error message on my development workstation: The system cannot find the file specified.

    Post Author: cseverin
    CA Forum: Crystal Reports
    Hi,
    I am currently developing an ASP.NET website using Visual Studio.NET 2005. I am using the .NET 2.0 framework, VB.NET as my programming language and I connect successfully to a SQL Server 2005 database.  I can select, insert, update and delete data from the database elsewhere in my project, so I know basic connectivity isn't an issue.  The problem seems to be with Crystal Reports. 
    I created a folder called 'Reports' in my project and added a Crystal Report file (OpenFiles.rpt) to it.  I designed the report and initally used a hard-coded SQL query as its datasource so I could quickly get the database fields onto the report and preview them.  All worked fine. 
    To make the report accessible to the rest of the website, I created an .xsd dataset file containing the three tables (and their corresponding tableadapters) that the report requires and then redeveloped the report using the dataset as the datasource for the report.  After doing this, the preview no longer worked.
    Next, I added a page to the website and dragged a Crystal Report Viewer Control onto it.  In the code behind the page I wrote:
    Option Strict On
    Imports System.Data
    Imports CrystalDecisions.CrystalReports.Engine
    Imports CrystalDecisions.Shared
    Partial Class Reports
         Inherits System.Web.UI.Page
         Private objOpenFilesreport As OpenFilesReport
         Private rptOpenFiles As ReportDocument
         Private strLastErrorMessage As String = Nothing
         Private errLastException As Exception = Nothing
         Dim strFileKey As String
         Dim strJurisdictionCode As String
         Dim strStaffId As String
         Dim strReportId As String
         Private Sub ConfigureCrystalReports()
              Dim reportPath As String = Server.MapPath("OpenFiles.rpt")
              Dim rptopenfiles As New ReportDocument
              rptOpenFiles.Load(reportPath)  <== I checked this during execution and the value correctly points to the OpenFiles.rpt file in the Reports     folder of my project
              Dim ConnectionInfo As ConnectionInfo = New ConnectionInfo()
              ConnectionInfo.DatabaseName = my database
              ConnectionInfo.UserID = login id of user
              ConnectionInfo.Password = user's password
              SetDBLogonForReport(ConnectionInfo, rptopenfiles)
              CrystalReportViewer1.ReportSource = rptopenfiles
         End Sub
         Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
             ConfigureCrystalReports()
         End Sub
         Private Sub SetDBLogonForReport(ByVal ConnectionInfo As ConnectionInfo, ByVal myReportDocument As ReportDocument)
              Dim myTables As Tables = myReportDocument.Database.Tables
              For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
                   Dim myTableLogonInfo As TableLogOnInfo = myTable.LogOnInfo
                   myTableLogonInfo.ConnectionInfo = ConnectionInfo
                   myTable.ApplyLogOnInfo(myTableLogonInfo)
              Next
         End Sub
    End Class
    I added a hyperlink to one of the existing pages on the website to navigate to this page with the report viewer on it.  When I run the website in Visual Studio and click on the hyperlink I get the following:
    Server Error in '/MyTest' Application.
    The system cannot find the file specified.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: The system cannot find the file specified.Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
    &#91;COMException (0x80004005): The system cannot find the file specified.
    &#93;
       CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +126
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +442
    &#91;Exception: Load report failed.&#93;
       CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +513
       CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +1378
       CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport() +149
       CrystalDecisions.CrystalReports.Engine.ReportDocument.get_DataDefinition() +85
       CrystalDecisions.CrystalReports.Engine.ReportDocument.get_ParameterFields() +158
       CrystalDecisions.Web.CrystalReportSource.BindControlParameter(Parameter parameter) +130
       CrystalDecisions.Web.CrystalReportSource.DataBindParameters() +191
       CrystalDecisions.Web.CrystalReportSource.EnsureParameters(Boolean forceDataBind) +90
       CrystalDecisions.Web.CrystalReportSource.LoadCompleteEventHandler(Object sender, EventArgs e) +47
       System.Web.UI.Page.OnLoadComplete(EventArgs e) +96
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4086
    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832 
    Any ideas, anyone?
    Also, assuming I can get past this error, I will need to figure out how to fill the tables in the .xsd dataset file.  I have written a class for the dataset that includes functions that populate the tables in the dataset from the database by executing SQL queries.  But how do I call these functions at the time the report is run?
    This is my first Crystal report written in .NET and I've been struggling with it for days now.  Any help would be most appreciated!
    Thanks very much!
    Chris Severin

    hello, the error message is obviously coming from one of the installed mcafee extensions. please directly contact mcafee technical support - they can likely give you more detailed guidance and are the only ones who can fix bugs or make necessary adjustments in the addon.

  • How to chage the welcome file in web.xml using creator?

    Hi guys,
    I want to set the welcome file in web.xml to index.html but every time I run my project in creator, creator replaces index.html by faces/index.jsp. I need the index.html to check if the browser enables cookies & javascript and then I redirect to index.jsp. If I change the web.xml in a common editor, build the war-file with ant and deploy the project with tomcat, everything is fine. but how can I change it in creator?
    thanks in advance

    Sorry, that doesn't make much sense.
    The XML you gave is a configuration file for txt2xml utility. It doesn't represent the output format.
    Are you a user of this utility?

  • App-v 4.6: cannot find the file specified

    Hi,
    Please see my previous
    post.
    In short: an application needs Internet Explorer activex, then a plugin for Excel. My App-v package is working (Internet Explorer opening), but the Excel plugin does not work. It says "cannot find the file specified".
    I copied the excel shortcut from start menu to q:\packagename.
    Please advise.
    J.
    Jan Hoedt
    In .osd file of Excel plugin, there is the following:
        <CODEBASE HREF="RTSP://%SFT_SOFTGRIDSERVER%:554/WindowsX64/Application/1.0/excelplugin.sft" GUID="9FA88591-089E-4E57-89D5-C23239E83238" PARAMETERS="" FILENAME="%CSIDL_PROGRAM_FILES%\Microsoft Office\Office12\EXCEL.EXE"
    SYSGUARDFILE="applic.001\osguard.cp" SIZE="305879730"/>
            <WORKINGDIR>%CSIDL_PROGRAM_FILES%\Microsoft Office\Office12</WORKINGDIR>
    The CSIDL_PROGRAM_FILES%, is that correct? If not, can I change it and how? Should I then reimport the package?
    I might have found a solution but please advise:
    http://blog.gridmetric.com/2011/09/26/possible-caveats-in-mixing-32-bit-and-64-bit-app-v-packages-and-environments/
    Office is x86, so I probably should change the %CSIDL_Programfiles% to %programfiles(x86)%?

    Changing CSIDL_PROGRAM_FILES to  %programfiles(x86)% is worth a try.
    A common reason for that 'cannot find the file..' error message also often can be resolved by removing the Workingdir entry (<WORKINGDIR></WORKINGDIR>  or just <WORKINGDIR/>.
    The way to apply the change depends on your deployment scenario. With an App-V Management Server (and for a test packae) you could modify (a copy of) the original .OSD file in the content share. Make sure you save with 'save as' and then 'Unicode'. Then
    re-initiate a Server Refresh from the client, that should download the new OSD.
    You also could - if it is permitted - create a copy of the client-local copy of the OSD file (you can figure that out with the Client Management Console). Double-Clicking that modified copy could do the trick.
    If you use another deployment method (SCCM, MSI) you would need to moify the OSD file using the App-V Sequencer.
    Whatever method you use during troubleshooting: For the 'final' pacage you should open the original package on the Sequencer ('Edit'), make the changes there and re-save + re-deploy the package. This makes sure that all information is consitent across the
    various App-V files
    Falko
    Twitter
    @kirk_tn   |   Blog
    kirxblog   |   Web
    kirx.org   |   Fireside
    appvbook.com

Maybe you are looking for

  • MacBook Pro C2D, Bootcamp, Windows XP Pro SP2, D-Link DWA-645 Driver

    I just did a test by installing the D-link DWA-645 drivers in Windows XP running under Bootcamp and connecting to the new AirPort Extreme 802.11n base station to see if I can get the higher speeds. I can confirm that the D-link driver does enable the

  • Is there any way to stop a remote wipe on iPhone 4 via iCloud?

    I lost my phone and thought it was stolen so i put a wipe on it, however it was offline so it is still pending. I just recently found my phone so i was wondering if there was a way to stop the pending wipe? THANKS FOR ANY COMMENTS!!

  • SPRY MENU BAR SUBMENUS-Showing up Under other Page Content

    Hello. I need help. My spry menu bar is showing up beneath content located in another div tag. My code is as below. <!DOCTYPE html> <html> <head> <!-- TemplateBeginEditable name="doctitle" --> <title>NEW TEMPLATE</title> <!-- TemplateEndEditable -->

  • Can't install Zen 3.2 sp3 on a NW5.1 sp7 Tree!!!

    I was never able to install 3.2 sp2 under NW5.1 sp5, so I hoped by going to sp7 and then finding the new Zen 3.2 sp3 I would actually get this **** sp installed. But no, yet again I get the message at the Tree screen saying:- ZfD 3.2 (ZENworks for De

  • Organizing classical music with itunes

    I am having trouble handling my classical music on itunes. I would like to be able to look up music by style and/or period (for example romantic, or renaissance) and then by composer, and then by instrument (for example oboe) and then by piece. I lis