How useJsp 2.0 tag file in Weblogic 9.2

I would like to use the JSP 2.0 tag file feature involving having a jsp fragment as an attribute.
The example I have runs fine in Tomcat 6.0. And it runs fine in Weblogic 10.0 and 10.3 But when I run the same test on weblogic 9.2, I get the following error:
Compilation of JSP File '/jsp/tagfile_hello_test.jspx' failed:
tagfile_hello_test.jspx:19:8: This tag can only appear as a subelement of a standard or custom action. Exceptions are: jsp:body, jsp:attribute, jsp:expression, jsp:scriptlet, and jsp:declaration.
<jsp:attribute name="footer">
Below I show the output I get when running in Tomcat.
Also below are the listing for the calling jsp page and the tag file page, tagfile_hello_test.jspx and tagfile_hello.tagx respectively.
The burning question I am trying resolve is why does the example runs perfectly fine in Tomcat and Weblogic 10.0 and 10.3 but fails in Weblogic 9.2. Tag files are part of the JSP2.0 specification and Weblogic 9.2 implements the specification.
Any help is greatly appreciated.
Output from Tomcat and Weblogic 10.3:
JSP 2.0 Examples Tag File
This JSP page invokes a tag file that has a footer fragment
Inside tagfile_hello
Invoking footer: I am the footer
Listing of tagfile_hello_test.jspx:
<html xmlns:c="http://java.sun.com/jsp/jstl/core"
     xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
     xmlns:jsp="http://java.sun.com/JSP/Page"
     xmlns:tags="urn:jsptagdir:/WEB-INF/tags">
<jsp:directive.page contentType="text/html" />
<head>
<title>Hi</title>
</head>
<body>
<h1>JSP 2.0 Examples Tag File</h1>
<hr/>
<p>This JSP page invokes a tag file that has a footer fragment</p>
<tags:tagfile_hello>
<jsp:attribute name="footer">
               <b>I am the footer</b>
</jsp:attribute>
</tags:tagfile_hello>
</body>
</html>
Listing of tagfile_hello.tagx:
<jsp:root
     xmlns:c="http://java.sun.com/jsp/jstl/core"
     xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
     xmlns:jsp="http://java.sun.com/JSP/Page"
     version="2.0"
>
<jsp:directive.attribute name="footer" required="true" fragment="true"/>
Inside tagfile_hello
Invoking footer:
<jsp:invoke fragment="footer"/>
</jsp:root>

Yes John.. i am using startNodemanager.sh.
Is this the change OutFile=$ServerDir/logs/$ServerName.out you are talking about.
wlscontrol.sh file:
# Directory and file names
ServerDir=$DomainDir/servers/$ServerName
SaltFile=$DomainDir/security/SerializedSystemIni.dat
OldSaltFile=$DomainDir/SerializedSystemIni.dat
StateFile=$ServerDir/data/nodemanager/$ServerName.state
PropsFile=$ServerDir/data/nodemanager/startup.properties
PidFile=$ServerDir/data/nodemanager/$ServerName.pid
LockFile=$ServerDir/data/nodemanager/$ServerName.lck
BootFile=$ServerDir/security/boot.properties
RelBootFile=servers/$ServerName/security/boot.properties
NMBootFile=$ServerDir/data/nodemanager/boot.properties
RelNMBootFile=servers/$ServerName/data/nodemanager/boot.properties
OutFile=$ServerDir/logs/$ServerName.out
SetDomainEnvScript=$DomainDir/bin/setDomainEnv.sh
StartWebLogicScript=$DomainDir/bin/startWebLogic.sh
MigrationScriptDir=$DomainDir/bin/service_migration
Thanks,
Krish

