Problem in Loading CSS and JS in strus

Hi,
I created an employee registration form using JSP. When I load the "Registration Form" That time my CSS and JS are working well.
Its works fine if all the fields are entered correctly then "sucess form is displaying". If I give wrong field entries after submiting the form. I am doing the server validation. If any field is missing or wrong I calling "fail" and forward to same employe registration form. When this form is loaded at that time my CSS and JS not working.
Please help me. my JSP page
<!-- JSP CODE -->
<%@ page import="modEmp.bisCommon.*,java.util.*,modLogin.bisCommon.*"%>
<%@ include file="init.jsp"%>
<%!
     ArrayList<String> list = new ArrayList<String>();
     ArrayList<String> list1 = new ArrayList<String>();
     String rec[]=new String[150];
     cBLabels cbl1 = null;
%>
<%
     for(int i=0;i<rec.length;i++)
          rec="";
cbl1 = new cBLabels();
     rec=cbl1.getLabels();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Employee Registration Form</title>
<script language="javascript" type="text/javascript" src="js-modEmp/addEmpval.js">
</script>
<script language="javascript" type="text/javascript" src="js-modEmp/datetimepicker.js">
</script>
<link rel="stylesheet" type="text/css" href="css-modEmp/styles.css">
</head>
<body onLoad="clearForm();">
<%
     try
          if (request.getAttribute("submit").equals("fail"))
%>
               <%@ include file="failure.jsp"%>
<%
     catch (Exception ex1)
%>
<%@ taglib uri="/META-INF/tlds/struts-html.tld" prefix="html"%>
<%@ taglib uri="/META-INF/tlds/struts-bean.tld" prefix="bean"%>
<html:form action="addemp.do">
<h2>EMPLOYEE REGISTRATION FORM </h2>
<h2 style="font-style: italic;">Personal Details</h2>
<%=rec[0]%>:      <html:text property="fname" size="20"/>      <%=rec[1]%>:      <html:text property="mname" size="20"/>
<%=rec[2]%>:      <html:text property="lname" size="20"/>      <%=rec[3]%>:      <input name="calc" id="demo1" type="text" size="20" disabled>Pick a date<html:hidden property="dob" />
<%=rec[4]%>:      <html:text property="mobileno" size="20"/>      <%=rec[5]%>:      <html:text property="emailid" size="20"/>
<%=rec[6]%>:      <html:text property="ftname" size="20"/>      <%=rec[7]%>:      <html:select property="gender"> <html:option value="male">Male</html:option> <html:option value="female">Female</html:option> </html:select>
<%=rec[8]%>:      <html:text property="nationality" size="20"/>
</html:form>
</body>
</html>
This is my strus-config.xml file
<struts-config>
     <form-beans>
          <form-bean
name="inputForm"
type="modEmp.bisVo.cVEmployee"/>
          <form-bean
name="searchForm"
type="modEmp.bisVo.cVSearchEmp"/>
          <form-bean
name="leaveForm"
type="modAttendance.bisVo.cVEmpLeave"/>
          <form-bean
name="loginForm"
type="modLogin.bisVo.cVLogin"/>
<form-bean
name="changepassForm"
type="modLogin.bisVo.cVChangePasswd"/>
<form-bean
name="empSalForm"
type="modSalary.bisVo.cVoUpdateEmpSal"/>
     </form-beans>
     <action-mappings>
          <action
path="/addemp"
type="modEmp.bisAction.AddEmpAction"
          input="/jsp-modEmp/addempform.jsp"
name="inputForm"
               scope="request">
               <forward name="success"
                    path="/jsp-modEmp/success.jsp"
                    redirect="false"></forward>
               <forward name="fail"
                    path="/jsp-modEmp/addempform.jsp"
                    redirect="false"/>
          </action>
</action-mappings>
     <!-- <plug-in className="modLogin.bisCommon.cBInitialise"></plug-in> -->
</struts-config>
Help me.....

Hi dude,
You can solve this using two ways...!
1. You can give the hard-core path (full path with the project name: /ProjectName/DirectoryName/JavaScriptFileName.js)
2. You can use request.contextPath() (to get the current context name)
Try this below code
<head>
<title>Employee Registration Form</title>
<script language="javascript" type="text/javascript" src="<%=request.getContextPath%>/js-modEmp/addEmpval.js">
</script>
<script language="javascript" type="text/javascript" src="<%=request.getContextPath%>/js-modEmp/datetimepicker.js">
</script>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath%>/css-modEmp/styles.css">
</head>

Similar Messages

  • I have a problem in loading programs And display my me Hazh message (Plase contact itunes support to complete this transaction)

    I have a problem in loading programs
    And display my me Hazh message
    (Plase contact itunes support to complete this transaction)

    You need to contact iTunes Support. There is a "Contact Us" link at the bottom right of every page of the forums.
    Best of luck.

  • I'm having all kinds of problems since loading Lion and I really wish I hadn't bought it yet. Even after the software update today, 1. my modem still won't work, 2. Photoshop Elements produces muddy photo prints, etc.  Anybody at Apple listening?

    I'm having all kinds of problems since loading Lion and I really wish I hadn't bought it yet. Even after the software update today, 1. my modem still won't work, 2. Photoshop Elements produces muddy photo prints, 3. View preferences in windows don't hold,  etc.  Anybody at Apple listening?  Anybody else out there having these kinds of problems?

    10.7 was horrible unstable so I waited until 10.7.1 and tried it again. Well I have to say that it is still a defective OS. I am reverting to Snow as we speak from my carbon clone copy.. This is really the worst OSX I have ever used. It gives me random Kernel panics for no reasons, unstable airport and hundreds of small issues that are just not necessary. For instance I can't use QuickTime in Lion to trim a videoclip ( the UI goes mad and the trimslider becomes inoperable and hangs the Player window ) while in Snow it is no problem. Itunes gives me crackling sound when the equalizer is turned on, Graphical glitches in Photoshop, games crashing, Preview.app not working with some pdfs, so I need Adobes reader which I never used before.. It is definately not ripe for mass usage. Might 10.7.2 or 10.7.3 fix it, but not yet.
    * and just for the records : the hardware is absoltely ok. Because in Snow it works as it should. ( So many Lion fanbois are talking : "your Ram is defect", defintely NOT. - Lion is defect! ).
    Shame on you Apple.
    Message was edited by: Sjazbec

  • Problem while loading texts and authorization objects file in RAR

    Hi all,
           i am getting internet explorer error while loading the texts and authorization objects text files in RAR .actually we uploaded rule file before this,does this step causes any error ?if so how to resolve this error.do i need to remove all rules/risks and then load text and authorization files? is there any shortcut to renove all risks generated in one shot? please reply me soon to resolve this.
    Thanks,
    Joseph.

    Hi Joseph,
    Please make sure to convert both the files in UTF-8 encoding format and then try to upload the files again. This should resolve the issue and if not then please paste the logs here.
    Regards
    Harleen

  • Load balancing and RFC problem

    Hi!
    I have a problem regarding load balancing and RFC's. We use the follow function in librfc32.dll (from VB6) for RFC calls: RfcOpenExt It's working fine no problem, but from now on we will have to use the this funcion due to load balancing: RfcOpenExtV3
    The only difference between the two functions is the parameters. RfcOpenExtV3 has 5 additional parameters:
    intLoadBalance1, strLbHost1, strLbSysName1, strLbGroup1, intSapGui1
    I asked our tech guys for the details so that I can set up the parameters (double check everything) and the RfcOpenExtV3 doesn't working. Return value is zero.
    Have somebody faced with this issue before?
    Thanks in advance!

    Hi,
    1. Probably this  link may help.
    [http://help.sap.com/saphelp_nw04/helpdata/en/22/042f18488911d189490000e829fbbd/content.htm]
    Especially see the function parameters on this page,
    which are the bottom.
    regards,
    amit m.

  • Problem loading variables and controls in Workshop 8.1 (Beta) Palettes

    Hi All,
    I am getting problem in loading variables and control in the Workshop Data and
    Control Palette at times when I open the application. The Workshop interface shows
    the variable at times and does not show up at all on another instance. Let me
    know if anybody else has faced a similar problem or not

    Akshay,
    Please post this question in the Workshop 8.1 Beta Newsgroup.
    weblogic.developer.interest.81beta.workshop
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Akshay Aggarwal" <[email protected]> wrote in message
    news:3e9107da$[email protected]..
    >
    Hi All,
    I am getting problem in loading variables and control in the Workshop Dataand
    Control Palette at times when I open the application. The Workshopinterface shows
    the variable at times and does not show up at all on another instance. Letme
    know if anybody else has faced a similar problem or not

  • Error loading CSS

    Using IE 7.0.5370.13. Cannot use Buzzword. After login and
    open Buzzword, then when select new file or load any new page,
    receive "Error loading CSS" and big white box appears.
    Thanks.

    Hello Steven,
    Have you ever been able to use Buzzword? This might be a
    flash problem, can you tell us what version of flash you are using?
    Are you able to upgrade your flash to the latest version? When did
    this problem begin, and were any changes done to your system around
    this same time?
    Thanks!

  • In fire fox and google chrome CSS and images are not loading

    I am facing problem with jrun, In IE-8 application is working fine, but in FireFox and Google chrome CSS and Images are not loading.
    in fire fox and google chrome requests are Aborted.
    thanks
    Ashok Gadiparthi.

    Check if Style Resource Readers SharePoint group has permissions on the site, permissions to the style library and make sure that this library provides Style Resource Readers with restricted read.
    If you don't see Style resource readers on the site, go to that library and set that permission.  you could also just load your installation media to a folder, and execute on setup.exe, select repair option.  This second option of the installation
    media is the cannon vs. flyswatter approach though, but it will work
    Stacy Anothersharepointblog.blogspot.com

  • Css and images are not loading in SharePoint website

    Scenario:-
    System Configuration- Windows server 2008 R2, SharePoint Designer 2010, SP server 2010 all are in Local Machine.
    1. I had reset the Windows server 2008 R2 password and opened SharePoint Designer 2010.
    2. Opened previous working site and found error- services unavailable- HTTP Error 503. The service is unavailable
    3. For this issue, I reset  (as I reset for windows server) the Identity password in App pool for "SharePoint Central Administration v4" application.
    4. The error "Service Unavailable" got vanished.
    But encountered new problem - .css and images are not loading. 
    5. I re run "Product Configuration wizard" with below steps:-
    A) Do not disconnect from this server.
    B) No, this machine will continue to host the website
     Still Problem persisting.
    What tried:-
    1. Resetting IIS Server.
    2. Restarted SharePoint Admin Services from "Service window".
    3. Recycled App pool.
    Just do let me know for further information.
    I have Checked so may forum and sites but no solution :(
    Looking for excellent resolution :)

    Check if Style Resource Readers SharePoint group has permissions on the site, permissions to the style library and make sure that this library provides Style Resource Readers with restricted read.
    If you don't see Style resource readers on the site, go to that library and set that permission.  you could also just load your installation media to a folder, and execute on setup.exe, select repair option.  This second option of the installation
    media is the cannon vs. flyswatter approach though, but it will work
    Stacy Anothersharepointblog.blogspot.com

  • Problem loading css or js file

    Hello,
    I am relatively new in java and I am trying to do a simple CRUD with Servlets and JSP. I am working with netbeans 8, and I have a Servlet that call the JSP pages.
    When I run the application, Servlet call a login.jsp and if validation is true, then it call index.jsp
    The problem occurs when one jsp page want to load a css file, then jsp page doesn't load the css file!
    I tried debugging with firebug page, but I don't found the problem.
    Some idea because this malfunction?
    I paste part of code of servlet:
    @Override
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            String accion = request.getParameter("accion");
            HttpSession sesion = request.getSession();
        if (accion != null) {
                if (accion.equals("login")) {
                 logger.info("doGet - Login");
              setRespuestaControlador(accion).forward(request, response);
           else if (accion.equals("inicio")) {
                 logger.info("doGet - inicio");
              setRespuestaControlador("index").forward(request, response);
               else if (accion.equals("insertIngEgr")) {
                 logger.info("doGet - insertingegre");
            setRespuestaControlador(accion).forward(request, response);
         else {
             setRespuestaControlador("login").forward(request, response);
                 logger.info("doGet - login por else");
            try {
           con.close();
        catch (SQLException e) {
            // Enviar a una vista de error
             logger.log(Level.SEVERE,"Error al cerrar conexion: " + e.getMessage());
        @Override
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
            String accion = request.getParameter("accion");
            HttpSession sesion = request.getSession();
            if (accion != null) {
           if (accion.equals("iniciarSesion")) {
              String usuario = request.getParameter("usuario");
                  String contrasena = request.getParameter("contrasena");
              Login login = new Login(con);
              if (login.login(usuario, contrasena)) {
                     logger.info("dopost - iniciarsession");
                     sesion.setAttribute("id", new AdministradorDao(con).obtenerIdAdmin(usuario));
             setRespuestaControlador("index").forward(request, response);
              else {
                 logger.info("Error de login");
                     // genera una variable error
                     request.setAttribute("error", "Nombre de Usuario o Contraseña Incorrecta !");
                     // reenvia al formulario login                 
                     setRespuestaControlador("login").forward(request, response);
        else {
                logger.info("dopost - login por que se yo");
            setRespuestaControlador("login").forward(request, response);
        try {
           con.close();
        catch (SQLException e) {
            // Enviar a una vista de error
             logger.log(Level.SEVERE,"Error al cerrar conexion: " + e.getMessage());
    And part of jsp view that doesn't load css file:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <link href="../css/jquery-ui.css" rel="stylesheet" type="text/css">
            <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
            <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
            <script type="text/javascript">
                $(document).ready(function() {
                    $("#fecha").datepicker({
                        dateFormat: 'dd/mm/yy',
                        dayNamesMin: ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sa'],
                        monthNames: ['Enero', 'Febrero', 'Martes', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre']
            </script>
        </head>
        <body>
    I appreciate your willingness and time!
    Fernando

    Hi dude,
    You can solve this using two ways...!
    1. You can give the hard-core path (full path with the project name: /ProjectName/DirectoryName/JavaScriptFileName.js)
    2. You can use request.contextPath() (to get the current context name)
    Try this below code
    <head>
    <title>Employee Registration Form</title>
    <script language="javascript" type="text/javascript" src="<%=request.getContextPath%>/js-modEmp/addEmpval.js">
    </script>
    <script language="javascript" type="text/javascript" src="<%=request.getContextPath%>/js-modEmp/datetimepicker.js">
    </script>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath%>/css-modEmp/styles.css">
    </head>

  • Problem with loading and unloading external swfs

    Hello Forum,
    I'm pretty new to as3, and it's giving me a great challenge. I have a large number of captivate files that I want to play inside a simple container built in CS5.5... but switching back and forth between all the movies hogs the memory like crazy, so I need something to clean it up. All code is in a single frame on the main timeline. First, I create the loader:
    var FlashLoader:Loader = new Loader();
    var flashUrl:URLRequest = new URLRequest("placeholder.swf");
    FlashLoader.load(flashUrl);
    addChild(FlashLoader);
    The actual movies are located via an XML... but as I said the memory problem is huge, so I tried to build something to get rid of that. Ideally, I want the loader to clean up everything and start life anew with a single mouse click, like so:
    function _mouseClickHandler2(event:MouseEvent):void {
              FlashLoader.unloadAndStop();
              FlashLoader.parent.removeChild(FlashLoader);
              FlashLoader = null;
              var flashUrl:URLRequest = new URLRequest(event.target.href);
              var FlashLoader:Loader = new Loader();
              addChild(FlashLoader);
              FlashLoader.load(flashUrl);
              FlashLoader.x = 120;
              setChildIndex(FlashLoader,0);
              trace(FlashLoader.parent.numChildren);
    //          System.gc();
    //          System.gc();
    //          try {
    //                    new LocalConnection  .connect('gc');
    //                    new LocalConnection  .connect('gc');
    //          } catch (e: * ) {
    //          trace(getMemory ());
    //trace(event.target.href);
    //trace(event.target.text);
    Upon clicking on the menu (and thus switching movies), I get the following error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at Treeview_working_fla::MainTimeline/_mouseClickHandler2()
    And this doesn't make sense to me. The FlashLoader is given a placeholder swf at the beginning, so why would the FlashLoader inside the function be recognized as having a null object reference?
    Thanks in advance

    In my quest to tackle this problem, I've decided to try and isolate the problem, and have made a simple "click to load, click to unload" when I stumbled upon a curious problem. The movie loads fine, and the UNLOAD function upon mouseclick also works perfectly. However, upon clicking again to activate RELOAD, it gives the error "No active security context" and refuses to load the same exact swf with the same exact path that successfully loaded the first time!
    import flash.events.MouseEvent;
    import flash.display.Loader;
    import flash.net.URLRequest;
    var FlashLoader:Loader = new Loader();
    var flashUrl:URLRequest = new URLRequest("folder/subfolder/movie.swf");
    FlashLoader.x = 120;
    FlashLoader.load(flashUrl);
    stage.addChild(FlashLoader);
    stage.addEventListener(MouseEvent.CLICK, UNLOAD);
    function UNLOAD(event:MouseEvent) {
              flashUrl = null;
              stage.removeChild(FlashLoader);
              FlashLoader.unloadAndStop();
              stage.removeEventListener(MouseEvent.CLICK, UNLOAD);
              stage.addEventListener(MouseEvent.CLICK, RELOAD);
    function RELOAD(event:MouseEvent) {
              var FlashLoader:Loader = new Loader();
              var flashUrl:URLRequest = new URLRequest("folder/subfolder/movie.swf");
              FlashLoader.x = 120;
              FlashLoader.load(flashUrl);
              stage.addChild(FlashLoader);
              stage.removeEventListener(MouseEvent.CLICK, RELOAD);
              stage.addEventListener(MouseEvent.CLICK, UNLOAD);

  • Cannot directly open the browser from the icon. "problem loading webpage" and "timed out" are the messages. Access was accomplished by using yahoo messenger and opening my email. if I attempt to open a new page, I recieve the aforementioned warnings.

    no link to open access to the internet. I used Yahoo Messenger, clicked on the 'mail icon' and since Firefox is my default it opened and I was able to continue from there. If I try to click File, open New Page, I get the "problem loading webpage" and "connection timed out" messages

    changed my homepage to Yahoo. Now Firrefox works but still cannot access ANYTHING 'Google"!

  • I have a problem with my mac, lit with blank screen loading bar and then goes out, I need assistencia on line or contact the Technical Support Service in Argentina

    I have a problem with my mac, lit with blank screen loading bar and then goes out, I need assistencia on line or contact the Technical Support Service in Argentina

    Priscilla,
    if your Mac is still in warranty, then you should contact the Argentinian technical support service. If it is out of warranty, then we can try to lend a hand. (We’re just fellow Apple product users here.)

  • Facing the problem in loading the applet in mozilla, Firefox and netscape

    Dear sir,
    Well I am facing the problem regarding loading of applet in firefox,mozilla and netscape. Its working fine in IE6 I have the samplecode which asks for jdk1.4 whenever the applet gets loaded in IE6 and also it works fine for every browser but he is asking jre for every time whenever the page gets loaded even if the jre is installed. I need a code such that it should ask only if the jre is not installed. One more thing is it so that for mozilla or netscape the jre installation files are different.
    pls give the solution.
    Well I am also facing the problem like when I load login page of my applicatoin in netscape or firefox
    I provided the buton on login page on which the hyperlink is present, the hyperlink is of servlet path when I click on the same it shows me the blank page instead he should forward the page to the next jsp webpage where I am showing the applet. But it works fine in IE versions and opera but not in the others.
    Awating for your reply.
    Rgs
    sumeet.

    Issue resolved with the help of ABAP.
    Regards
    Bijudas

  • I try to go to certain websites that I've had no problem going to before, and suddenly, it says, "Page cannot complete because the server is loading in such a way that it will never complete." I've tried erasing my cookies, and it still persists. Help!

    I tried going to a site that I've never had problems loading before, and suddenly it says, "Page cannot load because the server is loading in such a way that it will never complete." or something along those lines. I've tried clearing my cookies, but the problem persists. Help!

    If clearing the cookies doesn't help then it is possible that the file <i>cookies.sqlite</i> that stores the cookies is corrupted.
    Rename (or delete) <b>cookies.sqlite</b> (cookies.sqlite.old) and delete <b>cookies.sqlite-journal</b> and <b>cookies.txt</b>, if they exist, in the Firefox Profile Folder in case the file cookies.sqlite got corrupted.
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder

Maybe you are looking for

  • Possible to link the two tables?

    Dear All, I am currently trying to create a report where the user will enter in the customer code and then using discounts on item groups to create a sales price (list price - customer discount = sales price). I'm currently trying to do this in cryst

  • Reservation is created for item category N

    Hi friends, While attaching the material to activity in Cj20n, Reservation is created for that material but the thing is that it ia a non stock material and also I done default item category as N (non stock item) in T.ID OPS8 and attached it to netwo

  • Can i get rid of ios6 on my iphone 4s

    Can I get rid of ios6 on iphone 4s?

  • IPod showing wrong podcast number

    In iTunes (Windows), when I go to my iPod (Shuffle 4th generation), switch to "Podcasts" and tick "Sync Podcasts" with the default settings "Automatically include all episodes of all podcasts", it says "1 episode" on the right of "Sync Podcasts", tho

  • Can't create 8i database

    I have just installed Oracle 8i Enterprise on a Windows 2000 machine using all defaults for a typical installation. At the end of the installation, Net8 is successfully configured and then I follow the prompts for the creation of a database. It error