Jsp- Struts

Hi,
<in Struts Framework>
in my JSP i have a checkbox And in Bean Class the type of chkbox is boolean
if i checked the chkbox and click on "search" btn, getting the results. but not getting Proper value of check box ( true or false )
What should i do for this?
i made a print for knowing the value of chkbox in action class. but not getting proper value before submit.
Thanks in adv.
AE

hi,
try this.....................
in ActionForm
public boolean isCheck() {
         System.out.println("Inside isCheck check = " + check);
         return check;
public void setCheck(boolean b) {
         check = b;
         System.out.println("Inside setter check = " + check);
}in jsp................
     <html:checkbox name="FormBean1" property="check" />i tried this n i am getting the proper value true(if selected) otherwise false

Similar Messages

  • Frame issue in jsp/struts application

    I have a problem with jsp struts application .
    i have a jsp page which is inside a frame .
    The action class which receives the request from this page redirects the request to another jsp page.
    I want this new jsp page to be displayed without any frame , but it is getting displayed from inside the frame .
    can anybody help me out ...
    regards,               
    slam

    Possibly:
    1. Browser could be caching the page.
    2. If you use a proxy, the proxy may be caching the page.
    3. The page is not getting recompiled.

  • Non-ascii, jsp-struts, not reciveing the correct value in the server

    Hi,
    I am developing JSP-Struts based application using tomcat server. In JSP struts form, when I put nonascii charater in the text field or text area, on the server side I recived twice of that non-ascii character..
    for example, in the text field I entered following string:
    ------> This is text in tex field �&#131;
    On the server side, I get the following:
    ------> This is text in tex field �&#131;�&#131;
    Please notice, twice non ascii character.. :(
    I don't know how to resolve this.. Any help will be greatly appricated..
    Thanks,
    Ajay

    I changed the <form> in the jsp to div and its working fine. I do not need to have comments in JavaScript funcion() anymore. I don't know why that made the difference though? According to:
    http://www.w3schools.com/tags/tag_form.asp
    The <form> tag is used to create an HTML form for user input.
    The <form> element can contain one or more of the following form elements:
    <input>
    <textarea>
    <button>
    <select>
    <option>
    <optgroup>
    <fieldset>
    <label>
    An HTML form is used to pass data to a server.
    I do have <button> and also send the data - the value of checkboxes - to server. So I think it should also work with <form>.
    Please let me know if you have any idea. Thanks.

  • Tracking a separate Thread  - java/jsp/struts

    Hi all,
    My project is a webapplication using java/jsp/struts. My requirement is to write bulk data to a file, which i want to run as a separate thread. Since it runs as a separate thread the control comes back to UI (userInterface) page. On subsequent request from UI page by the user i want to check whether the thread process is completed or not , so that i can read from the file. Is it possible to simultaneously read from the file when the thread is in the process of writing data to the file. If so any idea on how to implement this functionality in java?
    How to keep track of the separate thread (whether it is completed or not) in java?
    Is it possible to read from the file when the thread is writing to the file in java?
    Thanks is advance.

    dangerous wrote:
    How to keep track of the separate thread (whether it is completed or not) in java?Thread#join().
    As you're already asking this trival question, I highly recommend you to read the Concurrency Tutorial here at Sun.com. Google can find it.
    Is it possible to read from the file when the thread is writing to the file in java?Not with java.io. You can use the java.nio API for that. You can also read/write it in memory (as a byte[] or a ByteArrayInputStream/OutputStream property) and if it is finished then write it to disk.

  • Deploy BC4J/JSP-Struts to IAS

    HI,
    I'm trying to deploy a BC4J/JSP-Struts application to IAS. This application was developed with JDeveloper 9.0.3.
    I can deploy this application to a Standalone OC4J (delivered with JDeveloper 9.0.3) on Windows2000 without problem.
    Then I want to deploy this application on Oracle9iAS 9.0.2. For this I create an .EAR file with JDeveloper and I start the OC4J Administrator tools from Oracle9iAS and deploy my application.
    I start the application with
    http://erbium.int.imd.ch:7778/InvoicesInterface/main.jsp?user=x-XxX
    and I become the menu without Problem.
    Then I click on the link
    http://erbium.int.imd.ch:7778/InvoicesInterface/VInvoiceUsersView1_Browse.do?user=x-XxX
    and I become following :
    HTTP 500 Internal server error
    The page cannot be displayed
    Did you have any Ideas ?
    Thanks Yves
    Configuration:
    - Oracle9iAS (9.0.2) on Solaris
    - JDeveloper9.0.3

    Yves -
    I am not able to pinpoint the exact error you are having but here are some obervations
    a) You are going backwards in versions of OC4J when you deploy to 9iAS 902. If you are using JDev 903, then it is running with a local version of OC4J 903. When you are deploying to 9iAS 902, it's a earlier release of OC4J, so there may be an issue there. There is a 9iAS 903 version available from OTN that would be better to use in this case.
    b) Is the struts framework packaged as part of the EAR file you are deploying? i'm not familiar with how BC4J and Struts apps are packaged from JDeveloper, but this is something to check on for sure. The local OC4J running inside of JDeveloper may have the Struts libs configured at the server level.
    c) You might want to try and change the show-friendly-error-messages (or something like that) property inside of IE (if you are using it) so that it will display the stack trace the server might be sending. this may be of help to further locate the source of the problem (ClassNotFoundException, etc.).
    -steve-

  • Learning JSP/Struts with JDeveloper

    Hi. We have an older version of Java on our Unix production web server (1.4.2_12-b03) and it'll be a year before we upgrade it and use JSF. In the meantime, I'm looking at learning Struts and JSP. Can you point me to a few tutorials specific to JDeveloper for JSP/Struts? Most of the tutorials now are for ADF/JSF -- which we can't use yet. Thanks.

    Just to clarify - JSF can run on OAS 10.1.2 (that supports J2EE 1.3 and uses JDK 1.4).
    See: http://download.oracle.com/docs/html/B25947_01/deployment_topics006.htm#CIHCGGDF
    So this shouldn't be a reason for you not to use JSF and JDeveloper 10.1.3.
    That said if you want to learn Struts try following the archive links on the various JDeveloper tutorials/demos pages to the demos from the 9.0.5/10.1.2 days.

  • How to putput a property of an object in session? (jsp/struts)

    Guys,
    I have an object (myGroup) that consist of 2 properties: groupName and groupTitle. The object is in a session called group_session.
    On my jsp page, I would like to output the property groupName on the text field associated with the groupName:
                   <html:text      property="name"
                                                   value=???????????????
                                  size="45"
                                  maxlength="60" />
                                  <html:errors property="name" />Q: how can I output the value of the groupName in the value section?
    thanks

    Hi
    you can try something like this....
    <input type="text" name="any" property="<bean:write
    name="myGroup" property="groupName "
    scope="session"/> " >
    This snippet is closer to JSP coding rather than struts. Leverage the capabilities of struts by setting the values in ActionServlet instead.
    <html:text property="name" size="45"  maxlength="60" />                    -Rohit
    By the way why did you add this tag
    <html:errors property="name" /> ??
    Message was edited by:
    RohitKumar

  • How to instantiate object in JSP/STRUTS page?

    I worked through the STRUTS tutorial (http://rzserv2.fhnon.de/~lg002556/struts/Doku.html) but I get errors when I try to instantiate an object of a class that is in my WEB-INF/classes directory:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 14 in the jsp file: /BookSerialize.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    D:\Programme\jakarta-tomcat-4.1.12\work\Standalone\localhost\strutsdemo\BookSerialize_jsp.java:86: cannot resolve symbol
    symbol : class Book
    location: class org.apache.jsp.BookSerialize_jsp
    Book book = new Book();
    ^
    The Book.class (and other classes) is in the WEB-INF/classes directory. The BookSerialize.jsp is here:
    <%@ page language="java" import="java.beans.XMLEncoder, java.beans.XMLDecoder, java.io.*"%>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <html:html locale="true">
    <head>
    <html:base/>
    <title><bean:message key="index.title"/></title>
    </head>
    <body bgcolor="white">
    <h2>Book Serialization</h2>
    <%
    Book book = new Book();
    book.setTitle("A great Book about Struts");
    book.setPages(100);
    out.println("<member>First Title: " + book.getTitle() + "</member>");
    try {
    XMLEncoder encoder = new XMLEncoder(new BufferedOutputStream(new FileOutputStream("/Sample.xml")));
    encoder.writeObject(book);
    encoder.close();
    } catch(Exception ex) {
    out.println(ex);
    book.setTitle("A great Book about Struts, Second Edition");
    out.println("<member>Second Title: " + book.getTitle() + "</member>");
    try {
    XMLDecoder decoder = new XMLDecoder(new BufferedInputStream(new FileInputStream("/Sample.xml")));
    book = (Book) decoder.readObject();
    decoder.close();
    } catch(Exception ex) {
    out.println("<h1>" + ex + "</h1>");
    out.println("<member>Third Title: " + book.getTitle() + "</member>");
    %>
    </body>
    </html:html>
    I also get the same error when deploying and (trying to) run on the J2EE 1.3.1 server.
    So far, I just used JSP pages working with beans (usebean tag). Is it possible at all to just do a
    MyClass myObject = new MyClass();
    within a JSP page, if MyClass.class is in the WEB-INF/classes of the web application?
    Is there any kind of import missing? Book.class is in the default package, so i can't state it in the page directive/import parameter of the JSP page...
    any advice?

    I think, I got it: you have to use package names for your classes and avoid the default package. After I used a package name, it was possible to instantiate the object ....

  • Dynamic Tree Creation using JSP, Struts framework

    I urgently require tips/information/code snippet for creating a Dynamic Tree structure.
    Tree is the hierarchical folder structure that we see in windows operating system.
    Dynamic tree in the sense that all nodes shall be populated from database & a radio button shall be present at each node that can be selected & submitted to form.
    Tree should be done using JSP (& if required Javascript).
    I am using Struts framework .
    [email protected]

    u need to know quite a few java technologies to make archieve your dream.
    JDBC, dynamic array and JSP.
    after reading tutorial regarding to these 3 materials, you should be able to get your job done.

  • Reading Byte [] in JSP - Struts

    Hi,
              I am storing PDF files as BLOB object in Oracle 9i Database.
              In my struts action class I am reading the file and converting it into byte [].
              I am storing this value in the session as an object and while reading in the JSP,I am getting only null.
              But when I check the size of the byte [], it says 7,which is the actual length.
              How to read the byte [] and put it session?
              Any suggestions.
              Regards,
              Ram

    Hi Kris,
              Thank you for your inputs.
              I have tried this option also.
              Still I am getting the same issue like the "File does not begin with %PDF-".
              Actually I am getting the byte[] in my DAO class and passing that value to the action class by way of list.
              In my action class I am doing the below code.
              List lstResult = new ArrayList();
              byte[] byteArray = (byte[]) lstResult.get(0);
                             smCat.debug("DailySalesReportAction - b4 byte array");
                             // write data to output stream of response object
                             try {
                                  st = objHttpResponse.getOutputStream();
                                  smCat.debug("DailySalesReportAction - inside try");
                                  objHttpResponse.setContentType("application/pdf");
                                  objHttpResponse.setContentLength(byteArray.length);     
                                  objHttpResponse.setHeader("Content-Disposition","inline");
                                  st.write(byteArray);
                                  st.flush();
                                  st.close();
                             } catch (IOException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
              My DAO looks like this.
              public byte[] executeBlobQuery(String strQuery) {
                        java.sql.Connection vendorConn = null;
                             Blob blobResult = null;
                             int lob_length = 0;
                             BufferedInputStream bufferedInStream = null;
                             java.io.OutputStream os = null;
                             byte[] byteBuffer = null;
                             smCat.debug("Entering in executeBlobQuery DAO***************> ");
                             try {
                                  try {
                                       mConnection = getConnection();
                                  } catch (Exception e) {
                                       smCat.error(e.getMessage());
                                  // Create a static JDBC statement
                                  Statement m_stmt = mConnection.createStatement();
                                  mConnection.setAutoCommit(false);
                                  m_stmt.setFetchSize(10000);
                                                      ResultSet m_rs = m_stmt.executeQuery(strQuery);
                                  // Increment the result set
                                  if(m_rs.next()){
                                  smCat.debug("strQuery "+strQuery);
                                  //blobResult = ((OracleResultSet) m_rs).getBLOB("REPORT");
                                  //blobResult = m_rs.getBlob("REPORT");
                                  //byteBuffer = m_rs.getBytes("REPORT");
                                  //System.out.println("Length is --> "+byteBuffer.length);
                                  os = ((OracleThinBlob)blobResult).getBinaryOutputStream();
                                  smCat.debug("Blob Retrived ");
                                  //image = (oracle.sql.BLOB)m_rs.getBlob(1);
                                  lob_length = (int) blobResult.length();
                                  smCat.debug("Value is --> " + lob_length);
                                  byteBuffer = new byte[lob_length];
                                                 int length = -1;
                                                 os.write(byteBuffer);
                                  smCat.debug("Value of byteBuffer --> " + byteBuffer.length);
                                                 os.flush();
                                  mConnection.commit();
                                                 os.close();
                                  bufferedInStream =
                                       new BufferedInputStream(blobResult.getBinaryStream());
                                  byteBuffer = new byte[lob_length];
                                  bufferedInStream.read(byteBuffer, 0, lob_length);
                                  bufferedInStream.close();
                             } catch (SQLException sqe) {
                                  smCat.error(sqe.getMessage());
                             catch (IOException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
              Ram

  • Oracle portal using JSF, JSP, Struts framework

    Hi ,
    Can anyone tell me how to build an oracle portal using JSF,Jsp and Struts Framework.
    Also please provide any manual or documentation for developing oracle portal.
    Thanks in Advance,
    Raghav

    At present, i think the best thing to do is to look at the example provided with the struts-faces integration taglib. I don't know any documentation about it.
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/

  • Newbie to JSP/Struts: Where to get started

    I would like to begin experimenting with JSP and the struts framework. I'm a java newbie but a relatively quick learner.
    First, what products do I need to use struts/JSP ?
    I have 9iAS standard edition release 1.0.2.1 and an oracle database std edition without the JVM installed. Do I need the JVM in the database ? Can JSP use a JVM outside the database ? Do I need enterprise edition ?
    Do I need Jdevelopper 9i or can I learn to use JSP with simple tools (HTML editor) first ?
    Does struts need JSP 2.0 spec or the JSP 1.1 that comes with iAS 1.0.2.1 is OK ? Is JSP 2.0 = JSP 1.2 (Like J2EE = JDK1.2 and up) There is a lot of version/naming confusion going on in java, you got any site that can help me untangle this mess ?
    Thanks a lot
    You can reply to [email protected]

    Thanks for your response.
    We actually use oracle 8.1.7 and 9iAS (PL/SQL gateway and http server). We would like to jump on the Java Bandwagon before we are left in the dust. We first need to be able to understand a lot of technology/concepts/buzzwords.
    We started basic Java programming (Applications) but would prefer to get an idea of "The big picture".
    By that, I mean, we need to be able to understand/design/architect sound applications and be able to talk to the community and understand what they are saying. Right now, reading the media or forums is just a big bunch of buzzwords that are ever changing and we cannot get a grasp on it.
    We not only need to get aquainted with the concepts, but we also need to be able to determine wether product xyz fits in the architecture, etc...
    If you were to get a couple of good books to answer some questions, where would you begin ?
    Kind of questions we might have are:
    - What is the difference between Jserv and Tomcat ?
    - What excatly is tomcat ? A replacement for Jserv ?
    - Can Jserv be used as a container for struts apps or do you need tomcat ? If you need tomcat, does it come with some version of 9ias ?
    - What is a java web service ?
    - I read a lot about Enterprise Java Beans etc.. What are they, what are there purpose ? It seems like it is a standard, what are they used for ? If it is a standard, does this mean that If I buy a set of EJB from a vendor, it would offer the same beans as another vendor ? Is Oracle BC4J an implementation of EJB with added functionality ? Is it proprietary ?
    - Buzzwords everywhere: MVC, EJB, J2EE, BC4J etc.. What are the definitions.
    - Is oracle's java vision proprietary or are they really following the rest of the world ? For example, is BC4J compatible with EJB ?
    - What is a Framework
    - What exactly is JSP.
    - Can STRUTS be used to access an oracle database ? If so, what are the required components (I guess you need JDBC or SQLJ) but does the oracle database need to be java enabled ?
    - Even if you use oracle 9ias as an application server, can you use non-proprietary development methods/architectures/techniques that could be easily implemented somewhere else using another vendor's application server (Ex: Apache + Tomcat, WebSphere, etc...)
    - Struts seems to be an interesting thing. I see that it was developped to encourage code reuse and prevent everyone from reinventing the wheel. But I cannot understand what exactly a developper had to write before struts was there. I mean, there must be alternatives to strut, if so what is the purpose of the framework ?
    A lot of questions, but we need to understand the basics before we jump on the java bandwagon. If we wait, we'll be left in the dust and we need to keep current.
    Thanks in advance.

  • Jsp, struts, problem in session invalidation

    Hello,
    Though have seen many topics here related to this, still cudn't get a proper solution. I'm having a struts application with many jsp's. have used session.invalidate for expiring sessions. Now the problem is my jsp have both button specific action and <html:link> forwards. tried including "response.setHeader("Cache-Control", "no-cache"); //Forces caches to obtain a new copy of the page from the origin server
    response.setHeader("Cache-Control", "no-store"); //Directs caches not to store the page under any circumstance
    response.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"
    response.setHeader("Pragma", "no-cache"); //HTTP 1.0 backward compatibility"
    got it from one of the topics here only.
    Now when i logout from any of my jsp and press back button of browser, the jsp's having struts specific action(http://...../xyz/edituser.do)works fine but forward specific jsp's(http://...../xyz/edit.jsp) is not redirecting to my login page(page not found error :- /xyz/edit.jsp). Also what if i press the browser back button more thn once????? weather this thing works on client side???at the moment in my application even the action specific logout is not working.........how can i solve this problem elegantly?????

    I faced same problem.
    I used below code.
    This code in every Authorized page.
    <%
    response.setHeader("Cache-Control","no-cache");
    response.setHeader("Cache-Control","no-store");
    response.setDateHeader("Expires", 0);
    response.setHeader("Pragma","no-cache");
    %>
    <%
    String username=(String) session.getAttribute("user");
    if(null==username)
         response.sendRedirect("../jsp-modLogin/login.jsp");
    }This code in logout page
    <%
    session.removeAttribute("user");
    session.invalidate();
    response.sendRedirect("../index.jsp");
    %>For me, It is working fine...
    Check it with ur code
    Regards
    Ramesh

  • JSP, Struts question - novice

    Hi,
    I'm new to Struts and am trying to get the hang of it.
    Here's what I am trying to do.
    In my action class:
    Collection b_list = DM.findAllById();
    request.setAttribute("fields1", b_list);
    Here, DM is a java class and the findAllById method returns an ArrayList. Each item in the array list is lets say of the type: abc(String id, String value) with getId() and getValue() implemented in that class.
    Now in my JSP:
    I do not have a form bean asssociated with it. Infact, I do not want to submit any data from this. I simply want to show a drop down menu box with all items from the collection.
    But I presume I need to create a bean using the object I have added to the request object.
    So, I'm trying to do this: (i dont know if I need property="id" for html:select tag as I dont want to submit anything.
    <logic :p resent parameter="field1">
    <bean :p arameter id="mylist" name="field1"/>
    <html:select property="id">
    <html :o ptionsCollection label="id" name="myList" value="value"/>
    </html:select>
    </logic :p resent>
    OR
    <html :o ptions collection="myList" property="value" labelProperty="id"/>
    instead of html :o ptionsCollections
    Is this correct? I cant get it to work. Am I missing something?
    I do not want to submit any info from this jsp. My jsp (a popup actually) simply uses a javascript function to update something in the previous JSP.
    Also, please note that I am NOT using LabelValueBean and am passing the Collection in the request object and TRYING to create a bean on the fly using the Collection of objects in the JSP.

    I do not have a form bean asssociated with it.
    Infact, I do not want to submit any data from this. I
    simply want to show a drop down menu box with all
    items from the collection.and then do what with the selected value?
    makes no sense to me. (or i'll learn something, too.) put a form in there and send the selection back to the controller servlet. everything from a page has to go back to the controller.
    I do not want to submit any info from this jsp. My
    jsp (a popup actually) simply uses a javascript
    function to update something in the previous JSP.this defeats the purpose of struts and the front controller, if i understand it correctly. that puts page navigation inside pages, and that's exactly what struts is supposed to remove.
    you're not using struts right by doing this, imo.
    %

  • Jsp & struts problem

    I have a jsp that display some data from database. I display it in textarea , so that i can edit them , once editing is completed then i have to store that data in database again . Rows of data that i will be getting is dynamic . so i can not write setter and getter for all the rows I am using struts
    Please suggest solution

    I have a jsp that display some data from database.post that jsp code here
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    <%@ page language="java"  %>
    <%@ page import="java.sql.*" %>
    <%@ page import="javax.servlet.*" %>
    <%@ page session="true"  %>
    <html:html>
    <body>
    <title>Source Target Segment Info</title>
    <body>
    <%-- Creatin' Database Connection --%>
    <%
    Class.forName("com.mysql.jdbc.Driver");
    Connection con = DriverManager.getConnection( "jdbc:mysql:///menagerie","root","JJJJJJ" );
    Statement st = con.createStatement();
    PreparedStatement pst = con.prepareStatement("select * from segments where isMarkup=0 and isSource=0");
    ResultSet rs = st.executeQuery( "SELECT * FROM segments  where isMarkup=0 and isSource=1" );
    ResultSet RS=pst.executeQuery();
    %>
    <script type="text/javascript" src="Ajax.js"></script>
    <form action="form_action.jsp" method="POST">
    <table align="center" border="0" width="">
    <tr><td><strong>Source Target Information</strong></td></tr>
    </table>
    <table align="center" border="1">
    <!-- ADD A HEADER LINE FOR ANY COLUMN AS BELOW -->
    <tr bgcolor="#FDF5E6">
    <td><strong>Source segmented Data::</strong></td>
    <td><strong>Target segmented Data::</strong></td>
    </tr>
    <%
    int  i =0 ;
    while ( rs.next()&& RS.next() ) {
    %>
    <!-- ADD A ROW LINE FOR ANY COLUMN AS BELOW -->
    <tr>
    <td><%= rs.getString( "segmentedData" ) %></td>
    <td><textarea  name= "targetSeg"+<%=i%> id = "bodyfield"  rows='3' cols='30'><%= RS.getString( "segmentedData" ) %></textarea></td>
    </tr>
    <%
    %>
    </table>
    <center>
    </tr>
    <html:submit/>
    </form>
    <tr>
    </tr></head>
    </center>
    </body>
    </code>
    </body>
    </html:html>Message was edited by:
    AmitChalwade123456

  • Optimizing jsp (struts)

    I am having problem with following jsp. Its taking very less time to load the data from database(using struts action class at backend) and the control is coming back to the browser soon , but its taking a long time to display the contents in the browser. What may be the issue. The jsp is as follows. It has lot of list boxes with huge data. Is there any way to optimize this page so that it loads faster.
    <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
    <%@ taglib uri="/tags/struts-html" prefix="html" %>
    <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
    <%@ page buffer="24kb" %>
    <jsp:include page="../header.jsp" ></jsp:include>
    <SCRIPT LANGUAGE="JavaScript">
    function submitThisForm(thisElem) {
    var verValue = thisElem.form.version.value;
    thisElem.form.version.value = trim(verValue);
    verValue = thisElem.form.version.value;
    var osTypeValue = thisElem.form.osType.value;
    var osFunValue = thisElem.form.osFunction.value;
    if (verValue.length != 0) {
    if ((osTypeValue == "" || osTypeValue == null) && (osFunValue == "" || osFunValue == null)) {
    alert ("Please select OS Type and Function");
    thisElem.form.osType.focus();
    return false;
    } else if (osTypeValue == "" || osTypeValue == null) {
    alert ("Please select OS Type");
    thisElem.form.osType.focus();
    return false;
    } else if (osFunValue == "" || osFunValue == null) {
    alert ("Please select Function");
    thisElem.form.osFunction.focus();
    return false;
    if(thisElem.form.memcheckVal.value.length > 0) {
    var val=thisElem.form.memcheckVal.value.match(/^\d+$/);
    if(val == null) {
    alert("Enter numeric value for memory");
    thisElem.form.memcheckVal.focus();
    return false;
    if(thisElem.form.flashcheckVal.value.length > 0) {
    var val=thisElem.form.flashcheckVal.value.match(/^\d+$/);
    if(val == null) {
    alert("Enter numeric value for flash");
    thisElem.form.flashcheckVal.focus();
    return false;
    return true;
    // Trim whitespace from left and right sides of s.
    function trim(s) {
    return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
    </SCRIPT>
    <!-- START OF PAGE -->
    <%
    String custId = request.getParameter("custId");
    String cpyKey = request.getParameter("cpyKey");
    System.out.println("Entered JSP Scriplet ");
    System.out.println("Buffer size is --"+ response.getBufferSize());
    %>
    <br/>
    <p class="note">
    <strong>Simple Config Search: </strong> This option will search the configuration files for keywords, allowing the ability to use AND/OR and NOT between lines. No wild cards are allowed, however this is a fast way of finding a keyword in a configuration file.
    <br/><br/>
    <strong>Regular Expression Config Search: </strong><br/>
    This option will search the configuration files, (line by line) using egrep. Therefore all expressions as
    supported by egrep, are supported here.
    <br/><br/>
    <strong>Combined Simple and Regular Expression Config Search: </strong><br/>
    Use the combined search for faster search results. It will search the whole document first with the
    Simple Search criteria (fast) and then pass the results on for Regular Expression matching (slow).
    </p>
    <p class="note">
    <strong>Note:</strong><br/>
    The search does an 'AND' between rows and an 'OR' on the fields inside each row.<br/> To select more than one in each row press 'CNTRL' key .
    <br/><br/>
    <strong>Device Name Pattern:</strong><br/>
    Enter a pattern for device names using '*' only.<br/>
    If device name is chosen from list "Device Names" above it, then that shall take precedence.
    <br/><br/>
    <strong>Chassis Serial Number:</strong><br/>
    Multiple patterns should be separated by a comma
    </p>
    <html:form action="/srchAction.do">
    <html:hidden property="custId" value="<%=custId%>"/>
    <html:hidden property="cpyKey" value="<%=cpyKey%>"/>
    <div class="tableholder" title="Name Or Describe The Form here">
    <table border="0" cellpadding="3" cellspacing="5">
    <tr>
    <td>
    <label for="swish">Simple Config Search</label>
    </td>
    <td>
    <html:text property="swish" size="45"/>
    </td>
    </tr>
    <tr>
    <td>
    <label for="rcsrch">Regex Config Search</label>
    </td>
    <td>
    <html:text property="regex" size="45"/>
    </td>
    </tr>
    <tr>
    <td colspan="2">
    <br/>    
    <input class="buttonpos" type="submit" name="search" value="Search" />
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="groupNameId">Groups</label>
    </td>
    <td>
    <html:select property="groupNameId" multiple="true" size="4">
    <option value="any" selected>Any</option>
    <%
    %>
    <html:optionsCollection name="GROUP_LIST" value="groupId" label="groupName" />
    <%
    %>
    </html:select>
    <br/>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="deviceNameId">Device Names</label>
    </td>
    <td>
    <html:select property="deviceNameId" multiple="true" size="4">
    <option value="any" selected>Any</option>
    %>
    <html:optionsCollection name="DEVICE_LIST" value="deviceId" label="deviceName" />
    <%
    %>
    </html:select>
    <br/><br/>
    <label for="text" value="">Pattern </label>
    <html:text property="deviceNamePat" size="20"/>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="os">SW Version</label>
    </td>
    <td>
    <html:select size="4" property="os" multiple="true">
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="osValues" />
    </html:select>
    <br/><br/>
    <label for="major" value="">Maj Ver </label><html:text property="major" value="*" size="2"/>
    <label for="minor" value="">Min Ver </label><html:text property="minor" value="(*)" size="2"/>
    <label for="release" value="">Release Train </label><html:text property="release" value="*" size="2"/>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="hostnames">Version Function</label>
    </td>
    <td>
    <label for="version" value="">Version </label><html:text property="version" size="20"/><br/>
    <label for="osType" value="">OS Type </label>
    <html:select property="osType">
    <html:option value=""> </html:option>
    <html:option value="IOS">IOS</html:option>
    <html:option value="CatOS">CatOS</html:option>
    </html:select>
    <br/>
    <label for="osFunction" value="">Function </label>
    <html:select property="osFunction">
    <html:option value=""> </html:option>
    <html:option value="releaseGreater">releaseGreater (Full Version Greater)</html:option>
    <html:option value="releaseGreaterEqual">releaseGreaterEqual (Full Version GreaterEqual)</html:option>
    <html:option value="releaseLesser">releaseLesser (Full Version Lesser)</html:option>
    <html:option value="releaseLesserEqual">releaseLesserEqual (Full Version LesserEqual)</html:option>
    </html:select>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="hwfam">HW Family</label>
    </td>
    <td>
    <html:select size="4" property="hwfam" multiple="true" >
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="hwfamValues" />
    </html:select>
    <br/><br/>
    <label for="hwfamPattern" value="">Pattern </label>
    <html:text property="hwfamPattern" value="*" size="20"/>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="pid">Chassis Product ID</label>
    </td>
    <td>
    <html:select size="4" property="pid" multiple="true">
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="pidValues" />
    </html:select>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="hwchass">Chassis SNMP Name</label>
    </td>
    <td>
    <html:select size="4" property="hwchass" multiple="true">
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="hwchassValues" />
    </html:select>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="tech">Technology</label>
    </td>
    <td>
    <html:select size="4" property="tech" multiple="true">
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="techValues" />
    </html:select>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="features">Features</label>
    </td>
    <td>
    <html:select size="4" property="features" multiple="true" >
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="featValues" />
    </html:select>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="cfam">Module Family</label>
    </td>
    <td>
    <html:select size="4" property="cfam" multiple="true" >
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="cfamValues" />
    </html:select>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="cfam">Module Product ID</label>
    </td>
    <td>
    <html:select size="4" property="cardspid" multiple="true" >
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="cardPidValues" />
    </html:select>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="cards">Module SNMP Name</label>
    </td>
    <td>
    <html:select size="4" property="cards" multiple="true" >
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="cardsValues" />
    </html:select>
    <br/><br/>
    <label for="cardPattern" value="">Pattern </label>
    <html:text property="cardPattern" value="*" size="20"/>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="inffam">Interface Family</label>
    </td>
    <td>
    <html:select size="4" property="inffam" multiple="true" >
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="inffamValues" />
    </html:select>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="infs">Interfaces</label>
    </td>
    <td>
    <html:select size="4" property="infs" multiple="true" >
    <option value="any" selected>Any</option>
    <html:options name="INV_DETAILS" property="infsValues" />
    </html:select>
    <br/><br/>
    <label for="interfacePattern" value="">Pattern </label>
    <html:text property="interfacePattern" value="*" size="20"/>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="srlNumPattern">Chassis Serial Number</label>
    </td>
    <td>
    <html:text property="srlNumPattern" value="*" size="45"/>
    </td>
    </tr>
    <tr>
    <td colspan="2"><div class="horizontalgraydots"></div></td>
    </tr>
    <tr>
    <td>
    <label for="memopVal">Memory</label>
    </td>
    <td>
    <html:select property="memopVal" size="1">
    <html:option value="gt">></html:option>
    <html:option value="lt"><</html:option>
    <html:option value="gte">>=</html:option>
    <html:option value="lte"><=</html:option>
    <html:option value="eq">=</html:option>
    </html:select>
    <html:text property="memcheckVal" size="8"/> MB
    </td>
    </tr>
    <tr>
    <td>
    <label for="flashopVal">Flash</label>
    </td>
    <td>
    <html:select property="flashopVal" size="1">
    <html:option value="gt">></html:option>
    <html:option value="lt"><</html:option>
    <html:option value="gte">>=</html:option>
    <html:option value="lte"><=</html:option>
    <html:option value="eq">=</html:option>
    </html:select>
    <html:text property="flashcheckVal" size="8"/> MB
    </td>
    </tr>
    <tr>
    <td colspan="2">
    <br/>    
    <input class="buttonpos" type="submit" name="search" value="Search" onclick="return submitThisForm(this);"/>
    </td>
    </tr>
    </table>
    </div>
    </html:form>
    <!-- END OF PAGE -->
    <jsp:include page="../footer.jsp"></jsp:include>

    <link rel='stylesheet' type='text/css' href="../stylesheets/common.css">
    The problem will be caused by the relative link to your stylesheet
    If your jsp page is /subdirectory/jsppage.jsp
    and your form is submitted to /controlServlet
    it looks for the css file relative to /controlServlet - ie it won't find it from here.
    There are two solutions.
    If your stylesheets can be accessed via absolute reference, make it so
    ie <link rel='stylesheet' type='text/css' href="/stylesheets/common.css">
    Thus you use only absolute references, and no relative links
    The other solution: to use relative links, you have to specify a base.
    <base href="reference to your jsp page\">

Maybe you are looking for

  • ICal Notification Change in Mountain Lion

    Since upgrading to Mountain Lion, the only option I have once a notification pops up is to "Snooze" where previously there were many choices, i.e. remind in 1 hr., 1 day, 1 week, etc. I would like to have the old style back. Is there a way to change

  • Controlling data access at universe level

    Hi, I had a doubt in universe regarding the implementation of security. Existing process: We had a portal called flex (intranet site)which the BO report has been integrated and  for opening the report the name of report was clicked (hyperlink)  This

  • IPad build vs iPhone build

    hey guys, just in general. is there any difference between a iPhone build or iPad build (provision profiles, etc.) or is everything the same just connect the iPad and use it as a iPhone like? thanks

  • Using java in robotics

    Hi all. I have started doing a project on programming an activmedia's pioneer robot.The robot can be programmed in c++ and i know only java. Is there a way to create something like a "translator" or a link between the two languages in order to avoid

  • Source Structure determination Dynamically

    Hi , I got a requirement to develop a File to IDoc scenario. Below are requirement details. 1.  Source system application creates maximum 9 XML files of different strucure for each run. File name is generated dynamically by the source application. 2.