Getting JasperException - in a JSP file

Hello all,
I am using a custom tag - that uses a JavaScriptDate bean...i did test it separately it works fine in a Jsp page...
Now, I created a Tag class as JavaScriptDateTag.java that has the following code:
class JavaScriptDateTag extends TagSupport {
public int doStartTag() {
try {
JspWriter out = pageContext.getOut();
JavaScriptDate now = new JavaScriptDate();
out.write(now.getScriptDate());
} catch (IOException e) {
System.out.println("Error in JavaScriptDateTag" +
e.getMessage());
return TagSupport.SKIP_BODY;
I also included this tag in JavaScriptDateTag.tld file...as today. this file contains one more tag "message" :
<tag>
<name>today</name>
<tagclass>vlv.mserver.mtags.JavaScriptDate</tagclass>
<info>Display current date</info>
</tag>
<tag>
<name>message</name>
<tagclass>vlv.mserver.mtags.JavaScriptExampleTag</tagclass>
<info>Display Alert Box</info>
</tag>
Now i tried in a JSP page i get an error as follows:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 5 in the jsp file: /jsps/tester.jsp
Generated servlet error:
D:\tomcat4.0.6\work\Standalone\localhost\iqc\jsps\tester$jsp.java:60: Method setPageContext(javax.servlet.jsp.PageContext) not found in class vlv.mserver.mtags.JavaScriptDate.
jspxth_js_today_0.setPageContext(pageContext);
^
The code in jsp page:
<%@ taglib uri="http://www.jsp.com/jspkit/javascript" prefix="js" %>
<html>
<body bgcolor="#ccffff">
Hi, <br> Here follows today's date:<js:today />
<js:message>Hello</js:message>
</body>
</html>
I have refered many books and couldn't get a solution to over come this ...
Anyone pl. guide me... Thanks a lot

Hello all
Thanks a lot , i found the error it was in the "*.tld" file, the <tagclass> tag was pointed to the Javabean instead of the Tag class. Following is the correct code in tld file:
     <tag>
          <name>today</name>
          <tagclass>vlv.mserver.mtags.JavaScriptDateTag</tagclass>
          <info>Display current date</info>
     </tag>
:)

Similar Messages

  • How to get result from another JSP file?

    I have to write a jsp (my.jsp) to get information from another jsp file (other.jsp).
    The other.jsp return integer value (0 / 1) so that user can tell if certain service is available or not. And in my.jsp I need to collect such result and other information from a text file to make up of a XML string.
    How can I call other.jsp to get the result? Thanks a lot.

    Hi, I think I didn't describe the problem clearly
    enough. In fact, there is a JSP file, and if our
    database is currently connected, the JSP will return
    value 1, otherwise, it will return 0. My java program
    need to get that result, and then form an XML string,
    and send the string back to the client. I'm just
    wonder how can I write such a program to read result
    from JSP file. Thanks a lot.Why is this function implemented as a JSP file? It should be implemented as a bean. It would be simple to get the information you require from that bean.

  • Getting error when placing jsp file in tomcat root folder

    hello experts,
    i have developed an application on netbeans 6.1 for mail.
    It is working perfect when i run it from netbeans, but when we copy those jsp files to ROOT folder of tomcat5.5 server, it is showing me following error.
    rg.apache.jasper.JasperException: Unable to compile class for JSP:
    An error occurred at line: 14 in the jsp file: /Mailer1.jsp
    Session cannot be resolved to a type
    11: <%!
    12: String nam = null, email = null, suggestion = null;
    13: RequestDispatcher disp = null;
    14: public static Session sess = null;
    15:
    16: %>
    17: <%
    An error occurred at line: 38 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    35:
    36: //SecurityManager security = System.getSecurityManager();
    37:
    38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
    39: {
    40: protected PasswordAuthentication getPasswordAuthentication()
    41: {
    An error occurred at line: 38 in the jsp file: /Mailer1.jsp
    Session cannot be resolved
    35:
    36: //SecurityManager security = System.getSecurityManager();
    37:
    38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
    39: {
    40: protected PasswordAuthentication getPasswordAuthentication()
    41: {
    An error occurred at line: 38 in the jsp file: /Mailer1.jsp
    javax.mail.Authenticator cannot be resolved to a type
    35:
    36: //SecurityManager security = System.getSecurityManager();
    37:
    38: sess= Session.getInstance(props,new javax.mail.Authenticator() //if u uses getDefaultInstance it will raise Security Exception
    39: {
    40: protected PasswordAuthentication getPasswordAuthentication()
    41: {
    An error occurred at line: 45 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    42: return new PasswordAuthentication("[email protected]","ratatouille");
    43: }
    44: });
    45: sess.setDebug(true);
    46:
    47:
    48: //sess = Session.getDefaultInstance(props);
    An error occurred at line: 50 in the jsp file: /Mailer1.jsp
    Transport cannot be resolved to a type
    47:
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    An error occurred at line: 50 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    47:
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    An error occurred at line: 51 in the jsp file: /Mailer1.jsp
    Message cannot be resolved to a type
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    An error occurred at line: 51 in the jsp file: /Mailer1.jsp
    MimeMessage cannot be resolved to a type
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    An error occurred at line: 51 in the jsp file: /Mailer1.jsp
    sess cannot be resolved
    48: //sess = Session.getDefaultInstance(props);
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    An error occurred at line: 52 in the jsp file: /Mailer1.jsp
    Message.RecipientType.TO cannot be resolved to a type
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    55: msg.setContent(suggestion, "text/plain");
    An error occurred at line: 52 in the jsp file: /Mailer1.jsp
    InternetAddress cannot be resolved to a type
    49: //sess.setDebug(true);
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    55: msg.setContent(suggestion, "text/plain");
    An error occurred at line: 53 in the jsp file: /Mailer1.jsp
    InternetAddress cannot be resolved to a type
    50: Transport trans = sess.getTransport();
    51: Message msg = new MimeMessage(sess);
    52: msg.setRecipient(Message.RecipientType.TO, new InternetAddress("[email protected]"));
    53: msg.setFrom(new InternetAddress(this.email));
    54: msg.setSubject(this.nam);
    55: msg.setContent(suggestion, "text/plain");
    56: trans.connect();
    Stacktrace:
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:435)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:298)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    i m unable to find out the solution,
    please help me to resolve it.
    thnaks.

    Hi shams.hq,
    I don't understand how you bother to copy an application in your server directories. It's really piece of cake to deploy with Tomcat.
    All you have to do :
    - with Netbeans, you build the project : a WAR file will be created in the dist directory of your project;
    - launch the server, if it's not running;
    - with your web browser, connect to the Tomcat Manager;
    - from there, you may upload and deploy the WAR file of your project.
    Et voilà ! Tomcat will unzip the WAR and install your classes and libraries at the right place.

  • Getting intermedia classes in jsp file

    Hi,
    I am using oracle intermedia classes in jsp file.I am importing the package 'oracle.ord.im' , and when running it is telling that the package is not available.
    I installed intermedia with oracle 10g, and i am using tomcat server,i don't know why it is saying that package is not availabe.
    can any one tell me how to access that package in a jsp file

    See my reply to your duplicate query

  • How to get  value on jsp file from ActionServlets class

    Hi All,
    I am facing problem in action servlets class into Struts, I am able to get the value on jsp file from action class with the help of session scope but i want to another method for it , so how i can solve the problem.Plz help me
    Thanks......... in advance

    I got a way out to access the attribute, i feel it is
    <jsp:usebean id="myRack" class="settings.Rack"/>
    <c:foreach var="book" item="myRack.books">
    </c:foreach>
    I am not able to check if this is correct or not because myRack.books is not having any value set by me in the request scope. How do i get instance of Rack class set by another page in the current request? I can get the value if i use scriptlet but i dont want to use scriptlet.
    I am continiously trying, if I get an answer, I shall post, else pls somebody guide.

  • How to display a tooltip for a textbox in JSP file

    I want to display a tool tip for a textbox when it gets focus in a jsp file.
    Any suggestion ?
    Thank you in advance

    I must think that the JSP is rendering HTML.
    so if you�re doing that then I would set
    <input type=text title="tool-tip-text-here" name="xxx">
    I think that should be it.
    hope it helps

  • How To Get The CLOSE Event In a JSP File?

    Hello everybody,
    Right now I am working in a JSP project which is about access log, when the users start , oprate, or close the system, the access log system works. I am in trouble in that when the users close the system, how can I get the close event?
    The JSP file contains the following fields :
    Close Window
    How to add code to get the CLOSE Event and submit to the service?
    And If I hit the "Close Button"(on the right-top of the window), how can I get the CLOSE event, too?
    Can anyone tell me?

    1. Add a hidden field:
    <input type="hidden" id="status" value="">2. modify <a href="index.jsp" onclick ="parent.window.close( );">Close Window</a> with <a href="index.jsp" onclick ="closefn();">Close Window</a>3. Add a javascript
    <script language="javascript">function closefn(){
    document.getElementById('status').value="close";
    document.form.action="";
    document.form.method="post";
    document.form.submit();
    parent.window.close( );
    }4. Now on the action page get the value of status by request.getParameter("status"); and log it.

  • Get JSP file to run with an applet tag under JDeveloper

    I Created an applet and an html file under JDeveloper. with the applet tag in the html file.
    when I run the html file the applet runs perfectly.
    I Created a jsp file in the same project with the applet and the html file under JDeveloper. I copied and pasted the applet tag from the html file to the jsp file.
    When I try to run the jsp file under JDeveloper I get
    java.io.FileNotFoundExceptions for all of the jar files in the Applet tag ARCHIVE and for the applet tag CODE
    This is the applet tag that I copied and pasted from the html file to the jsp file
    BEGIN:
    <APPLET CODE="myapplet.Applet1" ARCHIVE="jdev-rt.jar,ojsp.jar,ojsputil.jar,oc4j.jar,servlet.jar,ojc.jar" HEIGHT="200" WIDTH="200" ALIGN="bottom">This browser does not appear to support Applets.</APPLET>
    END:
    Here three example of the exceptions that I got BEGIN:
    1.
    java.io.FileNotFoundException: http://139.169.225.224:8988/JspToAppletWS-JspAppletInstantiation-context-root/jdev-rt.jar
    2.
    java.io.FileNotFoundException: http://139.169.225.224:8988/JspToAppletWS-JspAppletInstantiation-context-root/jdev-rt.jar
    3.
    java.lang.ClassNotFoundException: myapplet.Applet1
    Here three example of the exceptions that I got END:
    This is the html file that works BEGIN:
    <HTML>
    <HEAD>
    <TITLE>
    Title
    </TITLE>
    </HEAD>
    <BODY>
    <H2>
    This is sample HTML text.
    </H2>
    <BR>
    <APPLET CODE="myapplet.Applet1" ARCHIVE="jdev-rt.jar,ojsp.jar,ojsputil.jar,oc4j.jar,servlet.jar,ojc.jar" HEIGHT="200" WIDTH="200" ALIGN="bottom">This browser does not appear to support Applets.</APPLET>
    </BODY>
    </HTML>
    This is the html file that works END:
    This is the JSP file that does not work BEGIN:
    <!--%@ page contentType="text/html;charset=windows-1252"%-->
    <%@ page import = "myapplet.Applet1, java.util.Enumeration, java.util.Vector, javax.swing.JFrame, java.lang.*" contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>
    Hello World
    </title>
    </head>
    <body>
    <h2>
    The current time is:
    </h2>
    <p>
    <%= new java.util.Date() %></p>
    <APPLET CODE="myapplet.Applet1" ARCHIVE="jdev-rt.jar,ojsp.jar,ojsputil.jar,oc4j.jar,servlet.jar,ojc.jar" HEIGHT="200" WIDTH="200" ALIGN="bottom">This browser does not appear to support Applets.</APPLET-->
    </body>
    </html>
    This is the JSP file that does not work END:
    I would like to know what I need to do so that I can run
    the Jsp file under JDeveloper with the applet tag without any exceptions.

    Hi,
    I meet the same problem and can not get a solution from this forum or other forum in internet, either.
    Have you already solved this problem? Can you tell me your solution? thanks in advance.
    Regards

  • How 2 get the path of a file Using jsp

    how 2 get the path of a file Using jsp
    i have tried getPath...but i'm geting the error
    The method getPath(String) is undefined for the type HttpServletRequest
    any idea how 2 get the path of a file

    You need ServletContext#getRealPath().
    API documentation: http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getRealPath(java.lang.String)

  • How to get the weblogic.httpd.session.timeoutSecs value in a JSP file

    Hi,
              We are using Weblogic 5.1 SP8. We set weblogic.httpd.session.timeoutSecs=900 in the weblogic.properties file. How can I get this value in a JSP file if I don't use java.util.Properties to parse the properties file?
              Can I use session.getValue(sessionName) to get it? If so, what is the session name for this property?
              Thanks.
              Frank
              

    I think something like this should work:
              T3ServicesDef services = T3Services.getT3Services();
                   services.config().getProperty("weblogic.httpd.session.timeoutSecs");
              Frank Yu <[email protected]> wrote:
              > Hi,
              > We are using Weblogic 5.1 SP8. We set weblogic.httpd.session.timeoutSecs=900 in the weblogic.properties file. How can I get this value in a JSP file if I don't use java.util.Properties to parse the properties file?
              > Can I use session.getValue(sessionName) to get it? If so, what is the session name for this property?
              > Thanks.
              > Frank
              Dimitri
              

  • Is it possible to get control of the .SWF files in JSP files

    Hi All
    In my web application, I got 4 swf buttons which are created by flash and they are embedded in the jsp's. Each button perform the navigation to other page.
    this is the jsp file.
         <table width="100%" border="0">
                  <tr>
                    <td width="2%" height="26"> </td>
                    <td width="31%"> <object classid="clsid:...." codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                        <param name="BASE" value=".">
                        <param name="BGCOLOR" value="">
                        <param name="movie" value="button1.swf">
                        <param name="quality" value="high">
                        <embed src="button1.swf" width="100" height="22" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" base="." ></embed>
                      </object> <font size="-1" face="Arial, Helvetica, sans-serif"> </font></td>
                    <td width="67%" class="sitemapgy">*Add*  </td>
                  </tr>
                  <tr>
                    <td height="26"> </td>
                    <td><object classid="clsid:..." codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                        <param name="BASE" value=".">
                        <param name="BGCOLOR" value="">
                        <param name="movie" value="button2.swf">
                        <param name="quality" value="high">
                        <embed src="button2.swf" width="100" height="22" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" base="." ></embed>
                      </object> </td>
                    <td class="sitemapgy">*Edit* ;</td>
                  </tr>
                  <tr>
                    <td height="26"> </td>
                    <td><object classid="clsid:..." codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                        <param name="movie" value="button13.swf">
                        <param name="quality" value="high">
                        <param name="base" value=".">
                        <embed src="button7.swf" base="."  quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
                      </object></td>
                    <td class="sitemapgy">*Create*</td>
                  </tr>
                  <tr>
                    <td height="26"> </td>
                    <td><object classid="clsid:.." codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22">
                        <param name="BGCOLOR" value="">
                        <param name="movie" value="main_print.swf">
                        <param name="quality" value="high">
                        <param name="base" value=".">
                        <embed src="main_print.swf" base="."  quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="22" ></embed>
                      </object></td>
                    <td class="sitemapgy"><font face="Arial, Helvetica, sans-serif">*Print*</font></td>
                  </tr>
                  <tr>
                    <td height="26"> </td>
                    <td><object classid="clsid:..." codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="22" >
                        <param name="BGCOLOR" value="">
                        <param name="BASE" value=".">
                        <param name="movie" value="button3.swf">
                        <param name="quality" value="high">
                        <embed src="button3.swf" width="100" height="22" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" base="." ></embed>
                      </object></td>
                    <td class="sitemapgy"><font face="Arial, Helvetica, sans-serif">*_Admin_*</font></td>
                  </tr>
                  <tr>
                    <td height="24"> </td>
                    <td> </td>
                    <td> </td>
                  </tr>
                </table>When I click the button3.swf (Admin) button....it navigates to other page...Before that I need to get control of swf button and need to perform some login checks.
    Is it possible to get control?
    Thanks

    Thanks for your responses, I tried in the same way but when ever it looking at the path "/admin/admin_main.jsp",
    its navigating to error page if the username is admin too(abcd).
    Can you please help me regarding this.
    I am sending you my code and web.xml.
                     <filter>
              <filter-name>ExampleFilter</filter-name>
              <filter-class>com.pack.db.ExampleFilter</filter-class>
         </filter>
                   <filter-mapping>
              <filter-name>ExampleFilter</filter-name>
              <url-pattern>/admin/admin_main.jsp</url-pattern>
         </filter-mapping>
    import java.io.*;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.http.*;
    public class ExampleFilter implements Filter {
         private FilterConfig filterConfig=null;
         public void init(FilterConfig config) throws ServletException {
              this.filterConfig = config;
         public void destroy() {
              filterConfig = null;
         public void doFilter(ServletRequest request, ServletResponse response,
                   FilterChain chain) throws IOException, ServletException {
              RequestDispatcher rd = null;
              String userInfo = "";
              String userName="";
              if (request instanceof HttpServletRequest) {
                   userInfo = ((HttpServletRequest) request).getUserPrincipal()
                                      .getName();
                             String[] pieces = userInfo.split("\\\\"); // Firefox sends DOMAIN\USERNAME as UserPrincipal
                                  userName = pieces[pieces.length -1]; // getting the username for which I need to perform check
                                  if(userName!="abcd"){
                                  System.out.println("userName IN ELSE PART:"+userName);
                                  System.out.println("INVALID USER NAME");
                                 rd = request.getRequestDispatcher("/admin/error.html");// i need to forward the response url to error page if the username is not equal to "abcd"
                                 rd.forward(request, response);
                             else{
                             chain.doFilter(request, response); // if username="abcd" I need to navigate to normal pages.
    Thanks

  • Jdeveloper11gR2 Cannot get code Completion Insight in *.jsp files

    I am not getting code completion insight when pressing Ctrl + Space in *.jsp files. But it works in *.java files. My version of Jdeveloper is Jdeveloper 11g Release 2 version 11.1.2.2.0 .
    Edited by: Smitha Bhatt on Jun 7, 2012 5:40 PM

    I filed bug 14169588 for this.

  • Default java / jsp file which gets executed before DAM asset rendering

    Hi,
    I have a requirement to implement access control on DAM assets on the basis of a metadata property (tags).
    Is there a default JAVA / JSP file which gets executed before rendering a DAM asset?
    If yes, how can I override it?
    If no, how can I add a new JSP / JAVA file to be executed before rendering of each DAM asset?
    Thanks in advance,
    Anurag

    Hello Anuran,
    I dont think there is any api which is executed when you rendering any DAM asset on page component because for each type of DAM asset there are different APIs available which you use the render those dam asset like "Image" class to render the image asset.
    Each dam asset also support having different rendition format and if you are interested in that then refer http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/dam/api/DamEvent.Type.html
    Please let me know if you need more information
    Thanks,
    Pawan

  • Getting name of jsp file.

    i have a jsp file calling another jsp file. how do i get the filename of the first jsp file? It has to be obtained at runtime.

    Ive been looking into the same problem, whilst it is possible to get the path / current working directory, I have not found a way to get the filename.
    I think you are going to have to pass the name as a parameter from the first page.

  • Can we get the porlet name of which the JSP file is resided ?

    Hi all,
    Can we get the portlet name of which the JSP file is resided?
    Sincerely,
    Alan.

    you could try the following code
    <%@ page import="com.bea.portal.model.Portlet"%>
    <%@ page import="com.bea.portal.model.PortletState"%>
    <%@ page import="com.bea.portal.render.servlets.jsp.PortletRenderHelper"%>
    PortletState portletState = PortletRenderHelper.getPortletState( request);
    String portletName = portletState.getDisplayName();
    "Alan Liu" <[email protected]> wrote:
    Hi all,
    Can we get the portlet name of which the JSP file is resided?
    Sincerely,
    Alan.

Maybe you are looking for

  • How do I assign mapids to reference a merged chm file?

    Hello, I am using RoboHelp 9.0.2.271 on a Windows 7 64 bit machine to create chm files. I have 2 chm files I would like to merge and be able to create mapids for context-sensitive help. I created each chm in its own project directory with each having

  • Classpath entry in MANIFEST.MF file

    Hi All, When I deploy my application I get an error saying classpath entry in the MANIFEST.MF file is not correct.  The .ear file I am using has lot of .jar files, it is complaining about 1 or 2 jars at at time when I try to deploy the application. 

  • File saving error : write access not granted

    working on some old images annd when I try to save get a message---write access was not granted---- what is that ?

  • 70-200 f/4 IS usm

    I would like some feedback on this lens.  I just got mine yesterday and it makes a little grinding noise when it focuses, and what do you think of IQ?  let me know what you think...

  • 1GB 533MHz DDR2 SDRAM / Cost Versus Quality

    Total Confusion. Firstly Newly(ish) arrived G5 17" iMAC / iSight 1.9GHz c/w 512MB RAM. I want to upgrade the RAM and can't afford the 2GB Module so contemplating the 1GB as above. Prividing 1.5GB in total. Costs range from £140 (Apple) to unbranded e