Using window.alert in a jsp file

I am creating a website, when a user is found invalid I want to display an alert. The code is below
    if( invalid )
         window.alert( "Invalide user" );
         response.sendRedirect( "login.jsp" );
   }  The problem is that window.alert is not working, Please tell how to solve this problem.
Thanks

You need to distinguish between the serverside Java programming language and the clientside Javascript scripting language. Those are two completely different languages. The alert() is a Javascript function, not a Java class/method.

Similar Messages

  • I have an iPad 2 and iPhone 4 and for them I use I cloud I have also 1 pc windows and at work place I use windows pc ; until now my files are stored on an external disk drive could' I use iCloud to perform the backup of my external disk drive ? Thanks

    I have an iPad 2 and iPhone 4 and for them I use I cloud I have also 1 pc windows and at work place I use windows pc ; until now my files are stored on an external disk drive could' I use iCloud to perform the backup of my external disk drive ? Thanks
    Loredano

    These are the options you have.
    Budget $1299.
    http://www.apple.com/macbookair/
    http://www.apple.com/macbookpro/
    Best.

  • Can i use windows migration assistant to transfer files from my windows formatted external hard drive to my mac?

    I have a windows formatted external hard drive and a macbook pro. I was wondering if i could use the windows migration assistant to transfer files from my external hard drive to the mac

    No.
    Just connect the drive to your Mac. The Mac can read most Windows formats (it cannot WRITE Windows New Technology File System (NTFS) formatted drives.

  • How to use Windows SIM to create answer files for 32-bit (x86) Windows 7 from a 64-bit (x86_64) Windows 7 PC?

    So I'm having the old 32-bit/64-bit compatibility issues with Windows SIM. I have a Windows 7 64-bit PC (actually a virtual machine) that I intend to use to run Windows SIM and make answer files for 32-bit Windows 7 unattended installations.
    I've installed the latest Windows ADK (the Win 8.1 one). When doing this there was no choice of download or prompt during installation regarding 32-bit or 64-bit architectures. Once installed the Windows Kits folder is under Program Files (x86), but imgmgr.exe
    is a 64-bit executable. When I try and generate the catalog for a 32 bit install.wim, I get an error that 64-bit SIM cannot catalog 32-bit images.
    Is there any way to install a version of Windows SIM on a 64-bit Windows 7 PC that can catalog 32-bit Windows 7 images?

    Hi,
    I think the biggest problem is the architecture specific in answer file:
    <settings pass="specialize">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <OEMInformation>
    <Manufacturer>[ REPLACE WITH COMPANY NAME ]</Manufacturer>
    <SupportURL>[ REPLACE WITH SUPPORT WEBSITE ]</SupportURL>
    </OEMInformation>
            </component>
        </settings>
    The answer file must include processor-specific components. The answer-file settings in the windowsPE configuration pass must match the architecture type of the preinstallation environment. The settings that apply to the Windows image must match the architecture
    type of the image. For example, if you create an answer file that deploys 64-bit images from a 32-bit preinstallation environment, all components in the answer file for the windowsPE configuration pass must include the processor attribute type of x86. Settings
    to be applied in the specialize, oobeSystem, or other configuration passes must include the processor attribute type of amd64.
    If you have any feedback on our support, please click
    here
    Alex Zhao
    TechNet Community Support

  • How can I use a applet in a JSP file?

    hi
    I failed to use applet in a jsp file.My workspace is a BC4J type. I put the applet's source file in business component project.the jsp is in JSP project.
    The jsp file calls applet by <jsp:plugin></jsp:plugin> style.
    The error is can't find the applet class.
    why? Thank someone for give me help.

    Actually using jsp applet tags does not mean that it is taking care of that the classes are available. It simply renders the Applet tag tothe JSP page. If e.g. teh codebase is specified as /java/, then there should be a mapping to the Java class location with thename of /java/. If codebase is not provided, then the Java class must be in the classpath of the JSp servlet.
    Frank

  • Problems using windows media player to transfer files to zen x

    All 9gs of my music is stored in windows media player music library.transferring it to zen xtra has caused many cds arriving at player with wrong content under different artists and some songs copied many times over. Is there a known conflict using windows player and zen xtra?I would use mediasource but my cds imported to ther interface with many not identified even thogh all my music was clearly labeled with artist, title and gnere in windows music library.Any help would be great. I cant get my 9gs of music into the zen without content mess u
    ps.
    thanks matt

    I, for one, am incredibly dissapointed in the portable file aspect of this player. i work in a PC store and we sell the Zen Touch , i also received one for christmas. At first i was very happy that i could also use it to carry my files to and from school but all my hopes were extinguished when i realized that the computers i would transfering to and from had to have the creative software installed. Obviously, Creative's target consumers are of the Student generation, so they must have known that we, as students , use computer labs in school. So why not add the firmware to override the creative software when transfering data files? What's written on the box and the sales pitch creative uses is extreamly misguided and alot of the buyers have come back to the store with complaints. They arn't happy, i'm not happy, creative should fix this porblem, and yes it is a problem and not "part of the design".

  • HT4796 Can i use windows migration assistant to transfer files from a windows formatted hard drive to a mac?

    I have a windows formatted hard drive and a macbook pro. I was wondering if i could use the windows migration assistant to transfer files from my hard drive to the mac

    No.
    Just connect the drive to your Mac. The Mac can read most Windows formats (it cannot WRITE Windows New Technology File System (NTFS) formatted drives.

  • Error in connecting to database using a datasource in a jsp file

    Dear SDN's,
    I have a program which retreives Data from the Employee table and displays on portal page.
    What i have done is,
    I have created a pageprocessor component, with 2 jsp files one is for data insert and other is for retriving the data from the database table.
    For inserting the records, i have written the code in the Even handling method of Page Proceessor component.
    For retriving the data i have written the following jsp code in the jsp file and this i am calling in PBO of pageprocessor component based on the condition.
    When i try to insert the records it is working fine.But i am getting an error when try to execute the retreving the records in other jsp.
    Please go through the following code and correct me if anything is wrong here.
    <b><%@ page language="java" %>
    <%@ page import ="java.lang.*,java.sql.Connection,javax.sql.DataSource,java.sql.Statement,java.sql.ResultSet,javax.naming.InitialContext" %>
    <body>
    <center>
         <table border="1">
         <tr cellpadding="1">
         <th>Empid</th>
         <th>Name</th>
         <th>City</th>
         </tr>
    <%
         InitialContext initialContext = new InitialContext();
         DataSource ds = (DataSource) initialContext.lookup("jdbc/MyDS");
         Connection conn = ds.getConnection();
         stmt = conn.createStatement();     
         ResultSet rs=stmt.executeQuery("select * from EMP_DETAILS");
         while(rs.next())
              out.println(rs.getString("EMPID"));
              out.println(rs.getString("NAME"));
              out.println(rs.getString("CITY"));
         %>
         <tr cellpadding="1">
              <td><%=rs.getString("EMPID")%></TD>
              <TD><%=rs.getString("NAME")%></td>
              <td><%=rs.getString("CITY")%></td>
              <br>
              </table>
              catch (Exception e) {                    
         e.printStackTrace();
         out.println("Exception" + e);     
              }</b>
    The error what i am getting is.
      Portal Runtime Error
    An exception occurred while processing a request for :
    iView : JSPdbProject.Empjava
    Component Name : JSPdbProject.Empjava
    Error occurs during the rendering of jsp component.
    Exception id: 04:29_16/11/06_0005_507480350
    See the details for the exception ID in the log file

    Hi Sumathi,
    here is the error log.
    #1.5#0017087C79D800760000004700001C000004225B24927786#1163674757780#com.sap.portal.portal#sap.com/irj#com.sap.portal.portal#J2EE_ADMIN#10231##OBTDEV15_O50_507480350#J2EE_ADMIN#6afb6760756111dbaf3c0017087c79d8#SAPEngine_Application_Thread[impl:3]_24##0#0#Error#1#/System/Server#Java###Exception ID:04:29_16/11/06_0005_507480350
    [EXCEPTION]
    #1#com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Resource
    Component : JSPdbProject.Empjava
    Component class : Empjava
    User : J2EE_ADMIN
         at com.sapportals.portal.prt.core.PortalRequestManager.handlePortalComponentException(PortalRequestManager.java:969)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:444)
         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.htmlb.page.JSPDynPage.doOutput(JSPDynPage.java:76)
         at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
         at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         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:646)
         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:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         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:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         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:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sapportals.portal.prt.component.PortalComponentException: Error occurs during the compilation of java generated from the jsp
         at com.sapportals.portal.prt.core.broker.JSPComponentItem.getComponentInstance(JSPComponentItem.java:116)
         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)
         ... 38 more
    Caused by: com.sapportals.portal.prt.servlets_jsp.server.compiler.CompilingException: Error occurs during the rendering of jsp component
         at com.sapportals.portal.prt.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:2189)
         at com.sapportals.portal.prt.servlets_jsp.server.jsp.JSPCompiler.compile(JSPCompiler.java:81)
         at com.sapportals.portal.prt.servlets_jsp.server.jsp.JSPCompiler.run(JSPCompiler.java:140)
         at com.sapportals.portal.prt.core.broker.JSPComponentItem.compileJSP(JSPComponentItem.java:291)
         at com.sapportals.portal.prt.core.broker.JSPComponentItem.getComponentInstance(JSPComponentItem.java:141)
         ... 41 more
    Thanks,
    sireesha.B

  • Polish , turkish text not decoding in the alert boxes in JSP file

    Hi All,
    Currently I am working on application in the J2ee development perspective in NWDI  and this contains many Jsp pages.As per the business requirement we need to make this application support Polish and turkish languages , for this we have maintained properties files .
    I have encoded the polish and turkish text using the u201CHTML Unicode format encodingu201D hence when checked the url in the IE with Polish and turkish locale all the characters are getting decoded properly ,but i have a proplem with the text in the alert boxes i.e. the special characters in the text displayed in the alert boxes is not getting  decoded at all eg:"Wprowad&#378; numer konta BP" whereas it has to display as "Wprowadź numer konta BP:
    Also i have used java encode also to achieve the same and for this "?" is getting displayed i.e. it is not getting properly decoded.
    I have also used native2ascii method in this also it is getting decoded but not correctly i.e. "?" is displayed
    Please note that the alert boxes are written in the script tag in the JSP page.
    Request you to kindly help me in resolving the issue at the earliest as this is a very critical issue in my project now.
    Thanks and Regards,
    Nishita Salver

    Hi nishita,
    We had a similar problem in one of my projects, but what i remember is we have kept the ascii value for that character directly in the properties files and tried to encode it, this way i resolved my problem.
    Try this way and let me know the result.
    Regards,
    Saleem Mohammad.

  • How to update using Windows computer to download update files

    Hi
    I have a macbook I use at home, with OSX 10.4.7. Due to lack of a fast internet connection, I cannot update the macbook. At office, I have a faster connection, but on a windows computer. How do I download the files that are required for Macbook particularyly? I see files only on the macbook software update window, but on visiting the website, I see only a list of common updates, with nothing specifically for Macbook.
    Please help.
    Rajat

    <http://www.apple.com/support/downloads/> has all the updates. You don't need one specifically for the MacBook. To go from 10.4.7 to 10.4.9 use
    <http://www.apple.com/support/downloads/macosx1049comboupdateintel.html>
    If you see more than one version of a download, you should choose the Client, Intel version, for a MacBook.

  • Error while using window.open() in JSP page

    I am getting error while using window.open() in my JSP page.
    This is code in my JSP page,
    <h:commandLink onclick="loadContextSensitiveHelp(#{setNewDayStatusBean. cycleStatusViewObject.helpUrl});" value="Help">
    function loadContextSensitiveHelp(helpPageName) {
    top.consoleRef=window.open('#{facesContext.externalContext.requestContextPath}/main/patient/helpPageName','myconsole',
    'width=350,height=250'
    +',menubar=0'
    +',toolbar=0'
    +',status=0'
    +',scrollbars=1'
    +',resizable=0')
    top.consoleRef.document.close()
    I am getting the following error in my browser,
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /SetNewDayStatus.jsp(69,34) #{..} is not allowed in template text
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:102)
         org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:711)
         org.apache.jasper.compiler.Node$ELExpression.accept(Node.java:935)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:838)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Validator.validate(Validator.java:1737)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:428)
         com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:444)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:116)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.
    Anyone help me to solve this issue. Thanks............................

    I am getting error while using window.open() in my JSP page.
    This is code in my JSP page,
    <h:commandLink onclick="loadContextSensitiveHelp(#{setNewDayStatusBean. cycleStatusViewObject.helpUrl});" value="Help">
    function loadContextSensitiveHelp(helpPageName) {
    top.consoleRef=window.open('#{facesContext.externalContext.requestContextPath}/main/patient/helpPageName','myconsole',
    'width=350,height=250'
    +',menubar=0'
    +',toolbar=0'
    +',status=0'
    +',scrollbars=1'
    +',resizable=0')
    top.consoleRef.document.close()
    I am getting the following error in my browser,
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /SetNewDayStatus.jsp(69,34) #{..} is not allowed in template text
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:102)
         org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:711)
         org.apache.jasper.compiler.Node$ELExpression.accept(Node.java:935)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:838)
         org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         org.apache.jasper.compiler.Validator.validate(Validator.java:1737)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:428)
         com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:444)
         com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:116)
         com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
         com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
         com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.
    Anyone help me to solve this issue. Thanks............................

  • Transfering Files Using Windows Explorer

    Rather than using windows media player, why can't I just use windows explorer to add photos to my droid 2?  When I hook up my droid 2 to my computer with the usb cable, the droid appears in windows explorer.  I want to just drag and drop photos to the droid.  I have tried this with a couple of photos and it seems to work.  Will this method cause any problems?  It seems a lot easier than using windows media player to "sync" files.

    It apeaqrs that they automatically go into the photo folder.  I was able to access them via the "Gallery" app.
    I wonder why the user guide doesn't recommend this since I find it a lot easier to do than using the "sync" process?

  • Accessing my own class members from the JSP file

    Hi,
    I have created a class by name simple.java.and the package structure is like sridhar.source.useful.In this package i placed my file simple.java.
    Now i import this file with the import statement in JSP like
    <%@ import = "sridhar.source.useful.*" %>
    Now from the JSP file i want to execute some of the methods in simple.java.
    I tried this one by importing the simple.java in my JSP file,but i am getting some errors:
    variables that i have declared in Java files are not defined.
    The JSP is not importing the class simple.java
    I am executing my JSP in weblogic6.1(webserver is IPlanet)
    shall i need to set any classpath for this in the weblogic shell script??
    pls clarify me if any configuration is to be made or not??
    regards
    Naidu

    For JSP with IPlanet/weblogic and imported custom classes:
    Put your class / package in the correct folder. $path is any path you want....
    Ex: package foo, class foorbar must be
    $path/foo/foobar.class
    All classes must be .class, not .jar.
    Weblogic/IPlanet must be configured to have the CLASSPATH
    $path/
    (do not include foo/foobar!)
    The JSP has
    <%@ import "foo.*" %>
    Your class may now be used just like the other imported classes. Say you have an object Foobar with a constructor, you can just say
    Foobar myFoo = new Foobar();
    I do this with my classes, so if you have any questions, just ask.

  • Dashes in JSP File Names

              Has anyone seen this problem before?
              I have a WAR application deployed to WebLogic Server 6.0 including several JSP
              files. The construction of the WAR file and all of the JSP pages is correct.
              However, if any of the JSP file titles include a dash character, i.e., "-", there
              are cases in which Web Logic server emits the emphasis, "Can't find class in the
              path . . ." error. Change the dash character in the offending JSP file title
              to either an underscore, i.e., "_", or to eliminate the dash character altogether,
              and the application works just fine.
              I am running WebLogic Server 6.0 on an MS W2K system.
              Anyone seen this or have an idea for a fix that allows the use of dash characters
              in JSP file titles?
              Thanks,
              Ted
              

              Yes, I am running Service Pack 2 (should have said that in original post).
              And, I see the class file names with the ascii code in the names. But, sometimes
              it can't find that resulting class file. So, since I now have multiple engineers
              reporting the same problem on multiple development machines (all running SP2),
              we are avoiding all special characters except underscore in our JSP file names.
              Ted
              Dimitri Rakitine <[email protected]> wrote:
              >Strange - did you try the latest service pack? The only special thing
              >about jsps with dashes in names (and other characters not allowed in
              >Java
              >identifiers) is that JSP compiler replaces them with decimal ascii code
              >
              >when it creates .java files.
              >
              >Ted Gladieux <[email protected]> wrote:
              >
              >> Has anyone seen this problem before?
              >
              >> I have a WAR application deployed to WebLogic Server 6.0 including
              >several JSP
              >> files. The construction of the WAR file and all of the JSP pages is
              >correct.
              >
              >> However, if any of the JSP file titles include a dash character, i.e.,
              >"-", there
              >> are cases in which Web Logic server emits the emphasis, "Can't find
              >class in the
              >> path . . ." error. Change the dash character in the offending JSP
              >file title
              >> to either an underscore, i.e., "_", or to eliminate the dash character
              >altogether,
              >> and the application works just fine.
              >
              >> I am running WebLogic Server 6.0 on an MS W2K system.
              >
              >> Anyone seen this or have an idea for a fix that allows the use of dash
              >characters
              >> in JSP file titles?
              >
              >> Thanks,
              >
              >> Ted
              >
              >--
              >Dimitri
              

  • Calling a java bean in a jsp file

    hi all
    i am working on a jsp project. my tomcat is installed on one machine and my java Bean on another. how do i call the javabean on my machine from the jsp file on tomcat. i'm using packages.
    eg:
    in the jsp file in tomcat, i'm using
    <jsp:useBean id="student" scope="request" class="lab3.Student"/>
    i get class not found error.
    my main path for this Student Bean is say c://myLab/lab3 which has a lab3 folder with class files.
    Thanks

    eg:
    in the jsp file in tomcat, i'm using
    <jsp:useBean id="student" scope="request"
    class="lab3.Student"/>
    If you have a Context defined for c://mylab
    then below that directory you should have a WEB-INF directory and then a classes directory and then within that your package structure...
    so if the package is lab3 yo should have your Student class in:
    c://mylab/WEB_INF/classes/lab3/Student.class
    (asuming you have set up a Context that points at c://mylab...and your jsp file is there...)

Maybe you are looking for