Struts 2 external js file
hey,
I have a problem in invoking methods in an external js file. I'm using struts 2 in eclipse.
the jsp page is in WEB-INF\jsp\view and the js file is in
WEB-INF\jsp\view\js\
Following is my code;
<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<html:base/>
<script language="javascript" type="text/javascript" src="js/map.js"></script>
<body class="oneColElsCtr" onload="init()">but the init() never seems to be invoked!
I'm new to struts and it would be great if some one can help me
thanks in advance!
This is not the Struts problem but rather the location of You js folder. Folder with JavaScript scripts should be placed on the same level as WEB-INF directory. As evanfets said: "Anything under the WEB-INF directory is not directly accessible by the client. Nothing under WEB-INF can be downloaded." When You put your js folder in the same folder as WEB-INF (this is web root) it should work. To import js file use:
<script type="text/javascript" src="../js/script.js"></script> on the main jsp site (path to script should be considered).
Similar Messages
-
Problem validating XML file with external schema file
Hi All
I am having trouble at the moment trying to validate an xml file using an external xsd file that sits on my server. I have followed the basic option but at the moment to no avail. I am using a DOMParser and am setting all the features and properties correctly ... well I think I am anyway.....below is a fragment of the code
DOMParser parser = new DOMParser ();
// Setting the validation on for the parser.
parser.setFeature ( "http://xml.org/sax/features/validation", true );
parser.setFeature ( "http://apache.org/xml/features/validation/schema", true);
parser.setProperty ( "http://apache.org/xml/properties/schema/externalnoNamespaceSchemaLocation", "c://testing.xsd" );
parser.setErrorHandler ( this );
I am getting an error telling me that the root element cannot be found.....see below
org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'mainhome'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNamespaceBinder.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at com.cibenix.aps.util.MenuXMLParser.process(MenuXMLParser.java:163)
at com.cibenix.aps.actions.MenuAddAction.execute(MenuAddAction.java:80)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666)
Any help would be greatly appreciated
thanksIn the schema root element xs:schema add namespace declaration.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
In the XML document root element add xmlns:xsi and xsi:noNamespaceSchemaLocation attributes.
<root_element xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file://c:/testing.xsd"> -
External Drive Files Not Showing Up on Mac but files do shows Up on PC
External Drive Files Not Showing Up on Mac but files do shows Up on PC
i had the Ex HD for about 3 years running smoothly on my mac but recently everything disappeared. plunged it into a pc to see if it read my files and it did. what can i do? to make it work on mac again. i don't want to reformat that drive because i have important applications (DMG) and other zip photo video files in the drive.yes. i did.
...i have tried "verify" & "repair" but they didn't pass the san test. and when i "unmounted/mount" a error message popped up say that there is a application running off the drive but there nothing (i see) running, to close all activity -
How can I find Bitlocker External Key File location?
My Windows 8.1 PC includes a system drive and data drives. All the drivers were encrypted using Bitlocker with the data drives set for autounlock.
I recently decrypted the system drive (without decrypting the data drives) and reinstalled the OS, after which my data drives required the Bitlocker recovery key to unlock.
However, I had "backed up" the recovery keys to my Microsoft account but now I can find only the recovery keys for the system drive. The recovery keys for the data drives cannot be found on my Microsoft account.
I have tried to use the "manage-bde" command at the console to obtain the recovery password but I am only getting the Numerical Password ID and the External Key File Name. Can anyone provide advice on how I can retrieve the passwords or the
External Key File location?
Thanks.Hi Ridgewood,
As my point of viewer, the BitLocker Automatic unlock volume is also protected by BitLocker Disk Encryption. The user encrypted information is stored in the registry and volume metadata. After a user unlocks the operating system volume, BitLocker uses the
encrypted information to unlock the data volume automatically.
After the reinstallation of the system, the encrypted information is lost and BitLocker can’t unlock the data volume automatically.
Every volume has own recovery key.
As mentioned in your post, the data drive require the recovery key to unlock.
I suggest you to double-check the OneDrive and try to find out where did you store the recovery key.
If you can’t find the recovery key, we can’t help you to decrypt the data volume.
Best regards,
Fangzhou CHEN
Fangzhou CHEN
TechNet Community Support -
Need advice on retrieving Bitlocker Key or External Key File Location
My Windows 8.1 PC includes a system drive and data drives. All the drivers were encrypted using Bitlocker with the data drives set for autounlock.
I recently decrypted the system drive (without decrypting the data drives, <very bad>) and reinstalled the OS, after which my data drives required the Bitlocker recovery key to unlock.
However, I had "backed up" the recovery keys to my Microsoft account but now I cannot find them.
I have tried to use the "manage-bde" command at the console to obtain the Recovery Keys but I am only getting the Numerical Password ID and the External Key File Name. Can anyone provide advice on how I can retrieve the recovery passwords
or the External Key File location?
Before I had set the data drives to autounlock I had used a recovery password to unlock the drives. However, now when I try to unlock the data drives only the recovery key (which I don't have) is being requested not the password.
Thanks.Hi HMcBean,
How did you back up the BitLocker recovery key? To local computer, flash driver or Microsoft account?
If you backed up the recovery key to a Microsoft account, please refer to the following article to find it.
http://windows.microsoft.com/en-us/windows-8/bitlocker-recovery-keys-faq
Best regards,
Fangzhou CHEN
Fangzhou CHEN
TechNet Community Support -
Mixing external wave file into video
I've recorded a video including sound of a mandolin being played. At the same time I recorded the sound with my external recorder which resulted in a wave file of better quality that the sound from the camera. I would like to import the video and the externally recorded wave file into a project, line up the external wave file with the sound recorded by the video camera and then delete the sound recorded with the video camera so I end up with a video that has the sound from the external recording system. Any recommendations on a good approach to accomplishing this task?
There's information here about how to use the new merged clips features in Premiere Pro CS5.5 to merge the audio from an external source with the video from the camera.
-
Hello Everyone,
I am new to SAP Design Studio. I am working on creating dashboards and I am using Design Studio 1.2 version. Please suggest some solutions for the following issues. Thanks in Advance.
1. External CSS file which is embeded using custom CSS option under "application component properties" is not working.
* I kept the external CSS file inside repository-> my application folder.
2. During runtime, getting javascript error while selecting '-' option from filter panel.
3. Unable to select or type dimension name under "dimension filer component" properties.
4. Getting runtime error for dropdown list, and I have inserted the following code under "onStartup" option of Application component properties.
"DROPDOWN_1.setItems(DS_1.getMemberList("PRODUCTREF", MemberPresentation.INTERNAL_KEY, MemberDisplay.TEXT, 20));
and dimension values are not populated in auto suggest."There should be an Error Log under View > Error Log that gives you more details of these errors. Could you add that? There is also a View > Script Problems log that provides more details as well.
-
Find Change through external text file
Hello folks
I am bit pretty in InDesign scripting so could you please look into this.
How can i change any particular text field in Indesign CS3 document from text file.
I do have find change script but for each InDesign document specific text file is assigned.
So each time i have to modify find change GREP property that is also repetetive of work. Is there any way to get find change information should be extract from external text file.
Many Tanks in advanceIn the FindChangeByList script, you could customize the function myFindFile(myFilePath) {...} as to search the FindChangeList text file in the document location rather than the script location. That's an example. The question is: given a document, where will you have the corresponding FindChangeList?
@+
Marc -
How to load and unload more than one external swf files in different frames?
I do not have much experience on Adobe Flash or Action Script 3, but I know the basics.
I am Arabic language teacher, and I design an application to teach Arabic, I just would like to learn how to load and unload more than one external swf files in different frames.
ThanksLook into using the Loader class to load the swf files. If you want to have it happen in different frames then you can put the code into the different frames.
-
How can I set connection to external XML file with Dreamweaver to buiild AIR app?
Hello,
I try to do simple AIR app in dreamweaver. It's not problem
to use static data. But I'd like to use dynamic data from external
XML file. I try to use Spry and evrything works fine in web browser
but i have problem with loading external XML data into my app in
AIR. Can I simply transform my spry based html app into AIR?
What should I add to do this?
PawelDaniel Lichtenwald wrote:
What are the requirements and steps for arranging to receive this large file using File Transfer Protocol (FTP)?
Usually, we don't speak of "receive" when using FTP, since the file is transferred from server to client, so it's more of a case of "download".
At your end, it's simple. You use an FTP client; under SL, that includes Finder and Safari, so you don't even need to get any additional software.
At the other end, it's more complicated; the 'sender' must set up an FTP server on his machine.
Alternatively, you can set up your own Mac as an FTP server, and have the 'sender' connect to you with an FTP client and upload the file; but, if your Mac lives behind a router, then you have more work to do with the router settings.
That's why it's much easier to use the file sharing services mentioned above -- if they are available in both sender's and receiver's locations. (Keep in mind that some countries block access to all those mentioned -- except perhaps <www.transfer.ro>, of which I know absolutely nothing.) -
FAQ: How do I load an external SWF file into a parent SWF file?
A ton of Flash users visit Adobe’s we site every month wondering about how to load an external SWF file from within another SWF.
Adobe's own TechNote on the subject attempts to answer the basic question, along with some common follow-up questions, including:
How do I load more than one SWF?
How do I load a SWF into a specific location in the display list?
How do I resize the loaded SWF?
How do I set its X and Y location?
Here are some additional resources that elaborate on loading content and on working with the display list:
Sample files for the above TechNote. A set of 3 FLA and 3 corresponding SWF files, including a parent SWF and 2 SWFs that the parent loads.
Help > AS3 Developer’s Guide > Loading an external SWF file
Help > AS3 Developer’s Guide > Loading display content dynamically
Loading multiple external SWFs within a main SWF – CreativeCow.net forums
Video tutorial: ActionScript 101 – Episode 6: Adding named objects to the Stage. By Doug Winnie. An example of how to add the loaded external asset to the Stage and modify its location or other properties.
Video tutorial: Preloading in ActionScript 3.0. By Lee Brimelow. A slightly more complicated example, showing how to make the parent SWF display information about the progress of loading the external SWF.
Tutorial: Loading and unloading SWFs - FlashAndMath.com
This article provides several examples of how to communicate between a parent SWF file and the loaded SWF:
SWF to SWF Communcation via ActionScript 3.0 (by kglad)quote:
Originally posted by:
NedWebs
You now seem to want to get rid of the swf once it has loaded
and played itself thru. To do that you would need to have something
in the swf itself that triggers its removal in its last frame. The
following might work...
MovieClip(this.parent).removeChild(this);
Unfortunately I couldn't get this to work. I placed it on the
last frame of the SWF to be called - is that right?
I am not sure I am doing it correctly... -
Hello, I have two questions on time capsule I can only have it on my external hd files and free up my internal memory to my mac I can use an external hard drive, in my case a lacie rugged as shared memory for my two computers
I have a mackbook pro and an iMac if I buy a time capsule 2tb airport, I can use it with time machine and what would be the best way to use it.
There is no particular setup required for TM.. both computers will create their own backup sparsebundle which is like a virtual disk.. Pondini explains the whole thing if you read the reference I gave you.
and how to use time capsule airport whit other external hd to use my old lacie airport with the new time capsule
Up to you.. you can plug the external drive into the TC and enjoy really slow file transfers or you can plug it into your computer and use it as external drive.. which is faster than the TC.. and TM can include it in the backup.
Again everything is explained in the reference.. you are not reading it. -
How do I find the width of an external swf file that I am loading in
I have loaded in an external swf file and it works fine.
However, when I get the width dimensions of the movieclip that is housing the external swf file it gives me a '0' for the width.
Thanks for your time.you must wait until loading is complete before trying to access the loaded objects width. at that point you can determine the width,height of the onstage/backstage objects in frame 1 of the loaded swf.
-
Add one character at a time from External Text file
Hi,
I'm using Flash 8, and I have created a standard Dynamic
field that pulls the text from an external text file using the
LoadVars function and it works fine.
To get the correct effect for the design, I would like to be
able to create the illusion that the characters are being typed out
when the page loads as if someone has started typing and also hear
the "Typewriter Clack" each time a character appears.
The only place I have found an example is on the Syphon
Filter Game website which seems to have created the illusion
perfectly:
http://www.syphonfilterdarkmirror-thegame.com/en_IE/
(Check out the bottom right section)
I could create a Movieclip and add a character each frame
but, I would like to be able to edit the text when required via a
text file or even ASP or PHP if neccessary.
Any help would be grateful.
Cheersor here:
http://www.actionscripts.org/tutorials/beginner/Scripted_Typerwriter/index.shtml -
Is there a way to import Raw files into LR catalog ..including..any edits performed in an external raw file editor such as Capture One?
I can import the Raw file successfully but cannot see any edits that were applied in Capture One. Im assuming no but just checking.Your assumption is correct, Capture One, Lightroom and other third party raw processors have their own proprietary processes and profiles for rendering the raw data.
They do not make permanent changes to the raw data and store the changes to an .xmp file or to a catalog file like Lightroom.
Maybe you are looking for
-
Is there a way to modify Incase Mini Car Charger so it will fit into iPhone 5s in a case?
I should have read the reviews in the Apple Store before buying the Incase Mini Car Charger before I bought it: the material around the lightning connector is much thicker than that in the Apple cable (which broke after not much use) and won't fit in
-
Hi All, I've successfully installed Oracle8i EE version 8.1.7 on RedHat Linux 7.2. However, I have NOT had much luck installing Oracle 9i version 9.0.1 on RedHat Linux 7.2. I am wondering if anyone in this forum has any luck installing Oracle 9i on R
-
Is there a dvorak keyboard option rather than just a QWERTY keyboard?
So I've been recently trying out the dvorak keyboard settings since i've heard that its faster and easier to type. I wanted to see if the itouch has it but was disappointed to see that it does not. I've also got the 3.0 software and it doesn't have i
-
I am getting below error when I running this code regsvr32 AppHostNavigators.dll The module "AppHostNavigators.dll" failed to load. Make sure the binary is stored at the specified path or debug it to chec k for problems with the binary or dependent.D
-
Execute a sheel script (that is login to sqlplus and do some query) by ssh
I have two unix box. lets say...box1's ip is : a.b.c.d and box2's ip is : w.x.y.z We have shared the public key by "ssh-keygen -t rsa" in both the box so that it will not prompt password for ssh connection. Now, in the 2nd box I wrote a shell script