Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8794253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:13:37+00:00 2026-06-13T23:13:37+00:00

I have been using Jsoup for parsing my HTML files and so far it

  • 0

I have been using Jsoup for parsing my HTML files and so far it does a great job. However, it’s not able to parse any server tags ( <% … %> ). I decided to extend it but I cannot find an easy way to extend its Parser and all those private/package level classes (i.e. TreeBuilder, TransitionState … etc)…

So I started looking at Jericho as it claims it can parse server tags – however, its documentation is so poor that I cannot even get started easily. And seems like its API is not as friendly as what Jsoup provides – it’s not that straight forward to extract some nodes and move it around …

I wonder if anyone has the similar situation before and how you get it solved? In short, I just want to parse JSP files in Java. (Well .. please don’t ask me to implement one by myself ;p )

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:13:37+00:00Added an answer on June 13, 2026 at 11:13 pm

    Lastly I get a workaround: put server code block in a HTML comment block so that 1) server code can get executed correctly; 2) Jsoup can process the whole block as a HTML comment node without touching anything inside.

    e.g.

    <!--
    <%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
    <%@ page import="com.systemcrossed.groupbuystart.webapp.display.DisplayHelper" %>
    <%@ page import="com.systemcrossed.groupbuystart.webapp.util.JsonUtil" %>
    <%@ page import="org.apache.commons.lang.StringEscapeUtils" %>
    <%@ include file="/_sys/pages/public/incl/jspCommon.jsp" %>
    -->
    <!--<%
        // Java code here
    %>-->
    <html>
    <head>
        ... html stuff
    

    It works well for me now! Hope ppl who got the same problem could get some help ! 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using JSoup to parse lyrics and it has been great until
Im using JSoup with android and so far I have been successful. In my
have been using no DOCTYPE but rather simply starting with <html> as per HTML5
I have been using DOM for a long time and as such DOM parsing
I have been using Javascript but more in a procedural way not the object
I have been using mySQL Quite a bit however, this is the first time
I have been using these files all day... And then suddenly this is now
So far I have been using in tutorials, examples and sample code only packages
I have been using TortoiseSVN for some time and I really like it. I
I have been using Stanford POS Tagger to tag parts of speech in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.