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

  • Home
  • SEARCH
  • 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 9174179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:42:43+00:00 2026-06-17T16:42:43+00:00

My team had all ready created a project in spring framework and running successfully.

  • 0

My team had all ready created a project in spring framework and running successfully. Now i decided to make it run even faster.

Existing project:
My developers do their best and created dynamically output css pages using jsp.

Existing code:

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <jsp:include page="/WEB-INF/common/layout/head.jsp" />
    < jsp:include page="/WEB-INF/common/css/index.jsp" />
</head>

Out put:

<style type="text/css">
    body{background: #ffffff url('<c:url value='/resources/images/logo/logo_small.png'/>') no-repeat scroll center center}
</style>

There is no error in this code or project this is working fine.

What i need is that, my css files need to be loaded by a link tag in header. something like this:

<link rel="stylesheet" href="/mysite/resource/css/sitemap/index.css" type="text/css">

This will speed up by catching in browser.

What i done up to now:
I created a url it points to a jsp.

<c:if test="${branch == 'sitemap'}">
    <c:if test="${page == 'index'}">
        <%@include file="/myfile/dynamic/css/layout/index.jsp" %>
    </c:if>
</c:if>

This code may? works, but there is a problem. I need to replace style type start tag and end tag.
I done that by, Importing and replacing by this code:

<c:set var="my_css">
    <c:if test="${branch == 'sitemap'}">
        <c:if test="${page == 'index'}">
            <%@include file="/WEB-INF/common/css/index.jsp" %>
        </c:if>
    </c:if>
</c:set>
<c:set var="css" value='${fn:replace(fn:replace(fn:replace(my_css,"<style type=\\\"text/css\\\">", ""),"</style>", ""),"\'", "99999")}'/>
<compress:css enabled="true">
    <c:out value='${css}'/>
</compress:css>

Here 99999 location is causing problem. Actually i need to replace it with & #39;.

The above code works fine and replaces ‘ with 9999. But after replace with &.. it not working. The & itself again changing to & amp;

Information :
Its a completed project. More css will be generated dynamically. All in jsp pages.
Goodluck is that each jsp page ouput only css code. Badluck is that it contains script tag at top and bottom. One more bad luck is on url(”).

This ‘ code is doing the problem in fn:replace tag.

Or if you have a better suggestion please let me know.

I think there will be an easy option. Please let me know your suggestions, advice and help.

  • 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-17T16:42:44+00:00Added an answer on June 17, 2026 at 4:42 pm

    I achieved this.

    I created a new route /resource/css|js , I use internal resource view resolver – (folder).

    My link url is moething like /resource/css/qtn/page1.css.

    In controller /resources/{type}/{page}.css.

    Here i get type and page values and used this in my dynamic jsp page to achieve my result.

    For security i checked the url is it comes from my own page or not.

    Hint :

    While using internal resource view resolver it will throw error when you pass page values directly to resource url because sometimes page url will be /page1/block1 so our controller throws error.

    To solve this i passed page values as /resource/css/qtn/page1.css?sub=${page}.

    In controller we can easily cath this sub value and send to our dynamic jsp as model.

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

Sidebar

Related Questions

I had created all my stored procedures with username@XX.XX.XX.XX as DEFINER value. Now, since
We had a central Git repository on a separate server. All the team members
my team have built many tools for our project using win forms and Visual
My team is using Entity Framework 4.3.0 - Code Only with POCO classes as
My team have 3 or 5 person.And we are working locally. and we decided
Our team is now beginning to look at jumping from 2.0 to 3.5 and
My team's current project involves re-writing retrieval libraries in JavaScript. We are basically looking
Our team builds and owns a webservices framework. Other teams which actually build the
Yesterday I had a team leader of another team say that they took a
We've all had them, errors or bugs that have lost us lots of time.

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.