Re: svn commit: r486373 - in /incubator/solr/trunk: ./ src/webapp/resources/admin/

2007-02-07 Thread Otis Gospodnetic
Man, ancient email! :)  I think I used the XML-escaping class+method everywhere 
where it mattered.  I won't have time to look at this again in the near future, 
still have SOLR-81 to finish, so if I missed any spots, please get 'em.

Otis

- Original Message 
From: Erik Hatcher <[EMAIL PROTECTED]>
To: solr-dev@lucene.apache.org
Sent: Wednesday, January 31, 2007 5:21:15 AM
Subject: Re: svn commit: r486373 - in /incubator/solr/trunk: ./ 
src/webapp/resources/admin/

Otis,

This looks brittle - lots of things need escaping when just string  
concatenating to build XML.

I'm betting that bad XML could easily be generated.  No??

Erik


On Dec 12, 2006, at 5:24 PM, [EMAIL PROTECTED] wrote:

> Author: otis
> Date: Tue Dec 12 14:24:47 2006
> New Revision: 486373
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=486373
> Log:
> - SOLR-58: make admin pages return XML and transform them to HTML  
> using XSL
>
> Added:
> incubator/solr/trunk/src/webapp/resources/admin/analysis.xsl
> incubator/solr/trunk/src/webapp/resources/admin/heading.jsp
> incubator/solr/trunk/src/webapp/resources/admin/logging.xsl
> incubator/solr/trunk/src/webapp/resources/admin/meta.xsl
> incubator/solr/trunk/src/webapp/resources/admin/ping.xsl
> incubator/solr/trunk/src/webapp/resources/admin/threaddump.xsl
> Modified:
> incubator/solr/trunk/CHANGES.txt
> incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp
> incubator/solr/trunk/src/webapp/resources/admin/logging.jsp
> incubator/solr/trunk/src/webapp/resources/admin/ping.jsp
> incubator/solr/trunk/src/webapp/resources/admin/threaddump.jsp
>
> Modified: incubator/solr/trunk/CHANGES.txt
> URL: http://svn.apache.org/viewvc/incubator/solr/trunk/CHANGES.txt? 
> view=diff&rev=486373&r1=486372&r2=486373
> == 
> 
> --- incubator/solr/trunk/CHANGES.txt (original)
> +++ incubator/solr/trunk/CHANGES.txt Tue Dec 12 14:24:47 2006
> @@ -118,6 +118,8 @@
>  through multiple threads.  Large commits also might be faster  
> (klaas, SOLR-65)
>   9. Lazy field loading can be enabled via a solrconfig directive.   
> This will be faster when
>  not all stored fields are needed from a document (klaas, SOLR-52)
> +10. Made admin JSPs return XML and transform them with new XSL  
> stylesheets
> +(Otis Gospodnetic, SOLR-58)
>
>  Optimizations
>   1. getDocListAndSet can now generate both a DocList and a DocSet  
> from a
>
> Modified: incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp
> URL: http://svn.apache.org/viewvc/incubator/solr/trunk/src/webapp/ 
> resources/admin/analysis.jsp?view=diff&rev=486373&r1=486372&r2=486373
> == 
> 
> --- incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp  
> (original)
> +++ incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp  
> Tue Dec 12 14:24:47 2006
> @@ -1,20 +1,4 @@
> -<%@ page contentType="text/html; charset=utf-8"  
> pageEncoding="UTF-8"%>
> -<%--
> - Licensed to the Apache Software Foundation (ASF) under one or more
> - contributor license agreements.  See the NOTICE file distributed  
> with
> - this work for additional information regarding copyright ownership.
> - The ASF licenses this file to You under the Apache License,  
> Version 2.0
> - (the "License"); you may not use this file except in compliance with
> - the License.  You may obtain a copy of the License at
> -
> - http://www.apache.org/licenses/LICENSE-2.0
> -
> - Unless required by applicable law or agreed to in writing, software
> - distributed under the License is distributed on an "AS IS" BASIS,
> - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
> implied.
> - See the License for the specific language governing permissions and
> - limitations under the License.
> ---%>
> +<%@ page contentType="text/xml; charset=utf-8"  
> pageEncoding="UTF-8" language="java" %>
>  <%@ page import="org.apache.lucene.analysis.Analyzer,
>   org.apache.lucene.analysis.Token,
>   org.apache.lucene.analysis.TokenStream,
> @@ -30,129 +14,86 @@
>  <%@ page import="java.io.StringReader"%>
>  <%@ page import="java.util.*"%>
>
> -<%-- $Id$ --%>
> -<%-- $Source: /cvs/main/searching/org.apache.solrolarServer/ 
> resources/admin/analysis.jsp,v $ --%>
> -<%-- $Name:  $ --%>
> +
>
> -<[EMAIL PROTECTED] file="header.jsp" %>
> +<[EMAIL

Re: svn commit: r486373 - in /incubator/solr/trunk: ./ src/webapp/resources/admin/

2007-01-31 Thread Erik Hatcher
Ummm, wow, I was deep down in my old e-mails and somehow neglected to  
notice the date on this.  I believe this patch was reverted so this  
no longer a current issue.  Sorry for the noise.


Erik


On Jan 31, 2007, at 5:21 AM, Erik Hatcher wrote:


Otis,

This looks brittle - lots of things need escaping when just string  
concatenating to build XML.


I'm betting that bad XML could easily be generated.  No??

Erik


On Dec 12, 2006, at 5:24 PM, [EMAIL PROTECTED] wrote:


Author: otis
Date: Tue Dec 12 14:24:47 2006
New Revision: 486373

URL: http://svn.apache.org/viewvc?view=rev&rev=486373
Log:
- SOLR-58: make admin pages return XML and transform them to HTML  
using XSL


Added:
incubator/solr/trunk/src/webapp/resources/admin/analysis.xsl
incubator/solr/trunk/src/webapp/resources/admin/heading.jsp
incubator/solr/trunk/src/webapp/resources/admin/logging.xsl
incubator/solr/trunk/src/webapp/resources/admin/meta.xsl
incubator/solr/trunk/src/webapp/resources/admin/ping.xsl
incubator/solr/trunk/src/webapp/resources/admin/threaddump.xsl
Modified:
incubator/solr/trunk/CHANGES.txt
incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp
incubator/solr/trunk/src/webapp/resources/admin/logging.jsp
incubator/solr/trunk/src/webapp/resources/admin/ping.jsp
incubator/solr/trunk/src/webapp/resources/admin/threaddump.jsp

Modified: incubator/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/CHANGES.txt? 
view=diff&rev=486373&r1=486372&r2=486373
= 
=

--- incubator/solr/trunk/CHANGES.txt (original)
+++ incubator/solr/trunk/CHANGES.txt Tue Dec 12 14:24:47 2006
@@ -118,6 +118,8 @@
 through multiple threads.  Large commits also might be faster  
(klaas, SOLR-65)
  9. Lazy field loading can be enabled via a solrconfig  
directive.  This will be faster when
 not all stored fields are needed from a document (klaas,  
SOLR-52)
+10. Made admin JSPs return XML and transform them with new XSL  
stylesheets

+(Otis Gospodnetic, SOLR-58)

 Optimizations
  1. getDocListAndSet can now generate both a DocList and a DocSet  
from a


Modified: incubator/solr/trunk/src/webapp/resources/admin/ 
analysis.jsp
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/src/webapp/ 
resources/admin/analysis.jsp?view=diff&rev=486373&r1=486372&r2=486373
= 
=
--- incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp  
(original)
+++ incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp  
Tue Dec 12 14:24:47 2006

@@ -1,20 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"  
pageEncoding="UTF-8"%>

-<%--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed  
with

- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License,  
Version 2.0
- (the "License"); you may not use this file except in compliance  
with

- the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
implied.

- See the License for the specific language governing permissions and
- limitations under the License.
---%>
+<%@ page contentType="text/xml; charset=utf-8"  
pageEncoding="UTF-8" language="java" %>

 <%@ page import="org.apache.lucene.analysis.Analyzer,
  org.apache.lucene.analysis.Token,
  org.apache.lucene.analysis.TokenStream,
@@ -30,129 +14,86 @@
 <%@ page import="java.io.StringReader"%>
 <%@ page import="java.util.*"%>

-<%-- $Id$ --%>
-<%-- $Source: /cvs/main/searching/org.apache.solrolarServer/ 
resources/admin/analysis.jsp,v $ --%>

-<%-- $Name:  $ --%>
+

-<[EMAIL PROTECTED] file="header.jsp" %>
+<[EMAIL PROTECTED] file="_info.jsp" %>

 <%
   String name = request.getParameter("name");
-  if (name==null || name.length()==0) name="";
+  if (name == null || name.length() == 0) name = "";
   String val = request.getParameter("val");
-  if (val==null || val.length()==0) val="";
+  if (val == null || val.length() == 0) val = "";
   String qval = request.getParameter("qval");
-  if (qval==null || qval.length()==0) qval="";
+  if (qval == null || qval.length() == 0) qval = "";
   String verboseS = request.getParameter("verbose");
-  boolean verbose = verboseS!=null && verboseS.equalsIgnoreCase 
("on");
+  boolean verbose = verboseS != null && verboseS.equalsIgnoreCase 
("on");

   String qverboseS = request.getParameter("qverbose");
-  boolean qverbose = qverboseS!=null && qverboseS.equalsIgnoreCase 
("on");
+  boolean qverbose = qverboseS != null &&  
qverboseS.equalsIg

Re: svn commit: r486373 - in /incubator/solr/trunk: ./ src/webapp/resources/admin/

2007-01-31 Thread Erik Hatcher

Otis,

This looks brittle - lots of things need escaping when just string  
concatenating to build XML.


I'm betting that bad XML could easily be generated.  No??

Erik


On Dec 12, 2006, at 5:24 PM, [EMAIL PROTECTED] wrote:


Author: otis
Date: Tue Dec 12 14:24:47 2006
New Revision: 486373

URL: http://svn.apache.org/viewvc?view=rev&rev=486373
Log:
- SOLR-58: make admin pages return XML and transform them to HTML  
using XSL


Added:
incubator/solr/trunk/src/webapp/resources/admin/analysis.xsl
incubator/solr/trunk/src/webapp/resources/admin/heading.jsp
incubator/solr/trunk/src/webapp/resources/admin/logging.xsl
incubator/solr/trunk/src/webapp/resources/admin/meta.xsl
incubator/solr/trunk/src/webapp/resources/admin/ping.xsl
incubator/solr/trunk/src/webapp/resources/admin/threaddump.xsl
Modified:
incubator/solr/trunk/CHANGES.txt
incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp
incubator/solr/trunk/src/webapp/resources/admin/logging.jsp
incubator/solr/trunk/src/webapp/resources/admin/ping.jsp
incubator/solr/trunk/src/webapp/resources/admin/threaddump.jsp

Modified: incubator/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/CHANGES.txt? 
view=diff&rev=486373&r1=486372&r2=486373
== 


--- incubator/solr/trunk/CHANGES.txt (original)
+++ incubator/solr/trunk/CHANGES.txt Tue Dec 12 14:24:47 2006
@@ -118,6 +118,8 @@
 through multiple threads.  Large commits also might be faster  
(klaas, SOLR-65)
  9. Lazy field loading can be enabled via a solrconfig directive.   
This will be faster when

 not all stored fields are needed from a document (klaas, SOLR-52)
+10. Made admin JSPs return XML and transform them with new XSL  
stylesheets

+(Otis Gospodnetic, SOLR-58)

 Optimizations
  1. getDocListAndSet can now generate both a DocList and a DocSet  
from a


Modified: incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp
URL: http://svn.apache.org/viewvc/incubator/solr/trunk/src/webapp/ 
resources/admin/analysis.jsp?view=diff&rev=486373&r1=486372&r2=486373
== 

--- incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp  
(original)
+++ incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp  
Tue Dec 12 14:24:47 2006

@@ -1,20 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"  
pageEncoding="UTF-8"%>

-<%--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed  
with

- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License,  
Version 2.0

- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or  
implied.

- See the License for the specific language governing permissions and
- limitations under the License.
---%>
+<%@ page contentType="text/xml; charset=utf-8"  
pageEncoding="UTF-8" language="java" %>

 <%@ page import="org.apache.lucene.analysis.Analyzer,
  org.apache.lucene.analysis.Token,
  org.apache.lucene.analysis.TokenStream,
@@ -30,129 +14,86 @@
 <%@ page import="java.io.StringReader"%>
 <%@ page import="java.util.*"%>

-<%-- $Id$ --%>
-<%-- $Source: /cvs/main/searching/org.apache.solrolarServer/ 
resources/admin/analysis.jsp,v $ --%>

-<%-- $Name:  $ --%>
+

-<[EMAIL PROTECTED] file="header.jsp" %>
+<[EMAIL PROTECTED] file="_info.jsp" %>

 <%
   String name = request.getParameter("name");
-  if (name==null || name.length()==0) name="";
+  if (name == null || name.length() == 0) name = "";
   String val = request.getParameter("val");
-  if (val==null || val.length()==0) val="";
+  if (val == null || val.length() == 0) val = "";
   String qval = request.getParameter("qval");
-  if (qval==null || qval.length()==0) qval="";
+  if (qval == null || qval.length() == 0) qval = "";
   String verboseS = request.getParameter("verbose");
-  boolean verbose = verboseS!=null && verboseS.equalsIgnoreCase 
("on");
+  boolean verbose = verboseS != null && verboseS.equalsIgnoreCase 
("on");

   String qverboseS = request.getParameter("qverbose");
-  boolean qverbose = qverboseS!=null && qverboseS.equalsIgnoreCase 
("on");
+  boolean qverbose = qverboseS != null &&  
qverboseS.equalsIgnoreCase("on");

   String highlightS = request.getParameter("highlight");
-  boolean highlight = highlightS!=null &&  
highlightS.equalsIgnoreCase("on");
+  boolean highlight = highlightS != null &&  
highlightS.equalsIgnoreCase("on");

 %>

-
-
-Field Analysis

Re: svn commit: r486373 - in /incubator/solr/trunk: ./ src/webapp/resources/admin/

2006-12-13 Thread Yonik Seeley

Good catch.  IMO, this should be fixed before we cut our release.
-Yonik

On 12/13/06, Chris Hostetter <[EMAIL PROTECTED]> wrote:


Otis, i finally got a chance to try this out, and I'm noticing that while
most of hte pages look great, the analysis page isn't displaying the form
by default, so if you load
"http://localhost:8983/solr/admin/analysis.jsp"; or click the link from the
main admin page:
"http://localhost:8983/solr/admin/analysis.jsp?highlight=on"; you have no
where to go from there.

If you know what the URL should look like, and try to type it in
explicitly, you get a malformed XML file...

http://localhost:8983/solr/admin/analysis.jsp?name=text&highlight=on&val=booo&qval=

...there are too many  tags it looks like.


Re: svn commit: r486373 - in /incubator/solr/trunk: ./ src/webapp/resources/admin/

2006-12-13 Thread Chris Hostetter

Otis, i finally got a chance to try this out, and I'm noticing that while
most of hte pages look great, the analysis page isn't displaying the form
by default, so if you load
"http://localhost:8983/solr/admin/analysis.jsp"; or click the link from the
main admin page:
"http://localhost:8983/solr/admin/analysis.jsp?highlight=on"; you have no
where to go from there.

If you know what the URL should look like, and try to type it in
explicitly, you get a malformed XML file...

http://localhost:8983/solr/admin/analysis.jsp?name=text&highlight=on&val=booo&qval=

...there are too many  tags it looks like.



: Date: Tue, 12 Dec 2006 22:24:48 -
: From: [EMAIL PROTECTED]
: Reply-To: solr-dev@lucene.apache.org
: To: solr-commits@lucene.apache.org
: Subject: svn commit: r486373 - in /incubator/solr/trunk: ./
: src/webapp/resources/admin/
:
: Author: otis
: Date: Tue Dec 12 14:24:47 2006
: New Revision: 486373
:
: URL: http://svn.apache.org/viewvc?view=rev&rev=486373
: Log:
: - SOLR-58: make admin pages return XML and transform them to HTML using XSL
:
: Added:
: incubator/solr/trunk/src/webapp/resources/admin/analysis.xsl
: incubator/solr/trunk/src/webapp/resources/admin/heading.jsp
: incubator/solr/trunk/src/webapp/resources/admin/logging.xsl
: incubator/solr/trunk/src/webapp/resources/admin/meta.xsl
: incubator/solr/trunk/src/webapp/resources/admin/ping.xsl
: incubator/solr/trunk/src/webapp/resources/admin/threaddump.xsl
: Modified:
: incubator/solr/trunk/CHANGES.txt
: incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp
: incubator/solr/trunk/src/webapp/resources/admin/logging.jsp
: incubator/solr/trunk/src/webapp/resources/admin/ping.jsp
: incubator/solr/trunk/src/webapp/resources/admin/threaddump.jsp
:
: Modified: incubator/solr/trunk/CHANGES.txt
: URL: 
http://svn.apache.org/viewvc/incubator/solr/trunk/CHANGES.txt?view=diff&rev=486373&r1=486372&r2=486373
: ==
: --- incubator/solr/trunk/CHANGES.txt (original)
: +++ incubator/solr/trunk/CHANGES.txt Tue Dec 12 14:24:47 2006
: @@ -118,6 +118,8 @@
:  through multiple threads.  Large commits also might be faster (klaas, 
SOLR-65)
:   9. Lazy field loading can be enabled via a solrconfig directive.  This will 
be faster when
:  not all stored fields are needed from a document (klaas, SOLR-52)
: +10. Made admin JSPs return XML and transform them with new XSL stylesheets
: +(Otis Gospodnetic, SOLR-58)
:
:  Optimizations
:   1. getDocListAndSet can now generate both a DocList and a DocSet from a
:
: Modified: incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp
: URL: 
http://svn.apache.org/viewvc/incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp?view=diff&rev=486373&r1=486372&r2=486373
: ==
: --- incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp (original)
: +++ incubator/solr/trunk/src/webapp/resources/admin/analysis.jsp Tue Dec 12 
14:24:47 2006
: @@ -1,20 +1,4 @@
: -<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
: -<%--
: - Licensed to the Apache Software Foundation (ASF) under one or more
: - contributor license agreements.  See the NOTICE file distributed with
: - this work for additional information regarding copyright ownership.
: - The ASF licenses this file to You under the Apache License, Version 2.0
: - (the "License"); you may not use this file except in compliance with
: - the License.  You may obtain a copy of the License at
: -
: - http://www.apache.org/licenses/LICENSE-2.0
: -
: - Unless required by applicable law or agreed to in writing, software
: - distributed under the License is distributed on an "AS IS" BASIS,
: - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
: - See the License for the specific language governing permissions and
: - limitations under the License.
: ---%>
: +<%@ page contentType="text/xml; charset=utf-8" pageEncoding="UTF-8" 
language="java" %>
:  <%@ page import="org.apache.lucene.analysis.Analyzer,
:   org.apache.lucene.analysis.Token,
:   org.apache.lucene.analysis.TokenStream,
: @@ -30,129 +14,86 @@
:  <%@ page import="java.io.StringReader"%>
:  <%@ page import="java.util.*"%>
:
: -<%-- $Id$ --%>
: -<%-- $Source: 
/cvs/main/searching/org.apache.solrolarServer/resources/admin/analysis.jsp,v $ 
--%>
: -<%-- $Name:  $ --%>
: +
:
: -<[EMAIL PROTECTED] file="header.jsp" %>
: +<[EMAIL PROTECTED] file="_info.jsp" %>
:
:  <%
:String name = request.getParameter("name");
: -  if (name==null || name.length()==0) name="";
: +  if (name == null || name.length() == 0) name = "";
:String val = request.getParameter("val");
: -  if (val==null || val.length()==0) val="";
: +  if (val == null || val.length() == 0) val = "";
:String qval = request.getParameter("qval");
: -  if (qval==null || qval.leng