Link to home
Create AccountLog in
Avatar of NiksStruts
NiksStruts

asked on

How do we know JSP and servlet version for Strtus version

Hi experts,

i am using strtus 1.2.9 .. how can we know what is version for JSP and servlet , the struts 1.2.9 using..in general how can we know jsp and servlet versions?

Thanks in advance
Avatar of rrz
rrz
Flag of United States of America image

Try this JSP,
Server is <%= application.getServerInfo()%><br/>
JSP version is <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion()%><br/>
Servlet API is <%= application.getMajorVersion()%>.<%=application.getMinorVersion()%>
${"Hello JSP 2"}
Avatar of NiksStruts
NiksStruts

ASKER

Thats great ..working fine...i got to know versions..
I am using TOMCAT 6.0.16 for struts application...
but when i am running this application in TOMCAT 5.5 then some JSP file giving error for statments like below
IN TOMCAT 6.0.16
in JSP value="<%=session.getAttribute("countryName")%>"
working fine.
but in TOMCAT 5.5  not working n giving error like
 
Attribute value session.getAttribute("countryName") is quoted with " which must be escaped when used within the value

Please let me know how can i resolve this issue...
and i dont know how many issue it has with TOMCAT 5.5 so how can i resolve those which are differe in TOMCAT 6.0 and TOMCAT 5.5
 
Thanks in advance
 
 
 
>but in TOMCAT 5.5  not working n giving error like
I can't think of any difference that would explain. But did you try  
value='<%=session.getAttribute("countryName")%>'
Where is this value ? please show us complete code line.
Also you could try
value="${countryName}"
i tried this ${countryName} before but same issue i found so i did <%=session.getAttribute("countryName")%> way
in tomcat 5.5 when i use this ${countryName}  its not treating as session variable but its treating as string and displaying as ${countryName} on page.....
and when i tires '<%=session.getAttribute("countryName")%>' ..its giving me syntact error in my Struts 1.2.0 JSP page..
and the value
countryName is set in session initially as bewlo
 String countryName = LoginData.getCountyName(countryCode);
        session.setAttribute("countryName", countryName);
         
 Thanks
thats working fine ...thanks '<%=session.getAttribute("countryName")%>'

can i configure TOMCAT 6.0 as well as TOMCAT 5.5 with NETBEANS 6.0 at the same time?
do u have any idea about that?
 
Thanks for your comments
ASKER CERTIFIED SOLUTION
Avatar of rrz
rrz
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer