Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Using JSP inside equinox container
Using JSP inside equinox container [message #963160] Mon, 29 October 2012 16:06
bugra hasbek is currently offline bugra hasbek
Messages: 1
Registered: October 2012
Junior Member
Hi,

I am a first time poster so I apologize if this is the wrong forum for this question..

I am trying to use jsp inside equinox container. I am not very experienced in neither jsp nor osgi so i can't pinpoint my exact problem. Here is what i have done so far:

I have created a simple plugin project. My project structure is in ss.png (sorry i am not allowed to post pictures before sending 25 posts Sad )

In my activator class, I am creating an HttpServiceTracker object which registers my "/web" folder to "/".

in my web.xml, iam mapping test.jsp to "/test.jsp"
<web-app>
	<servlet>
		<servlet-name>test.jsp</servlet-name>
		<jsp-file>/test.jsp</jsp-file>
	</servlet>
	
	<servlet-mapping>
		<servlet-name>test.jsp</servlet-name>
		<url-pattern>/test.jsp</url-pattern>
	</servlet-mapping>
</web-app>



I have also added "org.eclipse.equinox.http.registry.servlets" to extensions as shown in ss2.png


here is my plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension point="org.eclipse.equinox.http.registry.servlets">
         <servlet
         alias="/test.jsp"
         class="org.eclipse.equinox.jsp.jasper.registry.JSPFactory:/">
      </servlet>
   </extension>
</plugin>



When i open localhost/test.jsp I expect to see a hello world page but instead i got an empty page.

if i register "/web" folder to "/test" and try to open localhost/test/test.jsp, jsp page is not being processed so an "open with" dialogue page is displayed as shown in ss3.png


btw i am trying to run my bundle from command line with "java -jar org.eclipse.osgi_3.7.0.v20110613.jar -console" command and all bundles start without a problem. But again i am not sure if there is a missing file. ss4.png shows all the active bundles in equinox container.

Any help is appreciated Smile
  • Attachment: facade.7z
    (Size: 1.94KB, Downloaded 139 times)
  • Attachment: screenshots.7z
    (Size: 660.34KB, Downloaded 189 times)
Previous Topic:Add pdf files to search index
Next Topic:Slow load in browser after reindexing for search
Goto Forum:
  


Current Time: Sat Oct 25 13:39:47 GMT 2014

Powered by FUDForum. Page generated in 0.03074 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software