How to call a servlet from a jsp form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How to call a servlet from a jsp form
Hello,
I know there is already a similar topic but it seems like this does not work in newer versions anymore. I am trying to call a Servlet from a custom jsp in Windchill 12.0.2.1.
The serlets url is <server>/Windchill/servlet/MyExportServlet. The servlet works fine when I paste this url in the browser.
I am generating the url in the jsp like you can see blow.
<%
String cb = WTProperties.getLocalProperties().getProperty("wt.server.codebase");
String action = cb + "/servlet/MyExportServlet";
%>
Then there is a form in the jsp that is supposed to call the servlet
<form action="<%=action%>">
....inputs
<button type="submit">Submit</button>
</form>
However when pressing submit the page seems to be reloading and the servlet is not called. There is no error or anything else.
Does anyone know how to do this?
Best regards
Solved! Go to Solution.
- Labels:
-
General Customization
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @TG_10272716
I guess that it should works.
try to use but it is same 😄
<input type="submit" value=" Submit ">
PetrH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @TG_10272716
I guess that it should works.
try to use but it is same 😄
<input type="submit" value=" Submit ">
PetrH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @HelesicPetr,
thank you for your reply.
It is actually working now, with <input type="submit" /> but also with <button type="submit" />
Looks like there was something else wrong.
Thank you