[Geoserver-users] Struts problem when porting to WebLogic 8.1

Hello All.

I believe that I have a struts taglib incompatibility when I try to run
GeoServer in WebLogic 8.1. I took the 1.5.0 final version in war file
format and exploded it before deploying it into WebLogic. I also changed
the welcome file to welcome.do (it could not find index.jsp) in web.xml.

Here is the message I gott when I trying to run:

Parsing of JSP File '/WEB-INF/pages/layouts/mainLayout.jsp' failed:
/WEB-INF/pages/layouts/mainLayout.jsp(4): Error in using tag library
uri='/tags/struts-html' prefix='html': The Tag class
'org.apache.struts.taglib.html.FormTag' has no setter method corresponding
to TLD declared attribute 'name', (JSP 1.1 spec, 5.4.1)
probably occurred due to an error in /WEB-INF/pages/layouts/mainLayout.jsp
line 4:
<%@ taglib uri="/tags/struts-html" prefix="html" %> Tue May 15 20:47:10 GMT
2007

I changed the html taglib include to this:
<%@ taglib uri="http:/jakarta.apache.org/struts/tags-html" prefix="html" %>

Then I get these errors:

Compilation of
'/h/data/local/I3CMT/data/I3/./myserver/.wlnotdelete/extract/myserver_geoserver_geoserver/jsp_servlet/_web_45_inf/_pages/_layouts/__mainlayout.java'
failed:
/h/data/local/I3CMT/data/I3/./myserver/.wlnotdelete/extract/myserver_geoserver_geoserver/jsp_servlet/_web_45_inf/_pages/_layouts/__mainlayout.java:725:
cannot find symbol
probably occurred due to an error in /WEB-INF/pages/layouts/mainLayout.jsp
line 64:
GeoServer gs = (GeoServer)
getServletContext().getAttribute(GeoServer.WEB_CONTAINER_KEY);

/h/data/local/I3CMT/data/I3/./myserver/.wlnotdelete/extract/myserver_geoserver_geoserver/jsp_servlet/_web_45_inf/_pages/_layouts/__mainlayout.java
uses or overrides a deprecated API.
Full compiler error(s):

/h/data/local/I3CMT/data/I3/./myserver/.wlnotdelete/extract/myserver_geoserver_geoserver/jsp_servlet/_web_45_inf/_pages/_layouts/__mainlayout.java:725:
cannot find symbol
symbol : method getServletContext()
location: class jsp_servlet._web_45_inf._pages._layouts.__mainlayout
          GeoServer gs = (GeoServer)
getServletContext().getAttribute(GeoServer.WEB_CONTAINER_KEY); //[
/WEB-INF/pages/layouts/mainLayout.jsp; Line: 64]
                                     ^
Note:
/h/data/local/I3CMT/data/I3/./myserver/.wlnotdelete/extract/myserver_geoserver_geoserver/jsp_servlet/_web_45_inf/_pages/_layouts/__mainlayout.java
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

--
View this message in context: http://www.nabble.com/Struts-problem-when-porting-to-WebLogic-8.1-tf3768349.html#a10653495
Sent from the GeoServer - User mailing list archive at Nabble.com.

I have no idea if this will actually help, but did you manage to find: http://docs.codehaus.org/display/GEOSDOC/Deploy+in+Weblogic ?

It has some hints on how to deploy in weblogic.

best regards,

Chris

Frederick Thurber wrote:

Hello All.

I believe that I have a struts taglib incompatibility when I try to run
GeoServer in WebLogic 8.1. I took the 1.5.0 final version in war file
format and exploded it before deploying it into WebLogic. I also changed
the welcome file to welcome.do (it could not find index.jsp) in web.xml.

Here is the message I gott when I trying to run:

Parsing of JSP File '/WEB-INF/pages/layouts/mainLayout.jsp' failed:
/WEB-INF/pages/layouts/mainLayout.jsp(4): Error in using tag library
uri='/tags/struts-html' prefix='html': The Tag class
'org.apache.struts.taglib.html.FormTag' has no setter method corresponding
to TLD declared attribute 'name', (JSP 1.1 spec, 5.4.1)
probably occurred due to an error in /WEB-INF/pages/layouts/mainLayout.jsp
line 4:
<%@ taglib uri="/tags/struts-html" prefix="html" %> Tue May 15 20:47:10 GMT
2007

I changed the html taglib include to this:
<%@ taglib uri="http:/jakarta.apache.org/struts/tags-html" prefix="html" %>

Then I get these errors:

