Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 537127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:53:38+00:00 2026-05-13T09:53:38+00:00

I have searched this web looking for an answer, but it seems that this

  • 0

I have searched this web looking for an answer, but it seems that this time I’m not so lucky, so I am forced to ask. I apologize if it’s already answered (could not find it). And yes, English is not my first language, so I also apologize for my spelling mistakes, I try my best.

This is my problem, using Tomcat 5.5, Struts 1.3, JRE 1.5 and I’m using firefox 3.5.6.
In my jsp page I cannot seem to put any src="path/path" in my <script> I have tried deleting the src and all works well, but my project is going to need a lot of use from jquery and I do not want to copy/paste all the js file in every jsp.

This is my code:

<script type="text/javascript" src="js/jquery-1.3.2.js">
    function showMySelf(){
        alert("Hello World!");      
    }
(... plus other stuff code that actually uses jquery functions)
</script>

and the submit button:

<input type="submit" onclick="showMySelf()">

When I click the button, nothing happens (well it actually repaints the page) and when I delete the “src” tag from the script and add all the jquery code to the page it all works well.

I have tried putting another slash in the path as “/js/jquery-1.3.2.js” and returns an error.

I have tried using ResolveURL and it doesn’t seem to give me better results.

I have also tried changing the js file to another file (“generics.js” and “js.js”), I also tried with “js/*.js”.

Any of theese solutions have archived anything.

I have also tried using the struts tags (like html:submit) but it also did not work.

The path is actually right, since looking the code in my web browser gives me a link to the js file. So I suposse the browser knows were to look for my js file, it does not give me an error or a broken link to the file.

Any ideas of why this is happening?

Thank you all.

Random.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:53:38+00:00Added an answer on May 13, 2026 at 9:53 am

    You can not use a script element to load an external file and put code in it at the same time. You need to use two script elements:

    <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
    <script type="text/javascript">
        function showMySelf(){
            alert("Hello World!");      
        }
    (... plus other stuff code that actually uses jquery functions)
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched around, and it seems that this is a limitation in MS
I've searched for this a little but I have not gotten a particularly straight
Not a great title but I'm looking more for some guidance, have searched quite
I've have searched on this and it seems to be a catch all, unfortunately
I have searched on the web for software that batch convert image at different
I am a hacker not and not a full-time programmer but am looking to
I have searched the web for days now but I can't seem to find
I have searched high and low for this on this site and the web
I have searched but apparently my google foo is weak. What I need is
Some will object that this is not a programming question. I'm willing to defend

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.