on ‎2008 Oct 07 2:29 PM
Hello,
Why this forum? this post is related to the way of calling a java servlet deployed on the java stack, so it's related to the structure of the stack than to real java programming.
Usually, I develop JSP servlets which are easily called either with a mapping or not. I have deployed now a java servlet and added a mapping to it by modifying the xml source itselft in its descriptor, but after deployement I am not able to reach the resource.
In the windows explorer of the java stack I find in j2ee>cluster>server>apps my application as follows:
app_ear>servlet_jsp>app>root>WEB-INF>classes>my class files
app_ear>servlet_jsp>app>root>app.jsp
This time it's not a jsp that I want to call: app/app.jsp but my java servlet which lies in the classes subdir.
Could someone help my to achieve this or is it the wrong way, we can only request jsp applications?
Kind regards,
Tanguy Mezzano
Request clarification before answering.
Hi Tanguy,
you have mapped unexisting servlet to "/SSOredirect3" url-pattern.
I assume that you need to map SSORedirect3.jsp servlet , previously declared.
So the corrected tags should look like :
<servlet>
<servlet-name>SSORedirect3.jsp</servlet-name>
<jsp-file>/SSORedirect3.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>SSORedirect3.jsp</servlet-name>
<url-pattern>/SSOredirect3</url-pattern>
</servlet-mapping>This way when you request http://host:port/SSOredirect3 it should be imvoked SSORedirect3.jsp servlet.
Best Regards
Bojidar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, but then you should declare this class as a servlet:
<servlet>
<servlet-name>AuthenticatorServlet</servlet-name>
<servlet-class>x.y.z.Authenticator</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AuthenticatorServlet</servlet-name>
<url-pattern>/SSOredirect3</url-pattern>
</servlet-mapping>
HTH!
\-- Vladimir
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.