cancel
Showing results for 
Search instead for 
Did you mean: 

Precompiled JSP --> Error

Former Member
0 Kudos

We are using MI 25 SP 16 with NWDS 2.0.16. The problem we have is that when we develop a JSP application with the MDK plugin and create a WAR archive with pre compiled jsp we are not able to run the application. We deploy the application with the webconsole to get the link on the main page and run the application. The pre compiled JSPs need a updated web.xml which maps an url to a servlet (compiled jsp). The problem now is that url that is called by the link of the main page of the MI lead to a "not found" error - the mapped url is not found. Normally the initial page should be mapped to /start, right? But when we edit our web.xml to map the initial jsp to /start it doesn't work.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Michael

Check this thread

Thanks

Gopi

Answers (2)

Answers (2)

Former Member
0 Kudos

We solved it. The problem was that we had the old mappings:

<servlet>

<servlet-name>HomePage</servlet-name>

<jsp-file>/mts_start.jsp</jsp-file>

</servlet>

<servlet-mapping>

<servlet-name>HomePage</servlet-name>

<url-pattern>/start</url-pattern>

</servlet-mapping>

for the non compiled jsps and as we did a new extract he added the new mappings for the compiled servlets:

<servlet>

<servlet-name>mts_0005fstart</servlet-name>

<servlet-class>mts_0005fstart</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>mts_0005fstart</servlet-name>

<url-pattern>/mts_start.jsp</url-pattern>

</servlet-mapping>

We changed the last mapping to /start and so we had 2 different mapping to the same url pattern with which the tomcat obviously couldn't deal. As we deleted the first jsp-file mapping everything works fine now.

kishorg
Advisor
Advisor
0 Kudos

Hi Michael Belz,

There are many differences between the smart sync JSP Runtime application development using the NWDS 2.0.16 and the versions lower than 2.0.11.

From NWDS 2.0.11 onwards , application development / rutime has been changed to great extend.

In the case of 2.0.11 v and higher , we have one main controller file for handling all the events from all the JSP files associated with the application . This main controller is extending AbstractMEHttpServlet, which has so many overloaded methods.(this main controller is handling events). So the /start should be mapped to this main controller . This mapping will happen automatically at the time of building the application.

From web.xml file u will get the mapping information.

like ,

<servlet>

<servlet-name>MISMARTSYNCJSPAPP</servlet-name>

<servlet-class>miProjectPackage.<b>MiProjectClass</b></servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>MISMARTSYNCJSPAPP</servlet-name>

<url-pattern>/start</url-pattern>

</servlet-mapping>

<servlet-mapping>

<servlet-name>MISMARTSYNCJSPAPP</servlet-name>

<url-pattern>/servlet</url-pattern>

</servlet-mapping>

Here the MiProjectClass file is the main controller file.

In this class , doHandleEvent - called any subsequent time when an event on the web client occurs. The return parameter is String, which is the name of the JSP file to be displayed.. So in this method , u should have to set the nextJSP as the target page for your particular event.

Just have a look at this blog also...

/people/kishor.gopinathan/blog/2006/05/29/smart-sync-application-development-using-sp-09v-of-developer-studio

Regards

Kishor Gopinathan