Problem in Frame and JSP

hi all,
i built an web application and now i want to add a menu using frame in HTML or javascript. The problem is all my JSP pages are data dependant from one another that means sometimes i am sending the data using input boxes and sometimes using HIDDEN values in HTML. Now i tried this followig way to use frame and to send my data to other pages but it is not working can anyone please help me.
"DOES ANYONE KNOW WHETHER I CAN USE FRAME IN THE JSP PAGE OR NOT"
LOGIN.HTML
<form action="startframe.html" method="post">
<center><h2>Employee Number:</h2></center>
<center><input type="text" name="emplno" maxlength="4"size="4"></center></br>
<center><h2>Password:</h2></center>
<center><input type="password" name="pass" maxlength="6" size="6"></center></br>
<center><input type="submit" value="SUBMIT YOUR INFO"></center>
</form>
</body>
</html> DATA are GOING FROM LOGIN.HTML TO VARIFYLOGIN.JSP
Now in between these two i used an HTML file to place a frame so that i can use the frame and the code is:
<HTML>
<HEAD>
<TITLE> </TITLE>
<frameset cols="15%,85%">>
<frame name="frame1" src="buttons.html">
<frame name="frame2" src="varifylogin.jsp?emplno=<%=emplno%> &pass=<%=pass%>" >
</frameset>
</HEAD>
<BODY>
</BODY>
</HTML> "DOES ANYONE KNOW WHETHER I CAN USE FRAME IN THE JSP PAGE OR NOT"
and then it should go to VARIFYLOGIN.JSP which is:
String empl_no = request.getParameter("emplno");
   String password=request.getParameter("pass");
   Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
   Connection con = DriverManager.getConnection("jdbc:odbc:finalmp" );
   Statement stmt = con.createStatement();
   ResultSet rs = stmt.executeQuery("SELECT StaffID,FirstName,LastName,Password FROM StaffDetails");...................................................etc.
i am getting this error on the RIGHT hand side frame meaning it showing the buttons on the left but this error on the right:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:367)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.lang.NullPointerException
     org.apache.jsp.varifylogin_jsp._jspService(varifylogin_jsp.java:83)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:320)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:856Can anyone please help me.
Cheers