Similar Messages

  • How to deploy a war file on Weblogic Server 7.0??

    Hello Everyone
    I am trying to deploy a servlet on Weblogic Server 7.0 as a WAR file. Can anyone of u plz tell me the steps required to do that. I am posting this question on EJb forum and not on servlets coz this is not a servlet problem, rather this is something which is related to J2EE, ie how to deploy a war file on J2EE Server.
    This is how i have done it, but this is not working---
    (1) First i created a directory structure for the web application according to J2EE Specification.
    C:\Work\
    myServletWAR\
    META-INF\
    WEB-INF\
    classes\
    HelloServlet.class
    web.xml
    i.e within work directory, there is a dic called myServletWAR which is my application directory which contains 2 sub directories viz META-INF which contains the mainifest file being generated by the jar utility. the second directory in the myServletWAR application dir is WEB-INF, which contains one file called web.xml for servlet mapping and one directory classes which contains HelloServlet.class
    (2) I used following command for creating war file from myServletWAR director(i.e from my web application's directory).
    jar -cvf TestServletWAR.war .
    This creates the TestServletWAR.war file in myServletWAR dir.
    Here is how my Servlet and web.xml looks like...
    Servlet code
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloServlet extends HttpServlet
    public void doPost ( HttpServletRequest req, HttpServletResponse res )
    throws IOException, ServletException
    doGet( req, res );
    public void doGet ( HttpServletRequest req, HttpServletResponse res )
    throws IOException, ServletException
    res.setContentType( "text/html" ); // Can also use "text/plain" or others.
    PrintWriter out = res.getWriter();
    // Get the requestor's IP address (See JavaDocs to see how to get other info):
    String addr = req.getRemoteAddr();
    // Create output (the response):
    out.println( "<HTML><HEAD><TITLE>HelloServlet in myServletWAR</TITLE></HEAD>" );
    out.println( "<BODY><H1 ALIGN=\"CENTER\">" );
    out.println( "Hello " + addr + ", from HelloServlet in myServletWAR!" );
    out.println( "</H1></BODY></HTML>" );
    out.close();
    ************************Servlet Ends Here **************************
    web.xml
    ---------------------------------------------------------- <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <display-name>myServletWAR, a first Web Application</display-name>
    <description>
    This is a simple web application containing a single servlet
    of the "Hello, World" variety.
    </description>
    <servlet>
    <servlet-name>myHello</servlet-name>
    <servlet-class>HelloServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>myHello</servlet-name>
    <url-pattern>/myHello</url-pattern>
    </servlet-mapping>
    </web-app>
    ****************************web.xml file ends here********************
    After deploying the TestServletWAR.war file on the weblogic 7.0, i tried to execute the servlet from the browser by the following URL
    http://localhost:7001/myServletWAR/myHello
    I am getting the HTTP 404 Error, which is an indication that weblogic was unable to find the resourse, which it was requested for. Can anybody plz tell me what i m doing worng?? do i need to use weblogic related xml file (i.e weblogic.xml) also along with web.xml. If yes, then what all i need to include that. I m not very sure. A sample weblogic.xml file for this HelloWorld example will help me a lot.
    Looking forward for your help
    Thanx in advance
    Nisha

    hi i have read ur answer regarding deploing a servlet in weblogic 7.0
    i am facing another problem
    when i try to access the servlet inside my classes directory it throwa an error stating this :
    IT DOES NOT FOUND THE CLASSES ON WHICH MY SERVLET DEPENDS.WHAT DOEES ATHIS MEAN
    KINDLY TELL ME
    PUNEET JAIN
    <May 28, 2003 1:46:25 PM IST> <Error> <HTTP> <101250> <[ServletContext(id=6057728,name=WebApp,context-path=/WebApp)]: Se
    rvlet class myclasses.Wservlet for servlet welcome could not be loaded because a class on which it depends was not found
    in the classpath D:\bea\user_projects\PuneetDomain\applications\WebApp;D:\bea\user_projects\PuneetDomain\applications\W
    ebApp\WEB-INF\classes.
    java.lang.NoClassDefFoundError: myclasses/Wservlet (wrong name: Wservlet)>
    <May 28, 2003 1:46:26 PM IST> <Error> <HTTP> <101018> <[ServletContext(id=6057728,name=WebApp,context-path=/WebApp)] Ser
    vlet failed with ServletException
    javax.servlet.ServletException: [ServletContext(id=6057728,name=WebApp,context-path=/WebApp)]: Servlet class myclasses.W
    servlet for servlet welcome could not be loaded because a class on which it depends was not found in the classpath D:\be
    a\user_projects\PuneetDomain\applications\WebApp;D:\bea\user_projects\PuneetDomain\applications\WebApp\WEB-INF\classes.
    java.lang.NoClassDefFoundError: myclasses/Wservlet (wrong name: Wservlet)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:791)
    at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:517)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:351)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5412)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:744)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3086)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    >

  • .tagx Tag files in Weblogic 9.2

    Hi,
              We are trying to run one of our applications deploying it to a Weblogic Server 9.2. We are running into problems, as we use .tagx tag files and they do not seem to be recognized. Our .jsp page tries to invoke them as:
                        <%@ taglib tagdir="/WEB-INF/tags/taglibname/" prefix="taglibname" %>
              <taglibname:tag ...>...</taglibname:tag>
                                  We have XML tag files named /WEB-INF/tags/taglibname/tag.tagx files, but still we get:
                        javax.servlet.jsp.JspException: ServletException in '/WEB-INF/jsp/chains/index.jsp': Failed to compile JSP /WEB-INF/jsp/chains/index.jsp
              index.jsp:1:5: No tag library could be found with this URI. Possible causes could be that the URI is incorrect, or that there were errors during parsing of the .tld file.
              <%@ taglib tagdir="/WEB-INF/tags/layout/" prefix="layout" %>
                  ^----^
                                  If we define a simple .tld file for the tag, the problem shifts, as the tagfile element for tlds does not allow defining attributes, and we zillions of "This attribute is not recognized." messages when trying to use the tags.
              Any ideas? Should we use .tag files instead of .tagx or...?
              Alex

    Hi,
              Does this happens if you invoke the tag from a .jspx page?
              I was under the heavy impression that .tagx were to be used by .jspx files, but maybe I am wrong.
              Regards,
              LG

  • How to run standalone java file from weblogic server on Solaris

    Hi,
    We have a requirement to run a java file at a scheduled time in a day using cron scheduler on our linux server.
    We need to fetch data from the database & perform some business logic in this standalone JAVA file.
    Our application has an EAR which is deployed on Weblogic 10.3 server & in our application, we are utilizing the datasource created in that domain.
    Now, we have created a standealone Java file & used exisitng datasource (without Hibernate) of the domain with the help of below forums,
    Use DataSource of weblogic in a standalone Java file
    able to achieve the same.
    I've bundled this JAVA in application WAR & depoyed on the same domain where datasource is created.
    Now, how can I execute this file from anywhere on the server using weblogic classpath.
    Please help on the same in implementation.
    Thanks,
    Uttam

    If the Java application must be stand-alone you must not deploy it on WebLogic, then WebLogic will manage its lifecycle.
    In this case you can use the CommonJ API and use the timermanager if it must run on a certain time. More information
    of how to do this can be found here: http://middlewaremagic.com/weblogic/?p=5569
    If you keep the Java application stand-only and want to use a cron job you can follow the example presented here: http://middlewaremagic.com/weblogic/?p=7065
    Note that the example runs a WLST script, but you can follow the same steps to run your Java application.

  • Reg: How to Run a Script File in WebLogic Server 10.3.3

    Hi WebLogic Experts,
    In our project we are using WebLogic Serve 10.3.3. I need to run one script file. could you please suggest me where should i need to place that script file in WebLogic Server 10.3.3 and How to run & stop that Script file.?
    please experts i waiting for your's reply..
    Thanks & Regards,
    Induja..

    1. You can put a command line into startWebLogic.sh to start your script file.
    2. In your proyect you can create a java class to run the script file.
    3. You can create a java class to run the script file an setup it like a startup class into weblogic server.
    4. You can create a java class to run the script file an setup it like a job scheduler into weblogic server.
    In what time you need run this script file?

  • How to deploy an Ear File into Weblogic Server

    Hello,
    i have created an ADF application successfully and make it as an EAR file.
    How can we deploy that EAR file into weblogic server..?
    Let me know step-by-step procedure.
    Regards.

    Hi,
    Steps to deploy EAR file on Weblogic server:
    1) login to http://<hostname>:<port>/console
    2) Go to deployments and then install your ear on weblogic server.
    Also you will need to create a data source with same name as given in your Application Module.
    Following link contains steps for data source creation - http://www.oracle.com/webfolder/technetwork/jdeveloper/howto/11114/managedserver/wlsadfms.html ( section - "Configure a JDBC Data Source")
    Thanks,
    Randhir

  • How to open a wsdl file in Weblogic Workshop 10.3? Cannot seem to do so!

    Hello, I'm new to Weblogic Workshop 10.3 & will be working with learning how to develop and use webservices using the application. I have a WSDL file which i want to use in a project but cannot seem to import or use the file as required.
    If I click on "File -> New -> Service Control ->" I get the option to "Select the WSDL file to use" however I cannot find any WSDL files I copy into my workbench folder. Even if I close the project, close workshop, re-open workshop, reopen a project the WSDL file are not available to choose.
    Does anyone know what I may be doing wrong or how to resolve this issue?
    Any help would be appreciated!
    Thanks.

    The Adobe PDF printer is no longer available in Snow Leopard. This is an announce to this fact at the entrance to the Acrobat Macintosh forum. The old methods for doing what you want will not work in Snow Leopard. I recommend you look at Quite Imposing. It can do everything you want and more. Alas, it comes at a price.

  • How to Customize the WSDL file in Weblogic

    Hello All
    I am trying to make a web service deployed inside weblogic to be accessible through a loadbalancer that use HTTPS protocol.
    The wsdl file url is accessible through the load balancer via https and all works fine expect the schemalocation attributes within the wsdl
    <types>
      <xsd:schema>
      <xsd:import namespace="http://interfaces.package.com/" schemaLocation="http://domainname:80/I2SS-Interface-context-root/InterfacePort?xsd=1"/>
      </xsd:schema>
    </types>
    I don't know which element is generating the wsdl (weblogic or JAXWS SOAPBinding) . But I need that the schema location attributes contains https url and using the port 443.
    Please can you help me to customize this file.
    Thanks

    change your web-inf directory name to WEB-INF. This should fix your problem.
              Kumar.
              Alex wrote:
              > I write a jap and a web.xml files and also pack these files into a war file.
              > When I use the console to deploy the war, the console think the war is a
              > application, not web application.
              > I attach the test.war.
              >
              > Name: test.war
              > test.war Type: unspecified type (application/octet-stream)
              > Encoding: x-uuencode
              

  • How to validate the XSD files in Weblogic

    Hi,
    i want to validate a xsd file in the weblogic. if anyone give me a solution then i'll greet u.

    Can you give some more details? Are you talking about doing this in your code? Or, do you want to validate the XSD deployment descriptors before you deploy an application?
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • How to deploy EJB jar file in Weblogic 8.1

    Hi,
    I have created the EJB jar file, bearing home,remote,ejb and client class aling with the META-INF folder containing ejb-jar.xml and weblogic-ejb-jar.xml.
    After all this I am confused where to put this EJB jar file so that the container could deploy it.
    I am putting it in application folder of my own created Domain.
    Suggest me...

    Put it anywhere you like. You can always deploy it using the administrator console. There usually is an auto-deployment directory for the domain. You could find all that information in the Weblogic documentation.

  • How to deploy the war file in weblogic 6.0 with sp1?

    I write a jap and a web.xml files and also pack these files into a war file.
              When I use the console to deploy the war, the console think the war is a
              application, not web application.
              I attach the test.war.
              [test.war]
              

    change your web-inf directory name to WEB-INF. This should fix your problem.
              Kumar.
              Alex wrote:
              > I write a jap and a web.xml files and also pack these files into a war file.
              > When I use the console to deploy the war, the console think the war is a
              > application, not web application.
              > I attach the test.war.
              >
              > Name: test.war
              > test.war Type: unspecified type (application/octet-stream)
              > Encoding: x-uuencode
              

  • How to explode  a war file in weblogic 8

    I have deployed a app in war file. But can not see the files . so is there any way to explode a war file.

    To explode my.war create a directory called my.war
    mkdir my.war
    cd into it
    cd ./my.war
    and unjar your war file into it
    jar -xvf <path_to_war>/my.war .
    you should end up with the following directory structure
    my.war
    |-WEB-INF
    |-META-INF
    Hoos

  • [weblogic-9.1] JSP 2.0 tag file gets compiled but not reloaded

    I am trying to use a JSP 2.0 tag file on weblogic 9.1. Everything works as expected until I reload the page after changing the tag file. Consider the following files, simple.jsp and simple.tag:
    h5. /simple.jsp
    &lt;%@ page language="java" %&gt;
    &lt;%@ taglib prefix="sandbox" tagdir="/WEB-INF/tags" %&gt;
    &lt;html&gt;
    &lt;body&gt;
    This output comes from the jsp.
    &lt;sandbox:simple&gt;
    &lt;/sandbox:simple&gt;
    &lt;/body&gt;
    &lt;/html&gt;h5. /WEB-INF/tags/simple.tag
    &lt;%@ tag language="java" %&gt;
    <div>This output comes from a tag file
    </div>The output of a call to simple.jsp is:
    <html><head>
    </head><body>
    This output comes from the JSP.
    <div>This output comes from a tag file</div>
    </body></html>So far, so good. Now I change the content of simple.tag to
    <%@ tag language="java" %>
    <div>This output comes from *simple.tag*<div>On a new call to simple.jsp,
    1. Weblogic notices that the file has been changed,
    2. generates the TagHandler .java file
    3. compiles the .java file
    But the new class file seems not to be loaded by weblogic; the resulting HTML does not change. It is not a browser cache issue, as I can see Javelin compilation errors. E.g., changing the tag file content to
    <%@ tag language="j" %>
    <div>This output comes from simple.tag</div>leads to the following (expected) error:
    Compilation of JSP File '/sandbox/simple.jsp' failed:
    simple.tag:1:18: "j" is not a valid setting for the language attribute.
    <%@ tag language="j" %>
    ^-^
    Changes to the .jsp file are reflected in the HTML output.
    Am I missing something? Is there any flag I have to set in my weblogic configuration?

    You are right in saying that decoding has nothing to
    do with rendering per se.I will go even further than Erik did, and dispute this statement.
    Consider that you are generating an <input> tag for a text field. Among other things, you have to generate a "name" attribute. Who decides what to put there? The renderer that actually created the markup.
    The "renderer" really does
    two completely different things. But both should
    nevertheless be separate from the component
    implementation itself. You could still have the
    renderer doing the decoding part, which arguably would
    rarely change, and somehow delegate the actual
    rendering to an implementation in a tag file.Whether you implement decoding in a separate class or inside the component, what request parameter name do you look for? It is not reasonable to assume that ALL possible renderers will choose the same parameter name ... hence, decoding and encoding are inextricably linked (the code doing the decoding has to know what kind of markup the code doing the encoding actually created). In JavaServer Faces, the current APIs create that linkage by requiring that the decode and encode be done by the same class (either the component, if you are not delegating, or the renderer if you are).
    Craig

  • How to keep .tag-files from accessing request?

    How can i keep .tag-files from accessing the request? I only want to allow the .tag-file access to parameters given to it as input attributes.

    Don't use the request object then.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • How i configure the log4j.xml in weblogic server

    hi
    i write a new lg4j.xml and i put this in WEB-INF/classes,i deployed this jar in my remote server,but it not reflected. [i am not specify the server logs, we have some API's which is deployed in server for that API log files is configured using log4j.xml ]
    i saw there is a option in weblogic - setDomain -LOG4J_CONFIG_FILE='here we give the path for log4j.xml'.I think it's only work for local machines not for the remote machines.
    i don't know how to get a log files in weblogic server

    To use Quartz primarily within an application server environment,include the Quartz JAR within the enterprise application (.ear or .war file). However, if you want to make Quartz available to many applications then simply make sure it's on the classpath of your appserver.
    You can also deploy it as a jar file or a library module as required.
    Quartz depends on a number of third-party libraries (in the form of jars) which are included in the distribution .zip file in the 'lib' directory. To use all the features of Quartz, all of these jars must also exist on your classpath.
    -Sandeep

Maybe you are looking for

  • HP Advanced Photo Paper not listed in my printer profile in Photoshop Elements 7

    I have an HP 6310 Officejet printer and have successfully printed photos on (8" X 10") HP Premier Plus photo paper.  However, (4" X 6") HP Advanced Photo Paper does not appear in my Photoshop Elements list of papers for selection. Can you help?

  • Error signing in Acrobat 7 pro

    I keep getting the following error when signing document... Unknown error Support Information: CSigDict-1812 Some help? Also, I cannot get it to remember my Digital ID after I close Acrobat... and YES, I click Always Use EVERY time.

  • Highliting more than one word using JTextArea

    I want to highlight more than one word using JTextArea. For example. My car color is red. My friend's car color is black. I want to highlight "red" in first sentence and friend in second sentence using JTextArea (both the sentences are in JTextArea).

  • How to set proxy service monitoring level to Action using script

    We have to enable monitoring at Action level for Proxy service. I have written the code to enable the monitoring at Action level but I am getting Null pointer error. Below is the portion of code I am using for this purpose : String sessionName = crea

  • What's the best practice to partition an existing table?

    We are using Oracle 11g EE 11.2.0.3.0. We want to partition an existing table. I found some information from this link [http://www.oracle-base.com/articles/misc/partitioning-an-existing-table.php], but I am not sure whether that's the best way. Could