Changeset 0473e08


Ignore:
Timestamp:
Aug 25, 2005 8:59:46 PM (15 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
4cf3d9c1
Parents:
346faa3
git-author:
jrandom <jrandom> (08/25/05 20:59:46)
git-committer:
zzz <zzz@…> (08/25/05 20:59:46)
Message:

remote w0rks

Location:
apps/syndie
Files:
2 added
1 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • apps/syndie/java/src/net/i2p/syndie/Archive.java

    r346faa3 r0473e08  
    4141    };   
    4242   
     43    static {
     44        TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
     45    }
     46
    4347    public Archive(I2PAppContext ctx, String rootDir, String cacheDir) {
    4448        _context = ctx;
     
    320324    public static String getEntryFilename(long entryId) { return entryId + ".snd"; }
    321325   
    322     private static SimpleDateFormat _dateFmt = new SimpleDateFormat("yyyyMMdd");
     326    private static SimpleDateFormat _dateFmt = new SimpleDateFormat("yyyyMMdd", Locale.UK);
    323327    public static String getIndexName(long entryId, int numBytes) {
    324328        try {
  • apps/syndie/java/src/net/i2p/syndie/ArchiveIndexer.java

    r346faa3 r0473e08  
    77import net.i2p.data.*;
    88import net.i2p.syndie.data.*;
     9import net.i2p.syndie.sml.*;
    910
    1011/**
     
    5455        int newBlogs = 0;
    5556       
     57        SMLParser parser = new SMLParser();
     58       
    5659        for (int i = 0; i < blogs.size(); i++) {
    5760            BlogInfo cur = (BlogInfo)blogs.get(i);
     
    8689                    newEntries++;
    8790                    newSize += entry.getCompleteSize();
     91                }
     92                HeaderReceiver rec = new HeaderReceiver();
     93                parser.parse(entry.getEntry().getText(), rec);
     94                String reply = rec.getHeader(HTMLRenderer.HEADER_IN_REPLY_TO);
     95                if (reply != null) {
     96                    BlogURI parent = new BlogURI(reply.trim());
     97                    if ( (parent.getKeyHash() != null) && (parent.getEntryId() >= 0) )
     98                        rv.addReply(parent, entry.getURI());
     99                    else
     100                        System.err.println("Parent of " + entry.getURI() + " is not valid: [" + reply.trim() + "]");
    88101                }
    89102            }
     
    135148        return rv;
    136149    }
     150   
     151    private static class HeaderReceiver implements SMLParser.EventReceiver {
     152        private Properties _headers;
     153        public HeaderReceiver() { _headers = null; }
     154        public String getHeader(String name) { return (_headers != null ? _headers.getProperty(name) : null); }
     155        public void receiveHeader(String header, String value) {
     156            if (_headers == null) _headers = new Properties();
     157            _headers.setProperty(header, value);
     158        }
     159       
     160        public void receiveAddress(String name, String schema, String location, String anchorText) {}
     161        public void receiveArchive(String name, String description, String locationSchema, String location, String postingKey, String anchorText) {}
     162        public void receiveAttachment(int id, String anchorText) {}
     163        public void receiveBegin() {}
     164        public void receiveBlog(String name, String blogKeyHash, String blogPath, long blogEntryId, List blogArchiveLocations, String anchorText) {}
     165        public void receiveBold(String text) {}
     166        public void receiveCode(String text, String codeLocationSchema, String codeLocation) {}
     167        public void receiveCut(String summaryText) {}
     168        public void receiveEnd() {}
     169        public void receiveGT() {}
     170        public void receiveH1(String text) {}
     171        public void receiveH2(String text) {}
     172        public void receiveH3(String text) {}
     173        public void receiveH4(String text) {}
     174        public void receiveH5(String text) {}
     175        public void receiveHR() {}
     176        public void receiveHeaderEnd() {}
     177        public void receiveImage(String alternateText, int attachmentId) {}
     178        public void receiveItalic(String text) {}
     179        public void receiveLT() {}
     180        public void receiveLeftBracket() {}
     181        public void receiveLink(String schema, String location, String text) {}
     182        public void receiveNewline() {}
     183        public void receivePlain(String text) {}
     184        public void receivePre(String text) {}
     185        public void receiveQuote(String text, String whoQuoted, String quoteLocationSchema, String quoteLocation) {}
     186        public void receiveRightBracket() {}
     187        public void receiveUnderline(String text) {}
     188    }
    137189}
  • apps/syndie/java/src/net/i2p/syndie/data/ArchiveIndex.java

    r346faa3 r0473e08  
    2727    /** list of BlogURI objects */
    2828    protected List _newestEntries;
     29    /** parent message to a set of replies, ordered with the oldest first */
     30    protected Map _replies;
    2931    protected Properties _headers;
    3032   
     
    3739        _newestEntries = new ArrayList();
    3840        _headers = new Properties();
     41        _replies = Collections.synchronizedMap(new HashMap());
    3942        _generatedOn = -1;
    4043        if (shouldLoad)
     
    139142        return rv;
    140143    }
    141    
     144    public List getReplies(BlogURI uri) {
     145        Set replies = (Set)_replies.get(uri);
     146        if (replies == null) return Collections.EMPTY_LIST;
     147        synchronized (replies) {
     148            return new ArrayList(replies);
     149        }
     150    }
    142151    public void setLocation(String location) {
    143152        try {
     
    256265            if (tag != null) {
    257266                if (!tag.equals(summary.tag)) {
    258                     System.out.println("Tag [" + summary.tag + "] does not match the requested [" + tag + "]");
     267                    System.out.println("Tag [" + summary.tag + "] does not match the requested [" + tag + "] in " + summary.blog.toBase64());
    259268                    continue;
    260269                }
     
    263272            for (int j = 0; j < summary.entries.size(); j++) {
    264273                EntrySummary entry = (EntrySummary)summary.entries.get(j);
    265                 ordered.put(new Long(0-entry.entry.getEntryId()), entry.entry);
     274                String k = (Long.MAX_VALUE-entry.entry.getEntryId()) + "-" + entry.entry.getKeyHash().toBase64();
     275                ordered.put(k, entry.entry);
     276                System.err.println("Including match: " + k);
    266277            }
    267278        }
     
    320331    }
    321332   
    322     private SimpleDateFormat _dateFmt = new SimpleDateFormat("yyyyMMdd");
     333    private SimpleDateFormat _dateFmt = new SimpleDateFormat("yyyyMMdd", Locale.UK);
    323334    private long getIndexDate(String yyyymmdd) {
    324335        synchronized (_dateFmt) {
  • apps/syndie/java/src/net/i2p/syndie/data/BlogURI.java

    r346faa3 r0473e08  
    2121        if (uri.startsWith("blog://")) {
    2222            int off = "blog://".length();
     23            _blogHash = new Hash(Base64.decode(uri.substring(off, off+44))); // 44 chars == base64(32 bytes)
     24            int entryStart = uri.indexOf('/', off+1);
     25            if (entryStart < 0) {
     26                _entryId = -1;
     27            } else {
     28                try {
     29                    _entryId = Long.parseLong(uri.substring(entryStart+1).trim());
     30                } catch (NumberFormatException nfe) {
     31                    _entryId = -1;
     32                }
     33            }
     34        } else if (uri.startsWith("entry://")) {
     35            int off = "entry://".length();
    2336            _blogHash = new Hash(Base64.decode(uri.substring(off, off+44))); // 44 chars == base64(32 bytes)
    2437            int entryStart = uri.indexOf('/', off+1);
     
    6275    }
    6376    public int hashCode() {
    64         return (int)_entryId;
     77        int rv = (int)_entryId;
     78        if (_blogHash != null)
     79            rv += _blogHash.hashCode();
     80        return rv;
    6581    }
    6682   
     
    7086        test("blog://Vq~AlW-r7OM763okVUFIDvVFzxOjpNNsAx0rFb2yaE8=/");
    7187        test("blog://Vq~AlW-r7OM763okVUFIDvVFzxOjpNNsAx0rFb2yaE8=/123456789");
     88        test("entry://Vq~AlW-r7OM763okVUFIDvVFzxOjpNNsAx0rFb2yaE8=/");
     89        test("entry://Vq~AlW-r7OM763okVUFIDvVFzxOjpNNsAx0rFb2yaE8=/123456789");
    7290    }
    7391    private static void test(String uri) {
  • apps/syndie/java/src/net/i2p/syndie/data/LocalArchiveIndex.java

    r346faa3 r0473e08  
    6868            _newestEntries.add(entry);
    6969    }
     70
     71    public void addReply(BlogURI parent, BlogURI reply) {
     72        Set replies = (Set)_replies.get(parent);
     73        if (replies == null) {
     74            replies = Collections.synchronizedSet(new TreeSet(BlogURIComparator.HIGHEST_ID_FIRST));
     75            _replies.put(parent, replies);
     76        }
     77        replies.add(reply);
     78        System.err.println("Adding reply to " + parent + " from child " + reply + " (# replies: " + replies.size() + ")");
     79    }
     80
     81    private static class BlogURIComparator implements Comparator {
     82        public static final BlogURIComparator HIGHEST_ID_FIRST = new BlogURIComparator(true);
     83        public static final BlogURIComparator HIGHEST_ID_LAST = new BlogURIComparator(false);
     84        private boolean _highestFirst;
     85        public BlogURIComparator(boolean highestFirst) {
     86            _highestFirst = highestFirst;
     87        }
     88       
     89        public int compare(Object lhs, Object rhs) {
     90            if ( (lhs == null) || !(lhs instanceof BlogURI) ) return 1;
     91            if ( (rhs == null) || !(rhs instanceof BlogURI) ) return -1;
     92            BlogURI l = (BlogURI)lhs;
     93            BlogURI r = (BlogURI)rhs;
     94            if (l.getEntryId() > r.getEntryId())
     95                return (_highestFirst ? 1 : -1);
     96            else if (l.getEntryId() < r.getEntryId())
     97                return (_highestFirst ? -1 : 1);
     98            else
     99                return DataHelper.compareTo(l.getKeyHash().getData(), r.getKeyHash().getData());
     100        }
     101    }
    70102}
  • apps/syndie/java/src/net/i2p/syndie/sml/HTMLRenderer.java

    r346faa3 r0473e08  
    413413                _postBodyBuffer.append(addrs).append(" addresses ");
    414414           
     415            if (_entry != null) {
     416                List replies = _archive.getIndex().getReplies(_entry.getURI());
     417                if ( (replies != null) && (replies.size() > 0) ) {
     418                    if (replies.size() == 1)
     419                        _postBodyBuffer.append("1 reply ");
     420                    else
     421                        _postBodyBuffer.append(replies.size()).append(" replies ");
     422                }
     423            }
     424       
     425            String inReplyTo = (String)_headers.get(HEADER_IN_REPLY_TO);
     426            if ( (inReplyTo != null) && (inReplyTo.trim().length() > 0) )
     427                _postBodyBuffer.append(" <a href=\"").append(getPageURL(sanitizeTagParam(inReplyTo))).append("\">(view parent)</a>\n");
     428           
    415429            _postBodyBuffer.append("</td></tr>\n");
    416430        } else {
     
    487501            }
    488502
     503           
     504            if (_entry != null) {
     505                List replies = _archive.getIndex().getReplies(_entry.getURI());
     506                if ( (replies != null) && (replies.size() > 0) ) {
     507                    _postBodyBuffer.append("<b>Replies:</b> ");
     508                    for (int i = 0; i < replies.size(); i++) {
     509                        BlogURI reply = (BlogURI)replies.get(i);
     510                        _postBodyBuffer.append("<a href=\"");
     511                        _postBodyBuffer.append(getPageURL(reply.getKeyHash(), null, reply.getEntryId(), -1, -1, true, _user.getShowImages()));
     512                        _postBodyBuffer.append("\">");
     513                        BlogInfo replyAuthor = _archive.getBlogInfo(reply);
     514                        if (replyAuthor != null) {
     515                            _postBodyBuffer.append(sanitizeString(replyAuthor.getProperty(BlogInfo.NAME)));
     516                        } else {
     517                            _postBodyBuffer.append(reply.getKeyHash().toBase64().substring(0,16));
     518                        }
     519                        _postBodyBuffer.append(" on ");
     520                        _postBodyBuffer.append(getEntryDate(reply.getEntryId()));
     521                        _postBodyBuffer.append("</a> ");
     522                    }
     523                    _postBodyBuffer.append("<br />");
     524                }
     525            }
     526       
     527            String inReplyTo = (String)_headers.get(HEADER_IN_REPLY_TO);
     528            if ( (inReplyTo != null) && (inReplyTo.trim().length() > 0) ) {
     529                _postBodyBuffer.append(" <a href=\"").append(getPageURL(sanitizeTagParam(inReplyTo))).append("\">(view parent)</a><br />\n");
     530            }
     531               
    489532            _postBodyBuffer.append("</td>\n</form>\n</tr>\n");
    490533        }
     
    526569   
    527570    private void renderMetaCell() {
     571        String tags[] = (_entry != null ? _entry.getTags() : null);
     572        if ( (tags != null) && (tags.length > 0) )
     573            _preBodyBuffer.append("<form action=\"index.jsp\">");
    528574        _preBodyBuffer.append("<td nowrap=\"true\" align=\"right\" valign=\"top\" class=\"syndieEntryMetaCell\">\n");
    529575        BlogInfo info = null;
     
    541587            _preBodyBuffer.append("[unknown blog]");
    542588        }
    543         String tags[] = (_entry != null ? _entry.getTags() : null);
    544589        if ( (tags != null) && (tags.length > 0) ) {
    545590            _preBodyBuffer.append(" Tags: ");
    546             _preBodyBuffer.append("<i>");
     591            _preBodyBuffer.append("<select name=\"selector\">");
    547592            for (int i = 0; tags != null && i < tags.length; i++) {
     593                _preBodyBuffer.append("<option value=\"blogtag://");
     594                _preBodyBuffer.append(_entry.getURI().getKeyHash().toBase64());
     595                _preBodyBuffer.append('/').append(Base64.encode(tags[i])).append("\">");
     596                _preBodyBuffer.append(sanitizeString(tags[i]));
     597                _preBodyBuffer.append("</option>\n");
     598                /*
    548599                _preBodyBuffer.append("<a href=\"");
    549600                _preBodyBuffer.append(getPageURL(_entry.getURI().getKeyHash(), tags[i], -1, -1, -1, (_user != null ? _user.getShowExpanded() : false), (_user != null ? _user.getShowImages() : false)));
     
    553604                if (i + 1 < tags.length)
    554605                    _preBodyBuffer.append(", ");
    555             }
    556             _preBodyBuffer.append("</i>");
     606                 */
     607            }
     608            _preBodyBuffer.append("</select>");
     609            _preBodyBuffer.append("<input type=\"submit\" value=\"View\" />\n");
     610            //_preBodyBuffer.append("</i>");
    557611        }
    558612        _preBodyBuffer.append(" ");
     613        /*
     614        String inReplyTo = (String)_headers.get(HEADER_IN_REPLY_TO);
     615        if ( (inReplyTo != null) && (inReplyTo.trim().length() > 0) )
     616            _preBodyBuffer.append(" <a href=\"").append(getPageURL(sanitizeTagParam(inReplyTo))).append("\">In reply to</a>\n");
     617         */
     618       
    559619        if (_entry != null)
    560620            _preBodyBuffer.append(getEntryDate(_entry.getURI().getEntryId()));
    561621        else
    562622            _preBodyBuffer.append(getEntryDate(new Date().getTime()));
    563         String inReplyTo = (String)_headers.get(HEADER_IN_REPLY_TO);
    564         if ( (inReplyTo != null) && (inReplyTo.trim().length() > 0) )
    565             _preBodyBuffer.append(" <a href=\"").append(getPageURL(sanitizeTagParam(inReplyTo))).append("\">In reply to</a>\n");
    566623        if ( (_user != null) && (_user.getAuthenticated()) )
    567624            _preBodyBuffer.append(" <a href=\"").append(getPostURL(_user.getBlog(), true)).append("\">Reply</a>\n");
    568         _preBodyBuffer.append("\n</td></tr>\n");
    569     }
    570    
    571     private final SimpleDateFormat _dateFormat = new SimpleDateFormat("yyyy/MM/dd");
     625        _preBodyBuffer.append("\n</td>");
     626        if ( (tags != null) && (tags.length > 0) )
     627            _preBodyBuffer.append("</form>");
     628        _preBodyBuffer.append("</tr>\n");
     629    }
     630   
     631    private final SimpleDateFormat _dateFormat = new SimpleDateFormat("yyyy/MM/dd", Locale.UK);
    572632    private final String getEntryDate(long when) {
    573633        synchronized (_dateFormat) {
     
    657717    }
    658718
    659     public String getPageURL(String selector) {
    660         return getPageURL(_user, selector);
    661     }
    662    
    663     public static String getPageURL(User user, String selector) {
    664         ArchiveViewerBean.Selector sel = new ArchiveViewerBean.Selector(selector);
    665         return getPageURL(sel.blog, sel.tag, sel.entry, sel.group, -1, -1, user.getShowExpanded(), user.getShowImages());
     719    public String getPageURL(String selector) { return getPageURL(_user, selector); }
     720    public static String getPageURL(User user, String selector) { return getPageURL(user, selector, -1, -1); }
     721    public static String getPageURL(User user, String selector, int numPerPage, int pageNum) {
     722        StringBuffer buf = new StringBuffer(128);
     723        buf.append("index.jsp?");
     724        buf.append("selector=").append(sanitizeTagParam(selector)).append("&");
     725        if ( (pageNum >= 0) && (numPerPage > 0) ) {
     726            buf.append(ArchiveViewerBean.PARAM_PAGE_NUMBER).append('=').append(pageNum).append('&');
     727            buf.append(ArchiveViewerBean.PARAM_NUM_PER_PAGE).append('=').append(numPerPage).append('&');
     728        }
     729        buf.append(ArchiveViewerBean.PARAM_EXPAND_ENTRIES).append('=').append(user.getShowExpanded()).append('&');
     730        buf.append(ArchiveViewerBean.PARAM_SHOW_IMAGES).append('=').append(user.getShowImages()).append('&');
     731        return buf.toString();
    666732    }
    667733   
  • apps/syndie/java/src/net/i2p/syndie/web/ArchiveViewerBean.java

    r346faa3 r0473e08  
    2626    }
    2727   
    28     private static final SimpleDateFormat _dateFormat = new SimpleDateFormat("yyyy/MM/dd");
    29     private static final String getEntryTitleDate(String blogName, long when) {
     28    private static final SimpleDateFormat _dateFormat = new SimpleDateFormat("yyyy/MM/dd", Locale.UK);
     29    public static final String getEntryTitleDate(String blogName, long when) {
    3030        synchronized (_dateFormat) {
    3131            try {
     
    116116        Archive archive = BlogManager.instance().getArchive();
    117117        ArchiveIndex index = archive.getIndex();
     118       
     119        for (int i = 0; i < index.getNewestBlogCount(); i++) {
     120            Hash cur = index.getNewestBlog(i);
     121            String blog = Base64.encode(cur.getData());
     122            out.write("<option value=\"blog://" + blog + "\">");
     123            out.write("New blog: ");
     124            BlogInfo info = archive.getBlogInfo(cur);
     125            String name = info.getProperty(BlogInfo.NAME);
     126            if (name != null)
     127                name = HTMLRenderer.sanitizeString(name);
     128            else
     129                name = Base64.encode(cur.getData());
     130            out.write(name);
     131            out.write("</option>\n");
     132        }
     133       
    118134        List allTags = new ArrayList();
    119135        // perhaps sort this by name (even though it isnt unique...)
     
    179195    }
    180196   
    181     public static void renderBlogs(User user, Map parameters, Writer out) throws IOException {
     197    public static void renderBlogs(User user, Map parameters, Writer out, String afterPagination) throws IOException {
    182198        String blogStr = getString(parameters, PARAM_BLOG);
    183199        Hash blog = null;
     
    212228        boolean regenerateIndex = getBool(parameters, PARAM_REGENERATE_INDEX, false);
    213229        try {
    214             renderBlogs(user, blog, tag, entryId, group, numPerPage, pageNum, expandEntries, showImages, regenerateIndex, out);
     230            renderBlogs(user, blog, tag, entryId, group, numPerPage, pageNum, expandEntries, showImages, regenerateIndex, sel, out, afterPagination);
    215231        } catch (IOException ioe) {
    216232            ioe.printStackTrace();
     
    264280    }
    265281   
    266     public static void renderBlogs(User user, Hash blog, String tag, long entryId, String group, int numPerPage, int pageNum,
    267                                    boolean expandEntries, boolean showImages, boolean regenerateIndex, Writer out) throws IOException {
     282    private static void renderBlogs(User user, Hash blog, String tag, long entryId, String group, int numPerPage, int pageNum,
     283                                   boolean expandEntries, boolean showImages, boolean regenerateIndex, String selector, Writer out, String afterPagination) throws IOException {
    268284        Archive archive = BlogManager.instance().getArchive();
    269285        if (regenerateIndex)
     
    294310                out.write("<i>");
    295311                if (pageNum > 0) {
    296                     String prevURL = HTMLRenderer.getPageURL(blog, tag, entryId, group, numPerPage, pageNum-1, expandEntries, showImages);
     312                    String prevURL = null;
     313                    if ( (selector == null) || (selector.trim().length() <= 0) )
     314                        prevURL = HTMLRenderer.getPageURL(blog, tag, entryId, group, numPerPage, pageNum-1, expandEntries, showImages);
     315                    else
     316                        prevURL = HTMLRenderer.getPageURL(user, selector, numPerPage, pageNum-1);
    297317                    System.out.println("prevURL: " + prevURL);
    298318                    out.write(" <a href=\"" + prevURL + "\">&lt;&lt;</a>");
     
    302322                out.write("Page " + (pageNum+1) + " of " + pages);
    303323                if (pageNum + 1 < pages) {
    304                     String nextURL = HTMLRenderer.getPageURL(blog, tag, entryId, group, numPerPage, pageNum+1, expandEntries, showImages);
     324                    String nextURL = null;
     325                    if ( (selector == null) || (selector.trim().length() <= 0) )
     326                        nextURL = HTMLRenderer.getPageURL(blog, tag, entryId, group, numPerPage, pageNum+1, expandEntries, showImages);
     327                    else
     328                        nextURL = HTMLRenderer.getPageURL(user, selector, numPerPage, pageNum+1);
    305329                    System.out.println("nextURL: " + nextURL);
    306330                    out.write(" <a href=\"" + nextURL + "\">&gt;&gt;</a>");
     
    312336        }
    313337       
     338        /*
    314339        out.write(" <i>");
    315340       
     
    329354       
    330355        out.write("</i>");
     356        */
     357       
     358        if (afterPagination != null)
     359            out.write(afterPagination);
    331360       
    332361        if (entries.size() <= 0) end = -1;
  • apps/syndie/java/src/net/i2p/syndie/web/RemoteArchiveBean.java

    r346faa3 r0473e08  
    88import net.i2p.util.EepGet;
    99import net.i2p.util.EepGetScheduler;
     10import net.i2p.util.EepPost;
    1011import net.i2p.syndie.data.*;
    1112import net.i2p.syndie.sml.*;
     
    4041    public String getRemoteLocation() { return _remoteLocation; }
    4142    public ArchiveIndex getRemoteIndex() { return _remoteIndex; }
     43    public String getProxyHost() { return _proxyHost; }
     44    public int getProxyPort() { return _proxyPort; }
    4245    public boolean getFetchIndexInProgress() { return _fetchIndexInProgress; }
    4346    public String getStatus() {
     
    4750        return buf.toString();
    4851    }
    49 
     52   
    5053    public void fetchMetadata(User user, Map parameters) {
    5154        String meta = ArchiveViewerBean.getString(parameters, "blog");
     
    147150    }
    148151   
    149     public void fetchIndex(User user, String schema, String location) {
     152    public void fetchIndex(User user, String schema, String location, String proxyHost, String proxyPort) {
    150153        _fetchIndexInProgress = true;
    151154        _remoteIndex = null;
     
    154157        _proxyHost = null;
    155158        _proxyPort = -1;
    156         if ("eep".equals(_remoteSchema)) {
    157             _proxyHost = user.getEepProxyHost();
    158             _proxyPort = user.getEepProxyPort();
    159         } else if ("web".equals(_remoteSchema)) {
    160             _proxyHost = user.getWebProxyHost();
    161             _proxyPort = user.getWebProxyPort();
    162         } else if ("tor".equals(_remoteSchema)) {
    163             _proxyHost = user.getTorProxyHost();
    164             _proxyPort = user.getTorProxyPort();
     159       
     160        if ( (schema == null) || (schema.trim().length() <= 0) ||
     161        (location == null) || (location.trim().length() <= 0) ) {
     162            _statusMessages.add("Location must be specified");
     163            _fetchIndexInProgress = false;
     164            return;
     165        }
     166       
     167        if ("web".equals(schema)) {
     168            if ( (proxyHost != null) && (proxyHost.trim().length() > 0) &&
     169            (proxyPort != null) && (proxyPort.trim().length() > 0) ) {
     170                _proxyHost = proxyHost;
     171                try {
     172                    _proxyPort = Integer.parseInt(proxyPort);
     173                } catch (NumberFormatException nfe) {
     174                    _statusMessages.add("Proxy port " + HTMLRenderer.sanitizeString(proxyPort) + " is invalid");
     175                    _fetchIndexInProgress = false;
     176                    return;
     177                }
     178            }
    165179        } else {
    166180            _statusMessages.add(new String("Remote schema " + HTMLRenderer.sanitizeString(schema) + " currently not supported"));
     
    168182            return;
    169183        }
    170 
    171         _statusMessages.add("Fetching index from " + HTMLRenderer.sanitizeString(_remoteLocation));
     184       
     185        _statusMessages.add("Fetching index from " + HTMLRenderer.sanitizeString(_remoteLocation) +
     186        (_proxyHost != null ? " via " + HTMLRenderer.sanitizeString(_proxyHost) + ":" + _proxyPort : ""));
    172187        File archiveFile = new File(BlogManager.instance().getTempDir(), user.getBlog().toBase64() + "_remoteArchive.txt");
    173188        archiveFile.delete();
    174         EepGet eep = new EepGet(I2PAppContext.getGlobalContext(), ((_proxyHost != null) && (_proxyPort > 0)), 
    175                                 _proxyHost, _proxyPort, 0, archiveFile.getAbsolutePath(), location);
     189        EepGet eep = new EepGet(I2PAppContext.getGlobalContext(), ((_proxyHost != null) && (_proxyPort > 0)),
     190        _proxyHost, _proxyPort, 0, archiveFile.getAbsolutePath(), location);
    176191        eep.addStatusListener(new IndexFetcherStatusListener(archiveFile));
    177192        eep.fetch();
     
    186201            _statusMessages.add("Attempt " + currentAttempt + " failed after " + bytesTransferred + (cause != null ? cause.getMessage() : ""));
    187202        }
    188 
     203       
    189204        public void bytesTransferred(long alreadyTransferred, int currentWrite, long bytesTransferred, long bytesRemaining, String url) {}
    190205        public void transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, String url, String outputFile) {
     
    211226            _statusMessages.add("Attempt " + currentAttempt + " failed after " + bytesTransferred + (cause != null ? cause.getMessage() : ""));
    212227        }
    213 
     228       
    214229        public void bytesTransferred(long alreadyTransferred, int currentWrite, long bytesTransferred, long bytesRemaining, String url) {}
    215230        public void transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, String url, String outputFile) {
     
    245260            _statusMessages.add("Attempt " + currentAttempt + " failed after " + bytesTransferred + (cause != null ? cause.getMessage() : ""));
    246261        }
    247 
     262       
    248263        public void bytesTransferred(long alreadyTransferred, int currentWrite, long bytesTransferred, long bytesRemaining, String url) {}
    249264        public void transferComplete(long alreadyTransferred, long bytesTransferred, long bytesRemaining, String url, String outputFile) {
     
    284299            _statusMessages.add("Fetch of " + HTMLRenderer.sanitizeString(url) + " failed after " + bytesTransferred);
    285300        }
     301    }
     302   
     303   
     304    public void postSelectedEntries(User user, Map parameters) {
     305        String entries[] = ArchiveViewerBean.getStrings(parameters, "localentry");
     306        if ( (entries == null) || (entries.length <= 0) ) return;
     307        List uris = new ArrayList(entries.length);
     308        for (int i = 0; i < entries.length; i++)
     309            uris.add(new BlogURI(entries[i]));
     310       
     311        post(uris, user);
     312    }
     313   
     314    private void post(List blogURIs, User user) {
     315        List files = new ArrayList(blogURIs.size()+1);
     316        Set meta = new HashSet(4);
     317        Map uploads = new HashMap(files.size());
     318        String importURL = getImportURL();
     319        _statusMessages.add("Uploading through " + HTMLRenderer.sanitizeString(importURL));
     320        for (int i = 0; i < blogURIs.size(); i++) {
     321            BlogURI uri = (BlogURI)blogURIs.get(i);
     322            File blogDir = new File(BlogManager.instance().getArchive().getArchiveDir(), uri.getKeyHash().toBase64());
     323            BlogInfo info = BlogManager.instance().getArchive().getBlogInfo(uri);
     324            if (!meta.contains(uri.getKeyHash())) {
     325                uploads.put("blogmeta" + meta.size(), new File(blogDir, Archive.METADATA_FILE));
     326                meta.add(uri.getKeyHash());
     327                _statusMessages.add("Scheduling upload of the blog metadata for " + HTMLRenderer.sanitizeString(info.getProperty(BlogInfo.NAME)));
     328            }
     329            uploads.put("blogpost" + i, new File(blogDir, uri.getEntryId() + ".snd"));
     330            _statusMessages.add("Scheduling upload of " + HTMLRenderer.sanitizeString(info.getProperty(BlogInfo.NAME))
     331                                + ": " + getEntryDate(uri.getEntryId()));
     332        }
     333        EepPost post = new EepPost();
     334        post.postFiles(importURL, _proxyHost, _proxyPort, uploads, new Runnable() { public void run() { _statusMessages.add("Upload complete"); } });
     335    }
     336   
     337    private String getImportURL() {
     338        String loc = _remoteLocation.trim();
     339        int archiveRoot = loc.lastIndexOf('/');
     340        int syndieRoot = loc.lastIndexOf('/', archiveRoot-1);
     341        return loc.substring(0, syndieRoot + 1) + "import.jsp";
    286342    }
    287343   
     
    306362       
    307363        int newEntries = 0;
     364        int localNew = 0;
    308365        out.write("<table border=\"1\" width=\"100%\">\n");
     366        List entries = new ArrayList();
    309367        for (Iterator iter = remoteBlogs.iterator(); iter.hasNext(); ) {
    310368            Hash blog = (Hash)iter.next();
     
    315373            if (info != null) {
    316374                buf.append("<a href=\"" + HTMLRenderer.getPageURL(blog, null, -1, -1, -1, user.getShowExpanded(), user.getShowImages()) + "\"><b>" + HTMLRenderer.sanitizeString(info.getProperty(BlogInfo.NAME)) + "</b></a>: " +
    317                           HTMLRenderer.sanitizeString(info.getProperty(BlogInfo.DESCRIPTION)) + "\n");
     375                HTMLRenderer.sanitizeString(info.getProperty(BlogInfo.DESCRIPTION)) + "\n");
    318376            } else {
    319377                buf.append("<b>" + blog.toBase64() + "</b>\n");
     
    321379            buf.append("</td></tr>\n");
    322380            buf.append("<tr><td>&nbsp;</td><td nowrap=\"true\"><b>Posted on</b></td><td nowrap=\"true\"><b>#</b></td><td nowrap=\"true\"><b>Size</b></td><td width=\"90%\" nowrap=\"true\"><b>Tags</b></td></tr>\n");
    323             List entries = new ArrayList();
     381            entries.clear();
    324382            _remoteIndex.selectMatchesOrderByEntryId(entries, blog, null);
    325383            for (int i = 0; i < entries.size(); i++) {
     
    331389                    shownEntries++;
    332390                } else {
    333                     String page = HTMLRenderer.getPageURL(blog, null, uri.getEntryId(), -1, -1, 
    334                                                           user.getShowExpanded(), user.getShowImages());
     391                    String page = HTMLRenderer.getPageURL(blog, null, uri.getEntryId(), -1, -1,
     392                    user.getShowExpanded(), user.getShowImages());
    335393                    buf.append("<td><a href=\"" + page + "\">(local)</a></td>\n");
    336394                }
     
    346404                buf.append("</tr>\n");
    347405            }
     406           
     407            // now for posts in known blogs that we have and they don't
     408            entries.clear();
     409            localIndex.selectMatchesOrderByEntryId(entries, blog, null);
     410            buf.append("<tr><td colspan=\"5\">Entries we have, but the remote Syndie doesn't:</td></tr>\n");
     411            for (int i = 0; i < entries.size(); i++) {
     412                BlogURI uri = (BlogURI)entries.get(i);
     413                if (!_remoteIndex.getEntryIsKnown(uri)) {
     414                    buf.append("<tr>\n");
     415                    buf.append("<td><input type=\"checkbox\" name=\"localentry\" value=\"" + uri.toString() + "\" /></td>\n");
     416                    shownEntries++;
     417                    newEntries++;
     418                    localNew++;
     419                    buf.append("<td>" + getDate(uri.getEntryId()) + "</td>\n");
     420                    buf.append("<td>" + getId(uri.getEntryId()) + "</td>\n");
     421                    buf.append("<td>" + localIndex.getBlogEntrySizeKB(uri) + "KB</td>\n");
     422                    buf.append("<td>");
     423                    for (Iterator titer = new TreeSet(localIndex.getBlogEntryTags(uri)).iterator(); titer.hasNext(); ) {
     424                        String tag = (String)titer.next();
     425                        buf.append("<a href=\"" + HTMLRenderer.getPageURL(blog, tag, -1, -1, -1, user.getShowExpanded(), user.getShowImages()) + "\">" + tag + "</a> \n");
     426                    }
     427                    buf.append("</td>\n");
     428                    buf.append("</tr>\n");
     429                }
     430            }
     431           
    348432            if (shownEntries > 0) // skip blogs we have already syndicated
    349433                out.write(buf.toString());
    350434        }
     435
     436        // now for posts in blogs we have and they don't
     437        int newBefore = localNew;
     438        buf.setLength(0);
     439        buf.append("<tr><td colspan=\"5\">Blogs the remote Syndie doesn't have</td></tr>\n");
     440        for (Iterator iter = localBlogs.iterator(); iter.hasNext(); ) {
     441            Hash blog = (Hash)iter.next();
     442            if (remoteBlogs.contains(blog)) {
     443                System.err.println("Remote index has " + blog.toBase64());
     444                continue;
     445            }
     446           
     447            entries.clear();
     448            localIndex.selectMatchesOrderByEntryId(entries, blog, null);
     449           
     450            for (int i = 0; i < entries.size(); i++) {
     451                BlogURI uri = (BlogURI)entries.get(i);
     452                buf.append("<tr>\n");
     453                buf.append("<td><input type=\"checkbox\" name=\"localentry\" value=\"" + uri.toString() + "\" /></td>\n");
     454                buf.append("<td>" + getDate(uri.getEntryId()) + "</td>\n");
     455                buf.append("<td>" + getId(uri.getEntryId()) + "</td>\n");
     456                buf.append("<td>" + localIndex.getBlogEntrySizeKB(uri) + "KB</td>\n");
     457                buf.append("<td>");
     458                for (Iterator titer = new TreeSet(localIndex.getBlogEntryTags(uri)).iterator(); titer.hasNext(); ) {
     459                    String tag = (String)titer.next();
     460                    buf.append("<a href=\"" + HTMLRenderer.getPageURL(blog, tag, -1, -1, -1, user.getShowExpanded(), user.getShowImages()) + "\">" + tag + "</a> \n");
     461                }
     462                buf.append("</td>\n");
     463                buf.append("</tr>\n");
     464                localNew++;
     465            }
     466        }
     467        if (localNew > newBefore)
     468            out.write(buf.toString());
     469       
    351470        out.write("</table>\n");
    352471        if (newEntries > 0) {
     
    356475            out.write(HTMLRenderer.sanitizeString(_remoteLocation) + " has no new posts to offer us\n");
    357476        }
    358     }
    359     private final SimpleDateFormat _dateFormat = new SimpleDateFormat("yyyy/MM/dd");
     477        if (localNew > 0) {
     478            out.write("<input type=\"submit\" name=\"action\" value=\"Post selected entries\" /> \n");
     479        }
     480    }
     481    private final SimpleDateFormat _dateFormat = new SimpleDateFormat("yyyy/MM/dd", Locale.UK);
    360482    private String getDate(long when) {
    361483        synchronized (_dateFormat) {
     
    363485        }
    364486    }
    365 
     487    private final String getEntryDate(long when) {
     488        synchronized (_dateFormat) {
     489            try {
     490                String str = _dateFormat.format(new Date(when));
     491                long dayBegin = _dateFormat.parse(str).getTime();
     492                return str + "." + (when - dayBegin);
     493            } catch (ParseException pe) {
     494                pe.printStackTrace();
     495                // wtf
     496                return "unknown";
     497            }
     498        }
     499    }
     500   
    366501    private long getId(long id) {
    367502        synchronized (_dateFormat) {
  • apps/syndie/jsp/_bodyindex.jsp

    r346faa3 r0473e08  
    11<%@page import="net.i2p.syndie.web.ArchiveViewerBean, net.i2p.syndie.*" %>
    2 <jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
    3 <form action="index.jsp">
     2<jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" /><table border="0" width="100%">
     3<tr><form action="index.jsp"><td nowrap="true">
    44<b>Blogs:</b> <%ArchiveViewerBean.renderBlogSelector(user, request.getParameterMap(), out);%>
    55<input type="submit" value="Refresh" />
    6 <input type="submit" name="action" value="<%=ArchiveViewerBean.SEL_ACTION_SET_AS_DEFAULT%>" /></form>
    7 <hr />
    8 
    9 <%ArchiveViewerBean.renderBlogs(user, request.getParameterMap(), out); out.flush(); %>
     6<input type="submit" name="action" value="<%=ArchiveViewerBean.SEL_ACTION_SET_AS_DEFAULT%>" />
     7<%ArchiveViewerBean.renderBlogs(user, request.getParameterMap(), out, "</td></form></tr><tr><td align=\"left\" valign=\"top\">");%></td></tr></table>
  • apps/syndie/jsp/_leftnav.jsp

    r346faa3 r0473e08  
    11<%@page import="net.i2p.syndie.web.ArchiveViewerBean, net.i2p.syndie.*, net.i2p.data.Base64" %>
    22<jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
    3 <jsp:useBean scope="session" class="net.i2p.syndie.data.ArchiveIndex" id="archive" />
    4 <%if (request.getRequestURI().indexOf("register.jsp") == -1) {%>
    5 <jsp:include page="_leftnavprotected.jsp" />
    6 <hr />
    7 <% } %>
    8 <u>Local archive:</u><br />
    9 <b>Posts:</b> <jsp:getProperty name="archive" property="newEntries" />/<jsp:getProperty name="archive" property="allEntries" /><br />
    10 <b>Blogs:</b> <jsp:getProperty name="archive" property="newBlogs" />/<jsp:getProperty name="archive" property="allBlogs" /><br />
    11 <b>Size:</b> <jsp:getProperty name="archive" property="newSizeStr" />/<jsp:getProperty name="archive" property="totalSizeStr" /><br />
    12 <i>(new/total)</i>
    13 <hr />
    14 <u>Latest blogs:</u><br />
    15 <%!int i = 0; %>
    16 <%for (i = 0; i < archive.getNewestBlogCount(); i++) {
    17     String keyHash = Base64.encode(archive.getNewestBlog(i).getData());
    18 %><a href="viewmetadata.jsp?<%=ArchiveViewerBean.PARAM_BLOG%>=<%=keyHash%>">
    19 <%=ArchiveViewerBean.getBlogName(keyHash)%></a><br />
    20 <% } %>
    21 <hr />
    22 <u>Latest posts:</u><br />
    23 <%for (i = 0; i < archive.getNewestBlogEntryCount(); i++) {
    24     String keyHash = Base64.encode(archive.getNewestBlogEntry(i).getKeyHash().getData());
    25     long entryId = archive.getNewestBlogEntry(i).getEntryId();
    26 %><a href="index.jsp?<%=ArchiveViewerBean.PARAM_BLOG%>=<%=keyHash%>&<%=ArchiveViewerBean.PARAM_ENTRY%>=<%=entryId%>&<%=ArchiveViewerBean.PARAM_EXPAND_ENTRIES%>=true">
    27 <%=ArchiveViewerBean.getEntryTitle(keyHash, entryId)%></a><br />
    28 <% } %>
     3<jsp:useBean scope="session" class="net.i2p.syndie.data.TransparentArchiveIndex" id="archive" />
  • apps/syndie/jsp/_toplogo.jsp

    r346faa3 r0473e08  
    11<%@page import="net.i2p.syndie.BlogManager" %>
    22<jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
    3 <jsp:useBean scope="session" class="net.i2p.syndie.data.ArchiveIndex" id="archive" />
    4 <% session.setAttribute("archive", BlogManager.instance().getArchive().getIndex()); %>
    53<!--
    64<center>[syndiemedia]</center>
  • apps/syndie/jsp/_topnav.jsp

    r346faa3 r0473e08  
    1 <td valign="top" align="left" class="syndieTopNavBlogsCell" height="10"><a href="index.jsp">Blogs</a></td>
    2 <td valign="top" align="left" class="syndieTopNavRemoteCell" height="10"><a href="remote.jsp">Remote archives</a></td>
    3 <td valign="top" align="left" class="syndieTopNavManageCell" height="10">Manage</td>
     1<%@page import="net.i2p.syndie.*, net.i2p.syndie.sml.*, net.i2p.syndie.web.*" %>
     2<jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
     3<td valign="top" align="left" class="syndieTopNavBlogsCell" height="10"><a href="index.jsp">Home</a></td>
     4<td valign="top" align="left" class="syndieTopNavRemoteCell" height="10">
     5<a href="remote.jsp">Remote archives</a>
     6<a href="import.jsp">Import</a>
     7</td>
     8<form action="<%=request.getRequestURI() + "?" + (request.getQueryString() != null ? request.getQueryString() : "")%>">
     9<td nowrap="true" valign="top" align="right" class="syndieTopNavManageCell" height="10"><%
     10if ("true".equals(request.getParameter("logout"))) {
     11  user.invalidate();
     12}
     13String login = request.getParameter("login");
     14String pass = request.getParameter("password");
     15String loginSubmit = request.getParameter("Login");
     16if ( (login != null) && (pass != null) && (loginSubmit != null) && (loginSubmit.equals("Login")) ) {
     17  String loginResult = BlogManager.instance().login(user, login, pass);
     18  if (!user.getAuthenticated())
     19    out.write("<b>" + loginResult + "</b>");
     20}
     21%>
     22<% if (user.getAuthenticated()) { %>
     23Logged in as: <b><jsp:getProperty property="username" name="user" />:</b>
     24<a href="<%=HTMLRenderer.getPageURL(user.getBlog(), null, -1, -1, -1, user.getShowExpanded(), user.getShowImages())%>"><%=HTMLRenderer.sanitizeString(ArchiveViewerBean.getBlogName(user.getBlogStr()))%></a>
     25<a href="<%=HTMLRenderer.getPostURL(user.getBlog())%>">Post</a>
     26<a href="<%=HTMLRenderer.getMetadataURL(user.getBlog())%>">Metadata</a>
     27<a href="index.jsp?logout=true">Logout</a><br />
     28<%} else {%>
     29Login: <input type="text" name="login" size="8" />
     30Pass: <input type="password" name="password" size="8" /><%
     31java.util.Enumeration params = request.getParameterNames();
     32while (params.hasMoreElements()) {
     33 String p = (String)params.nextElement();
     34 String val = request.getParameter(p);
     35 %><input type="hidden" name="<%=p%>" value="<%=val%>" /><%
     36}%>
     37<input type="submit" name="Login" value="Login" />
     38<a href="register.jsp">Register</a>
     39<% } %>
     40
     41</td>
     42</form>
  • apps/syndie/jsp/import.jsp

    r346faa3 r0473e08  
    11<%@page import="net.i2p.data.Base64, net.i2p.syndie.web.*, net.i2p.syndie.sml.*, net.i2p.syndie.data.*, net.i2p.syndie.*, org.mortbay.servlet.MultiPartRequest, java.util.*, java.io.*" %>
    2 <jsp:useBean scope="session" class="net.i2p.syndie.data.ArchiveIndex" id="archive" />
     2<jsp:useBean scope="session" class="net.i2p.syndie.data.TransparentArchiveIndex" id="archive" />
    33<html>
    44<head>
  • apps/syndie/jsp/post.jsp

    r346faa3 r0473e08  
    114114Attachment 1: <input type="file" name="entryfile1" /><br />
    115115Attachment 2: <input type="file" name="entryfile2" /><br />
    116 Attachment 3: <input type="file" name="entryfile3" /><br />
     116Attachment 3: <input type="file" name="entryfile3" /><br /><!--
    117117Attachment 4: <input type="file" name="entryfile4" /><br />
    118118Attachment 5: <input type="file" name="entryfile5" /><br />
     
    120120Attachment 7: <input type="file" name="entryfile7" /><br />
    121121Attachment 8: <input type="file" name="entryfile8" /><br />
    122 Attachment 9: <input type="file" name="entryfile9" /><br />
     122Attachment 9: <input type="file" name="entryfile9" /><br />-->
    123123<hr />
    124124<input type="submit" name="Post" value="Preview..." /> <input type="reset" value="Cancel" />
  • apps/syndie/jsp/remote.jsp

    r346faa3 r0473e08  
    22<jsp:useBean scope="session" class="net.i2p.syndie.web.RemoteArchiveBean" id="remote" />
    33<jsp:useBean scope="session" class="net.i2p.syndie.User" id="user" />
    4 <jsp:useBean scope="session" class="net.i2p.syndie.data.ArchiveIndex" id="archive" />
     4<jsp:useBean scope="session" class="net.i2p.syndie.data.TransparentArchiveIndex" id="archive" />
    55<html>
    66<head>
     
    1818if (!user.getAuthenticated() || !user.getAllowAccessRemote()) {
    1919%>Sorry, you are not allowed to access remote archives from here.  Perhaps you should install Syndie yourself?<%
    20 } else {
    21  %>Import from:
     20} else { %>Import from:
    2221<select name="schema">
    23  <option value="web">Web</option>
    24  <option value="eep">I2P</option>
    25  <option value="tor">TOR</option>
    26  <option value="freenet">Freenet</option>
     22 <option value="web">I2P/TOR/Freenet</option>
    2723 <option value="mnet">MNet</option>
    2824 <option value="feedspace">Feedspace</option>
    2925 <option value="usenet">Usenet</option>
    30 </select>
    31 <input name="location" size="60" /> <input type="submit" name="action" value="Continue..." />
     26</select>
     27Proxy <input type="text" size="10" name="proxyhost" value="localhost" />:<input type="text" size="4" name="proxyport" value="4444" />
     28<input name="location" size="40" /> <input type="submit" name="action" value="Continue..." /><br />
    3229<%
    3330  String action = request.getParameter("action");
    3431  if ("Continue...".equals(action)) {
    35     remote.fetchIndex(user, request.getParameter("schema"), request.getParameter("location"));
     32    remote.fetchIndex(user, request.getParameter("schema"), request.getParameter("location"), request.getParameter("proxyhost"), request.getParameter("proxyport"));
    3633  } else if ("Fetch metadata".equals(action)) {
    3734    remote.fetchMetadata(user, request.getParameterMap());
     
    4037  } else if ("Fetch all new entries".equals(action)) {
    4138    remote.fetchAllEntries(user, request.getParameterMap());
     39  } else if ("Post selected entries".equals(action)) {
     40    remote.postSelectedEntries(user, request.getParameterMap());
    4241  }
    4342  String msgs = remote.getStatus();
    4443  if ( (msgs != null) && (msgs.length() > 0) ) { %><pre><%=msgs%>
    45 <a href="remote.jsp">Refresh</a></pre><br /><% }
     44<a href="remote.jsp">Refresh</a></pre><br /><%
     45  }
    4646  if (remote.getFetchIndexInProgress()) { %><b>Please wait while the index is being fetched
    4747from <%=remote.getRemoteLocation()%></b>. <%
    4848  } else if (remote.getRemoteIndex() != null) {
    4949    // remote index is NOT null!
    50    %><b><%=remote.getRemoteLocation()%></b>:<br />
     50   %><b><%=remote.getRemoteLocation()%></b>
     51<a href="remote.jsp?schema=<%=remote.getRemoteSchema()%>&location=<%=remote.getRemoteLocation()%><%
     52if (remote.getProxyHost() != null && remote.getProxyPort() > 0) {
     53  %>&proxyhost=<%=remote.getProxyHost()%>&proxyport=<%=remote.getProxyPort()%><%
     54} %>&action=Continue...">(refetch)</a>:<br />
    5155<%remote.renderDeltaForm(user, archive, out);%>
    5256<textarea style="font-size:8pt" rows="5" cols="120"><%=remote.getRemoteIndex()%></textarea><%
  • apps/syndie/jsp/web.xml

    r346faa3 r0473e08  
    55
    66<web-app>
     7    <servlet>
     8     <servlet-name>net.i2p.syndie.web.ArchiveServlet</servlet-name>
     9     <servlet-class>net.i2p.syndie.web.ArchiveServlet</servlet-class>
     10    </servlet>
     11     
    712    <!-- precompiled servlets -->
     13   
    814    <servlet-mapping>
    915      <servlet-name>net.i2p.syndie.jsp.index_jsp</servlet-name>
    1016      <url-pattern>/</url-pattern>
     17    </servlet-mapping>
     18    <servlet-mapping>
     19      <servlet-name>net.i2p.syndie.web.ArchiveServlet</servlet-name>
     20      <url-pattern>/archive/*</url-pattern>
    1121    </servlet-mapping>
    1222   
Note: See TracChangeset for help on using the changeset viewer.