i am working in jubuilder
and have made there three forms,and
calling s-aots and st_aots in fs_aots
but when i compile
it takes fiel,d text on seprate page display result on other window
why it dosent use frame here
2nd thing
i want to enable scrolling
how i can do
or how can i display required no of records in second row
if i mention page size in any check box
<html>
<head>
<title>
fs_aots
</title>
</head>
<jsp:useBean id="fs_aotsBeanId" scope="session" class="s_aots.fs_aotsBean" />
<jsp:setProperty name="fs_aotsBeanId" property="*" />
<body>
<FRAMESET Rows="30%" Framespacing="0">
<Frame Name ="Header" SRC="s_aots.jsp" Frameborder="0" Scrolling="no">
<FRAMESET Rows="70%" Framespacing="0">
<Frame Name="data" SRC="st_aots.jsp" Frameborder="0" Scrolling="yes">
</frameset>
</frameset>
</BODY>
</html>
<html>
<head>
<title>
s_aots
</title>
</head>
<jsp:useBean id="s_aotsBeanId" scope="session" class="s_aots.s_aotsBean" />
<jsp:setProperty name="s_aotsBeanId" property="*" />
<body>
<p>update database content
<form action="st_aots.jsp" method="post">
Region<input type=text name=Regionparam><br>
Bill Month From :<input type=text name=BmonthFparam><br>
Bill Month To:<input type=text name=BmonthTparam><br>
Connection Type:<input type=text name=Conntypeparam><br>
Exchanges:<input type=text name=Exchparam><br>
Phone No:<input type=text name=PhoneNoparam><br>
<input type=Submit value="Retrive from DB">
</form>
</BODY>
</HTML>
<html>
<head>
<title>
st_aots
</title>
</head>
<jsp:useBean id="st_aotsBeanId" scope="session" class="s_aots.st_aotsBean" />
<jsp:setProperty name="st_aotsBeanId" property="*" />
<%@ page language="java" import="java.util.*"%>
<table border=1 cellpadding=0 cellspacing=0 >
<tr><td> Phone No: </td>
<td> Current Bill: </td>
<td> Net Payable: </td>
<td>Net Arrers:</td>
<td>customer Name:</td>
<td>Customer Address:</td>
<td>Connection Type:</td>
</tr>
<%
  Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
  java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:AOTS4");
  java.sql.Statement statement = connection.createStatement();
  Enumeration parameters = request.getParameterNames();
    if(parameters.hasMoreElements()){
    String REGION = request.getParameter("Regionparam");
    String BILL_MONTH_FROM = request.getParameter("BmonthFparam");
    String BILL_MONTH_TO = request.getParameter("BmonthTparam");
    String CONN_TYPE = request.getParameter("Conntypeparam");
    String EXCHANGES = request.getParameter("Exchparam");
    String PHONE = request.getParameter("PhoneNoparam");
   //String q;
   // statement.executeUpdate("INSERT INTO updatephonebook (LAST,FIRST,PHONE) VALUES ('"+LastValue+"','"+FirstValue+"','"+PhoneValue+"')");
// q= " SELECT PHONE_NO,GROSS_CURRENT_BILL,AMOUNT_PAYABLE,NET_ARRERS_AMOUNT,NAME,ADDRESS_1,ADDRESS_2,ADDRESS_3,ADDRESS_4,CONNECTION_TYPE FROM AOTS WHERE REGION_CODE='" +REGION+ "' AND BILL_PERIOD BETWEEN '" + BILL_MONTH_FROM + "' AND '"+BILL_MONTH_TO+"' AND CONNECTION_TYPE='"+CONN_TYPE+"' AND EXCHANGE_CODE='"+EXCHANGES+"' AND PHONE_NO='"+PHONE+"'";
   // System.out.println(q);
     java.sql.ResultSet columns = statement.executeQuery
    (" SELECT PHONE_NO,GROSS_CURRENT_BILL,AMOUNT_PAYABLE,NET_ARRERS_AMOUNT,NAME,ADDRESS_1,ADDRESS_2,ADDRESS_3,ADDRESS_4,CONNECTION_TYPE FROM AOTS4 WHERE REGION_CODE='" +REGION+ "' AND (BILL_PERIOD BETWEEN '"+BILL_MONTH_FROM+"' AND '"+BILL_MONTH_TO+"') AND CONNECTION_TYPE='"+CONN_TYPE+"' AND EXCHANGE_CODE='"+EXCHANGES+"' AND PHONE_NO='"+PHONE+"' ")  ;
    //(" SELECT PHONE_NO,GROSS_CURRENT_BILL,AMOUNT_PAYABLE,NET_ARRERS_AMOUNT,NAME,ADDRESS_1,ADDRESS_2,ADDRESS_3,ADDRESS_4,CONNECTION_TYPE FROM AOTS4 WHERE REGION_CODE='" +REGION+ "' AND CONNECTION_TYPE='"+CONN_TYPE+"' AND EXCHANGE_CODE='"+EXCHANGES+"' AND PHONE_NO='"+PHONE+"' ")  ;
     // java.sql.ResultSet columns = statement.executeQuery(q);
   // String sql =  ("SELECT BILL_PERIOD,REGION_CODE,EXCHANGE_CODE,PHONE_NO,GROSS_CURRENT_BILL,AMOUNT_PAYABLE,NET_ARRERS_AMOUNT,NAME,ADDRESS_1,ADDRESS_2,ADDRESS_3,ADDRESS_4,CONNECTION_TYPE FROM AOTS WHERE REGION_CODE ='"+REGION+"' AND (BILL_PERIOD BETWEEN '"+BILL_MONTH_FROM+"' AND '"+BILL_MONTH_TO+"') AND CONNECTION_TYPE='"+CONN_TYPE+"' AND EXCHANGE_CODE = '"+EXCHANGES+"' AND PHONE_NO='"+PHONE+"') " );
     //System.out.println("THE SQL QUERY = " + sql);
      //java.sql.ResultSet columns = statement.executeQuery(sql);
                            while(columns.next()){
                            String Phone_No = columns.getString("PHONE_NO");
                            String G_C_Bill = columns.getString("GROSS_CURRENT_BILL");
                            String Amount_Payable= columns.getString("AMOUNT_PAYABLE");
                            String N_A_Amount= columns.getString("NET_ARRERS_AMOUNT");
                            String Name= columns.getString("NAME");
                            String Address1= columns.getString("ADDRESS_1");
                            String Address2= columns.getString("ADDRESS_2");
                            String Address3= columns.getString("ADDRESS_3");
                            String Address4= columns.getString("ADDRESS_4");
                            String C_Type= columns.getString("CONNECTION_TYPE");
%>
                            <TR>
                            <TD> <%=Phone_No %></td>
                            <TD> <%=G_C_Bill %></td>
                            <TD> <%=Amount_Payable%></td>
                            <TD> <%=N_A_Amount %></td>
                            <TD> <%=Name %></td>
                            <TD> <%=Address1 %>,<%=Address2%>,<%=Address3%>,<%=Address4%></td>
                            <TD> <%=C_Type %></td>
                            </tr>
                            <%}
}%>
                            </table>
                            </body>
                            </html>