Compilation of
'/h/data/local/I3CMT/data/I3/./myserver/.wlnotdelete/extract/myserver_geoserver_geoserver/jsp_servlet/_web_45_inf/_pages/_layouts/__mainlayout.java'
failed:
/h/data/local/I3CMT/data/I3/./myserver/.wlnotdelete/extract/myserver_geoserver_geoserver/jsp_servlet/_web_45_inf/_pages/_layouts/__mainlayout.java:725:
cannot find symbol
probably occurred due to an error in /WEB-INF/pages/layouts/mainLayout.jsp
line 64:
GeoServer gs = (GeoServer)
getServletContext().getAttribute(GeoServer.WEB_CONTAINER_KEY);

/h/data/local/I3CMT/data/I3/./myserver/.wlnotdelete/extract/myserver_geoserver_geoserver/jsp_servlet/_web_45_inf/_pages/_layouts/__mainlayout.java
uses or overrides a deprecated API.
Full compiler error(s):

/h/data/local/I3CMT/data/I3/./myserver/.wlnotdelete/extract/myserver_geoserver_geoserver/jsp_servlet/_web_45_inf/_pages/_layouts/__mainlayout.java:725:
cannot find symbol
symbol : method getServletContext()
location: class jsp_servlet._web_45_inf._pages._layouts.__mainlayout
          GeoServer gs = (GeoServer)
getServletContext().getAttribute(GeoServer.WEB_CONTAINER_KEY); //[
/WEB-INF/pages/layouts/mainLayout.jsp; Line: 64]
                                     ^
Note:
/h/data/local/I3CMT/data/I3/./myserver/.wlnotdelete/extract/myserver_geoserver_geoserver/jsp_servlet/_web_45_inf/_pages/_layouts/__mainlayout.java
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org

Thanks Chris,

I was aware of this excellent information from Luca Morandini (he has
another similar page here:
http://docs.codehaus.org/display/GEOSDEV/GeoServer+WCS+branch+under+WebLogic+9.2,
but it does not *seem* to be applicable at this point and much of this
information is for WebLogic 9.n

What the heck, I will try it...but I think that there is a version mismatch
somewhere with the struts html tld or jar file.

Chris Holmes wrote:

I have no idea if this will actually help, but did you manage to find:
http://docs.codehaus.org/display/GEOSDOC/Deploy+in+Weblogic ?

It has some hints on how to deploy in weblogic.

best regards,

Chris

--
View this message in context: http://www.nabble.com/Struts-problem-when-porting-to-WebLogic-8.1-tf3768349.html#a10653998
Sent from the GeoServer - User mailing list archive at Nabble.com.

I have found the problem indicated by this particular error message. The
GeoServer code uses a Java 1.4 deprecated call (getServletContext()), but my
WebLogic server is using Java 1.5. Once I address that, I will let you know
how it works; I know you'all are waiting with baited breath ;^)
--
View this message in context: http://www.nabble.com/Struts-problem-when-porting-to-WebLogic-8.1-tf3768349.html#a10666155
Sent from the GeoServer - User mailing list archive at Nabble.com.

I found the problem, and it had little to do with the error messages. The
issue was that I was porting to WebLogic on Solaris 10. My JVM was set to
1.4.2, but, unbeknowest to me, that when WebLogic went to compile the jsp
files, it used the Java 1.5 that was bundled with Solaris. Thus the weird
errors...

Setting the JavaCompiler subelement of Server in config.xml allowed WebLogic
to compile with a Java 1.4.2 javac and thus cured the problem.
--
View this message in context: http://www.nabble.com/Struts-problem-when-porting-to-WebLogic-8.1-tf3768349.html#a10739246
Sent from the GeoServer - User mailing list archive at Nabble.com.

The solution to the problem was actually two-part. The first part of the
solution is described above (setting the correct path to the javac).

The second part involved this line of code in pages/layouts/mainLayout.jsp
which refused to compile in the WebLogic 8.1 environment:

          GeoServer gs = (GeoServer)
getServletContext().getAttribute(GeoServer.WEB_CONTAINER_KEY)

The getServletContext() was not found in the WebLogic servlet jars so I did
a hack and changed the code thus (config had been previously set from
getServletConfig()):

          GeoServer gs = (GeoServer)
config.getServletContext().getAttribute(GeoServer.WEB_CONTAINER_KEY)

It then compiled and ran correctly.

--
View this message in context: http://www.nabble.com/Struts-problem-when-porting-to-WebLogic-8.1-tf3768349.html#a10804878
Sent from the GeoServer - User mailing list archive at Nabble.com.