Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

Problem with JSP using WSAD

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am noticing a strange problem with WSAD while working with JSP files.
I have created a simple JSP file and try running it on the server, the result is a HTML page even with the JSP tags.
Eg:
My JSP File Looks like
HEAD
TITLE
TestJsp
/TITLE
/HEAD
BODY
out.println("THIS IS A SIMPLE JSP");
/BODY

(please ignore the syntax)
If we try running this file using a server configured in WSAD the result page will be blank and the source of the HTML file generated looks the same as the JSP file .
Does any one has a solution to this??
Thanks in Advance
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try enclosing your java code in an jsp scriptlet:
<% out.println("THIS IS A SIMPLE JSP"); >>
or
jsp expresssion:
<%= new String("THIS IS A SIMPLE JSP") %>
 
Craig Jackson
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please ignore the ">>", it of course should be ">".
Thanks.
 
sreekailas balan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.
It is already in the jsp scriplet tag.
My jsp is like this
<HTML>
<HEAD>
<TITLE>TestJsp</TITLE>
</HEAD>
<BODY>
<% out.println("THIS IS A SIMPLE JSP");%>
</BODY>
</HTML>
But the page generated does not compile the jsp and generates the html with the source code as below
<HTML>
<HEAD>
<TITLE>TestJsp</TITLE>
</HEAD>
<BODY>
<% out.println("THIS IS A SIMPLE JSP");%>
</BODY>
</HTML>
There is no jsp comiplation occuring. Can you tell me what could be the reason?
Thanks
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the extension of the file .JSP?
It looks like you have not told your Webserver it needs to propagate certain URI's requests to your JSP pages to WebSphere.
Do you have a web app installed in WebSphere Admin Console?
Is your JSP page in the right directory under this web app?
Did you regenerate the config-plugin and stop/start your webserver?
Good luck!
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi kailash.
r u the REC,Calicut guy.if so do mail me at iamkabs@yahoo.com
cheers!!!
kabs
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Wacko Jacko:
Is the extension of the file .JSP?
It looks like you have not told your Webserver it needs to propagate certain URI's requests to your JSP pages to WebSphere.
Do you have a web app installed in WebSphere Admin Console?
Is your JSP page in the right directory under this web app?
Did you regenerate the config-plugin and stop/start your webserver?
Good luck!



None of these apply (except for the theory). He's using WSAD, not standalone WAS. However, your theory that the web app doesn't know that this is a JSP is probably the correct one.
Kyle
 
sreekailas balan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies. Note that I am using WSAD and not WAS. The file name is given as .jsp only. It is also strange that if I develop a Jsp in any other editor and drag it into wsad it is working fine. But once I make any change and save the file it stops the jsp compilation and ignores all the jsp tags. It considers the file as a normal html file and prints out all the jsp code in the source. Does any body of you notice this with WSAD? In our office a lot of us are facing the problem.. I want to know whether it is a problem with WSAD or something has gone wrong in my settings
Thanks
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever I move something over to WASD, I use the import function to do it. (file/import) If I just drag it over to WASD, I always seem to have difficulty.
 
sreekailas balan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have detected the problem as a problem with the page editor. If we are changing the page editor to other editors like Textpad or Edit plus the jsp works fine. Can any one tell why the problem with the page editor in WSAD?
Thanks
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!