Similar Messages

  • Problem printing frames and lines

    Hi,
    I have problems when printing frames and lines. As far as I know in reports created by WRITE statement. Frame characters aren't printed at all, I mean not even spaces and so all layout of page is corrupted. It changes even with format types what I don't understand.
    Could you tell me basic concept of printing frames?
    I think some of box_drawings_* characters are used.
    I tried to change characters in character set used by device type of chosen output device. But I probably haven't done it right, because in comparing character sets it still compares values before my change.
    What is proper way of changing character set?
    Thank you for every reply.
    Dasa

    What format are you using for your output?
    Try using something other then HTML, Try HTMLCSS or PDF or RTF insead.
    Simply set the DESFORMAT parameter to one of these values.

  • Can we use frames and jsps together..

    Is it good to use frames with jsps.performence wise..bcos when iam calling jsps in frames it taking more time..to laod..
    regards,

    Remember, 2 frames == 2 HTTP requests. 3 frames == 3 requests, etc.
    It will take longer of course. To think otherwise is crazy. However there are times when the benefits are there. I've used them, expecially if it's a situation where taking a little longer on the initial load makes all other accesses faster. This is particularly the case when I've got a fancy UI that uses lots of graphics. I don't need to load the graphics more than once so I put them in separate frames and only have one frame (which is mostly text) change content.

  • FCP7 export problems - black frames and text irregularities

    I'm on FCP 7.0.3 and have recently started editing stuff from my new Panasonic HDC-HS900.
    I started a small project just to get to grips with the new workflow and realised that I had made the mistake of trying to import .mts files. However, I found a plugin from Panasonic's website which allows this but editing with the imported files is a nightmare because FCP starts running so slowly that it is impossible to make any kind of precise edits - the scrubber bar jumps all over the place and moving it forward one frame with the arrow keys takes about three seconds.
    So, I realised my mistake and having discovered that using ClipWrap circumvents all these problems, I devised a new workflow and resolved to stick to it.
    The only problem is that I showed the test edit to my girlfriend and her parents and despite it being full of bad stuff (I mean very rough edits caused by the slowness and audio problems that I couldn't be bothered sorting out also because the process was so frustratingly slow), they all liked it. So, whilst I would like to consign this experimental disaster to the bin, I need to at least iron out some of the problems so that I can give my girlfriend a copy which does not look quite so awful.
    So, after labouring through this excruciatingly slow process, I try to export the finished thing only to find that the opening ten seconds, where I have used a slow motion sequence (which, ironically, is not an .mts file - it's a 10s .mov file I exported from FCP in order to convert it from 50p to 25p slow motion without losing frames) and a bit of text which dissolves in and out, there are a few single black frames and the text disappears momentarily several times.
    Everything else is fine (apart from the awful edits!).
    Having now left FCP to render the whole sequence, I managed to inspect it frame by fram much quicker and on the timeline it looks exactly as it should - the edit itself couldn't be much simpler; two layers - one text, one .mov file. dissolve the text in for one second, two seconds later dissolve in the .mov then a virtual reverse process. What could possibly go wrong?
    Anyway, I have deleted all the render files and I am currently waiting for the sequence to re-render - estimated time: two hours.
    All I want to do is wrap this junk up so that I can start a proper project.

    I'll have to respond in an unordered fashion, just to try to make sense in my reply.
    I was using ProRes 422 HQ because I found three options in ClipWrap and had to make a quick decision based on two minutes research and having found by trying it that 422 HQ files were only about 25% bigger than 422 files, I figured I had nothing to lose - especially as the workflow I WILL BE employing does not require permanent storage of the files and I now have 1TB external space for media archive storage and over 600GB internal space for ongoing projects. I might as well use the highest quality.
    The reason I suspected the rendering files is that they were being used by FCP in the export of the project - evident in the fact that it takes almost three hours to save an unrendered sequence vs about six minutes to export a rendered sequence. Therefore, being unaware of the inherant problem you mention, I think it was reasonable to guess that a forced re-rendering might have sorted it out.
    Yes, with 20/20 hindsight, it might have been quicker but, again being unaware of the issue you mention - which I shall have to look into - it seemed like a small problem which ought to have a had a simple answer. But now I know better.
    I have, incidentally, discovered that all the dissolves I inserted have very similar problems.
    And, to answer your first point last, I have already gone down that path - I'm just waiting for the results.
    Could you perhaps point me at some article where I can read about the inherant problems of H.264, please?

  • Problem with JNDI and JSP in Tomcat

    Hi,
    Basically, what I've done is to use the Tomcat administration web
    application to create the DataSource, which looks like it populated the
    server.xml (see below). I then try to access the testconn.jsp, and am
    getting that "Name java:comp is not bound in this Context" error.
    I was wondering if anyone could tell me what I'm doing wrong?
    Thanks,
    Feri
    My Configuration:
    - Tomcat 5.0.19
    - MySQL 4.0.18-nt
    - mysql-connector-java-3.0.15-ga-bin.jar
    server.xml:
    <GlobalNamingResources>
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <!-- Editable user database that can also be used by
    UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
    type="org.apache.catalina.UserDatabase"
    description="User database that can be updated and saved">
    </Resource>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    </ResourceParams>
    <!--Feri test JNDI-->
         <Context crossContext="true" debug="5" docBase="injury" path="/injury" reloadable="true">
         <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_injury_log." suffix=".txt" timestamp="true"/>
              <Resource name="jdbc/injury" auth="Container"
    type="javax.sql.DataSource">
    </Resource>
    <ResourceParams name="jdbc/injury">
         <parameter>
              <name>factory</name>
              <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
         </parameter>
    <parameter>
    <name>username</name>
    <value>root</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>root</value>
    </parameter>
         <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
         <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/injury</value>
    </parameter>
         <parameter>
              <name>maxIdle</name>
              <value>30</value>
         </parameter>
         <parameter>
              <name>maxActive</name>
              <value>10</value>
         </parameter>
         <parameter>
              <name>maxWait</name>
              <value>10000</value>
         </parameter>
    </ResourceParams>
         </Context>
    <!--Feri test JNDI end-->
    </GlobalNamingResources>
    \webapps\injury\WEB-INF\web.xml:
    <resource-ref>
    <description>Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file.</description>
    <res-ref-name>jdbc/injury</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    \webapps\injury\testconn.jsp
    <%@ page import="java.sql.*" %>
    <%@ page import="javax.sql.*" %>
    <%@ taglib prefix="ct" uri="/injury" %>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
    <h1>Connection test</h1>
    <ct:connection name="jdbc/injury">
    <%
    Statement stmt= conn.createStatement();
    ResultSet rs;
    rs = stmt.executeQuery("select * from user");
    while (rs.next()){
    %><%=rs.getString(1)%><%=rs.getInt(2) %><br><%
    rs.close();
    stmt.close();
    %>
    </ct:connection>
    ConnectionTag.java
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    import javax.naming.*;
    import javax.sql.*;
    import javax.sql.DataSource;
    public class ConnectionTag extends TagSupport implements TryCatchFinally {
    private Connection conn;
    // JNDI name of the connection
    private String name;
    public void setName(String name)
         this.name = name;
    public int doStartTag()
         throws JspException
         try {
         Context env = (Context) new InitialContext().lookup("java:comp/env");
         DataSource ds = (DataSource) env.lookup(name);
         if (ds != null)
              conn = ds.getConnection();
         } catch (Exception e) {
         throw new JspException(e);
         if (conn == null)
         throw new JspException("can't open connection " + name);
         pageContext.setAttribute("conn", conn);
         return EVAL_BODY_INCLUDE;
    public void doCatch(Throwable t)
         throws Throwable
         throw t;
    public void doFinally()
         try {
         Connection conn = this.conn;
         this.conn = null;
         pageContext.removeAttribute("conn");
         conn.close();
         } catch (Exception e) {
    Tomcat 5.0\conf\Catalina\localhost\injury.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Context displayName="Injury" docBase="E:\Tomcat 5.0\webapps\injury" path="/injury" className="org.apache.catalina.core.StandardContext"
    cachingAllowed="true" charsetMapperClass="org.apache.catalina .util.CharsetMapper" cookies="true" crossContext="false" debug="0"
    mapperClass="org.apache.catalina.core.StandardContextMapper" useNaming="true" wrapperClass="org.apache.catalina.core.StandardWrapper" >
    <Resource auth="Container" description="Resource reference to a factory for java.sql.Connection instances that may be used for talking to a particular database that is configured in the server.xml file." name="jdbc/injury" type="javax.sql.DataSource"/>
    <ResourceLink global="jdbc/injury" name="injury" type="javax.sql.DataSource"/>
    </Context>

    Hi,
    First of all, you can find alot of information about this in the forum about jsp's.
    I think a good thing to do is not to put your context tag directly into the server.xml file.
    What you should do is create a context.xml file with the context-tag in it, and put it in the META-INF directory of your .war file. Upon deployment to tomcat5 this file will be extracted from the war, copied to the conf\enginename\hostname directory, and it will be renamed to contextName.xml.
    I think you are developing directly into the webapps directory, and I believe you should avoid that and use the deployment feature of the manager web-app or you should use the deployertool from you ide or standalone ant.
    anyway, for starters try to remove the context tag from the server.xml file as described above, and check out the jsp / jdbc forums for simular problems and answers.
    good luck

  • Problems using JNI and JSP in WebLogic 6.0

    Hello everybody. My problem is that I've got a Java class that is called from a JSP. That class connects to a C function and it returns a String. A want this string to be shown by the JSP. The code is:
    JSP
    <html>
    <head>
    <title>prueba JNI</title>
    </head>
    <body>
    <%@ page import="ejemplosJNI.*, conversiones.*;"%>
    <%
    Texto texto = new Texto();
    out.println(texto.realizado());
    %>
    </body>
    </html>
    Java class
    package ejemplosJNI;
    public class Texto
    private native String getLine(String prompt);
    String input = null;
    public static void main(String args[])
    Texto t = new Texto();
    static
    System.loadLibrary("MyImpOfPrompt");
    public String realizado()
    input = this.getLine("Mando una l�nea desde Java");
    return input;
    C function
    #include <stdio.h>
    #include <jni.h>
    #include "Texto.h"
    JNIEXPORT jstring JNICALL
    Java_Texto_getLine(JNIEnv *env, jobject obj, jstring prompt)
    char buf[128];
    const char str = (env)->GetStringUTFChars(env, prompt, 0);
    (*env)->ReleaseStringUTFChars(env, prompt, str);
    return (*env)->NewStringUTF(env, str);
    I compile de C function and put the .dll library in the 'bin' folder in webLogic.
    When I call the JSP, I get the next exception:
    Servlet failed with Exception
    java.lang.UnsatisfiedLinkError: getLine
    at ejemplosJNI.Texto.getLine(Native Method)
    at ejemplosJNI.Texto.realizado(Texto.java:19)
    at jsp_servlet._jsp._pruebasjni._prueba1._jspService(_prueba1.java:93)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:213)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:246)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:1265)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:1622)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Is there any place where I have to put the .dll?
    Is there any place where I have to put the generated .lib?
    Where do I have to put the Texto.h file generated with javah?
    Can anybody help me to solve this problem?
    Thanks in advance.

    Hi, jschell! Maybe you can see my problem if I give you the code. My Java class and the C funtions are:
    Java class
    package ejemplos.cadena;
    public class Texto
    private native String getLine(String prompt) throws Exception;
    String cadenaFinal = null;
    public static void main(String args[])
    Texto t = new Texto();
    static
    System.loadLibrary("LibreriaCadena");
    public String realizado(String cadena)
    try
    cadenaFinal = getLine(cadena);
    catch(Exception e)
    System.out.println(e.toString());
    return cadenaFinal;
    C code
    #include <stdio.h>
    #include <jni.h>
    #include "ejemplos_cadena_Texto.h"
    JNIEXPORT jstring JNICALL
    Java_ejemplos_cadena_Texto_getLine(JNIEnv *env, jobject obj, jstring prompt)
    int cero =0;
    int division = 10 / cero;
    const char str = (env)->GetStringUTFChars(env, prompt, 0);
    (*env)->ReleaseStringUTFChars(env, prompt, str);
    return (*env)->NewStringUTF(env, str);
    I have done something like "int division = 10 / cero;" in order to get an exception in my C code. When I run my Java class I get an error message and the application breaks. I would like to know how to catch the C exception in order to pass it to my Java class that can manage it into the try-catch clause. I have read I have to use something like "FindClass" or "ThrowNew", but my problem is that I have no idea about C programming.
    Can you help me?
    Thanks for your time.

  • Problems with filters and jsp pages.

    I have the following simple filter that checks if there is user information in the session object and redirects accordingly:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginFilter implements Filter
         public void init(FilterConfig filterConfig) {}
         public void destroy() {}
         public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
         throws IOException, ServletException
              System.out.println("filter");
              HttpSession session = ((HttpServletRequest)request).getSession();
              String action = request.getParameter("action");
              if(action != null && !action.equals("login") && !action.equals("wronglogin"))
                   if(session.getAttribute("username") == null)
                        ((HttpServletResponse)response).sendRedirect("index.jsp?action=wronglogin");
                        System.out.println("User not OK, kicking out...");
                   else
                        chain.doFilter(request, response);
                        System.out.println("User OK, letting in...");
              else
                   chain.doFilter(request, response);
    }The filter is mapped to an admin page with the name index.jsp. However, I get an error for every <% and %> tag in the file (there are quite a few) when I use the filter with the page. The page works fine without the filter, and the filter seems to work with pages without scriptlets (without the <% and %> tags). Here is the beginning of the error report:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 6 in the jsp file: /admin/index.jsp
    Generated servlet error:
    Syntax error on tokens, AnnotationName expected instead
    An error occurred at line: 6 in the jsp file: /admin/index.jsp
    Generated servlet error:
    Syntax error on tokens, delete these tokens
    An error occurred at line: 6 in the jsp file: /admin/index.jsp
    Generated servlet error:
    Syntax error on token ";", [ expected
    An error occurred at line: 6 in the jsp file: /admin/index.jsp
    Generated servlet error:
    Syntax error on token ";", [ expected
    An error occurred at line: 6 in the jsp file: /admin/index.jsp
    Generated servlet error:
    Syntax error on token ";", [ expected
    Jasper gives me many errors per <% and %> tag. As you can see there is a <% tag on line 6. Any idea, why this does not work?
    Thanks!
    Message was edited by:
    chincillya

    What is the JSP scriptlet code at line 6 ?
    By looking at the code we can identify if there are any syntax errors, otherwise we can't really guess what might be the problem.

  • Problem in JavaScript and JSP

    Hello all, I have a problem. I am using a file upload box in my JSP page.
    And I want to put some validations on the input of that file - see if it exists, check its size, or may be its type. I tried to use ActiveXObject in the JavaScript but it gives an error - ActiveXObject is not defined. Is not allowed to use ActiveX object in JavaScript. if not then where can we use such an object. I used such a FileSystemObject in VbScript, but that too was a independent running scripts like .vbs file. Can anybody help?

    Use of ActiveX object is strongly discouraged, however
    Check if this solution solves your problem
    Inorder to use ActiveX Objects ,check whether ActiveX object s are enabled in IE.
    Goto IE>Internet Options>Security Tab>click button Custom level>
         scroll to 'Run ActiveX controls and plug-ins'>select �enable�.
         also enable "Initialize and script ActiveX control not marked as safe."

  • Problem w/ Netscape and JSPs

    I am experience a very strange problem regarding Netscape. When the
              application is overloaded (running on development machine), I occasionally
              experience a situation where HTML is displayed at the top of the screen. It
              seems to be the contents of a common javascript file that is used by all
              pages. Also, the basic contents of page seem to appear (and with
              appropriate data), but a few of the JSP includes do not seem to come through
              (used for common navigation)
              This only happens using netscape when hitting a machine that is underpowered
              and busy. Otherwise it seems to work fine.
              Thanks for any insight.
              

    Sometimes that happens if there is too much stuff at the top of a jsp,
              causing too many linefeeds before the html begins. However, I do not know
              how that could be correlated with what you described about increased load.
              Cameron Purdy
              [email protected]
              http://www.tangosol.com
              WebLogic Consulting Available
              "Steve Schroeder" <[email protected]> wrote in message
              news:39cd259c$[email protected]..
              > I am experience a very strange problem regarding Netscape. When the
              > application is overloaded (running on development machine), I occasionally
              > experience a situation where HTML is displayed at the top of the screen.
              It
              > seems to be the contents of a common javascript file that is used by all
              > pages. Also, the basic contents of page seem to appear (and with
              > appropriate data), but a few of the JSP includes do not seem to come
              through
              > (used for common navigation)
              >
              > This only happens using netscape when hitting a machine that is
              underpowered
              > and busy. Otherwise it seems to work fine.
              >
              > Thanks for any insight.
              >
              >
              

  • Please Help: Problems w/Frames and Rollovers

    I've been having a problem recently w/making rollovers in
    Fireworks 8. Whenever I change the color of the text (intended to
    be made into a rollover link) in one frame, it changes the color of
    that text in all of the frames. I've never had this happen in the
    previous software version. Please help! Thanks!

    PSparky wrote:
    > I've been having a problem recently w/making rollovers
    in Fireworks 8. Whenever
    > I change the color of the text (intended to be made into
    a rollover link) in
    > one frame, it changes the color of that text in all of
    the frames. I've never
    > had this happen in the previous software version. Please
    help! Thanks!
    Make sure that Share Across Layers, and Share Across Frames
    are unchecked.
    Linda Rathgeber [PVII] *Adobe Community Expert-Fireworks*
    http://www.projectseven.com
    Fireworks Newsgroup:
    news://forums.projectseven.com/fireworks/
    CSS Newsgroup: news://forums.projectseven.com/css/
    http://www.adobe.com/communities/experts/

  • How do I fix problem with linked and cropped image frames not printing properly when spanning pages?

    We are using InDesign (ID) to develop and print church bulletins which contain a combination of text frames and graphics. One of the graphic types we use are TIF files which are high-resolution scans of hymns.
    A hymn usually has a combination of the musical score, plus the lyrics - with many verses., so the modular structure is 'staff' composed of a treble clef, followed by verses, followed by a base clef.
    If the example above had 6 verses instead of one, we would crop the image by adjusting the frame, so that the treble clef and the desired verses showed through the frame.
    We would then copy and link the frame - piggy back - adjusting the next content window etc....so we build a custom version of the music as a series of linked frames - each with the same base image, but a different frame position.
    So this works fine, when we do this on a single page, but when we then add a 'last staff' at the top of the following page, we encounter print problems with some output devices.
    Imagine a two-page spread, with a full page of music on the left, and the last staff (treble clef, verses, base clef) unit as a separately linked frame at the top of the right page of the spread.
    It displays correctly, and will print individually as pages correctly, but when we print it as a booklet, the last frame drops out and we have blank space.
    I can print the document to PDF and it works fine, but if I print it to a copier or laser printer I get drop out.
    It is inconsistent.
    Previews are always okay. Individual page prints are okay, but when you print the entire document, the last frame in this kind of linked series gets blanked.
    If we create and name the image differently, and call it in as a new image - (not linked to the previous), but it is still a large image that is cropped to a small piece, then it doesn't print.
    If we save the last frame as a different image type (take the TIFF file into photoshop, crop it and save it as a jpg - so it is only the 'snippet') and then import it, it works fine.
    So my question to you InDesigners....is there some setting or tip or trick I need to know to be able to link a series of frames with the same base image, but different crops and make it span across two pages properly.
    Or do we need to play this game of crop and trim the image so that it doesn't drop out?
    Any thoughts, advice, direction would be gratefully received!

    I did a lot of such hymn things in the past, but I was alway working on the scans in Photoshop, like adjusting, retouching spots and cropping. And I was always seperating those images to be more flexible so I never run into such a problem.
    I am always scanning in a higher quality level than I would need, I scan it in color, this allows me to eliminate paper color easily, even if I need 1-bit images at the end, I do it in color, so I can also turn the image.
    I did once run into a similar problem with a scan I have got from a copier-scanner machine (it was not a song). But saving as PSD resolved my problem.
    So I would suggest: Open your files in Photoshop, resave them as PSD files and use those instead. If you use 1-bit images (which is fine for this type of images) you should use a resolution equal to the printer's resolution.

  • Has anyone experienced this problem: I am editing in FCP 7.0.3 on a Mac 10.6.8 - I have a clip in the browser that is full frame and matched the other clips but when I drop it in the time line it becomes a fully zoomed in version of itself

    has anyone experienced this problem: I am editing in FCP 7.0.3 on a Mac 10.6.8 - I have a clip in the browser that is full frame and fine and it matches the other clips in my bins but when I drop it into the time line it becomes a fully zoomed in version of itself and I can only see a small portion of the image.  What's going on?  I've noticed this has happened in the past randomly with other clips and it's driving me cray cray!  Any help appreciated greatly and thanks in advance for taking the time

    In the FCP Browser, click on the source clip that is showing up sized incorrectly to select it. Once it is selected, type Command + 9 to see the item properties for the clip. Either report those properties here, or take a screen shot of the item properties and post the screen shot here.
    Next, click anywhere in your sequence timeline and then type Command + 0 {zero} to see your sequence settings. Either report those settings or take a screen shot of the sequence settings and post that screen shot here.
    MtD

  • Tomcat 4.0.x and JSP / JSTL performance problems.

    Hello everyone,
    I've got a web application where some of my JSP pages are rendering quite slowly. As an example I'll use a JSP page that I wrote for browsing through a user database. It uses two beans...
    1. jobBean - Ensures that all of the required (and correct) beans that will be used for processing the request have been loaded.
    2. browserBean - A basic JavaBean that holds a set of UserBean(s) and other information pertinent to database queries (start, limit, order).
    I'm using Apache Struts to map requests to the appropriate processing modules. Now the problem I'm having is that each request is taking between 1 and 2 seconds to execute. As you can imagine that's not going to allow for very many simaltaneous users. I've tracked the problem down to something JSP related. All of my code executes fairly quickly (I think). It takes about 20-30ms for my code to identify the request, load the requested data from the database, and convert it into a usable format (the browserBean). Here's my code...
    <%@ page contentType="text/html"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <META http-equiv="Cache-Control" content="no-cache">
    <title>
    Browse Users
    </title>
    </head>
    <body>
    <!-- Set up the OrganizationBeans for use -->
    <jsp:useBean id="jobBean" class="com.vacode.jobs.generic.JobBean" scope="session" />
    <jsp:useBean id="browserBean" class="com.vacode.mqdb.beansets.user.UserBrowserBean" scope="session" />
    <!---------------------------->
    <!-- Start Time Logged Here -->
    <!---------------------------->
    <c:if test="${jobBean.currentJob.name != 'BrowseUserJob'}">
         <!-- This page was accessed before everything was properly initialized -->
         <c:url var="browseUser" value="manageUsers.do">
              <c:param name="action" value="browse" />
         </c:url>
         <c:redirect url="${browseUser}" />
    </c:if>
    <form action="manageUsers.do" method="get">
         <input type="hidden" name="action" value="browse">
         <input type="hidden" name="start" value="<c:out value="${browserBean.dummyStart}" />">
         <input type="hidden" name="order" value="<c:out value="${browserBean.order}" />">
         I would like to view
         <select name="limit">
              <c:forEach begin="1" end="5" var="current">
                   <option value="<c:out value="${current*5}" />"
                        <c:if test="${browserBean.dummyLimit == current*5}">
                        selected
                        </c:if>
                   >
                    <c:out value="${current*5}" />
                   </option>
              </c:forEach>
         </select>
         results per page.
         <input type="submit" action="submit">
    </form>
    <c:url var="id" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_ID" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="name" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="firstName" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_FIRST_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="lastName" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_LAST_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="email" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_EMAIL_ADDRESS" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="organization" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_ORGANIZATION_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="status" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="USER_STATUS_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <c:url var="role" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="0" />
         <c:param name="order" value="ROLE_NAME" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
    </c:url>
    <table>
         <tr>
              <td><a href="<c:out value="${id}" />">Id</a></td>
              <td><a href="<c:out value="${name}" />">User Name</a></td>
              <td><a href="<c:out value="${firstName}" />">First Name</a></td>
              <td><a href="<c:out value="${lastName}" />">Last Name</a></td>
              <td><a href="<c:out value="${email}" />">E-Mail</a></td>
              <td><a href="<c:out value="${organization}" />">Organization</a></td>
              <td><a href="<c:out value="${status}" />">Status</a></td>
              <td><a href="<c:out value="${role}" />">User Type</a></td>
         </tr>
    <c:forEach items="${browserBean.beans}" var="bean">
         <tr>
              <c:url var="manage" value="manageUsers.do">
                   <c:param name="action" value="modify" />
                   <c:param name="beanId" value="${bean.userId}" />
              </c:url>
              <td><a href="<c:out value="${manage}" />"><c:out value="${bean.userId}" /></a></td>
              <td><c:out value="${bean.userName}" /></td>
              <td><c:out value="${bean.firstName}" /></td>
              <td><c:out value="${bean.firstName}" /></td>
              <td><c:out value="${bean.email}" /></td>
              <td><c:out value="${bean.organizationName}" /></td>
              <td><c:out value="${bean.statusName}" /></td>
              <td><c:out value="${bean.roleName}" /></td>
         </tr>
    </c:forEach>
    <!-------------------------->
    <!-- End Time Logged Here -->
    <!-------------------------->
    </table>
    <c:url var="next" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="${browserBean.nextPageStart}" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
         <c:param name="order" value="${browserBean.order}" />
    </c:url>
    <c:url var="previous" value="manageUsers.do">
         <c:param name="action" value="browse" />
         <c:param name="start" value="${browserBean.previousPageStart}" />
         <c:param name="limit" value="${browserBean.dummyLimit}" />
         <c:param name="order" value="${browserBean.order}" />
    </c:url>
    <c:if test="${browserBean.previousPageStart>-1}">
         <a href="<c:out value="${previous}" escapeXml="false" />">previous</a>
    </c:if>
    <c:if test="${browserBean.nextPageStart>-1}">
         <a href="<c:out value="${next}" escapeXml="false" />">next</a>
    </c:if>
    <br>
    <br>
    Quick Jump To Page:
    <c:forEach varStatus="loopTag" items="${browserBean.pageStartValues}" var="current">
    <c:choose>
         <c:when test="${loopTag.index+1==browserBean.currentPageNumber}">
              <c:out value="${loopTag.index+1}" />
         </c:when>
         <c:otherwise>
         <c:url var="thisPage" value="manageUsers.do">
              <c:param name="action" value="browse" />
              <c:param name="start" value="${current}" />
              <c:param name="limit" value="${browserBean.dummyLimit}" />
              <c:param name="order" value="${browserBean.order}" />
         </c:url>
         <a href="<c:out value="${thisPage}" />"><c:out value="${loopTag.index+1}" /></a>
         </c:otherwise>
    </c:choose>
    </c:forEach>
    <br>
    <br>
    Max Possible Pages: <c:out value="${browserBean.maxNumberOfPages}" />
    <br>
    Current Page: <c:out value="${browserBean.currentPageNumber}" />
    </body>
    </html>I've added comments where I timed my code from (by writing new Date().getTime() to the console). It usually takes between 1 and 2 seconds for that block of JSP to execute. I wrote a test class that should be very similar to the process (iterating over the forEach loop mainly) and it usually executed in 10ms to 20ms.
    I had a look at the servlets that were generated by Tomcat and I noticed that for each <c:url> I used there's about 300 lines of code (with several syncronized() methods). Could this have anything to do with it? If so, what could I do to improve the performance?
    Worth mentioning... The machine I am using is an AMD Athlon 1GHZ with 768MB RAM, 7200 RPM UDMA100 IDE HDD.
    I'm also using Tomcat integrated with a development environment (IntelliJ IDEA).
    Any help that anyone could offer is much appreciated.
    Thanks,
    Ryan

    Can you get acceptable performance if you hack out everything except the browserBean forEach loop? Maybe you are trying to do too much runtime EL evaluation on the page.
    If performance improves, you may want to push the URL construction and startValue computations to a Struts Action and put a bunch of objects on the requestScope (like "id_url", "name_url", "pageStartValue").
    Putting these computations in the Action would avoid having JSTL parse each of the ${} arguments, evaluating the expressions, and using costly reflection to turn ${browserBean.order} into browserBean.getOrder().

  • Bullet problem when creating text frames and tables in InDesign CS5

    Every time I create a new text frame or table in InDesign CS5 and paste information there, the first row in the table or several lines of text come out with bullet points. I'm sure this is a setting or style at some point I created and now am unsure of how to delete. I would like the new text frames and tables to not include bullet points as a default when imported or pasted. Any thoughts? Thanks!

    Defaults for text in the current document are made with no text selected. Turn off bullets and they should stay off (but check the styles, too, you might have accidentally set a bulleted style as the defualt and you should change the default style instead). If this is happening in all files, you need to do it with nothing open to reset the default for all new documents (existing files, unfortunately, need to be fixed one at a time).

  • I'm having problems with the opening frame and can't find a way to deal with it.

    When I open a file, the full Illustrator frame changes from maximum to a smaller frame. Why? How can I set the program to stay at a full frame and not have to resize the Illustrator every time I open a file?

    Thanx Harron, I thought to myself that I was either going to mess up somewhere and get lost or just screw up my settings, but I followed the instructions you gave and it worked perfect.
    Thanx again,
    Sean

Maybe you are looking for