• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

This could bug you

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am facing a unique problem, in the sense that i didn't thought
it was a problem as it used to work fine on tomcat 3.0, but on
tomcat 3.1, i'm getting a parseException by jasper.
The problem starts as follows:
I've got a config.jsp file as follows:
<%!
public static String site = "My Site";
%>
There's another file called display.jsp, defined as

The name of my site is <%= site %>
Value of flag is <%= flag %>

And finally a file called show.jsp defined as
<%@ include file="config.jsp" %>
<%
int flag = 0;
if (flag == 0) {
%>
<%@ include file="display.jsp" %>
<%
}
else if (flag == 1) {
%>
<%@ include file="display.jsp" %>
<%
}
else {
%>
<%@ include file="display.jsp" %>
<%
}
%>

The above code just illustrated my organization. Now when i try to
run show.jsp it fails with a parseException as follows:
org.apache.jasper.compiler.ParseException: Seen file \display.jsp already,
maybe this is a recursive include?!
Please guide me what should i do to prevent the above
Gaurav
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Gaurav:
I have seen your earlier post, but din't post what I thought.
Since no one else is taking a shot at this, I am saying this.
Personally, I would go into the work folder, open the java
source code and see if the java code correctly reflects
the if else construct. Not that this would be wrong, but
I would do it anyways. The reason I would do it is because
the error messsage is not very intutive.
If you find time try it out.
regds.
- satya
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Garry Kalra:

I've got a config.jsp file as follows:
<%!
public static String site = "My Site";
%>
There's another file called display.jsp, defined as

The name of my site is <%= site %>
Value of flag is <%= flag %>


How the heck do you expect to access 'site' variable )declared in config.jsp) from display.jsp??? It's like creating classes like these....

 
Garry Kalra
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks, everything is fine, i guess the only problem seems to be with tomcat 3.1, as i tried it out in tomcat 3.0 and tomcat 3.2.1 and it is working perfectly fine.
So i think the tomcat 3.1 is a pretty buggy software. Any views about tomcat 3.1 and tomcat 3.2.1 will be highly appreciated.
And for Bhupinder, it works fine because it is a compile time include.
Gaurav
 
Then YOU must do the pig's work! Read this tiny ad. READ IT!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic