Render a JSP page into HTML in a String
I am using a mail template system that gets templates as JSP pages placed in /WEB-INF/mailtemplates/
I want to internally parse JSPs as if they were real JSPs in my tomcat but:
- Get get them using getResourceAsStream (or any other way)
- make JSP engine translate JSP into HTML into a String object.
- Send a mail with this HTML. (this part is already finished)
What I need is a method with the following proposed signature:
public String getMailTemplate(java.io.InputStream jspPageStream, javax.servlet.HttpServletRequest request) {}
The method must get the JSP from the stream, render it into the HTML and return it as a String.
Of course, it must render the JSP as a real JSP, using the apserver JSP engine. It must so replace any tags and EL objects:
${session.user.name} -> The name of the user
<c:forEach, ...
etc. etc. etc.
�Any ideas / directions on how to achieve this?
thanks,
Ignacio
Ok, just tried it out myself, and I'm getting the same result you are.
Nothing makes it out to the RedirectingServletResponse.
It appears to be buffering it somewhere in the included page.
If you put a command to flush the buffer on the jsp page being included: <% out.flush; %> then it works.
So why doesn't it work normally? Why doesn't the call to requestDispatcher.include (or forward) flush/commit its response?
I will admit to being stuck on this one. I'm figuring its something in the internal workings of Tomcat/JSP to do with when a page is flushed or not, but I can't thing of anything right now.
Here is the test I put together to try this out (along with a few corrections to my previous code). I will admit to being stumped :-)
The response wrapper:
package web;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import javax.servlet.ServletOutputStream;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
public class RedirectingServletResponse extends HttpServletResponseWrapper {
RedirectServletStream out;
* @param arg0
public RedirectingServletResponse(HttpServletResponse response, OutputStream out) {
super(response);
this.out = new RedirectServletStream(out);
/* (non-Javadoc)
* @see javax.servlet.ServletResponse#flushBuffer()
public void flushBuffer() throws IOException {
out.flush();
/* (non-Javadoc)
* @see javax.servlet.ServletResponse#getOutputStream()
public ServletOutputStream getOutputStream() throws IOException {
return out;
/* (non-Javadoc)
* @see javax.servlet.ServletResponse#getWriter()
public PrintWriter getWriter() throws IOException {
return new PrintWriter(out);
/* (non-Javadoc)
* @see javax.servlet.ServletResponseWrapper#getResponse()
public ServletResponse getResponse() {
return super.getResponse();
/* (non-Javadoc)
* @see javax.servlet.ServletResponseWrapper#setResponse(javax.servlet.ServletResponse)
public void setResponse(ServletResponse arg0) {
super.setResponse(arg0);
private static class RedirectServletStream extends ServletOutputStream {
OutputStream out;
RedirectServletStream(OutputStream out) {
this.out = out;
public void write(int param) throws java.io.IOException {
out.write(param);
A JSP using this class: requestWrapperTest.jsp
<%@ page import="java.io.*" %>
<%@ page import="web.RedirectingServletResponse" %>
<%@ page contentType="text/html;charset=UTF8" %>
<%!
public String getEmailText(HttpServletRequest request, HttpServletResponse response, String emailURL) {
try{
// create an output stream - to file, to memory...
ByteArrayOutputStream out = new ByteArrayOutputStream();
// create the "dummy" response object
RedirectingServletResponse dummyResponse;
dummyResponse = new RedirectingServletResponse(response, out);
// get a request dispatcher for the email template to load
RequestDispatcher rd = request.getRequestDispatcher(emailURL);
// execute that JSP
rd.include(request, dummyResponse);
// at this point the ByteArrayOutputStream has had the response written into it.
dummyResponse.flushBuffer();
byte[] result = out.toByteArray();
System.out.println("result = " + result.length);
// now you can do with it what you will.
String emailText = new String(result);
return emailText;
catch (Exception e){
e.printStackTrace(System.out);
return "DANGER WILL ROBINSON!";
%>
<html>
<body>
<h2> Server Info Virtual!!</h2>
Server info = <%= application.getServerInfo() %> <br>
Servlet engine version = <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %><br>
Java version = <%= System.getProperty("java.vm.version") %><br>
<hr>
<%
String result = getEmailText(request, response, "/testLoad.jsp");
System.out.println(result);
%>
<%= result %>
</body>
</html>------------------------------------------------------------------
And the template page being included: testLoad.jsp
This is the page loaded for testing
<%
System.out.println("in the inner jsp");
// uncomment the following line to see this example work
//out.flush();
%>
Similar Messages
-
Capturing the output of a JSP page as HTML
Hi,
Can anyone tell me if this is possible. I have a JSP page that contains
information about an order that was just entered (Essentially a
confirmation page). What I want to do is somehow intercept the output
stream inside the JSP page and write it to a file, as plain html, which
I
will later attach to an email and send to someone.
Thanks,
Jordi
Jordi Pinyol Essi Projects
Ingeniero de Desarrollo
[email protected] t +34 977 221 182
http://www.essiprojects.com f +34 977 230 170You won't be able to "intercept" the output since it is the JSP page itself that is doing the writing.
Will the file that you write the output to reside on the client side or the server side? It sounds like you want to receive the HTML output not as something to view on the browser, but a file you can save and send and use later. If this is the case, one technique that might work is to take advantage of the servlet name mapping feature that is available for registered JSP pages.
Assuming your JSP pages are registered, you would map your JSP page like:
<servlet>
<servlet-name>confirmation</servlet-name>
<jsp-file>confirmation.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>confirmation</servlet-name>
<url-pattern>/confirmation.out</url-pattern>
</servlet-mapping>
What happens is that a request for the URL /NASApp/myapp/confirmation.out gets mapped to the confirmation.jsp JSP page. If you set your MIME type correctly in the JSP page, the HTML output from the JSP page is not properly recognized by the browser causing it to prompt you to save the file.
I have used this technique to generated CSV files from a JSP page. The browser is completely fooled.
JC
Jordi Pi?ol wrote:
>
Hi,
Can anyone tell me if this is possible. I have a JSP page that contains
information about an order that was just entered (Essentially a
confirmation page). What I want to do is somehow intercept the output
stream inside the JSP page and write it to a file, as plain html, which
I
will later attach to an email and send to someone.
Thanks,
Jordi
Jordi Pinyol Essi Projects
Ingeniero de Desarrollo
[email protected] t +34 977 221 182
http://www.essiprojects.com f +34 977 230 170 -
Ive just learned that i can use loadjava to load jsp pages into the database.
Ive just learned that i can use loadjava to load jsp pages into the database. How is that possible. How can someone go to my lets say, index.jsp page and actually see it if its inside the database? What authenticates it? Where would you set the parameters to tell http(apache) to look inside the db for the pages?
Any ideas?Thanks for the reply. If I put the file on the database, does it have to be in a particular location? I've put it on the database server, launched sql*plus (as APPS) and ran the following:
execute dbms_java.loadjava('-v', 'ZebraGetPrinterFromXML.class');
PL/SQL procedure successfully completed.Then when I try to run a process that uses this I get this:
ORA-29540: class ZebraGetPrinterFromXML does not exist -
How to add Jsp pages into existing portal (JDeveloper 9.0.4)
I am a jsp developer. I have to add a jsp page into existing portal. I am new to portal. Could anyone help me how to develop jsp using portal classes like PortletRenderRequest,ProviderSession and others.
Rigoberto, there should be no space between "-Xbootclasspath/p:" and the path "C:\oracle\infra\jdbc-10.1.0.4\ojdbc14.jar;C:\oracle\infra\jdbc-10.1.0.4\orai18n.jar"
By the way, one can always take a look at the logs at
$ORACLE_HOME/opmn/logs
especially those files whose names start with OC4J~ if there is some wrong with oc4j processes. Those files are the default oc4j stout and sterr. If oc4j can not init, there should be some kind of error message in them.
By the way, the following line may be deleted since no property file is specified.
<data id="oc4j-options" value="-properties"/>
Hope this helps. -
Exporting Content of a JSP page into Excel Spread Sheet
I am trying to export the content of a JSP page into an excel spread sheet. I know this issue had been posted before, but if you any one has the source code of a sample that's working please send it to me at [email protected]
Your help is appreciated.
Jamais.http://forum.java.sun.com/thread.jspa?threadID=664249
-
Including a JSP page into a JSF page
Hi !!
I have read some posts here about <f:subwview>. There says to use:
<f:subview>
<jsp:include page="somepage.jsp"/>
</f:subview>But it does not work.
How can i include a jsp page into a JSF page?
Thanks !!!Hi,
Replace <jsp:include page="somepage.jsp">
with <%@ include file="datasetView.jspf" %>
See thread: http://forum.java.sun.com/thread.jspa?messageID=3413354� -
Convert jsp page into xml or dom for search
Hello everyone,
I have to build an application that searches for message beans in all jsp page. I did it the traditional way, using scanner and string methods. Its working but its not perfect. So i want to convert all my jsp page into xml format and then process them. My jsp pages are quite complicated. I used some jars that convert them into jspx . But its not working. Please help
Thanks in advanceWell its like this.I need to develop a program that reads all the message bean keys.. We have lots of struts webapps. All messages in the jsp pages have been externalised and internationalised. Now i have to build a program that given a webapp path prints out all the message bean keys used in the webapp. I have developed the program using the Plexus Directory scanner to filter all the jsp pages and java util Scanner to read line by line and used String functions to search for keys.
Now thats not the best soultion. The best way, imo, is to cinvert the jsp into xml pages and then we can parse the xml pages easily. The' problem is to find a way to convert the jsp pages(jstl +javascript) into xml.
Can you help me out?
Thanks -
How to convert a JSP page into a PDF file?
I am calculating and generating a bill in JSP?
I want the output JSP page from the server to get converted to a PDF file.
How to do this?
Please help me doing this!Hai CeciNEstPasUnProgrammeur
Actually I didnt mean what you are asking?
I will put it in this way,
I am having a JSP output.
If I save that page in the browser it should get
saved as a PDF File,
This is my problem,As far as I can see, you have two options:
1) Ensure you have some kind of rendering tool installed on the server, render your JSP to that engine, capture the output as an image and transform the image to a PDF. Or a variation on that server-side theme.
2) Take the data you would be/are pushing into a JSP, offer a "download" facility that just takes that data and wraps it into a PDF. Your server then serves out that PDF file.
To save the browser view (your JSP) as a PDF each client machine would need to be set up with some mechanism to capture and save as PDF. You can't control that.
I've had to do something similar in the past. In that case though we had a simplar task of just generating a stored HTML file that we could store in the DB and lock down. Our approach was to use XSLT over the generated XML data structure.
I'd advise you doing the same and generating an XML file and then running an XSLT/FO process over it to generate your PDF file. Don't try to do all the fancy stuff on the client environment, that's an environment you usually have very little control over. -
How to render a JSP page dynamically with JSF controls ??
Hi All,
I am new to JAVA and JSF. I am recently started doing a web project. First we started using plain JSP and servlets and now we are going to use JSF.
Now I am facing one problem with JSF. In a JSP page, I am having a combobox and a div and when i am selecting a value from the combo box, the div should be filled with some controls(like text boxes and comboboxes, buttons, etc) according to the selection.
I have done this in plain JSP with the help of XML/XSLT, AJAX and JavaScript. i.e. XML contains the details of the controls and XSLT transformer will give me controls in a string format in the server, AJAX helps to retrieve it and I have to simply set the div.innerHTML property to that string. It is working fine.
Now with JSF, I need to add JSF controls into my XML file, and it inturn returns the corresponding string having JSF controls easily, but i could not set it directly to div's innerHTML as the String contains JSF controls (Moreover, these JSF controls are linked with JAVA beans).
Is there any provision to add JSF controls to a running page dynamically or is there any provision to convert the above mentioned string of JSF controls to normal HTML controls like the JSF taglibraries doing.??
thanks in advance
noushad
Edited by: naash007 on Apr 20, 2009 4:17 AM
Edited by: naash007 on Apr 20, 2009 5:45 AMThat's simply asking for trouble. Do not suggest to use JSTL in combination with JSF.
JSF already provides almost everything which the JSTL flow control tags provides in flavour of the 'rendered' attribute. -
Combine two jsp pages into single
hai how to combine two jsp pages in to one
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import com.latchiya.Constants;
import com.latchiya.model.Staffinfo;
import com.latchiya.service.Manager;
import com.latchiya.webapp.form.StaffinfoForm;
* Action class to handle CRUD on a Staffinfo object
* @struts.action name="staffinfoForm" path="/staffinfos" scope="request"
* validate="false" parameter="method" input="mainMenu"
* @struts.action name="staffinfoForm" path="/editStaffinfo" scope="request"
* validate="false" parameter="method" input="list"
* @struts.action name="staffinfoForm" path="/saveStaffinfo" scope="request"
* validate="true" parameter="method" input="edit"
* @struts.action-forward name="edit" path="/WEB-INF/pages/staffinfoForm.jsp"
* @struts.action-forward name="list" path="/WEB-INF/pages/staffinfoList.jsp"
* @struts.action-forward name="search" path="/staffinfos.html" redirect="true"
public final class StaffinfoAction extends BaseAction {
public ActionForward cancel(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
return mapping.findForward("search");
public ActionForward delete(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
if (log.isDebugEnabled()) {
log.debug("Entering 'delete' method");
ActionMessages messages = new ActionMessages();
StaffinfoForm staffinfoForm = (StaffinfoForm) form;
// Exceptions are caught by ActionExceptionHandler
Manager mgr = (Manager) getBean("manager");
Staffinfo staffinfo = (Staffinfo) convert(staffinfoForm);
mgr.removeObject(Staffinfo.class, staffinfo.getStaffId());
messages.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("staffinfo.deleted"));
// save messages in session, so they'll survive the redirect
saveMessages(request.getSession(), messages);
return mapping.findForward("search");
public ActionForward edit(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
if (log.isDebugEnabled()) {
log.debug("Entering 'edit' method");
StaffinfoForm staffinfoForm = (StaffinfoForm) form;
// if an id is passed in, look up the user - otherwise
// don't do anything - user is doing an add
if (staffinfoForm.getStaffId() != null) {
Manager mgr = (Manager) getBean("manager");
Staffinfo staffinfo = (Staffinfo) convert(staffinfoForm);
staffinfo = (Staffinfo) mgr.getObject(Staffinfo.class, staffinfo.getStaffId());
staffinfoForm = (StaffinfoForm) convert(staffinfo);
updateFormBean(mapping, request, staffinfoForm);
return mapping.findForward("edit");
public ActionForward save(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
if (log.isDebugEnabled()) {
log.debug("Entering 'save' method");
// Extract attributes and parameters we will need
ActionMessages messages = new ActionMessages();
StaffinfoForm staffinfoForm = (StaffinfoForm) form;
boolean isNew = ("".equals(staffinfoForm.getStaffId()) || staffinfoForm.getStaffId() == null);
Manager mgr = (Manager) getBean("manager");
Staffinfo staffinfo = (Staffinfo) convert(staffinfoForm);
mgr.saveObject(staffinfo);
// add success messages
if (isNew) {
messages.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("staffinfo.added"));
// save messages in session to survive a redirect
saveMessages(request.getSession(), messages);
return mapping.findForward("search");
} else {
messages.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("staffinfo.updated"));
saveMessages(request, messages);
return mapping.findForward("edit");
public ActionForward search(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
if (log.isDebugEnabled()) {
log.debug("Entering 'search' method");
Manager mgr = (Manager) getBean("manager");
request.setAttribute(Constants.STAFFINFO_LIST, mgr.getObjects(Staffinfo.class));
return mapping.findForward("list");
public ActionForward unspecified(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
return search(mapping, form, request, response);
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;
import com.latchiya.Constants;
import com.latchiya.webapp.form.UploadForm;
* This class handles the uploading of a resume (or any file) and writing it to
* the filesystem. Eventually, it will also add support for persisting the
* files information into the database.
* <p>
* <i>View Source</i>
* </p>
* @author Matt Raible
* @struts.action name="uploadForm" path="/uploadFile" scope="request"
* validate="true" input="failure"
* @struts.action-forward name="failure" path="/WEB-INF/pages/uploadForm.jsp"
* @struts.action-forward name="success" path="/WEB-INF/pages/uploadDisplay.jsp"
public class UploadAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
// Did the user click the cancel button?
if (isCancelled(request)) {
request.removeAttribute(mapping.getAttribute());
return (mapping.findForward("mainMenu"));
//this line is here for when the input page is upload-utf8.jsp,
//it sets the correct character encoding for the response
String encoding = request.getCharacterEncoding();
if ((encoding != null) && (encoding.equalsIgnoreCase("utf-8"))) {
response.setContentType("text/html; charset=utf-8");
UploadForm theForm = (UploadForm) form;
//retrieve the name
String name = theForm.getName();
//retrieve the file representation
FormFile file = theForm.getFile();
//retrieve the file name
String fileName = file.getFileName();
//retrieve the content type
String contentType = file.getContentType();
//retrieve the file size
String size = (file.getFileSize() + " bytes");
String data = null;
String location = null;
// the directory to upload to
String uploadDir =
servlet.getServletContext().getRealPath("/resources") + "/"
+ request.getRemoteUser() + "/";
//write the file to the file specified
File dirPath = new File(uploadDir);
if (!dirPath.exists()) {
dirPath.mkdirs();
//retrieve the file data
InputStream stream = file.getInputStream();
//write the file to the file specified
OutputStream bos = new FileOutputStream(uploadDir + fileName);
int bytesRead = 0;
byte[] buffer = new byte[8192];
while ((bytesRead = stream.read(buffer, 0, 8192)) != -1) {
bos.write(buffer, 0, bytesRead);
bos.close();
location = dirPath.getAbsolutePath()
+ Constants.FILE_SEP + file.getFileName();
//close the stream
stream.close();
// place the data into the request for retrieval on next page
request.setAttribute("friendlyName", name);
request.setAttribute("fileName", fileName);
request.setAttribute("contentType", contentType);
request.setAttribute("size", size);
request.setAttribute("data", data);
request.setAttribute("location", location);
//destroy the temporary file created
file.destroy();
//return a forward to display.jsp
return mapping.findForward("success");
===========================================================================================
i want to get second jsp file ie upload file to student file
if anybody know please tell i am new to java side
regards
rangaur not able to give solution
insted giving comment mind ur words being in software fied
commentting like bad words not good i warn u mind ur words -
How to convert text values acceses from jsp page into an xml file?
/* this is the jsp page which i want to convert it into an xml file
please help me , i thank in advance*/
<html>
<head>
<title> xml test</title>
</head>
<body>
<form action="testxml2.jsp" method = post>
<ul>
<li>
<ul>NAME:
<br>
<li>First Name:<INPUT NAME="firstName" TYPE=text SIZE=20><br>
<li>Middle Name:<INPUT NAME="middlename" TYPE=text SIZE=20><br>
<li>Last Name:<INPUT NAME="lastname" TYPE=text SIZE=20><br>
<li>t Name:<INPUT NAME="tname" TYPE=text SIZE=20><br>
</ul>
<br>
<ul>Role:</b><p><input type="radio" name="role" value="buyer">Buyer<p>
<input type="radio" name="role" value="seller">Seller<p>
<input type="radio" name="role" value="thirdparty">Third Party<p>
</ul>
<ul>
Qualification:<br>
<li>Highest Degree:<INPUT NAME="degree" TYPE=text SIZE=20><br>
<li>Percentage: <INPUT NAME="percentage" TYPE=text SIZE=20><br>
</ul>
<ul> Adress:
<li> streetName:<INPUT NAME="street" TYPE=text SIZE=20><br>
<li>cityName:<INPUT NAME="city" TYPE=text SIZE=20><br>
<li>StateName:<INPUT NAME="state" TYPE=text SIZE=20><br>
</ul>
</ul>
<b>
<INPUT TYPE=SUBMIT VALUE="ENTER" >
</body>
</html>hi there,
In the MCV there is a part about struts, this is a descent way to do this.
how to do it:
create an actionform containing all the properties of the page.
then when you submit your form use an method in the actionforms (that you have written) that makes sets your data in a xml file.
this works very quickely and i use it in production...
you can choose if you want the xml to generaded hard coded or via a parser.
greetings -
How can I send email from an JSP page with HTML format either using jsp
hi,
I have an jsp page with online application form,after compleating the form if i select submit it will send all the compleated data to the mail id we mentioned in the form tag,for this i am using javascript,but instead of receiving the data in the format of strings,my client want to receive the data in the same format as he's filling in the jsp page(html format) through e-mail.any help would be appreciated.the fallowing is the code right now i am using for email application.
<code>
function send()
if(validatePersonalInfo(document.theform))
document.theform.submit()
location.href=location.reload()
function validatePersonalInfo(form)
var tmpStr ="";
if (form.Name.value == "") {
tmpStr = "Name";
document.all.dName.style.visibility="visible";
document.theform.Name.focus();
else{
document.all.dName.style.visibility="hidden";
if (form.SSN.value == "") {
tmpStr = tmpStr + ", Social Security Number";
document.all.dSSN.style.visibility="visible";
if(form.Name.value != "")
{document.theform.SSN.focus();}
else{
document.all.dSSN.style.visibility="hidden";
if (tmpStr == "") {
return true;
} else {
alert("Please Fill the Following Fields: " + tmpStr);
return false;
<FORM NAME="theform" METHOD="post"
ACTION="mailto:[email protected]?subject=Online Application Form for MinorityDealer." ENCTYPE="text/plain">
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="10" NOF="LY">
<TH>
<P>
<FONT SIZE="3" FACE="Arial,Helvetica,Univers,Zurich BT">Online�Application</font></TH><BR>
</TABLE>
<table width="718" border="1" cellspacing="0" cellpadding="3" bgcolor="#CCCCFF" align="center">
<tr>
<td colspan="2"><font class="captionText">Name*�</font><br><input type="text" size="25" name="Name" class="bodyText">
<div id="dName" name="dName" style="position:absolute;visibility:hidden"><font color="red">Name is Mandatory*</font></div>
</td>
<td colspan="2"><font class="captionText">Social Security Number*�</font><br><input type="text" size="9" name="SSN" class="bodyText">
<div id="dSSN" name="dSSN" style="position:absolute;visibility:hidden"><font color="red">SSN is Mandatory*</font></div></td>
</tr>
<tr>
<td colspan="2"><font class="captionText">Total Personal Assets</font><br><input type="text" size="10" name="TotPersAss3" class="bodyText"></td>
<td colspan="2"><font class="captionText">Total Personal Liabilities & NetWorth</font><br><input type="text" size="10" name="TotPerLiab3" class="bodyText"></td>
</tr>
</tr>
</TABLE>
<IMG Valign="middle" name="imgSubmit" src="images/buttons/Submit.gif" width="66" height="29" border="0" alt="Submit">
</code>Can any one do some help to solve this problem.
Regards. -
PAR files and jsp pages into NWDS
Hi,
I need to modify transactions from the MSS 50.x package, i.e. HR transactions. I need to delete some fields on the screens.
The sysadmin was giving me a par file
com.sap.pct.hcm.attendanceoverviewperiod.par.bak
But when I import the par file into NWDS, the only thing I see is the portalapp.xml and a bunch of attribute files.
No jsp page, no class files..
When I browse into the directoria via sysadmin/support/portal runtime via WEB-INF, I do see all the necessary files. But how do I get the whole bunch of classes, jsp etc into NWDS? Download all single elements and put them manually into a NWDS project? There must be a better way
Any help will be gracefully awardedI tried it, but when I follow your instruction, NWDS gives me an error in the import wizard "<dir> does not have a .project file".
If I look in the .par file, there is no .project file at all.
I looked in the download of the PCD, there is no .project file either, but at least the java classes and the jsp.
Is it removed intentionally? Probably because it is an SAP business package? -
How to deploy a JSP page into my APEX application?
hi all,
i am using a JSP to upload multiple spreadsheets into the db. i want to deploy it on the APEX and use it as part of my APEX application's uploading feature.
i already have the JSP file with me. can somebody please tell me how to put that onto the APEX?
Thanks,
BasavarajOne way using JSP portal is, creating Portal project with JSP Dynpage applications
You can use NWDS tool to create JSP Dynpage based Portal components.
Procedure to create and deploy Portal components,
1. Open Enterprise Portal Perspective in NWDS
2. Create -> new Portal Project -> Give the valid name
3. Right click on the project -> Choose Portal Object -> JSP Dynpage -> Give all the information including JSP name. -> Finish
4. Right Click on the project structure -> Properties -> Java Build Path -> All the following jars
htmlb, com.sap.portal.html_api.jar, servlet
5. Navigate to your JSP page located under the folder PORTAL-INF, Write logic
6. Right click on the portal projet-> Refresh -> Re-Build
7. Right Click on the portal project -> Export -> Give the Valid Portal serverdetails, Admin user name and password
8. You can create iView (iView from PAR) in content admin for the developed portal component
Ram -
Sending colour from a JSP page into a MySQL database field
Dear All,
I am working on trying to send different colours into a MySQL database field from a JSP page.
This is so that I can represent different pieces of data on my webpage tables in different colours providing status depending on the user request.
What is the best way to write JSP code for this?
thanks,
AlasdairDouble-posted:
http://forum.java.sun.com/thread.jspa?threadID=598637
Maybe you are looking for
-
Levels/Layer Question. HELP!
Okay. So I use Elements 6.0 to create graphics and such. I know, kinda geeky. But all of a sudden, when I try to create layer masks (since elements does not have the mask tool), it doesn't work like it used to. Here is an example: So I start out with
-
Issue setting up PXE Enabled Distribution point for SCCM 2012.
I'm trying to set up SCCM 2012 in my Lab Enviroment in order to plan for implmentation to production. I have installed and Configure one Primary site which has a working DP role width PXE /WDS. And i am able to successfully do and OS Deployment. I wa
-
Highly customized JList- change selection logic
I've written a highly customized JList that lays cells out horizontally, wrapping, and is editable. This is presenting a problem with one piece of default JList behaviour that I need to change or remove and install my own functionality. My JList can
-
Take the JTable Challenge !
The concept: Server side return search result to client. if it is the first record, (#1); call cl*** to create JTable and all other user insertRow(); function to update *********problem here is my code. please guide me and teach me what i suppose to
-
How to uninstall DNG converter5.6 on windows 7 before installing 6.6 version
how to uninstall DNG converter 5.6 version on windows 7 before install 6.6 version